/* Design tokens */
/* Light is the deliberate default; dark is opt-in via the toggle. */
:root {
  --bg: #faf7f2;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(20, 15, 10, 0.08);
  --border-strong: rgba(20, 15, 10, 0.16);
  --text: #1c1a17;
  --text-muted: #5c564d;
  --text-faint: #8d867a;
  --red: #8f0d0d;
  --red-dark: #450808;
  --gold: #b8934a;
  --gold-soft: rgba(184, 147, 74, 0.12);
  --shadow: 0 20px 60px -25px rgba(20, 15, 10, 0.25);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
}

:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --bg-elevated: #131315;
  --bg-card: #17171a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1ec;
  --text-muted: #a9a39a;
  --text-faint: #6f6a63;
  --red: #c23b3b;
  --red-dark: #7a1f1f;
  --gold: #e7d192;
  --gold-soft: rgba(231, 209, 146, 0.14);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

::selection { background: var(--gold); color: #1c1a17; }

a { color: inherit; }

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

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, var(--gold-soft) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}
@media (hover: hover) {
  .cursor-glow.is-active { opacity: 1; }
}

/* Layout helpers */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 90px 32px;
  position: relative;
  z-index: 3;
}

.section-head { max-width: 680px; margin-bottom: 38px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.btn-primary {
  background: var(--red);
  color: #fff7ee;
}
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); }

/* Header / Nav */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 32px;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}
.nav-brand-dot { color: var(--red); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle svg { width: 17px; height: 17px; grid-area: 1 / 1; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-burger span { width: 16px; height: 1.5px; background: var(--text); transition: transform 0.25s ease, opacity 0.25s ease; }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 4px 20px;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-mobile a {
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}
.site-header.is-open {
  background: var(--bg);
  border-bottom-color: var(--border);
}
.site-header.is-open .nav-mobile { display: flex; }

/* Hero */
.hero {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding: 140px 32px 60px;
  z-index: 3;
}

.hero-kicker {
  font-size: 13.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin: 0 0 18px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-role {
  margin: 18px 0 20px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--red);
  font-weight: 600;
}

.hero-lede {
  max-width: 540px;
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.7;
  margin: 0 0 34px;
}

.hero-actions { display: flex; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; }

.hero-teaser { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.teaser-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.teaser-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.teaser-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}
.teaser-thumb img { width: 100%; height: 100%; object-fit: cover; }
.teaser-thumb-icon { color: var(--red); }
.teaser-thumb-icon svg { width: 20px; height: 20px; }
.teaser-label { display: flex; flex-direction: column; gap: 1px; }
.teaser-label strong { font-size: 13px; font-weight: 600; line-height: 1.3; }
.teaser-label span { font-size: 11px; color: var(--text-faint); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.stat { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start; gap: 2px; position: relative; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  display: block;
  width: 100%;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

.hero-photo-wrap {
  position: relative;
  justify-self: center;
  width: min(340px, 80%);
}
.hero-photo {
  aspect-ratio: 1 / 1.08;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-ring {
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 28px;
  z-index: 1;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  right: 32px;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  text-decoration: none;
}
.scroll-cue span {
  width: 4px; height: 8px;
  border-radius: 4px;
  background: var(--gold);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

/* About */
.about-text {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 40px;
  max-width: 780px;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.fact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.fact-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #7a5f22;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
:root[data-theme="dark"] .fact-icon { color: var(--gold); }
.fact-icon svg { width: 19px; height: 19px; }
.fact-card strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
}
.fact-card span { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.country-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}
.flag-icon {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 15, 10, 0.12);
}

/* Research */
.research-role {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.research-role-main { flex: 1; min-width: 0; }
.research-role-icon {
  flex-shrink: 0;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--gold-soft), transparent);
  border: 1px solid var(--border);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}
.research-role-icon svg { width: 36px; height: 36px; }
.research-role-meta { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.research-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5f22;
}
:root[data-theme="dark"] .research-tag { color: var(--gold); }
.research-tag-muted { background: var(--bg-elevated); color: var(--text-faint); border: 1px solid var(--border); }

.research-role h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 6px;
  font-weight: 600;
}
.research-org { color: var(--red); font-weight: 600; font-size: 14.5px; margin: 0 0 18px; }
.research-role p:not(.research-org) { color: var(--text-muted); font-size: 15.5px; line-height: 1.75; }
.research-links { margin-top: 20px; }

.publication-card {
  background: linear-gradient(155deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.publication-main { flex: 1; min-width: 0; }
.publication-icon {
  flex-shrink: 0;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--gold-soft), transparent);
  border: 1px solid var(--border-strong);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
}
.publication-icon svg { width: 36px; height: 36px; }
.publication-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 18px;
}
.publication-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.3;
  margin: 0 0 12px;
}
.publication-authors { color: #7a5f22; font-weight: 600; font-size: 14.5px; margin: 0 0 18px; }
:root[data-theme="dark"] .publication-authors { color: var(--gold); }
.publication-abstract { color: var(--text-muted); font-size: 15px; line-height: 1.75; margin: 0 0 26px; }
.publication-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* Projects */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-chip {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text); }
.filter-chip.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff7ee;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.show-more-btn {
  display: block;
  margin: 28px auto 0;
  padding: 11px 26px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.show-more-btn:hover { border-color: var(--gold); }
.show-more-btn[hidden] { display: none; }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1), border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.project-media {
  aspect-ratio: 4 / 3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-elevated);
}
.project-media img { width: 100%; height: 100%; object-fit: contain; }
.project-media-mono {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.project-media-mono::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%);
}
.project-status {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10,10,11,0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}

