:root {
  color-scheme: light;
  --bg: #fafaf8;
  --text: #24282c;
  --muted: #626970;
  --line: #dedfdd;
  --accent: #315b78;
  --surface: #f0f1ee;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181c20;
  --text: #e8e9e6;
  --muted: #adb4b9;
  --line: #363d43;
  --accent: #a4c7e1;
  --surface: #22282e;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.container { width: min(1040px, calc(100% - 96px)); margin-inline: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
p { margin: 0 0 16px; }
h1, h2, h3 { margin: 0; color: var(--text); }
h1 { font: 400 clamp(40px, 5vw, 58px)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -1.8px; }
h2 { font-size: 15px; font-weight: 600; line-height: 1.5; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.55; }
.site-header { border-bottom: 1px solid var(--line); }
nav { min-height: 94px; display: flex; align-items: center; gap: 28px; }
.wordmark { color: var(--text); text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -.5px; margin-right: auto; }
.wordmark-dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; font-size: 14px; }
.nav-links a { color: var(--muted); text-decoration: none; padding-block: 10px; }
.nav-links a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 8px; }
.nav-links a:hover { color: var(--text); }
.theme-toggle { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.skip-link { position: absolute; left: 24px; top: -80px; padding: 8px 16px; background: var(--bg); z-index: 2; }
.skip-link:focus { top: 12px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 70px; align-items: start; padding: 70px 0 58px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.role { color: var(--muted); font-size: 16px; margin: 16px 0 26px; }
.intro-copy > p:not(.eyebrow):not(.role) { max-width: 66ch; }
.portrait { margin: 6px 0 0; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 13 / 15; object-fit: cover; border-radius: 4px; }
.portrait figcaption { color: var(--muted); font-size: 11px; margin-top: 12px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 25px 0 16px; font-size: 13px; }
.social-links a, .text-link, .paper-links a { text-decoration: none; }
.social-links a:hover, .text-link:hover, .paper-links a:hover { text-decoration: underline; }
.text-link { font-size: 13px; font-weight: 500; }
.section-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 40px; border-top: 1px solid var(--line); padding: 34px 0 38px; }
.section-row > h2 { padding-top: 3px; }
.section-content { min-width: 0; }
.section-content > p:last-child { margin-bottom: 0; }
.section-content p { font-size: 14px; }
.experience { margin-top: 28px; }
.experience:first-child { margin-top: 0; }
.entry-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.date { color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.experience p { margin-bottom: 0; }
.experience .entry-role { color: var(--muted); font-size: 12px; margin: 4px 0 7px; }
.publication .eyebrow { margin-bottom: 8px; color: var(--accent); }
.publication h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 23px; line-height: 1.4; max-width: 650px; }
.publication h3 a { color: var(--text); text-decoration: none; }
.publication h3 a:hover { text-decoration: underline; }
.publication .authors { margin: 14px 0 2px; font-size: 14px; }
.authors strong { font-weight: 600; }
.publication .venue { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.paper-links { display: flex; gap: 24px; font-size: 12px; }
.page-heading { padding: 66px 0 44px; }
.page-heading > p:last-child { color: var(--muted); margin: 20px 0 0; font-size: 15px; }
.page-heading .eyebrow { margin-top: 0; }
.publications-row { padding-block: 40px; }
.scholar-note { font-size: 13px; color: var(--muted); margin: 8px 0 80px 210px; }
.cv-summary { border-block: 1px solid var(--line); padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cv-summary h2 { font-size: 18px; }
.cv-summary p { font-size: 14px; margin: 5px 0 0; color: var(--muted); }
.cv-summary .document-meta { font-size: 12px; margin-top: 12px; }
.cv-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.button { background: var(--text); color: var(--bg); display: inline-flex; gap: 24px; padding: 11px 20px; border-radius: 3px; text-decoration: none; font-size: 13px; font-weight: 500; }
.button:hover { opacity: .85; text-decoration: none; }
.cv-preview { margin: 32px 0 60px; }
.cv-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: white; }
.cv-preview figcaption { margin-top: 14px; font-size: 12px; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); margin-top: 28px; padding-block: 24px 36px; display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
@media (max-width: 850px) {
  .container { width: calc(100% - 56px); }
  .intro { grid-template-columns: minmax(0, 1fr) 170px; gap: 32px; }
  .section-row { grid-template-columns: 130px minmax(0, 1fr); gap: 24px; }
  .entry-heading { display: block; }
  .date { display: block; margin-top: 3px; }
  .scholar-note { margin-left: 154px; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  nav { min-height: 78px; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
  .wordmark { font-size: 17px; }
  .nav-links { gap: 16px; font-size: 12px; }
  .theme-toggle { width: 30px; height: 30px; }
  .intro { display: flex; flex-direction: column; gap: 28px; padding: 38px 0; }
  .portrait { order: -1; display: flex; align-items: center; gap: 16px; margin: 0; }
  .portrait img { width: 90px; height: 104px; }
  .portrait figcaption { max-width: 130px; margin: 0; }
  h1 { font-size: 42px; }
  .eyebrow { font-size: 10px; }
  .role { margin-block: 12px 22px; }
  .intro-copy p { font-size: 15px; }
  .section-row { grid-template-columns: 1fr; gap: 20px; padding-block: 26px 30px; }
  .section-row > h2 { color: var(--muted); font-size: 12px; }
  .publication h3 { font-size: 22px; }
  .page-heading { padding: 38px 0 30px; }
  .scholar-note { margin: 0 0 50px; }
  .cv-summary { align-items: flex-start; flex-direction: column; }
  .cv-actions { flex-direction: row; gap: 24px; }

}
@media (max-width: 370px) {
  nav { gap: 10px; }
  .nav-links { gap: 12px; }
  .wordmark { flex-basis: calc(100% - 46px); }
  .theme-toggle { order: 1; }
  .nav-links { order: 2; flex-basis: 100%; }
}
@media print {
  .site-header, .site-footer, .theme-toggle, .skip-link, .cv-preview { display: none; }
  :root { --bg: #fff; --text: #000; --muted: #444; --accent: #000; --line: #ccc; }
  .container { width: 100%; }
  .intro, .page-heading { padding-top: 0; }
  .experience, .publication { break-inside: avoid; }
}
