/* Fancy Styles for Modern Portfolio */

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 30px; /* For fixed header */
}

body {
  color: var(--text-color);
  background-color: var(--bg-color);
  font-family: var(--font-primary);
  line-height: 1.6;
  letter-spacing: 0.01em;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%239C92AC' fill-opacity='0.05' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  position: relative;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-spacing: normal;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23333' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: -1;
}

body.dark-mode::before {
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23eee' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Theme Variables */
:root {
  /* Light Mode - Warm Blue Palette */  
  --primary-color: #2a4d69; /* Warm dark blue */
  --secondary-color: #4b86b4; /* Medium blue */
  --accent-color: #3a6ea5; /* Slate blue */
  --accent-gradient: linear-gradient(135deg, #2a4d69, #3a6ea5);
  --success-color: #4d8d74; /* Deep teal */

  --bg-color: #fffcf7; /* Lighter ivory background */
  --surface-color: #fdfaf5; /* Lighter ivory surface */
  --surface-color-hover: #f7f4ef; /* Slightly darker on hover */
  --card-bg: #fffefb; /* Very light ivory cards */
  
  --text-color: #3c3128; /* Rich dark brown */
  --text-color-highlight: #ae9682;
  --text-muted: #6d6359; /* Warm taupe */
  --heading-color: #2a4d69; /* Match primary color */
  
  --border-color: rgba(42, 77, 105, 0.15); /* Blue-tinted border */
  --divider: rgba(42, 77, 105, 0.08); /* Light blue divider */
  
  --shadow-sm: 0 2px 8px rgba(42, 77, 105, 0.08);
  --shadow-md: 0 4px 12px rgba(42, 77, 105, 0.12);
  --shadow-lg: 0 8px 24px rgba(42, 77, 105, 0.15);
  --shadow-accent: 0 5px 15px rgba(42, 77, 105, 0.25);
  
  /* Fonts - Unchanged */
  --font-primary:"Montserrat", sans-serif;
  --font-secondary: "Montserrat", sans-serif;
  
  /* Spacing - Unchanged */
  --spacing-unit: 1rem;
  --spacing-xs: calc(var(--spacing-unit) * 0.25);
  --spacing-sm: calc(var(--spacing-unit) * 0.5);
  --spacing-md: var(--spacing-unit);
  --spacing-lg: calc(var(--spacing-unit) * 1.5);
  --spacing-xl: calc(var(--spacing-unit) * 2);
  --spacing-xxl: calc(var(--spacing-unit) * 3);

  /* Borders - Unchanged */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-circle: 50%;

  /* Transitions - Unchanged */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.5s cubic-bezier(0.5, -0.5, 0.1, 1.5);

  /* New variables for author links */
  --primary-color-rgb: 42, 77, 105;
  --accent-color-rgb: 58, 110, 165;
}

/* Dark Mode - Warm Gray Palette */
body.dark-mode {
  --primary-color: #5d8cb3; /* Keep blue as primary color */
  --secondary-color: #4a7ba8; /* Slightly darker blue */
  --accent-color: #81a4cd; /* Light blue accent */
  --accent-gradient: linear-gradient(135deg, #5d8cb3, #81a4cd);
  --success-color: #4d8d74; /* Teal green */
  
  --bg-color: #2d2723; /* Warm dark brown-gray */
  --surface-color: #36302b; /* Slightly lighter warm gray */
  --surface-color-hover: #413a35; /* Medium warm gray hover */
  --card-bg: #33302c; /* Dark warm gray card */
  
  --text-color: #f1ece6; /* Lighter warm off-white */
  --text-color-highlight: #eabf8a; /* Lighter warm off-white */
  --text-muted: #ccc3bd; /* Lighter muted beige */
  --heading-color: #c8d8e8; /* Light blue-gray heading */
  
  --border-color: rgba(193, 214, 233, 0.15); /* Light blue-gray border */
  --divider: rgba(193, 214, 233, 0.08); /* Subtle blue-gray divider */
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 5px 15px rgba(93, 140, 179, 0.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.03' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  background-color: var(--bg-color);

  /* New variables for author links in dark mode */
  --primary-color-rgb: 93, 140, 179;
  --accent-color-rgb: 129, 164, 205;
}

.author-name {
  color: var(--accent-color);
  font-weight: 700;
  animation: auhtor-blink 10s infinite;
}

/* Container Layout */
.container {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

@keyframes auhtor-blink {
  0% {
    color: var(--accent-color);
  }
  50% {
    color: var(--success-color);
  }
  100% {
    color: var(--accent-color);
  }
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: var(--spacing-xl);
  position: fixed;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  scrollbar-width: none; /* For Firefox */
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
}

/* Hide the scrollbar for WebKit browsers (Chrome, Safari, etc.) */
.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Profile Section */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: var(--spacing-xl);
  text-align: center;
}

.profile-img-wrapper {
  width: 150px;
  height: 150px;
  border-radius: var(--border-radius-circle);
  border: 4px solid transparent;
  background: var(--accent-gradient);
  padding: 3px; /* Creates gradient border effect */
  animation: float 10s infinite ease-in-out;
  display: inline-block;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.profile img {
  width: 100%;
  border-radius: var(--border-radius-circle);
  object-fit: cover;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-bounce), box-shadow var(--transition-normal);
}

.profile img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-accent);
}

.profile h1 {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  animation: heading-color-change 5s infinite ease-in-out;
  cursor: default;
}

@keyframes heading-color-change {
  0%, 100% {
    color: var(--heading-color);
  }
  50% {
    color: var(--success-heading-color);
  }
}

/* Social Links */
.social {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.social a {
  color: var(--text-muted);
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.social a:hover {
  color: white;
  background: var(--accent-gradient);
  transform: translateY(-5px) rotate(22.5deg);
  box-shadow: var(--shadow-accent);
  text-decoration: none;
}

/* Prevent underline effect on social links */
.social a:after,
.social a:hover:after {
  content: none !important;
  transform: scaleX(0) !important;
  width: 0 !important;
  height: 0 !important;
}

/* Navigation Links */
.nav-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--spacing-sm);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.nav-links a {
  position: relative;
  font-family: var(--font-secondary);
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing-sm) * 1.5) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: all var(--transition-normal);
  overflow: hidden;
  letter-spacing: -0.5px;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-gradient);
  transform: scaleY(0);
  transition: transform var(--transition-normal);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  transform: scaleY(1);
}

