:root {
  color-scheme: dark;
  --bg: #181818;
  --text: #ededed;
  --muted: #b8b8b8;
  --accent: #92bdff;
  --line: #464646;
  --control: #858585;
  --focus: #92bdff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
img { max-width: 100%; height: auto; }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 500; line-height: 1.06; letter-spacing: -.045em; margin: 0 0 28px; }
h2 { font-weight: 500; font-size: 23px; line-height: 1.3; letter-spacing: -.015em; margin: 0 0 24px; }
h3 { font-weight: 500; font-size: 20px; line-height: 1.4; letter-spacing: -.01em; margin: 0 0 8px; }
section { margin-top: 48px; }
main > p, main > section > p { max-width: 70ch; }
.site-layout { max-width: 1280px; margin: 0 auto; padding: 0 48px 32px; }
.identity { display: flex; gap: 32px; align-items: center; justify-content: space-between; padding: 24px 0; border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.identity-name { color: var(--text); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.identity nav ul, .site-footer ul { list-style: none; padding: 0; margin: 0; }
.identity nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.identity nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid transparent; }
.identity nav a:hover { color: var(--text); }
.identity nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.cv-link { display: inline-flex; gap: 12px; min-height: 44px; align-items: center; font-size: 14px; white-space: nowrap; }
.portrait { display: block; width: 96px; height: 144px; object-fit: cover; object-position: 50% 0%; margin-bottom: 16px; }
.home-intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 48px; align-items: start; margin-bottom: 40px; }
.home-heading h1 { font-size: clamp(42px, 6vw, 84px); font-weight: 400; letter-spacing: -.045em; }
.home-heading h1 span { color: var(--accent); }
.home-profile { padding-left: 32px; border-left: 1px solid var(--line); }
.home-profile .role { font-size: 14px; line-height: 1.5; margin: 0; color: var(--text); }
.home-profile .role span { color: var(--muted); }
.home-overview { display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; }
.home-summary { min-width: 0; }
.home-overview #current-work { margin: 0; padding-left: 32px; border-left: 1px solid var(--accent); }
.home-overview #current-work h2 { font-size: 13px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--accent); letter-spacing: .04em; margin-bottom: 20px; }
.home-overview #current-work p { font-size: 16px; }
.home-overview #current-work .text-link { font-size: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.project-grid .project { display: flex; flex-direction: column; border: 0; border-top: 1px solid var(--line); padding: 24px 0 0; margin: 0; }
.project-grid .text-link { margin-top: auto; }
.page-home main > section { margin-top: 72px; }
.page-home main > section > h2 { border: 0; padding: 0; margin-bottom: 28px; }
.home-summary p { max-width: 57ch; }
.home-summary p:first-child { font-size: 18px; line-height: 1.6; }
.home-summary p + p { color: var(--muted); }
main { min-width: 0; padding-bottom: 32px; }
.eyebrow, .metadata, .authors, .period { color: var(--muted); font-size: 14px; line-height: 1.55; }
.eyebrow { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .045em; margin: 0 0 16px; }
.eyebrow span { padding: 0 5px; }
.role { color: var(--accent); line-height: 1.5; margin-bottom: 28px; }
.primary-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; }
.primary-links a, .text-link { display: inline-flex; min-height: 44px; align-items: center; }
main > section > h2 { padding-top: 24px; border-top: 1px solid var(--line); }
.project { padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.project:last-child { margin-bottom: 0; }
.project p { max-width: 68ch; }
.project .text-link { font-size: 14px; }
.contributions li { margin-bottom: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 0; list-style: none; font-size: 14px; margin: 4px 0 0; }
.links a { display: inline-flex; min-height: 44px; align-items: center; }
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.publication:last-child { margin-bottom: 0; }
.publication .eyebrow { font-size: 12px; margin-bottom: 8px; }
.publication h3 { max-width: 62ch; font-size: 21px; line-height: 1.35; }
.publication .authors { max-width: 90ch; }
.publication .authors { margin-bottom: 6px; }
.publication .metadata { margin-bottom: 0; }
.year-group { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); gap: 32px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 36px; }
.year-group .publication:last-child { border-bottom: 0; padding-bottom: 0; }
.page-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
.page-summary p { margin: 0; }
.page-heading { margin-bottom: 28px; }
main > .year-group > h2 { border: 0; padding: 0; font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 20px 0; border-top: 0; border-bottom: 1px solid var(--line); margin: 24px 0; }
.filters > div { flex: 0 1 7.5em; min-width: min(100%, 7.5em); }
.filters > .search-field { flex: 1 1 16em; }
.filters label { display: block; font-size: 14px; margin-bottom: 8px; }
/* Reserve the controls' natural size until initialization completes. With
   scripting disabled, the hidden form occupies no space. Never reserve print space. */
