:root {
  color-scheme: light;
  --bg: #fcfcfa;
  --surface: #f1f3f4;
  --text: #252e38;
  --heading: #172b40;
  --muted: #64707b;
  --accent: #285986;
  --accent-soft: #e8eff5;
  --border: #dde2e5;
  --header: #17375b;
  --header-text: #f5f8fc;
  --focus: #316fa6;
  --cover-shadow: 0 9px 15px -8px #14233466;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #191e24; --surface: #222a33; --text: #d3d9df; --heading: #f0f3f6;
    --muted: #a3aeba; --accent: #91bde2; --accent-soft: #24394c; --border: #35404b;
    --focus: #a8d6fb; --cover-shadow: 0 9px 15px -8px #0009;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191e24; --surface: #222a33; --text: #d3d9df; --heading: #f0f3f6;
  --muted: #a3aeba; --accent: #91bde2; --accent-soft: #24394c; --border: #35404b;
  --focus: #a8d6fb; --cover-shadow: 0 9px 15px -8px #0009;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; border-radius: 2px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { color: var(--heading); line-height: 1.25; }
h1 { font-size: clamp(36px, 4.2vw, 52px); letter-spacing: -1.7px; font-weight: 650; margin: 0 0 16px; }
h2 { font-size: 26px; letter-spacing: -.6px; font-weight: 600; margin: 0 0 20px; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 12px; }
p { margin: 0 0 18px; }
strong { font-weight: 600; }
figure { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
figcaption { color: var(--muted); font-size: 12px; margin-top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 20; top: -70px; left: 20px; padding: 10px 18px; background: var(--bg); }
.skip-link:focus { top: 10px; }
.site-header { background: var(--header); color: var(--header-text); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #ffffff20; }
.header-inner { max-width: 1140px; margin: auto; display: flex; align-items: center; gap: 32px; min-height: 72px; padding: 0 30px; }
.wordmark { margin-right: auto; color: var(--header-text); font-size: 18px; font-weight: 600; letter-spacing: -.4px; text-decoration: none; white-space: nowrap; }
.wordmark span { color: #95bddc; }
.site-nav { display: flex; align-items: stretch; gap: 28px; align-self: stretch; }
.site-nav a { color: #d5e0ed; font-size: 14px; text-decoration: none; display: flex; align-items: center; border-bottom: 2px solid transparent; padding-top: 2px; }
.site-nav a:hover, .site-nav a.active { color: #fff; border-color: #90b7d7; }
.site-nav a.active { font-weight: 600; }
.theme-toggle { color: #e3edf7; background: none; border: 1px solid #ffffff30; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.theme-toggle:hover { background: #ffffff12; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.site-main { max-width: 1140px; padding: 0 30px; margin: auto; }
.site-main:focus { outline: none; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 18px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 80px; align-items: start; padding: 76px 0 62px; }
.affiliation { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.affiliation a { text-decoration: none; }
.affiliation span { padding: 0 5px; }
.bio { font-size: 16px; line-height: 1.8; }
.bio p { margin-bottom: 16px; }
.bio a { text-decoration: none; border-bottom: 1px solid var(--border); }
.portrait { padding-top: 0; }
.portrait img { border-radius: 5px; aspect-ratio: 1; object-fit: cover; }
.social-links { display: flex; flex-wrap: wrap; list-style: none; gap: 8px 22px; margin: 27px 0 0; padding: 0; }
.social-links a { text-decoration: none; font-size: 13px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; min-height: 30px; }
.link-arrow { font-size: 12px; opacity: .75; }
.section { border-top: 1px solid var(--border); padding: 42px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; }
.section-link { font-size: 13px; text-decoration: none; white-space: nowrap; }
.section-link span { margin-left: 6px; }
.section-note { font-size: 12px; color: var(--muted); }
.publication { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 28px; padding: 28px 0; }
.publication + .publication { border-top: 1px solid var(--border); }
.publication-venue { padding-top: 2px; }
.publication-venue > span { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; padding: 5px 10px; border-radius: 3px; }
.publication h3 { max-width: 760px; font-size: 19px; line-height: 1.4; margin-bottom: 8px; }
.publication h3 a { color: var(--heading); text-decoration: none; }
.authors { color: var(--muted); font-size: 13px; line-height: 1.7; margin-bottom: 11px; }
.authors strong { color: var(--text); }
.publication-summary { font-size: 14px; line-height: 1.75; margin-bottom: 14px; max-width: 790px; }
.paper-links { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.paper-links a { font-size: 11px; text-decoration: none; padding: 3px 10px; border: 1px solid var(--border); border-radius: 3px; min-height: 28px; }
.paper-links a:hover { background: var(--accent-soft); border-color: var(--accent); }
.paper-links span { margin-left: 5px; }
.citation { margin-top: 17px; }
.citation summary { color: var(--accent); font-size: 12px; cursor: pointer; width: fit-content; padding: 5px 0; }
.citation-content { background: var(--surface); border: 1px solid var(--border); padding: 18px; border-radius: 4px; margin-top: 12px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; margin: 0 0 14px; }
.copy-citation { background: var(--bg); color: var(--accent); border: 1px solid var(--border); padding: 6px 12px; border-radius: 3px; font-size: 12px; }
.copy-status { color: var(--muted); font-size: 12px; margin-left: 12px; }
.text-link { font-size: 13px; font-weight: 500; text-decoration: none; display: inline-block; padding: 4px 0; }
.text-link span { margin-left: 7px; }
.bio-timeline { list-style: none; margin: 32px 0 4px; padding: 0; max-width: 930px; }
.bio-timeline li { position: relative; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 40px; padding-bottom: 32px; }
.bio-timeline li:last-child { padding-bottom: 0; }
.bio-timeline li::before { content: ""; position: absolute; left: 154px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); z-index: 1; }
.bio-timeline li::after { content: ""; position: absolute; left: 158px; top: 10px; bottom: -10px; width: 1px; background: var(--border); }
.bio-timeline li:last-child::after { display: none; }
.timeline-date { color: var(--muted); font-size: 13px; text-align: right; line-height: 1.8; }
.timeline-content h3 { font-size: 16px; line-height: 1.5; letter-spacing: 0; margin: 0 0 7px; }
.timeline-content p { font-size: 14px; line-height: 1.8; margin: 0; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { max-width: 1140px; margin: auto; padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 11px; }
.footer-inner p { margin: 0; }
.footer-inner div { display: flex; gap: 24px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.page-heading { padding: 64px 0 38px; max-width: 820px; }
.page-heading h1 { font-size: 43px; margin-bottom: 20px; }
.page-heading > p { max-width: 750px; font-size: 15px; line-height: 1.8; }
.page-heading > p:last-child { margin-bottom: 0; }
.project-feature { border-top: 1px solid var(--border); display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 44px; padding: 44px 0; }
.project-side .eyebrow { font-size: 10px; margin-bottom: 12px; }
.project-year { color: var(--muted); font-size: 12px; }
.project-content { max-width: 710px; }
.project-content h2 { font-size: 29px; margin-bottom: 8px; }
.project-role { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.project-content > p:not(.project-role) { font-size: 15px; }
.engineering-project { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 50px; padding: 22px 0 32px; }
.engineering-project p:not(.eyebrow) { font-size: 14px; }
.engineering-project figure { background: #fff; padding: 12px; border-radius: 4px; }
.engineering-project figure img { width: 100%; }
.engineering-project figcaption { color: #64707b; text-align: center; }
.engineering-project.text-only { grid-template-columns: 1fr; border-top: 1px solid var(--border); padding-top: 32px; }
.engineering-project.text-only > div { max-width: 640px; }
.book-tools { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 20px 0; margin-bottom: 38px; }
.book-search { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 390px; color: var(--muted); }
.book-search input { min-width: 0; width: 100%; border: none; background: none; color: var(--text); font-size: 14px; padding: 8px 0; border-radius: 0; }
.book-search input::placeholder { color: var(--muted); opacity: 1; }
.book-category { margin-left: auto; }
.book-category select { color: var(--text); border: 1px solid var(--border); border-radius: 3px; padding: 7px 30px 7px 12px; background: var(--bg); font-size: 12px; max-width: 225px; }
#book-count { color: var(--muted); font-size: 12px; margin: 0; min-width: 52px; text-align: right; }
.book-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 35px; row-gap: 36px; padding: 0 0 70px; }
.book-cover { height: 238px; display: flex; align-items: end; justify-content: center; background: var(--surface); padding: 22px 22px 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.book-cover img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; box-shadow: var(--cover-shadow); }
.book h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 1.5; margin: 0 0 5px; }
.book > p { color: var(--muted); font-size: 11px; margin: 0; }
.empty-state { padding: 24px 0 100px; color: var(--muted); }
.not-found { min-height: 65vh; padding: 90px 0; }
@media (min-width: 1400px) { .intro { padding-top: 88px; } }
@media (max-width: 950px) {
  .intro { grid-template-columns: minmax(0, 1fr) 240px; gap: 42px; padding-top: 58px; }
  .portrait { padding-top: 0; }
  h1 { font-size: 42px; }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
  .book-cover { height: 235px; padding: 20px 17px 16px; }
  .project-feature { grid-template-columns: 165px minmax(0, 1fr); gap: 25px; }
}
@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; padding: 15px 22px 0; gap: 8px 20px; }
  .wordmark { font-size: 17px; }
  .theme-toggle { width: 34px; height: 34px; }
  .site-nav { order: 3; flex: 0 0 100%; gap: 28px; min-height: 45px; }
  .site-nav a { font-size: 13px; }
  .site-main { padding: 0 22px; }
  .intro { grid-template-columns: minmax(0, 1fr) 155px; gap: 22px; padding: 40px 0; }
  .intro-copy { display: contents; }
  .affiliation { grid-column: 1; grid-row: 1; font-size: 14px; margin: 0; align-self: center; }
  .affiliation span { padding: 0 3px; }
  .portrait { grid-column: 2; grid-row: 1; padding: 0; }
  .bio { grid-column: 1 / -1; font-size: 15px; }
  .bio p:last-child { margin-bottom: 0; }
  .social-links { grid-column: 1 / -1; margin-top: 0; gap: 6px 20px; }
  .section { padding: 32px 0; }
  .section-heading { margin-bottom: 18px; }
  .bio-timeline { margin-top: 24px; }
  .bio-timeline li { grid-template-columns: 1fr; gap: 5px; padding-left: 27px; padding-bottom: 28px; }
  .bio-timeline li::before { left: 0; top: 7px; }
  .bio-timeline li::after { left: 4px; top: 8px; bottom: -8px; }
  .timeline-date { text-align: left; font-size: 12px; }
  h2 { font-size: 23px; }
  .section-link { font-size: 11px; }
  .publication { grid-template-columns: 1fr; gap: 15px; padding: 23px 0; }
  .publication-venue { display: flex; align-items: center; gap: 10px; }
  .publication h3 { font-size: 18px; }
  .publication-summary { font-size: 13px; }
  .footer-inner { padding: 22px; font-size: 10px; gap: 15px; }
  .footer-inner div { gap: 15px; }
  .page-heading { padding: 40px 0 30px; }
  .page-heading h1 { font-size: 36px; }
  .project-feature { grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
  .project-side { display: flex; align-items: center; justify-content: space-between; }
  .project-side .eyebrow { margin: 0; font-size: 9px; }
  .project-content h2 { font-size: 26px; }
  .engineering-project { grid-template-columns: 1fr; gap: 20px; }
  .book-tools { flex-wrap: wrap; gap: 14px; margin-bottom: 28px; padding: 16px 0; }
  .book-search { flex-basis: 100%; max-width: none; }
  .book-category { margin-left: 0; }
  #book-count { margin-left: auto; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px 20px; }
  .book-cover { height: 220px; padding: 17px 13px 14px; }
}
@media (max-width: 470px) {
  .intro { grid-template-columns: minmax(0, 1fr) 110px; gap: 18px; }
  .affiliation { line-height: 1.65; }
  .affiliation span { display: none; }
  .affiliation a { display: block; }
  .social-links { gap: 5px 18px; }
  .social-links a { font-size: 12px; }
  .section-heading h2 { font-size: 21px; }
  .section-link { font-size: 10px; }
  .footer-inner { flex-wrap: wrap; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 22px; }
  .book-cover { height: 230px; padding: 18px 13px 15px; }
  .book h2 { font-size: 13px; }
  .book-category select { max-width: 235px; }
  .page-heading h1 { font-size: 34px; }
}
@media (max-width: 350px) {
  .site-main { padding: 0 18px; }
  .header-inner { padding-left: 18px; padding-right: 18px; }
  .intro { grid-template-columns: minmax(0, 1fr) 95px; gap: 16px; }
  .book-cover { height: 210px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { color-scheme: light; --bg: #fff; --text: #000; --heading: #000; --muted: #444; --accent: #000; --border: #ddd; }
  .site-header, .site-footer, .book-tools, .theme-toggle, .copy-citation { display: none !important; }
  .site-main { max-width: none; }
  .intro { padding-top: 25px; }
  .publication, .project-feature, .book { break-inside: avoid; }
}