.nav-links a i {
  margin-right: var(--spacing-md);
  width: 24px;
  text-align: center;
  font-size: 1.1rem;
  transition: transform var(--transition-normal);
}

.nav-links a:hover i,
.nav-links a.active i {
  transform: scale(1.2);
  color: var(--primary-color);
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--surface-color-hover);
  transform: translateX(5px);
  color: var(--primary-color);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.nav-links a span {
  position: relative;
  z-index: 1;
}

/* Main Content Styling */
.main-content {
  flex: 1;
  padding: var(--spacing-xxl);
  margin-left: 280px;
  transition: margin-left var(--transition-normal);
}

/* Section Styling with Animations */
.section {
  position: relative;
  padding: var(--spacing-xxl) 0;
  margin-bottom: var(--spacing-xxl);
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--divider);
}

.section:last-child::after {
  display: none;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
  color: var(--heading-color);
  text-shadow: 0px 1px 1px rgba(0,0,0,0.1);
  font-family: var(--font-secondary);
  font-weight: 700;
  letter-spacing: -0.5px;
  cursor: default;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50%;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(42, 77, 105, 0.25);
  transition: width 0.3s ease;
}

.section:hover h2::after {
  width: 100%;
}

/* About Section Styling */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-img {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  width: 100%;
  min-width: 200px;
}

.about-img:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-accent);
}

.about-img img {
  width: 100%;
  display: block;
  transition: transform var(--transition-slow);
}

.about-img:hover img {
  transform: scale(1.05);
}

.typewriter-box {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  width: 100%;
  border-right: 2px solid transparent;
  overflow: hidden;
  white-space: nowrap;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.5em;
  background-color: currentColor;
  margin-left: 8px;
  animation: blink 0.8s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

#contact-list {
  list-style: none;
  margin-bottom: var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--spacing-md);
}

#contact-list li {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-normal);
}

#contact-list li:hover {
  background-color: var(--surface-color-hover);
  transform: scale(1.02) translateX(5px);
}

#contact-list li strong {
  color: var(--primary-color);
  margin-right: var(--spacing-sm);
  font-weight: 500;
}

#contact-list li a {
  color: var(--text-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

#contact-list li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

#contact-list li a:hover::after {
  width: 100%;
}