.project-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7a5f22;
  background: var(--gold-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
:root[data-theme="dark"] .project-tag { color: var(--gold); }
.project-card h3 { margin: 2px 0 0; font-size: 1rem; font-family: var(--font-display); font-weight: 600; }
.project-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-award {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
}
.project-hint {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: auto;
  padding-top: 6px;
}

/* Awards */
.awards-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 34px;
}
.award-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.award-stat svg {
  width: 26px; height: 26px;
  color: var(--gold);
  margin-bottom: 12px;
}
:root:not([data-theme="dark"]) .award-stat svg { color: #7a5f22; }
.award-stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 6px;
}
.awards-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.awards-group { padding: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.awards-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a5f22;
  margin: 0 0 20px;
}
.awards-group h3 svg { width: 18px; height: 18px; flex-shrink: 0; }
:root[data-theme="dark"] .awards-group h3 { color: var(--gold); }
.award-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.award-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.award-list li:last-child { border-bottom: none; }
.award-list .award-name { color: var(--text); font-weight: 500; }
.award-list .award-place { color: var(--text-faint); font-size: 13px; white-space: nowrap; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-inner h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin: 0 0 18px;
  line-height: 1.2;
}
.contact-inner > p { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin: 0 0 32px; max-width: 520px; }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  transition: background 0.2s ease;
}
.contact-row + .contact-row { border-top: 1px solid var(--border); }
.contact-row:hover { background: var(--bg-elevated); }
.contact-row-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #7a5f22;
  display: flex;
  align-items: center;
  justify-content: center;
}
:root[data-theme="dark"] .contact-row-icon { color: var(--gold); }
.contact-row-icon svg { width: 18px; height: 18px; }
.contact-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.contact-row-text strong { font-size: 14px; font-weight: 600; }
.contact-row-text span { font-size: 12.5px; color: var(--text-faint); }
.contact-row-arrow { color: var(--text-faint); font-size: 14px; }

/* Footer */
.site-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}
.footer-top { text-decoration: none; color: var(--text-faint); }
.site-footer p { margin: 0; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 4, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  max-width: 860px;
  width: 100%;
  max-height: 93vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.7);
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  z-index: 2;
  font-size: 14px;
}

.modal-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 20px 20px 0;
  width: calc(100% - 40px);
  border-radius: 14px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-media img { width: 100%; height: 100%; object-fit: contain; }
.modal-media .project-media-mono { font-size: 3.6rem; }

.modal-body { padding: 22px 36px 30px; }
.modal-tags { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.modal-body h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 14px; font-weight: 600; }
.modal-body p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin: 0 0 18px; }
.modal-awards { margin: -10px 0 18px; }
.modal-awards h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a5f22;
  margin: 0 0 10px;
}
:root[data-theme="dark"] .modal-awards h4 { color: var(--gold); }
.modal-awards ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.modal-awards li { font-size: 14px; color: var(--text-muted); }
.modal-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { grid-template-columns: 1fr; padding-top: 140px; text-align: left; }
  .hero-photo-wrap { order: -1; width: min(220px, 60%); margin-bottom: 20px; }
  .scroll-cue { display: none; }
  .awards-columns { grid-template-columns: 1fr; gap: 24px; }
  .research-role-icon, .publication-icon { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 64px 20px; }
  .hero { padding: 110px 20px 50px; min-height: unset; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 22px 20px; }
  .awards-stats { grid-template-columns: 1fr; }
  .research-role, .publication-card { padding: 26px 22px; }
  .modal-body { padding: 24px; }
  .site-header { padding: 14px 18px; }

  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .project-media-mono { font-size: 1.6rem; }
  .project-status { font-size: 8.5px; padding: 2px 6px; }
  .project-body { padding: 10px 11px 12px; gap: 3px; }
  .project-card h3 { font-size: 0.85rem; }
  .project-card p { font-size: 11.5px; -webkit-line-clamp: 2; }
  .project-award { font-size: 10.5px; }
  .project-hint { font-size: 10px; }
}
