:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #252525;
  --muted: #686868;
  --line: #dedede;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--serif); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
p { margin: 0 0 18px; }
h1 { font: 700 34px/1.25 var(--serif); margin: 0 0 28px; }
h2 { font: 500 24px/1.35 var(--sans); margin: 0 0 22px; }
h3 { font: 700 18px/1.5 var(--serif); margin: 0; }
section, [id] { scroll-margin-top: 28px; }
.site-layout { max-width: 960px; margin: 0 auto; padding: 50px 30px 30px; display: grid; grid-template-columns: 190px minmax(0, 650px); }
.site-header { align-self: start; position: sticky; top: 50px; padding-right: 30px; font: 500 15px/1.5 var(--sans); color: var(--muted); }
.nav-label { font: 600 15px/1.5 var(--sans); margin: 0 0 24px; }
nav { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; color: var(--ink); }
main { min-width: 0; position: relative; }
.theme-toggle { position: absolute; top: 11px; right: 0; width: 40px; height: 22px; border: 1.5px solid currentColor; border-radius: 20px; padding: 0; background: transparent; color: var(--ink); }
.theme-toggle::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 2.5px; border-radius: 50%; background: currentColor; transition: transform .15s; }
.theme-toggle[aria-checked="true"]::after { transform: translateX(18px); }
.site-footer { grid-column: 2; margin-top: 64px; color: var(--muted); font: 12px/1.5 var(--sans); }
.site-footer p { margin: 0; }
.site-footer .template-credit { margin-top: 12px; font: 13px/1.6 var(--serif); }
.template-credit a { overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 16px; top: -80px; padding: 8px 16px; background: var(--paper); z-index: 10; font-family: var(--sans); }
.skip-link:focus { top: 12px; }
.home-header h1 { margin-bottom: 56px; padding-right: 58px; }
.home-header .intro { margin: 0; font-size: 18px; line-height: 1.6; }
.home-header .intro, #about p { text-align: justify; hyphens: auto; }
.home-page section { margin-top: 54px; }
.home-page #research { margin-top: 58px; }
.publications { margin: 0; padding-left: 26px; }
.publication { padding-left: 5px; margin-bottom: 27px; }
.publication::marker { color: var(--muted); font: 13px var(--sans); }
.pub-title { margin: 0 0 4px; }
.pub-meta { margin: 0; font-size: 16px; color: var(--muted); }
.award { color: var(--ink); }
.pub-links { display: flex; flex-wrap: wrap; gap: 0; font-size: 16px; }
.pub-links a + a::before { content: "/"; display: inline-block; margin: 0 9px; color: var(--muted); text-decoration: none; }
.thesis { margin: 34px 0 0; font-size: 17px; }
.project-list { padding-left: 22px; margin: 0; }
.project-list li { padding-left: 4px; margin-bottom: 26px; }
.project-list p { margin: 5px 0; font-size: 16px; color: var(--muted); }
.project-list li > a { font-size: 16px; }
.links-section ul { margin: 0; padding-left: 22px; }
.links-section li { margin-bottom: 5px; }
.page-top, .detail-header { margin-bottom: 38px; }
.page-top h1 { margin: 25px 0 15px; }
.lead { font-size: 20px; }
.back-link { font: 14px/1.6 var(--sans); color: var(--muted); }
.cv-contact { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 5px; font-size: 16px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; font-size: 14px; }
.print-button { border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cv-section { padding: 26px 0; border-top: 1px solid var(--line); }
.cv-section > h2 { margin-bottom: 18px; font-size: 22px; }
.cv-item { margin-bottom: 22px; }
.cv-item:last-child { margin-bottom: 0; }
.cv-item h3 { font-size: 18px; }
.cv-item p { margin: 3px 0 0; font-size: 16px; }
.cv-date { color: var(--muted); font: 13px/1.6 var(--sans) !important; }
.cv-list { margin: 0; padding-left: 22px; font-size: 16px; }
.cv-list li { margin-bottom: 8px; }
.skills { font-size: 16px; margin: 0; }
.archive-note { padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.eyebrow { font: 14px/1.6 var(--sans); color: var(--muted); }
.detail-header h1 { font-size: 32px; margin: 20px 0; }
.pub-authors { font-size: 17px; }
.detail-figure { margin: 0 0 38px; padding: 16px; background: #fff; border: 1px solid var(--line); }
.detail-figure img { max-height: 450px; width: 100%; object-fit: contain; }
.prose h2 { margin: 35px 0 18px; }
.video-link { display: block; margin-bottom: 20px; }
.video-link span { display: block; font-size: 14px; color: var(--muted); }
.detail-footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; font-size: 16px; }
:root[data-theme="dark"] { color-scheme: dark; --paper: #111; --ink: #d4d4d4; --muted: #a0a0a0; --line: #383838; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --paper: #111; --ink: #d4d4d4; --muted: #a0a0a0; --line: #383838; }
}
@media (max-width: 768px) {
  .site-layout { display: block; padding: 30px 20px 28px; max-width: 680px; }
  .site-header { display: none; }
  .home-header .intro, #about p { text-align: left; hyphens: none; }
  .home-page section, .home-page #research { margin-top: 44px; }
  .site-footer { margin-top: 48px; }
  .publication { margin-bottom: 26px; padding-left: 2px; }
  .pub-title { font-size: 18px; }
  .detail-header h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .theme-toggle::after { transition: none; } }
@media print {
  :root, :root[data-theme] { color-scheme: light; --paper: #fff; --ink: #111; --muted: #444; --line: #ccc; }
  body { font-size: 10pt; }
  .site-layout { display: block; padding: 0; max-width: none; }
  .site-header, .site-footer, .skip-link, .page-actions, .back-link, .archive-note, .theme-toggle { display: none; }
  .page-top { margin-bottom: 18pt; }
  .page-top h1 { margin: 0 0 8pt; font-size: 28pt; }
  .lead { font-size: 12pt; }
  .cv-contact { font-size: 9pt; }
  .cv-section { padding: 14pt 0; }
  .cv-section h2 { font-size: 14pt; margin-bottom: 10pt; }
  .cv-item { margin-bottom: 12pt; break-inside: avoid; }
  .cv-item h3 { font-size: 11pt; }
  .cv-item p, .skills, .cv-list { font-size: 10pt; }
  .cv-date { font-size: 9pt !important; }
  a { text-decoration: none; }
  @page { size: A4; margin: 17mm; }
}