.about-info p {
  margin-bottom: var(--spacing-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  animation-delay: calc(var(--item-index, 0) * 0.2s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.introduction-item {
  margin: 1em 0;
  padding: 0.5rem 0;
  transition: all var(--transition-normal);
}

.introduction-item:hover {
  transform: scale(1.005);
}

/* News Section */
.news-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.news-item {
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-sm);
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--primary-color);
  opacity: 0;
  transform: translateY(20px);
}

.news-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.news-item:hover {
  transform: scale(1.01) translateY(-5px) !important;
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-color);
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.news-date {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.news-date::before {
  content: '📅';
  margin-right: var(--spacing-xs);
  font-size: 0.8rem;
}

.news-content {
  color: var(--text-color);
  line-height: 1.6;
  font-size: 1rem;
}

/* Special styling for emojis in news content */
.news-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Publication Section */
.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.pub-item {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  border-left: 3px solid var(--primary-color);
  align-items: center;
  background: linear-gradient(to right, var(--card-bg), var(--bg-color));
}

.pub-item::before {
  content: none;
}

.pub-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pub-img {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.pub-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
  vertical-align: middle;
  margin: auto;
  border-radius: var(--border-radius-md);
}

.pub-item:hover .pub-img img {
  transform: scale(1.05);
}

.pub-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pub-details h3 {
  font-family: var(--font-secondary);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-normal);
}

.pub-item:hover .pub-details h3 {
  color: var(--primary-color);
}

.pub-details .authors {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
}

.pub-details .venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--spacing-md);
}

.pub-details .links {
  display: flex;
  gap: var(--spacing-md);
}

.pub-details .links i {
  padding-right: var(--spacing-sm);
}

.pub-details .links a {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--surface-color);
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.pub-details .links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

/* Author links styling - updated to be more compact */
.author-link {
  position: relative;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
  display: inline;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  transform-origin: center;

}

.author-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.author-link:hover {
  cursor: pointer;
  color: var(--accent-color);
  transform: scale(1.05) translateY(-1px);
}

.author-link:hover::after {
  width: 100%;
}

/* Animation for author links on pub-item hover - simplified */
.pub-item:hover .author-link {
  animation: none;
}

/* Reduce spacing in authors list */
.authors {
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  letter-spacing: normal;
  white-space: normal;
  hyphens: none;
}

.authors span, .authors a {
  margin-right: 0;
  display: inline;
}

/* Override the global word-spacing that might be causing the issue */
body .authors,
.pub-details .authors {
  hyphens: none;
  text-align: left;
}

/* Mobile responsive styling for author links */
@media (max-width: 768px) {
  .authors {
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
  }
  
  .author-link {
    display: inline;
    margin: 0;
  }
  
  .author-link:active {
    color: var(--accent-color);
    transform: none;
  }
}

/* Resume Section */
.resume-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.resume-column h3 {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  color: var(--heading-color);
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
  padding-bottom: var(--spacing-xs);
}

.resume-column h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--border-radius-sm);
  transition: width var(--transition-normal);
}

.resume-column h3:hover::after {
  width: 100%;
}

.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  background-color: var(--card-bg);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  z-index: 1;
  border-top: 2px dashed var(--border-color);
  border-right: 2px dashed var(--border-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--spacing-xl));
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--accent-color);
  border: 3px solid var(--surface-color);
  box-shadow: 0 0 0 3px var(--border-color);
  z-index: 2;
  transition: all var(--transition-normal);
}

/* Basic hover effects (apply to all timeline items) */
.timeline-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.timeline-item:hover::before {
  background: var(--accent-color);
  box-shadow: 0 0 0 4px var(--primary-color), 0 0 20px var(--primary-color);
  transform: translateY(-50%) scale(1.2);
}

/* Present/ongoing position styling (overrides basic styles) */
.timeline-item.timeline-item-present::before {
  background: var(--success-color); /* Use theme variable instead of hardcoded color */
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 4px var(--surface-color);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(61, 106, 89, 0.3), 0 0 0 10px rgba(61, 106, 89, 0.1);
  }
  100% {
    box-shadow: 0 0 0 4px var(--surface-color);
  }
}

