/* ============================================
   CSS Custom Properties (Theming)
   ============================================ */
:root {
  --color-primary: #064e3b;
  --color-primary-light: #065f46;
  --color-accent: #10b981;
  --color-accent-hover: #059669;
  --color-bg: #ffffff;
  --color-bg-alt: #f0fdf4;
  --color-text: #111827;
  --color-text-secondary: #374151;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-card-bg: #ffffff;
  --color-card-shadow: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --max-width: 1100px;
  --nav-height: 64px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --color-primary: #34d399;
  --color-primary-light: #6ee7b7;
  --color-accent: #10b981;
  --color-accent-hover: #34d399;
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-text: #e2e8f0;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-border: #334155;
  --color-card-bg: #1e293b;
  --color-card-shadow: rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

strong {
  font-weight: 600;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar.scrolled {
  background-color: rgba(15, 23, 42, 0.85);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.navbar.scrolled .nav-logo {
  color: var(--color-text);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .nav-links a {
  color: var(--color-text-secondary);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--color-text);
  background-color: var(--color-bg-alt);
}

.nav-links a.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled .nav-toggle span {
  background: var(--color-text);
}

.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.navbar.scrolled .theme-toggle {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.navbar.scrolled .theme-toggle:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #064e3b 0%, #0f766e 40%, #134e4a 70%, #0c4a6e 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero-canopy.jpg') center/cover no-repeat;
  opacity: 0.4;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 78, 59, 0.3) 0%, rgba(6, 78, 59, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  max-width: 800px;
}

.hero-name {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: 1.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.25rem;
}

.hero-affiliation {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 300;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.05);
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
  animation: bounce 2s infinite;
}

.hero-scroll a:hover {
  color: rgba(255, 255, 255, 0.8);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

/* ============================================
   About
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 60% center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  z-index: -1;
  transform: translate(12px, 12px);
}

.about-text p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ============================================
   Software
   ============================================ */
.software-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  max-width: 700px;
}

.software-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.software-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #064e3b, #0f766e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.software-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  font-family: 'Courier New', monospace;
}

.software-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.github-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.github-stars svg {
  color: #eab308;
}

.github-stars:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.software-desc {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.software-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #065f46, #047857);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(16, 185, 129, 0.05);
}

/* ============================================
   Publications
   ============================================ */
.pub-year-group {
  margin-bottom: 2.5rem;
}

.pub-year-group:last-child {
  margin-bottom: 0;
}

.pub-year {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.pub-entry {
  padding: 1.25rem;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pub-entry:hover {
  box-shadow: var(--shadow-sm);
}

.pub-entry.first-author {
  border-left-color: var(--color-accent);
}

.pub-authors {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.pub-title a {
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

.pub-journal {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================
   Thesis & Media
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.thesis-card,
.media-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.thesis-card h3,
.media-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.thesis-card h3 a,
.media-card h3 a {
  color: var(--color-text);
}

.thesis-card h3 a:hover,
.media-card h3 a:hover {
  color: var(--color-accent);
}

.thesis-card p,
.media-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.media-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .media-badge {
  background: linear-gradient(135deg, #065f46, #047857);
}

/* ============================================
   Fieldwork Banner
   ============================================ */
.fieldwork-banner {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
}

.fieldwork-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.fieldwork-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 768px) {
  .fieldwork-banner {
    height: 240px;
  }
}

/* ============================================
   Teaching & Supervision
   ============================================ */
.teaching-intro {
  margin-bottom: 2rem;
}

.teaching-intro p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.testimonial {
  margin-bottom: 2rem;
}

.testimonial blockquote {
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem 2rem;
  position: relative;
}

.testimonial blockquote p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.8;
}

.testimonial cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 500;
}

.supervision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.supervision-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.supervision-year {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  border-radius: 1rem;
  margin-bottom: 0.75rem;
}

.supervision-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.supervision-student {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.supervision-detail {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ============================================
   Awards
   ============================================ */
.awards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.award-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.award-year {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 3rem;
  padding-top: 0.1rem;
}

.award-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.award-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================
   Education Timeline
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
  max-width: 600px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-accent);
  z-index: 1;
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.35rem;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ============================================
   Consultancy
   ============================================ */
.consultancy-block {
  max-width: 700px;
}

.consultancy-block p {
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: #064e3b;
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0;
}

[data-theme="dark"] .footer {
  background: #0c1222;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.footer-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
}

.footer-affiliation {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    align-items: flex-start;
    gap: 1rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-links a {
    color: var(--color-text);
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    width: 100%;
  }

  .nav-links a:hover {
    color: var(--color-accent);
    background: none;
  }

  .theme-toggle {
    margin-left: 0;
    margin-top: 1rem;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section {
    padding: 3.5rem 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    max-width: 240px;
    margin: 0 auto;
  }

  .about-stats {
    justify-content: center;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .supervision-grid {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-social {
    gap: 0.5rem;
  }

  .social-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }

  .software-header {
    flex-wrap: wrap;
  }

  .github-stars {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-tagline br {
    display: none;
  }

  .about-stats {
    gap: 1.25rem;
  }

  .pub-entry {
    padding: 1rem;
    padding-left: 1.25rem;
  }
}

/* ============================================
   Mobile overlay
   ============================================ */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.nav-overlay.active {
  display: block;
}

/* ============================================
   Animations (subtle)
   ============================================ */

/* Intersection Observer driven fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Print styles */
@media print {
  .navbar, .hero-scroll, .theme-toggle, .nav-toggle {
    display: none !important;
  }
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  .section {
    padding: 1.5rem 0;
  }
}
