@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b1424;
  --surface: #121e32;
  --text: #e9eef6;
  --muted: #a8b5c9;
  --accent: #efbe68;
  --line: #29374e;
  --sans: 'Roboto', Arial, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.3; }
p + p { margin-top: 1em; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 10;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
}
.skip-link:focus { top: 16px; }
.site-wrap { max-width: 1240px; margin: auto; padding: 0 52px; }
.site-header {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: .1px; }
nav { display: flex; gap: 30px; font-size: 15px; color: var(--muted); }
nav a { padding: 8px 0; border-bottom: 1px solid transparent; }
nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.menu-toggle { display: none; }

/* About: a few paragraphs and an uncropped photograph. */
.about-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 66px;
  padding: 66px 0 76px;
}
.about-copy h1 {
  font-size: clamp(35px, 3.9vw, 48px);
  line-height: 1.17;
  font-weight: 700;
  letter-spacing: -1.2px;
  margin-bottom: 24px;
}
.role-line {
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.85;
  color: var(--accent);
  margin-bottom: 30px;
}
.role-line a:hover { text-decoration: underline; text-underline-offset: 5px; }
.biography { font-size: 20px; line-height: 1.85; }
.biography p + p { margin-top: 25px; }
.biography a { color: var(--accent); text-decoration: underline; text-decoration-color: #8b734e; text-underline-offset: 4px; }
.biography a:hover { text-decoration-color: var(--accent); }
.social-links { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 32px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
}
.social-links a:hover { border-color: var(--accent); }
.social-links a > span[aria-hidden] { color: var(--muted); font-size: 13px; }
.profile-photo img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #35445e;
}
.profile-contact { margin-top: 21px; color: var(--muted); font-size: 14px; }
.profile-contact p { display: flex; gap: 12px; align-items: flex-start; }
.profile-contact p + p { margin-top: 12px; }
.profile-contact svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); margin-top: 4px; }
.profile-contact a { color: var(--text); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.profile-contact a:hover { color: var(--accent); }

/* Shared page headings and content. */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .4px; color: var(--muted); }
.status-dot { display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.page-intro { padding: 58px 0 45px; }
.page-intro h1 { font-size: 44px; font-weight: 700; letter-spacing: -.8px; margin: 16px 0; }
.page-intro > p:not(.eyebrow), .page-intro > div > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.accent { color: var(--accent); }
.text-link { display: inline-flex; gap: 12px; align-items: center; font-size: 14px; color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.page-intro .text-link { margin-top: 19px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  background: var(--accent);
  color: #152033;
  padding: 12px 21px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--accent);
  border-radius: 6px;
}
.button:hover { background: #f6cd87; color: #152033; }
.section { border-top: 1px solid var(--line); padding: 36px 0 43px; }
.split-section { display: grid; grid-template-columns: 1fr 2.3fr; gap: 45px; }
.section-label { display: flex; gap: 16px; align-items: baseline; }
.section-number { color: var(--accent); font-size: 11px; font-family: var(--mono); }
.section-label h2 { font-size: 21px; }
.prose { font-size: 17px; color: var(--muted); line-height: 1.85; }
.prose h3 { color: var(--text); font-size: 19px; margin-bottom: 9px; }
.prose article + article { margin-top: 28px; }
.prose article > .text-link { margin-top: 13px; }

/* Publications. */
.publication-controls { border-top: 1px solid var(--line); padding-top: 25px; }
.search-box { position: relative; display: block; }
.search-box svg { position: absolute; width: 20px; height: 20px; left: 16px; top: 17px; color: var(--muted); }
.search-box input {
  width: 100%;
  height: 55px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 15px 0 47px;
  font-size: 15px;
}
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box input:focus-visible { outline-offset: 2px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.filter { background: transparent; border: 1px solid var(--line); padding: 6px 16px; border-radius: 30px; color: var(--muted); font-size: 13px; }
.filter.active { background: var(--accent); color: #152033; border-color: var(--accent); }
.filter:hover:not(.active) { border-color: var(--accent); color: var(--text); }
.publication-count { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 28px; font-size: 13px; color: var(--muted); }
.publication-count a { color: var(--accent); }
.publication-list > .paper { padding: 35px 0 29px; border-bottom: 1px solid var(--line); }
.paper-meta { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 13px; color: var(--accent); font-family: var(--mono); font-size: 12px; }
.paper-meta > span:last-child { color: var(--muted); }
.paper h2 { font-size: 25px; font-weight: 500; line-height: 1.45; max-width: 960px; }
.paper-title-arrow { color: var(--accent); font-size: 20px; white-space: nowrap; }
.authors { font-size: 15px; color: var(--muted); margin-top: 16px; line-height: 1.85; }
.authors strong { color: var(--text); font-weight: 600; }
.authors sup { color: var(--accent); font-size: 10px; margin-left: 1px; }
.contribution-note { color: var(--muted); font-size: 12px; margin-top: 5px; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 18px; font-size: 13px; color: var(--accent); }
.paper-actions a { display: inline-flex; gap: 7px; align-items: center; }
.paper details { margin-top: 20px; max-width: 960px; }
.paper summary { list-style: none; display: flex; align-items: center; gap: 13px; width: max-content; cursor: pointer; font-size: 14px; padding: 4px 0; }
.paper summary::-webkit-details-marker { display: none; }
.expand-symbol { width: 10px; height: 10px; position: relative; display: inline-block; }
.expand-symbol:before, .expand-symbol:after { content: ''; background: var(--accent); position: absolute; top: 4px; left: 0; width: 9px; height: 1px; }
.expand-symbol:after { transform: rotate(90deg); }
details[open] .expand-symbol:after { transform: rotate(0); }
.abstract { padding: 13px 0 2px 20px; border-left: 2px solid var(--line); margin-top: 13px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.abstract-note { font-size: 12px; }
.abstract math { font-size: 1.05em; }
.empty-state { padding: 40px 0; color: var(--muted); font-size: 16px; }

.misc-placeholder { min-height: calc(100svh - 94px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.misc-placeholder h1 { font-size: clamp(72px, 12vw, 132px); font-weight: 600; letter-spacing: .08em; line-height: 1; padding-left: .08em; }
.tbd-clock { width: 104px; height: 104px; color: var(--accent); }

/* Curriculum vitae and teaching. */
.cv-page { padding: 28px 0 20px; }
.cv-actions { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.cv-page .pdf-viewer { height: calc(100dvh - 210px); min-height: 480px; }
.cv-page .cv-document { display: grid; gap: 18px; padding: 18px; }
.cv-page .cv-document:empty { min-height: 480px; }
.pdf-page { position: relative; width: 100%; max-width: 850px; margin: auto; background: white; }
.pdf-page canvas { display: block; width: 100%; height: auto; }
.cv-intro { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.cv-intro .button { white-space: nowrap; margin-top: 24px; }
.cv-overview { border-top: 1px solid var(--line); padding: 32px 0 37px; display: grid; grid-template-columns: 1fr 3fr; gap: 35px; }
.small-heading { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.education-row { display: flex; justify-content: space-between; gap: 25px; }
.education-row + .education-row { margin-top: 23px; }
.education-row h3 { font-size: 18px; }
.education-row p { color: var(--muted); font-size: 14px; }
.education-row > p { text-align: right; font-size: 12px; white-space: nowrap; }
.education-row > p span { display: block; font-size: 12px; }
.cv-document { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.document-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 19px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.document-toolbar > span { display: flex; align-items: center; gap: 8px; }
.document-toolbar > a { color: var(--accent); }
.pdf-viewer { display: block; width: 100%; height: 900px; border: 0; background: #282828; }
.pdf-fallback { padding: 60px 30px; text-align: center; }
.pdf-fallback .button { margin-top: 20px; }
.document-note { font-size: 13px; color: var(--muted); margin: 18px 0 40px; }
.document-note a { color: var(--accent); }
.timeline-entry { position: relative; padding-left: 22px; border-left: 1px solid var(--line); padding-bottom: 30px; color: var(--muted); font-size: 16px; }
.timeline-entry:before { content: ''; position: absolute; left: -3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; }
.timeline-head h3 { color: var(--text); font-size: 18px; }
.timeline-head > span { white-space: nowrap; font-size: 12px; }
.timeline-role { color: var(--accent); font-size: 14px; margin: 5px 0 10px; }
.timeline-role + p { margin-top: 0; }
.site-footer { border-top: 1px solid var(--line); margin-top: 22px; padding: 27px 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 25px; font-size: 12px; color: var(--muted); }
.site-footer p span { display: block; font-size: 11px; margin-top: 3px; }
.site-footer > a:not(.back-top) { color: var(--text); }
.back-top { font-size: 12px; }
.back-top span { margin-left: 10px; color: var(--accent); }

@media (max-width: 1000px) {
  .site-wrap { padding: 0 36px; }
  .about-page { grid-template-columns: minmax(0, 1fr) 250px; gap: 36px; }
  .about-copy h1 { font-size: 39px; }
  .biography { font-size: 18px; }
  .role-line { font-size: 15px; }
  .split-section { grid-template-columns: 1fr 2fr; gap: 30px; }
  .timeline-head { display: block; }
  .timeline-head > span { display: block; margin-top: 4px; }
  .cv-intro { display: block; }
}

@media (max-width: 720px) {
  .misc-placeholder { min-height: calc(100svh - 78px); }
  .tbd-clock { width: 84px; height: 84px; }
  .site-wrap { padding: 0 24px; }
  .site-header { height: 78px; position: relative; flex-wrap: wrap; gap: 15px; }
  .wordmark { font-size: 16px; }
  .js .menu-toggle { display: flex; align-items: center; gap: 15px; border: 0; padding: 9px 0; background: transparent; font-size: 14px; }
  .menu-toggle span { color: var(--accent); font-size: 21px; line-height: 1; }
  .js nav { display: none; position: absolute; top: 77px; left: -24px; right: -24px; z-index: 5; padding: 18px 24px; justify-content: space-between; gap: 14px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; }
  .js nav.is-open { display: flex; }
  html:not(.js) .site-header { height: auto; min-height: 110px; padding: 16px 0; gap: 8px; }
  html:not(.js) nav { width: 100%; gap: 23px; font-size: 14px; }
  .about-page { grid-template-columns: 1fr; padding: 40px 0 45px; gap: 37px; }
  .about-copy h1 { font-size: 36px; letter-spacing: -.7px; margin-bottom: 20px; }
  .role-line { font-size: 15px; margin-bottom: 25px; }
  .biography { font-size: 18px; line-height: 1.8; }
  .biography p + p { margin-top: 23px; }
  .social-links { gap: 9px; margin-top: 28px; }
  .social-links a { font-size: 13px; padding: 9px 14px; }
  .profile-sidebar { max-width: 320px; width: 100%; }
  .page-intro { padding: 40px 0 34px; }
  .page-intro h1 { font-size: 37px; margin: 15px 0; overflow-wrap: anywhere; }
  .page-intro > p:not(.eyebrow), .page-intro > div > p:not(.eyebrow) { font-size: 17px; }
  .section { padding: 28px 0 33px; }
  .split-section { display: block; }
  .split-section > .prose, .split-section > .timeline { margin-top: 24px; }
  .section-label h2 { font-size: 21px; }
  .prose { font-size: 16px; }
  .publication-controls { padding-top: 21px; }
  .filter-buttons { gap: 7px; }
  .filter { font-size: 12px; padding: 5px 12px; }
  .publication-count { font-size: 12px; align-items: flex-start; gap: 20px; }
  .publication-count a { max-width: 150px; text-align: right; }
  .paper-meta { font-size: 11px; gap: 18px; }
  .paper h2 { font-size: 22px; }
  .authors { font-size: 14px; }
  .paper-actions { gap: 20px; font-size: 12px; }
  .abstract { padding-left: 15px; font-size: 15px; }
  .cv-overview { display: block; padding: 26px 0 31px; }
  .cv-overview > div { margin-top: 21px; }
  .education-row { gap: 18px; }
  .education-row h3 { font-size: 16px; }
  .education-row p { font-size: 12px; }
  .education-row > p, .education-row > p span { font-size: 11px; }
  .document-toolbar { padding: 13px 12px; font-size: 11px; gap: 15px; }
  .pdf-viewer { height: 540px; }
  .document-note { font-size: 12px; }
  .timeline-entry { font-size: 15px; }
  .timeline-head h3 { font-size: 17px; }
  .site-footer { display: grid; grid-template-columns: 1fr auto; gap: 19px 12px; padding: 25px 0; font-size: 11px; }
  .site-footer p { grid-column: 1 / 3; }
  .site-footer p span { font-size: 11px; }
  .back-top { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  body { background: white; color: black; }
  .site-header, .site-footer, .publication-controls, .paper-actions { display: none; }
  .site-wrap { max-width: none; padding: 0; }
  .page-intro { padding: 0 0 20px; }
  .paper { break-inside: avoid; }
  a, .authors, .paper-meta, .abstract { color: black; }
  .publication-list > .paper { padding: 20px 0; }
}