/* Present/ongoing hover styling (overrides basic hover) */
.timeline-item-present:hover::before {
  background: #2a5445; /* Darker teal on hover */
  box-shadow: 0 0 0 4px var(--primary-color), 0 0 20px rgba(61, 106, 89, 0.6);
  transform: translateY(-50%) scale(1.2);
}

.timeline-item .institution {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading-color);
  margin-bottom: var(--spacing-xs);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-secondary);
}

.timeline-item .location,
.timeline-item .advisor {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: normal;
  margin-left: var(--spacing-sm);
  display: block;
  width: 100%;
  margin-top: var(--spacing-xs);
}

.timeline-item .date-pill {
  display: inline-block;
  padding: 3px 10px;
  background-color: rgba(42, 77, 105, 0.1);
  border-radius: 0; /* Square corners for typewriter style */
  font-size: 0.8rem;
  color: var(--primary-color);
  margin: var(--spacing-sm) 0;
  font-family: var(--font-secondary);
  border: 1px dashed rgba(42, 77, 105, 0.2);
}

.timeline-item .role {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-family: var(--font-secondary);
  letter-spacing: -0.5px;
}

.timeline-item ul {
  list-style-type: none;
  margin-top: var(--spacing-sm);
}

.timeline-item ul li {
  margin-bottom: var(--spacing-xs);
  position: relative;
  padding-left: var(--spacing-md);
}

.timeline-item ul li::before {
  content: '•';
  color: var(--primary-color);
  position: absolute;
  left: -0.5em;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-circle);
  background-color: var(--card-bg);
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.dark-mode-toggle:hover {
  transform: rotate(45deg);
  box-shadow: var(--shadow-accent);
}

