:root {
  --ink: #172033; --muted: #5e6878; --line: #e5e9f0; --surface: #ffffff; --soft: #f6f8fb; --accent: #315efb; --accent-dark: #2447c6; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fbfcfe; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
.container, .nav-shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251,252,254,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav-shell { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-end; }
nav a { color: var(--muted); font-size: .92rem; font-weight: 650; }
nav a:hover { color: var(--ink); text-decoration: none; }
.hero { padding: 92px 0 70px; background: linear-gradient(180deg, #f4f7ff 0%, #fbfcfe 100%); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 60px; align-items: center; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-title { margin: 12px 0 16px; font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.hero-title span { display: block; }
.hero-location { margin: 0 0 14px; color: var(--ink); font-size: .98rem; }
.hero .lead { max-width: 720px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.28rem); }
.robot-line { margin: 14px 0 0; font-weight: 700; color: var(--ink); }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: .9rem; box-shadow: 0 4px 14px rgba(23,32,51,.05); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.profile-wrap { display: flex; justify-content: center; }
.profile { width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: 0 24px 60px rgba(23,32,51,.16); }
section { padding: 76px 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 30px; }
.section-head h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.section-head p { max-width: 610px; margin: 0; color: var(--muted); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: 0 8px 30px rgba(23,32,51,.045); }
.interests { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.tag { padding: 7px 11px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .84rem; font-weight: 650; }
.research-cycle { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 8px; }
.affiliation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.affiliation-card { min-height: 112px; display: flex; align-items: center; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.affiliation-card > img { width: 145px; max-height: 70px; object-fit: contain; }
.affiliation-card strong, .affiliation-card span { display: block; }
.affiliation-card span { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.logo-pair { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-pair img { width: 88px; max-height: 62px; object-fit: contain; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-media { width: 100%; aspect-ratio: 16 / 9; background: #edf1f7; overflow: hidden; }
.project-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project h3 { margin: 0 0 8px; font-size: 1.2rem; }
.project p { margin: 0 0 12px; color: var(--muted); }
.project .meta { margin-top: auto; padding-top: 4px; font-size: .86rem; color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-weight: 700; font-size: .9rem; }
.pub-list { display: grid; gap: 0; }
.pub { display: grid; grid-template-columns: 82px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.pub:first-child { border-top: 0; }
.pub-year { color: var(--accent); font-weight: 800; }
.pub h3 { margin: 0 0 5px; font-size: 1rem; line-height: 1.45; }
.pub p { margin: 0; color: var(--muted); font-size: .92rem; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 30px; padding: 24px 0; border-top: 1px solid var(--line); }
.timeline-item:first-child { border-top: 0; }
.timeline-date { color: var(--accent); font-weight: 800; }
.timeline h3 { margin: 0 0 5px; font-size: 1rem; }
.timeline p { margin: 0; color: var(--muted); }
.subsection-head { margin-top: 58px; margin-bottom: 22px; }
.subsection-head h2 { font-size: 1.7rem; }
.fellowship-banner { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 30px; }
.fellowship-logos { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.fellowship-logos img { max-width: 125px; max-height: 78px; object-fit: contain; }
.fellowship-banner h3 { margin: 0 0 7px; font-size: 1.25rem; }
.fellowship-banner p { margin: 5px 0; color: var(--muted); }
.toolkit { width: 100%; border-collapse: collapse; }
.toolkit td { padding: 14px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.toolkit td:first-child { width: 180px; font-weight: 750; }
.slideshow-block { margin-top: 26px; }
.slideshow-head { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 14px; }
.slideshow-head h3 { margin: 0; font-size: 1.2rem; }
.slideshow-head span { color: var(--muted); font-size: .9rem; }
.slideshow { position: relative; overflow: hidden; border-radius: 20px; background: var(--ink); min-height: 520px; }
/* The vertical gallery needs an explicit height because its slides use height: 100%. */
.slideshow:not(.slideshow-horizontal) { height: min(700px, 78vh); min-height: 520px; }
.slideshow-horizontal { min-height: 0; aspect-ratio: 16 / 8; }
.slides { width: 100%; height: 100%; position: relative; }
.slide { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 60px; color: white; background: linear-gradient(transparent, rgba(0,0,0,.72)); font-weight: 700; font-size: .88rem; }
.slide-control { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; box-shadow: 0 5px 18px rgba(0,0,0,.15); }
.slide-control:hover { background: white; }
.slide-control.prev { left: 16px; }
.slide-control.next { right: 16px; }
.slide-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; display: flex; gap: 6px; max-width: calc(100% - 120px); overflow: hidden; }
.slide-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; flex: 0 0 auto; }
.slide-dots button.active { background: white; transform: scale(1.25); }
.contact { padding-bottom: 55px; }
.contact-box { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 36px; border-radius: 24px; background: var(--ink); color: white; }
.contact-box h2 { margin: 0 0 8px; font-size: 2rem; }
.contact-box p { margin: 0; color: #cbd3e2; }
.contact-box .button { border-color: #ffffff33; background: white; }
.last-updated { width: min(calc(100% - 40px), var(--max)); margin: 0 auto 35px; text-align: right; color: var(--muted); font-size: .82rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.footer-inner { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
@media (max-width: 800px) {
  .container, .nav-shell, .last-updated { width: min(calc(100% - 28px), var(--max)); }
  .nav-shell { min-height: 60px; }
  nav { gap: 11px; max-width: 58%; }
  nav a { font-size: .78rem; }
  .hero { padding: 62px 0 48px; }
  .hero-grid, .about-grid, .project-grid, .affiliation-grid, .fellowship-banner { grid-template-columns: 1fr; }
  .hero-grid { gap: 35px; }
  .hero-title { font-size: clamp(2.55rem, 13vw, 4.2rem); }
  .profile-wrap { justify-content: flex-start; }
  .profile { width: 170px; border-radius: 22px; }
  section { padding: 55px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; }
  .timeline-item { grid-template-columns: 1fr; gap: 5px; }
  .affiliation-card { align-items: flex-start; }
  .affiliation-card > img { width: 105px; }
  .logo-pair img { width: 70px; }
  .slideshow { min-height: 420px; }
  .slideshow:not(.slideshow-horizontal) { height: 72vh; min-height: 420px; max-height: 620px; }
  .slideshow-horizontal { min-height: 0; aspect-ratio: 4 / 3; }
  .slide figcaption { padding: 12px 50px; font-size: .8rem; }
  .contact-box { display: block; padding: 28px; }
  .contact-box .hero-links { margin-bottom: 0; }
  .footer-inner { padding: 18px 0; display: block; }
  .last-updated { margin-bottom: 28px; }
}
