:root {
  color-scheme: light;
  --ink: #172b41;
  --muted: #4e6277;
  --accent: #185cb5;
  --line: #dce5ee;
  --soft: #f2f6fb;
  --paper: #fff;
  --link-hover: #0d3b78;
  --focus: #176bd2;
  --on-ink: #fff;
  --toggle-hover: #e7eef7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eef6;
  --muted: #a9b8c8;
  --accent: #78b7ff;
  --line: #2b4054;
  --soft: #132438;
  --paper: #0b1521;
  --link-hover: #acd3ff;
  --focus: #89c2ff;
  --on-ink: #0b1521;
  --toggle-hover: #1a3046;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #e7eef6;
    --muted: #a9b8c8;
    --accent: #78b7ff;
    --line: #2b4054;
    --soft: #132438;
    --paper: #0b1521;
    --link-hover: #acd3ff;
    --focus: #89c2ff;
    --on-ink: #0b1521;
    --toggle-hover: #1a3046;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration-thickness: .07em; text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1rem; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
h1 { font-size: clamp(2.35rem, 5vw, 3.65rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0 0 1.5rem; }
h3 { font-size: 1.15rem; margin: 0 0 .65rem; }
.wrap { width: min(1080px, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; top: -6rem; left: 1rem; z-index: 10; padding: .7rem 1rem; background: var(--ink); color: var(--on-ink); }
.skip-link:focus { top: 1rem; }
.site-header { border-top: 5px solid var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.header-inner-home { justify-content: flex-end; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1.35rem; margin-left: auto; }
.brand { color: var(--ink); font-weight: 650; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.navigation { display: flex; flex-wrap: wrap; gap: .4rem 1.45rem; padding: 0; margin: 0; list-style: none; }
.navigation > li > a, .nav-dropdown > summary { display: block; padding: .7rem 0; color: var(--muted); font-size: .9375rem; font-weight: 550; text-decoration: none; border-bottom: 2px solid transparent; }
.navigation > li > a[aria-current="page"], .nav-dropdown.is-current > summary { color: var(--ink); border-color: var(--accent); }
.navigation > li > a:hover, .nav-dropdown > summary:hover { color: var(--accent); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { display: flex; align-items: center; gap: .4rem; list-style: none; cursor: pointer; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::marker { content: ""; }
.nav-dropdown > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 2px; }
.nav-dropdown > summary svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-dropdown[open] > summary svg { transform: rotate(180deg); }
.nav-submenu { position: absolute; z-index: 5; top: 100%; left: -.75rem; width: 10rem; margin: 0; padding: .4rem; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.nav-submenu a { display: block; padding: .55rem .75rem; border-radius: 2px; color: var(--muted); font-size: .9375rem; font-weight: 550; text-decoration: none; }
.nav-submenu a:hover, .nav-submenu a:focus-visible { color: var(--accent); background: var(--soft); }
.nav-submenu a:focus-visible { outline-offset: -2px; }
.nav-submenu a[aria-current="page"] { color: var(--accent); background: var(--soft); }
.theme-toggle { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper); cursor: pointer; }
.theme-toggle:hover { color: var(--accent); background: var(--toggle-hover); }
.theme-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
main { padding-block: 3.75rem 4.5rem; min-height: 65vh; }
.eyebrow { margin: 0 0 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .875rem; font-weight: 650; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 4.5rem; align-items: start; padding-bottom: 3.5rem; }
.hero h1 { max-width: none; white-space: nowrap; }
.hero .affiliation { font-size: 1.125rem; line-height: 1.65; }
.affiliation-fellowship { margin-bottom: .85rem; }
.institution + .institution { margin-top: .65rem; }
.institution-translation { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.hero .interests { color: var(--muted); max-width: 650px; }
.portrait { width: 100%; height: 310px; object-fit: cover; object-position: center 32%; border-radius: 4px; }
.profile-links { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1.6rem; font-size: .9375rem; }
.section { margin-top: 3.25rem; }
.section-heading { display: flex; align-items: baseline; gap: 1rem; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; }
.section-heading h2 { margin-bottom: 1rem; }
.opportunities { background: var(--soft); border-left: 3px solid var(--accent); padding: 1.35rem 1.65rem; }
.opportunities h2 { font: 600 1.125rem/1.3 system-ui, sans-serif; letter-spacing: 0; margin-bottom: .8rem; }
.opportunities p { margin: .45rem 0; }
.deadline { color: var(--muted); font-size: .9375rem; }
.publications { list-style: none; margin: 0; padding: 0; }
.publication { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .75rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.publication:first-child { padding-top: .4rem; }
.publication-number { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .875rem; padding-top: .2rem; }
.publication-title { display: inline-block; color: var(--ink); font-weight: 600; font-size: 1.0625rem; line-height: 1.45; text-decoration: none; }
.publication p { margin: .4rem 0 0; }
.authors { color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.journal { font-size: .9375rem; }
.publication-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .875rem; margin-top: .5rem; }
.page-intro { max-width: 820px; margin-bottom: 2.8rem; }
.page-intro > p:not(.eyebrow) { font-size: 1.125rem; color: var(--muted); }
.research-topic { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 3rem; padding-block: 2.5rem; border-top: 1px solid var(--line); }
.research-topic h2 { font-size: 1.85rem; }
.research-topic figure { margin: .35rem 0 0; }
:root[data-theme="dark"] .research-topic figure { padding: .75rem; border-radius: 4px; background: #f8fafc; }
.research-topic figure img { width: 100%; max-height: 420px; object-fit: contain; }
.selected-papers { padding-left: 1.25rem; }
.selected-papers li { padding-left: .25rem; margin: .8rem 0; }
.paper-detail { display: block; color: var(--muted); font-size: .9375rem; margin-top: .15rem; }
.group-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.member { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.member img { width: 100%; height: 280px; object-fit: cover; object-position: center 30%; border-radius: 4px; margin-bottom: 1.3rem; }
.member p { color: var(--muted); margin: .2rem 0; }
.member a { display: inline-block; margin-top: .55rem; font-size: .9375rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-entry { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 2rem; border-top: 1px solid var(--line); padding-block: 1.65rem; }
.timeline-date { color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.timeline-entry p { margin: .4rem 0 0; }
.timeline-entry .detail { color: var(--muted); font-size: .9375rem; }
.cv-timeline .timeline-entry { grid-template-columns: 145px 96px minmax(0, 1fr); align-items: start; }
.timeline-logo { width: 96px; height: 96px; padding: 8px; object-fit: contain; background: #fff; border: 1px solid #dce5ee; border-radius: 4px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding-top: 1rem; }
.contact-grid h2 { font-size: 1.75rem; }
address { font-style: normal; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 1.25rem; }
.contact-label { display: block; color: var(--muted); font-size: .875rem; margin-bottom: .2rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.7rem; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 800px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: .5rem; padding-block: 1.2rem .6rem; }
  .header-actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .navigation { gap: .25rem 1.4rem; }
  main { padding-block: 2.6rem 3rem; }
  .hero { gap: 2rem; grid-template-columns: minmax(0, 1fr) 200px; }
  .portrait { height: 260px; }
  .research-topic { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2rem; }
  .group-grid { gap: 1.4rem; }
  .member img { height: 225px; }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 2rem); }
  .brand { font-size: .9375rem; }
  .navigation { gap: .1rem 1.05rem; }
  .header-actions { align-items: flex-start; gap: .75rem; }
  .navigation a { font-size: .9375rem; }
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2rem; }
  .hero h1 { font-size: clamp(1.35rem, 7.5vw, 2.35rem); }
  .hero-photo { width: min(260px, 80%); }
  .portrait { height: 280px; }
  .opportunities { padding: 1.2rem; }
  .section { margin-top: 2.6rem; }
  .section-heading { align-items: start; }
  .publication { grid-template-columns: 1.6rem minmax(0, 1fr); gap: .5rem; }
  .research-topic, .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .research-topic figure { width: min(320px, 100%); }
  .group-grid { grid-template-columns: 1fr; gap: 2rem; }
  .member { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 1.2rem; }
  .member img { height: 150px; margin: 0; }
  .timeline-entry { grid-template-columns: 1fr; gap: .55rem; }
  .cv-timeline .timeline-entry { grid-template-columns: 96px minmax(0, 1fr); column-gap: 1rem; }
  .cv-timeline .timeline-date { grid-column: 1 / -1; }
  .contact-grid { gap: 2.4rem; }
}
@media (prefers-reduced-motion: no-preference) {
  body, .site-header, .site-footer, .opportunities, .theme-toggle { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .site-footer, .skip-link, .theme-toggle { display: none; }
  .wrap { width: 100%; }
  main { padding: 0; }
  .publication, .timeline-entry, .member { break-inside: avoid; }
  a { color: inherit; }
}