.dark-mode-toggle .fa-moon,
.dark-mode-toggle .fa-sun {
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.dark-mode-toggle .fa-moon { opacity: 1; transform: scale(1); }
.dark-mode-toggle .fa-sun { opacity: 0; transform: scale(0); position: absolute; }

body.dark-mode .dark-mode-toggle .fa-moon { opacity: 0; transform: scale(0); }
body.dark-mode .dark-mode-toggle .fa-sun { opacity: 1; transform: scale(1); }

/* Scroll to Top Button */
#scroll-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-circle);
  background: var(--accent-gradient);
  color: white;
  border: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

#scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-accent);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  position: fixed;
  top: var(--spacing-md);
  left: var(--spacing-md);
  width: 44px;
  height: 44px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1.5rem;
  z-index: 1002;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.nav-toggle:hover {
  transform: rotate(5deg) scale(1.05);
  box-shadow: var(--shadow-lg);
  background-color: var(--accent-color);
}

.nav-toggle i {
  display: block;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.nav-toggle .fa-bars {
  animation: bounceIn 0.5s;
}

.nav-toggle .fa-times {
  animation: spinIn 0.5s;
}



@keyframes bounceIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes spinIn {
  0% { transform: rotate(-180deg) scale(0); }
  100% { transform: rotate(0) scale(1); }
}

@media (max-width: 1320px) {
  .typewriter-box {
    height: 3em;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    top: 12px; /* Position consistently at the top */
    left: 12px;
  }
  
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: var(--spacing-lg);
    padding-top: 60px; /* Add top padding to avoid menu button overlap */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* First section needs more spacing after the navigation buttons */
  .main-content section:first-child {
    padding-top: 20px;
  }
  
  /* Add margin to section titles on mobile */
  .section h2 {
    margin-top: 15px;
  }
  
  .container {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Ensure sections are visible on mobile */
  .section {
    opacity: 1;
    transform: translateY(0);
    width: 100%;
  }
  
  /* Adjust section spacing for mobile */
  .section {
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-lg);
  }
  
  /* Fix About section issues on mobile */
  .about-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  .about-img {
    max-width: 280px;
    margin: 0 auto;
  }
  
  /* Fix the typewriter effect for mobile */
  .about-info h3 {
    white-space: normal;
    width: 100%;
    animation: none;
    border-right: none;
  }
  
  .about-info h3::after {
    display: none;
  }
  
  /* Make paragraphs visible immediately on mobile */
  .about-info p {
    opacity: 1;
    transform: translateY(0);
    animation: none;
  }
  
  /* Fix the contact list display on mobile */
  #contact-list {
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  /* Other mobile styles */
  .resume-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .pub-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .pub-img {
    max-height: 250px;
    margin: 0 auto;
    width: 100%;
    max-width: 350px;
  }
  
  /* Adjust dark mode toggle position for better mobile layout */
  .dark-mode-toggle {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  
  /* Fix files container for mobile */
  .files-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    width: 100%;
  }
  
  /* Make file items more compact and readable on mobile */
  .file-item {
    min-height: auto;
    padding: var(--spacing-sm);
  }
  
  .file-icon {
    height: 80px;
    margin-bottom: var(--spacing-sm);
  }
  
  /* Improve current path display on mobile */
  .current-path {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }
  
  .current-path::before {
    display: block;
    width: 100%;
    margin-bottom: var(--spacing-xs);
  }
  
  /* Mobile responsive styling for author links */
  .authors {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
  }
  
  .author-link {
    margin: 2px 0;
    display: inline-block;
  }
  
  .pub-item:hover .author-link {
    animation: none; /* Disable animation on mobile for better performance */
  }
  
  .author-link:active {
    color: var(--accent-color);
    transform: translateY(-1px);
  }
  
  .author-link:active::after {
    width: 100%;
  }

  /* News section mobile styles */
  .news-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }

  .news-date {
    font-size: 0.85rem;
    margin-bottom: var(--spacing-xs);
  }

  .news-content {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .typewriter-box {
    height: 3em;
  }

  .section h2 {
    font-size: 2rem;
  }
  
  .timeline {
    padding-left: 25px; /* Adjust padding for smaller screens */
  }
  
  .timeline::before {
    left: 6px; /* Adjust vertical line position for mobile */
  }
  
  .timeline-item {
    padding: var(--spacing-md);
  }
  
  .timeline-item::before {
    left: calc(-1 * var(--spacing-lg)); /* Adjust circle position for mobile */
    width: 12px;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  /* Make file items take full width on very small screens */
  .files-container {
    grid-template-columns: 1fr;
  }
  
  /* Allow text overflow with ellipsis for file names */
  .file-name {
    font-size: 1rem;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  /* Simplify file meta display */
  .file-meta {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  #scroll-top {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 44px;
    height: 44px;
  }
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
  50% {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-md);
  }
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Add animation classes that can be applied to any element */
.fade-in { animation: fadeInUp 1s forwards; }
.fade-in-slow { animation: fadeInUp 1.5s forwards; }
.pulse { animation: pulse 2s infinite; }

/* Error message styling */
.error-message {
  padding: var(--spacing-lg);
  background-color: rgba(255, 0, 0, 0.05);
  border-left: 3px solid #ff3333;
  color: var(--text-color);
  font-family: var(--font-secondary);
  margin: var(--spacing-md) 0;
  border-radius: var(--border-radius-md);
}

/* Styling for date-pill in ongoing positions */
.timeline-item-present .date-pill {
  background-color: rgba(61, 106, 89, 0.15);
  border-color: var(--success-color);
  color: var(--heading-color);
  font-weight: 500;
}

/* Make sure our changes are visible in dark mode too */
body.dark-mode .timeline-item-present::before {
  background: var(--success-color);
}

body.dark-mode .timeline-item-present:hover::before {
  background: #5aaa8e; /* Lighter teal on hover in dark mode */
  box-shadow: 0 0 0 4px var(--primary-color), 0 0 20px rgba(77, 141, 116, 0.4);
}

body.dark-mode .timeline-item-present .date-pill {
  background-color: rgba(77, 141, 116, 0.15);
  border-color: var(--success-color);
}

/* Enhance buttons with warm gradients */
.btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn:hover::after {
  opacity: 1;
}

/* Warm links */
a {
  color: var(--primary-color);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--accent-color);
}

a:not(.btn):after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

a:not(.btn):hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Navigation styling */
nav {
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  transition: color var(--transition-normal), transform var(--transition-normal);
  position: relative;
}

nav a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

nav a.active {
  color: var(--primary-color);
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

/* Publication items with warm borders */
.publication-item {
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.publication-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.02) 75%, transparent 75%);
  background-size: 15px 15px;
  opacity: 0.5;
  z-index: 1;
}

.publication-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Timeline updates for warm theme */
.timeline-item::before {
  background-color: var(--accent-color);
  border: 3px solid var(--surface-color);
  box-shadow: 0 0 0 3px var(--border-color);
}

.date-pill {
  background-color: rgba(42, 77, 105, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(42, 77, 105, 0.2);
}

/* Skill badges with warm theme */
.skill-badge {
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.skill-badge:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Apply justify to specific text content elements */
p, 
.about-info, 
.introduction-item, 
.pub-details, 
.timeline-item ul li, 
.timeline-item .role,
.section-description,
.venue,
.authors,
.item-description,
.error-message {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* Keep certain elements left-aligned for better design */
h1, h2, h3, h4, h5, h6,
.nav-links a,
.date-pill,
.timeline-item .institution,
.skill-badge {
  text-align: left;
}

/* Shared Files Section Styling */


.files-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.file-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.file-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.file-item img {
  border-radius: var(--border-radius-md);
  transition: all var(--transition-normal);
}

.file-item:hover img {
  transform: scale(1.05);
}

.file-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  margin-bottom: var(--spacing-md);
  font-size: 3rem;
  color: var(--primary-color);
}

.file-icon img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
}

.file-info {
  margin-top: auto;
}

.file-name {
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: var(--spacing-md);
}

.file-download {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal);
  text-align: center;
  margin-top: var(--spacing-sm);
}

.file-download:hover {
  color: white;
  background-color: var(--accent-color);
  transform: scale(1.02) translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Enhanced directory styling */
.file-item i {
  color: var(--primary-color);
  transition: all var(--transition-normal);
}

.file-item:hover i {
  color: var(--accent-color);
  transform: scale(1.1);
}

/* Special styling for "View Contents" button */
.file-view-link {
  background-color: var(--primary-color) !important;
}

.file-item:hover .file-view-link {
  background-color: var(--accent-color) !important;
}

/* Directory path navigation styling */
.current-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--surface-color);
  border-radius: var(--border-radius-md);
  font-family: var(--font-secondary);
  box-shadow: var(--shadow-sm);
  position: relative;
  border-left: 3px solid var(--primary-color);
}

.current-path::before {
  content: "Location:";
  font-weight: 700;
  margin-right: var(--spacing-md);
  color: var(--primary-color);
}

.current-path a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-normal);
  margin-right: var(--spacing-xs);
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
}