@media screen and (scripting: enabled) {
  .filters[hidden] { display: flex !important; visibility: hidden; }
}
input, select, button { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--control); border-radius: 2px; min-height: 44px; padding: 8px 10px; }
input, select { width: 100%; }
input::placeholder { color: var(--muted); opacity: 1; }
button { cursor: pointer; }
button:hover { border-color: var(--text); }
#publication-empty { padding: 24px 0; }
.timeline { list-style: none; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 20px; margin-bottom: 28px; }
.timeline .period { padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline h3 { margin-bottom: 4px; }
.timeline p:last-child { margin-bottom: 0; }
.activity-list { list-style: none; padding: 0; }
.activity-list > li { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.activity-list .period { margin-bottom: 8px; }
.page-teaching #courses .activity-list > li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; }
.activity-body { min-width: 0; }
.activity-body:only-child { grid-column: 1 / -1; }
.page-teaching #courses .period { font-variant-numeric: tabular-nums; padding-top: 3px; }
.research-directions { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px 40px; }
.research-directions dt { font-weight: 500; font-size: 18px; }
.research-directions dd { margin: 0; max-width: 65ch; color: var(--muted); }
.page-projects .project { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding: 16px 0 32px; margin-bottom: 32px; }
.page-projects .project h3 { font-size: 28px; line-height: 1.2; max-width: 16ch; }
.project-body { min-width: 0; }
.project-body .contributions { font-size: 16px; }
.project-body > .links:last-child { display: block; }
.project-body > .links:last-child li + li { margin-top: 8px; }
.related-note { margin-top: 40px; }
details { margin-top: 10px; font-size: 15px; }
summary { cursor: pointer; color: var(--accent); min-height: 44px; padding: 9px 0; }
.site-footer { display: flex; gap: 24px; justify-content: space-between; border-top: 1px solid var(--text); padding-top: 24px; margin-top: 40px; color: var(--muted); font-size: 13px; }
.site-footer p { line-height: 1.5; }
.site-footer span { font-size: 12px; }
.site-footer ul { display: flex; gap: 0 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.skip-link { position: absolute; top: 8px; left: 12px; padding: 10px 16px; background: var(--bg); z-index: 2; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.preview-notice { padding: 8px 20px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 1100px) {
  .filters > .search-field { flex-basis: 100%; }
}
@media (max-width: 959px) {
  .site-layout { padding: 0 28px 24px; }
  .identity { flex-wrap: wrap; gap: 12px 24px; margin-bottom: 56px; }
  .identity nav { order: 3; flex-basis: 100%; }
  .identity nav ul { gap: 0 24px; }
  .home-intro { grid-template-columns: minmax(0, 1fr) 180px; gap: 24px; }
  .home-profile { padding-left: 24px; }
  .home-overview { gap: 32px; }
  .project-grid { display: block; }
  .project-grid .project { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 24px; margin-top: 24px; }
  .project-grid .project h3 { grid-row: 1 / span 2; }
  .project-grid .text-link { grid-column: 2; }
  .page-projects .project { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .research-directions { grid-template-columns: 180px minmax(0, 1fr); gap: 28px 32px; }
}
@media (max-width: 599px) {
  .site-layout { padding: 0 20px 24px; }
  h1 { font-size: 42px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  section { margin-top: 32px; }
  .identity { margin-bottom: 40px; padding: 18px 0; }
  .identity-name { font-size: 16px; }
  .identity nav ul { gap: 0 20px; }
  .home-intro, .home-overview, .project-grid { display: block; }
  .home-overview #current-work { margin-top: 40px; padding-left: 20px; }
  .project-grid .project { display: block; margin-top: 24px; }
  .home-summary p:first-child { font-size: 17px; }
  .page-home main > section { margin-top: 48px; }
  .home-heading h1 { font-size: clamp(35px, 9vw, 52px); }
  .home-profile { display: flex; align-items: center; gap: 20px; padding: 0; border: 0; margin-top: 28px; }
  .home-profile .portrait { width: 64px; height: 96px; margin: 0; }
  .home-profile .role { max-width: 24ch; }
  .home-intro { margin-bottom: 32px; }
  .year-group { display: block; }
  .research-directions, .page-projects .project { display: block; }
  .research-directions dt { margin-bottom: 8px; }
  .research-directions dd { margin-bottom: 28px; }
  .page-projects .project h3 { margin-bottom: 20px; font-size: 25px; }
  .year-group > h2 { margin-bottom: 24px; }
  .timeline > li, .page-teaching #courses .activity-list > li { display: block; }
  .timeline .period { margin-bottom: 6px; }
  .filters > div { flex: 1 1 6em; min-width: min(100%, 6em); }
  .filters > .search-field { flex-basis: 100%; }
  .filters button { min-width: 88px; }
  .site-footer { display: block; }
  .site-footer ul { justify-content: flex-start; }
}
@media print {
  :root {
    color-scheme: light;
    --bg: white;
    --text: black;
    --muted: #333;
    --accent: black;
  }
  .site-layout { display: block; padding: 0; }
  .identity { display: block; border: 0; padding: 0; margin-bottom: 20pt; }
  .identity nav, .cv-link, .site-footer, .filters, .skip-link, .preview-notice { display: none; }
  .home-intro, .home-overview, .project-grid, .project-grid .project, .page-projects .project, .research-directions { display: block; }
  .home-intro { margin-bottom: 16pt; }
  .home-profile { display: flex; align-items: center; gap: 16px; border: 0; padding: 0; }
  .home-profile .portrait { width: 48px; height: 72px; margin: 0; }
  .home-overview #current-work { border: 0; padding: 0; margin-top: 20pt; }
  .page-home main > section { margin-top: 24pt; }
  .research-directions dd { margin-bottom: 12pt; }
  .page-teaching #courses .activity-list > li { display: block; break-inside: avoid; }
  .publication, .project, .timeline > li, .activity-list > li { break-inside: avoid; }
  h1, .home-heading h1 { font-size: 28pt; }
}

/* Citation content stays readable with scripting disabled and at narrow widths. */
.publication h3 a { color: inherit; text-decoration-color: var(--line); }
.publication h3 a:hover { color: var(--accent); }
.citation-text { margin: 12px 0; }
.bibtex { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; margin: 16px 0; }
.citation-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.copy-status:empty { display: none; }
.copy-status { margin: 12px 0 0; color: var(--muted); }
@media print { .citation-actions, .copy-status { display: none; } }

.year-jump { margin: 0; }
.year-jump ul { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 8px 0; margin: 0; }
.year-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.year-group > h2 { scroll-margin-top: 24px; }
@media (max-width: 599px) {
  .page-publications .identity { margin-bottom: 24px; }
  .page-publications h1 { margin-bottom: 16px; }
  .page-publications .page-heading { margin-bottom: 16px; }
  .page-publications .filters { padding: 12px 0; margin: 12px 0; }
  .page-publications .year-group { padding-top: 16px; margin-top: 20px; }
  .page-publications .year-group > h2 { margin-bottom: 12px; }
}
@media print { .year-jump { display: none; } }

.project-body h4 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 24px 0 8px; }

.course-list { list-style: none; padding: 0; }
.course-list > li { padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.course-list p { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.course-terms { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; margin: 0; font-size: 14px; }
.course-terms > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; scroll-margin-top: 24px; }
.course-terms .links { margin: 0; }
.course-terms a { display: inline-flex; align-items: center; min-height: 44px; }
.history-archive > .timeline { margin-top: 20px; }
.history-archive .timeline { font-size: 17px; }
