:root {
  color-scheme: light;
  --background: #fff;
  --ink: #222831;
  --muted: #616874;
  --blue: #235b97;
  --line: #e4e7eb;
  --soft: #f2f6fb;
  --link-hover: #163b64;
  --selected-text: #fff;
  --summary: #4e5661;
  --distinction: #3c5c78;
  --award: #7b5b27;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #181c22;
  --ink: #e9edf2;
  --muted: #adb7c5;
  --blue: #91bdf0;
  --line: #363e49;
  --soft: #242d38;
  --link-hover: #bfdcff;
  --selected-text: #181c22;
  --summary: #c3cbd6;
  --distinction: #b5cee9;
  --award: #dfbd80;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 112px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; border-radius: 2px; }
p, h1, h2, h3, h4, figure { margin: 0; }
strong { font-weight: 600; }
.container, .header-inner { width: min(960px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 24px; padding: 8px 16px; background: var(--background); z-index: 20; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--background); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.site-name { font-size: 18px; font-weight: 650; letter-spacing: -.5px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.name-dot { color: var(--blue); }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 28px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
nav .cv-link { color: var(--blue); }
.theme-toggle { appearance: none; border: 1px solid var(--blue); border-radius: 999px; padding: 7px 13px; min-height: 44px; background: var(--background); color: var(--blue); font: inherit; font-size: 13px; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.theme-toggle[aria-pressed="true"] { background: var(--blue); color: var(--selected-text); }
.theme-toggle:hover { border-color: var(--link-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.about { padding: 78px 0 68px; display: grid; grid-template-columns: minmax(0, 1fr) 218px; gap: 36px 62px; align-items: start; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 1.35px; text-transform: uppercase; line-height: 1.6; }
h1 { margin-top: 15px; font-size: clamp(38px, 5vw, 48px); font-weight: 600; line-height: 1.15; letter-spacing: -1.8px; }
.role { color: var(--muted); font-size: 17px; margin-top: 12px; }
.biography { margin-top: 27px; }
.biography p + p { margin-top: 17px; }
.biography strong { font-weight: 600; }
.portrait { align-self: center; }
.portrait img { display: block; width: 100%; height: 257px; object-fit: cover; object-position: center 35%; border-radius: 4px; background: var(--soft); }
.portrait figcaption { color: var(--muted); font-size: 11px; text-align: center; margin-top: 12px; }
.deployment { grid-column: 1 / -1; min-width: 0; }
.deployment video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 4px; background: var(--soft); }
.deployment video:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.deployment figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; }
.profile-links, .paper-links { display: flex; flex-wrap: wrap; gap: 10px 23px; padding: 0; margin: 0; list-style: none; }
.profile-links { margin-top: 25px; font-size: 13px; }
.profile-links a, .paper-links a { text-decoration: none; }
.profile-links span, .paper-links span, .section-link span { margin-left: 3px; font-size: 12px; }
.publications { border-top: 1px solid var(--line); padding-top: 37px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 33px; }
.publications-heading { flex-wrap: wrap; row-gap: 16px; }
.publication-filters { display: flex; flex: 1; flex-wrap: wrap; gap: 7px; }
.publication-filters button { appearance: none; border: 1px solid var(--blue); border-radius: 999px; padding: 6px 12px; background: var(--background); color: var(--blue); font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; }
.publication-filters button[aria-pressed="true"] { background: var(--blue); color: var(--selected-text); }
.publication-filters button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
h2 { font-size: 28px; font-weight: 550; letter-spacing: -.75px; line-height: 1.3; margin-top: 7px; }
.section-link { font-size: 13px; text-decoration: none; margin-bottom: 4px; }
.publication-year { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
.year { font-size: 15px; font-weight: 500; color: var(--muted); padding-top: 1px; line-height: 1.5; }
.paper { padding-bottom: 28px; }
.paper:not([hidden]) ~ .paper:not([hidden]) { border-top: 1px solid var(--line); padding-top: 26px; }
.publication-year:not([hidden]) ~ .publication-year:not([hidden]) { border-top: 1px solid var(--line); padding-top: 28px; }
.paper-venue { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: .65px; text-transform: uppercase; line-height: 1.6; margin-bottom: 8px; }
.distinction { display: inline-block; margin-left: 10px; padding: 1px 7px; background: var(--soft); border-radius: 3px; color: var(--distinction); font-size: 10px; letter-spacing: .2px; }
h4 { font-size: 19px; font-weight: 600; line-height: 1.45; letter-spacing: -.25px; }
h4 a { color: var(--ink); text-decoration: none; }
.authors { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.authors strong { color: var(--ink); }
.paper-summary { margin-top: 11px; font-size: 14px; line-height: 1.75; color: var(--summary); max-width: 780px; }
.paper-award { font-size: 12px; color: var(--award); margin-top: 10px; }
.paper-links { font-size: 12px; gap: 20px; margin-top: 12px; }
.contact { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; border-top: 1px solid var(--line); margin-top: 16px; padding: 42px 0 46px; }
.email-address { font-size: 18px; letter-spacing: -.2px; text-decoration: none; overflow-wrap: anywhere; }
.contact-affiliation { font-size: 13px; color: var(--muted); margin-top: 12px; }
.contact .profile-links { margin-top: 17px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: 11px; color: var(--muted); }

@media (max-width: 760px) {
  html { scroll-padding-top: 144px; }
  .container, .header-inner { width: calc(100% - 48px); }
  .header-inner { padding: 18px 0; min-height: 0; grid-template-columns: 1fr auto; gap: 13px 24px; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .theme-toggle { grid-column: 2; grid-row: 1; }
  .about { gap: 30px; grid-template-columns: minmax(0, 1fr) 160px; padding-top: 52px; }
  .portrait img { height: 195px; }
  .eyebrow { letter-spacing: 1px; }
  nav { gap: 20px; }
  .publication-year { grid-template-columns: 58px minmax(0, 1fr); }
  .publication-filters { order: 3; flex-basis: 100%; }
}

@media (max-width: 560px) {
  .container, .header-inner { width: calc(100% - 40px); }
  nav { gap: 24px; font-size: 13px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 36px 0 40px; }
  .intro { grid-row: 2; }
  .portrait { grid-row: 1; margin-top: 0; display: flex; align-items: end; gap: 15px; }
  .portrait img { width: 94px; height: 112px; }
  .portrait figcaption { max-width: 110px; text-align: left; margin-bottom: 5px; line-height: 1.65; }
  h1 { margin-top: 13px; }
  .role { font-size: 15px; }
  .biography { margin-top: 22px; font-size: 15px; }
  .profile-links { gap: 12px 21px; }
  .publications { padding-top: 29px; }
  .section-heading { align-items: center; margin-bottom: 26px; }
  .section-link { font-size: 11px; margin-top: 22px; white-space: nowrap; }
  .publication-year { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .year { font-size: 14px; }
  h4 { font-size: 18px; }
  .paper { padding-bottom: 25px; }
  .paper:not([hidden]) ~ .paper:not([hidden]) { padding-top: 23px; }
  .paper-venue { font-size: 10px; }
  .authors { font-size: 12px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 32px; }
  .email-address { font-size: 16px; }
  .site-footer { font-size: 10px; }
}

@media print {
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --background: #fff;
    --ink: #222831;
    --muted: #616874;
    --blue: #235b97;
    --line: #e4e7eb;
    --soft: #f2f6fb;
    --link-hover: #163b64;
    --selected-text: #fff;
    --summary: #4e5661;
    --distinction: #3c5c78;
    --award: #7b5b27;
  }
  .site-header, .skip-link, .cv-link { display: none; }
  .container { width: 100%; }
  .about { padding-top: 0; }
  .paper { break-inside: avoid; }
  a { color: inherit; }
}