.current-path a:hover {
  color: white;
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.current-path a i {
  margin-right: var(--spacing-xs);
}

.current-path span {
  color: var(--text-muted);
  margin-right: var(--spacing-xs);
  font-weight: 500;
}

/* Back directory item styling */
.file-item-back .file-icon i {
  color: var(--text-muted);
  font-size: 2.5rem;
  transition: all var(--transition-normal);
}

.file-item-back:hover .file-icon i {
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* Make scroll-top button always visible on resources page */
.resources-page #scroll-top {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Sidebar Footer */
.sidebar-footer {
  cursor: default;
  margin-top: auto;
  padding-top: var(--spacing-xl);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--transition-normal);
}

.sidebar-footer:hover {
  color: var(--accent-color);
  transform: scale(1.05) translateY(-2px);
}

.sidebar-footer p {
  margin-bottom: var(--spacing-xs);
}


.modal {
  border-radius: 20px;
  display: none;
  position: fixed;
  z-index: 1;
  left: 10vw;
  top: 10vh;
  width: 80%;
  height: 80vh;
  background-color: var(--bg-color);
  justify-content: center;
  align-items: center;
  opacity: 0;
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.3);
  transform: scale(0.1);
  transition: 0.3s;
  z-index: 1000;
  overflow: hidden;
}

.modal.show {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.modal-content {
  display: block;
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  margin: auto;
  border-radius: var(--border-radius-lg);
  object-fit: contain;
  box-shadow: var(--shadow-accent);
  transition: transform var(--transition-normal);
}

.modal-content:hover {
  transform: scale(1.05);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(--text-color);
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--text-color-highlight);
  text-decoration: none;
  cursor: pointer;
  transform: rotate(90deg);
}

.thumbnail {
  cursor: pointer;
}

/* Basic responsive fixes for very small screens */
@media (max-width: 360px) {
  
  body {
    min-width: 320px; /* Set minimum width to avoid excessive squeezing */
  }
  .typewriter-box {
    height: 3em;
  }
  
  .section h2 {
    font-size: 1.75rem;
  }
  
  /* Make sure content doesn't overflow */
  .main-content, 
  .container,
  .section {
    min-width: 280px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Adjust about image size for very small screens */
  .about-img {
    max-width: 220px;
  }
} 