/* Shared shell; profile content comes from PROFILE.md via _data/profile.json. */
:root {
  --paper: #ffffff;
  --ink: #22282a;
  --muted: #626866;
  --accent: #854338;
  --line: #dfdfd7;
  --soft: #f1f0ea;
  --measure: 1040px;
}
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0; padding: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Arial, sans-serif;
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
body::before { display: none; }
* { box-sizing: border-box; }
a, a:visited { color: var(--accent); }
a { text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--ink); text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
::selection { color: var(--ink); background: #e7dbd0; }
.initial-content { flex: 1 0 auto; width: 100%; }
#main { animation: none; -webkit-animation: none; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner, .site-footer__inner {
  max-width: var(--measure); margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-header__inner { min-height: 84px; }
.site-name, .site-name:visited { font-weight: 650; font-size: 18px; letter-spacing: -.4px; color: var(--ink); white-space: nowrap; }
.site-navigation { display: flex; align-items: center; gap: 30px; }
.site-navigation a { padding: 8px 0; font-size: 14px; color: var(--muted); }
.site-navigation a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; color: var(--muted); }
.site-footer__inner { min-height: 104px; font-size: 12px; }
.site-footer p { font-size: inherit; margin: 0; }
.site-footer__links { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
#main.profile-main { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 64px 40px 16px; float: none; }
.profile-main h1, .profile-main h2, .profile-main h3 { color: var(--ink); line-height: 1.3; margin: 0; padding: 0; border: 0; }
.profile-main h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 50px; letter-spacing: -1.8px; }
.profile-main h2 { font-size: 24px; font-weight: 600; letter-spacing: -.6px; }
.profile-main h3 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.profile-main h2, .selected-project h3, .research-project h3 { text-wrap: balance; }
.profile-main p { font-size: 16px; margin: 0 0 16px; text-wrap: pretty; }
.profile-main strong { font-weight: 600; }
.profile-main ul { padding-left: 20px; margin: 14px 0 0; }
.profile-main li { margin-bottom: 7px; }
.profile-main li p { margin: 0; }
.profile-main img { height: auto; max-width: 100%; }
.profile-main .eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1.6px; font-size: 11px; font-weight: 650; margin: 0 0 12px; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 48px; align-items: start; padding: 8px 0 12px; }
.intro h1 { font-size: 56px; margin-bottom: 8px; }
.profile-main .intro__role { color: var(--muted); margin-bottom: 24px; font-size: 16px; }
.intro__body > p:not(.eyebrow):not(.intro__role) { max-width: 660px; }
.intro__portrait { margin: 36px 0 0; }
.intro__portrait img { display: block; width: 230px; height: 296px; object-fit: cover; object-position: 50% 30%; border-radius: 3px; filter: saturate(.82); background: var(--soft); }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; row-gap: 12px; margin-top: 26px; font-size: 14px; }
.contact-links a { display: inline-flex; align-items: center; gap: 6px; }
.link-format { font-size: 10px; letter-spacing: .5px; color: var(--muted); }
.profile-section { margin-top: 50px; scroll-margin-top: 32px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 17px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-aside { font-size: 12px; color: var(--muted); }
.section-link { flex-shrink: 0; font-size: 13px; }
.interest-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.item-index { display: block; color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.interest h3 { margin-bottom: 10px; }
.interest p { color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 0; }
.selected-project { display: grid; grid-template-columns: 24px minmax(0, 1fr) 154px; column-gap: 20px; padding: 8px 0 28px; }
.selected-project + .selected-project { border-top: 1px solid var(--line); padding-top: 28px; }
.selected-project .item-index { padding-top: 3px; }
.selected-project h3 { margin-bottom: 10px; }
.selected-project h3 a { color: var(--ink); }
.selected-project > div { min-width: 0; }
.selected-project p { font-size: 15px; margin-bottom: 12px; }
.selected-project__result p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.selected-project__result strong { color: var(--ink); }
.selected-project__links p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.9; }
.record__date { font-size: 12px; color: var(--muted); line-height: 1.7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.selected-project > .record__date { text-align: right; padding-top: 2px; }
.selected-project--illustrated { grid-template-columns: 24px 160px minmax(0, 1fr) 154px; }
.selected-project__preview { display: block; align-self: start; background: white; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.selected-project__preview img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.selected-project__links .project-materials { margin-top: 8px; font-size: 12px; gap: 6px 16px; }
.record { margin-bottom: 26px; }
.record:last-child { margin-bottom: 0; }
.record__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 6px; }
.record__subtitle { color: var(--muted); }
.record__subtitle p { font-size: 14px; margin: 0 0 10px; }
.record p, .record li { font-size: 15px; }
.record ul { margin-top: 10px; }
.record__result { margin-top: 12px; color: var(--muted); }
.record__result p { margin-bottom: 0; }
.publication-list { list-style: none; padding: 0; margin: 0; counter-reset: publications; }
.publication-list li { position: relative; padding-left: 44px; margin-bottom: 22px; counter-increment: publications; }
.publication-list li::before { content: "0" counter(publications); color: var(--accent); font-size: 11px; position: absolute; left: 0; top: 3px; }
.publication-list li p { font-size: 15px; line-height: 1.8; margin: 0; }
.page-heading { max-width: 800px; margin-bottom: 36px; }
.page-heading h1 { margin-bottom: 18px; }
.page-heading > p:not(.eyebrow) { color: var(--muted); max-width: 620px; }
.page-heading .contact-links { margin-top: 22px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.profile-main--cv .profile-section { margin-top: 40px; }
.download-link { font-weight: 600; }
.research-project { scroll-margin-top: 32px; margin-bottom: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.research-project:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.research-project .record__heading { margin-bottom: 12px; }
.research-project h3 { font-size: 20px; max-width: 680px; }
.research-project > p { font-size: 15px; max-width: 780px; margin: 14px 0; }
.research-project details { margin-top: 16px; font-size: 14px; }
.research-project summary { width: fit-content; cursor: pointer; color: var(--accent); font-weight: 500; padding: 4px 0; }
.research-project details ul { max-width: 800px; margin: 14px 0 0; padding-left: 20px; }
.research-project details li { padding-left: 4px; }
.project-overview--illustrated { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.project-overview__body { min-width: 0; }
.project-overview__body > p, .project-overview__body li { font-size: 15px; }
.project-results { margin-top: 20px; }
.project-results h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.project-results p { font-size: 14px; line-height: 1.75; margin-bottom: 0; }
.project-results p + p { margin-top: 10px; }
.project-materials { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 18px; font-size: 13px; }
.project-materials a { display: inline-flex; align-items: baseline; gap: 5px; text-decoration: underline; text-decoration-color: var(--line); }
.project-materials a:hover { text-decoration-color: currentColor; }
.project-figure { margin: 0; min-width: 0; }
.project-figure > a { display: block; position: relative; background: white; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.project-figure img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.project-figure__open { position: absolute; right: 8px; bottom: 8px; color: var(--accent); background: rgba(255,255,255,.94); padding: 2px 7px; border-radius: 2px; font-size: 10px; }
.project-figure figcaption { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 9px; }
.selected-project__preview:hover, .project-figure > a:hover { border-color: var(--accent); }
.figure-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.project-gallery__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 16px; }
.project-gallery__grid .project-figure img { aspect-ratio: auto; }
.notes-empty { padding: 36px 0 48px; border-top: 1px solid var(--line); }
.notes-empty p, .archive-link { color: var(--muted); }
.note-row { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.note-row h2 { font-size: 22px; margin-bottom: 10px; }
.note-row p { font-size: 15px; color: var(--muted); margin: 0; }
.note-entry { max-width: 760px; margin: auto; }
.back-link { display: inline-block; margin-bottom: 32px; font-size: 14px; }
.note-content { font-size: 17px; }
.note-content h2 { margin: 40px 0 18px; }
.note-content h3 { margin: 30px 0 14px; }
.note-content img { border-radius: 3px; }
.note-content figure { margin: 28px 0; }
.note-content figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.note-content blockquote { border-left-color: var(--accent); }
/* Older research notes retain their URLs, images, code blocks, and mathematics. */
body.layout--single #main { max-width: 840px; padding: 54px 40px; margin: 0 auto; }
body.layout--single #main > .sidebar { display: none; }
body.layout--single .page { float: none; width: 100%; padding: 0; }
body.layout--single .page__title { font-size: 36px; line-height: 1.3; letter-spacing: -1px; }
body.layout--single .page__title a { color: var(--ink); }
body.layout--single .page__content { font-size: 16px; }
body.layout--single .page__content p, body.layout--single .page__content li { font-size: 16px; }
body.layout--single .page__content h2 { font-size: 25px; margin-top: 38px; border-bottom-color: var(--line); }
body.layout--single .page__content h3 { font-size: 20px; }
body.layout--single .page__related { float: none; width: 100%; }
body.layout--single .page__related .archive__item-title { font-size: 16px; }
body.layout--single .page__inner-wrap { float: none; }
body.layout--single .page__content img { max-width: 100%; }
/* Shared rows keep descriptions aligned even when interest titles wrap. */
@media (min-width: 601px) {
  .interest-list { row-gap: 10px; }
  .interest { display: grid; grid-template-rows: subgrid; grid-row: span 3; }
  .interest .item-index, .interest h3 { margin-bottom: 0; }
}
@media (min-width: 601px) and (max-width: 960px) {
  .selected-project { grid-template-columns: 24px minmax(0, 1fr); }
  .selected-project--illustrated { grid-template-columns: 24px 140px minmax(0, 1fr); }
  .selected-project > .record__date { grid-column: 2; text-align: left; margin-top: 8px; }
  .selected-project--illustrated > .record__date { grid-column: 3; }
  .selected-project__preview { grid-row: span 2; }
}
@media (max-width: 800px) {
  .project-overview--illustrated { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .intro { gap: 32px; grid-template-columns: minmax(0, 1fr) 170px; }
  .intro__portrait img { width: 170px; height: 218px; }
  .intro h1 { font-size: 48px; }
  .interest-list { column-gap: 24px; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
}
@media (max-width: 600px) {
  .project-overview--illustrated { display: flex; flex-direction: column; gap: 22px; }
  .project-overview--illustrated > .project-figure { width: 100%; }
  .project-overview__body > p, .project-overview__body li { font-size: 14px; }
  .project-gallery__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .site-header__inner, .site-footer__inner { padding-left: 24px; padding-right: 24px; }
  .site-header__inner { min-height: 104px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding-top: 14px; padding-bottom: 14px; }
  .site-name { font-size: 17px; }
  .site-navigation { width: 100%; justify-content: space-between; gap: 12px; }
  .site-navigation a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; font-size: 13px; }
  .site-navigation a[aria-current] { text-underline-offset: 6px; }
  #main.profile-main { padding: 36px 24px 0; }
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 0 16px; padding: 0; position: relative; }
  .intro__body { display: contents; }
  .intro__body > * { grid-column: 1 / -1; }
  .intro__body > .eyebrow { font-size: 9px; letter-spacing: 1.1px; grid-column: 1; grid-row: 1; margin-top: 4px; align-self: end; }
  .intro h1 { grid-column: 1; grid-row: 2; font-size: 38px; letter-spacing: -1.3px; margin: 0 0 6px; }
  .intro__body > .intro__role { grid-column: 1; grid-row: 3; font-size: 12px; margin-bottom: 26px; }
  .intro__portrait { grid-column: 2; grid-row: 1 / 4; margin: 0 0 24px; align-self: center; }
  .intro__portrait img { width: 96px; height: 124px; }
  .profile-main p { font-size: 15px; }
  .intro .contact-links { margin-top: 10px; }
  .contact-links { column-gap: 20px; font-size: 13px; }
  .contact-links a, .project-materials a, .site-footer__links a { min-height: 36px; align-items: center; }
  .site-footer__links a { display: inline-flex; }
  .project-materials { row-gap: 4px; }
  .research-project summary { min-height: 44px; padding: 10px 0; }
  .profile-section { margin-top: 38px; }
  .section-heading { align-items: baseline; margin-bottom: 20px; padding-bottom: 14px; }
  .profile-main h2 { font-size: 21px; }
  .section-aside { display: none; }
  .section-link { font-size: 11px; }
  .interest-list { display: block; }
  .interest { display: grid; grid-template-columns: 24px 1fr; gap: 6px 12px; margin-bottom: 24px; }
  .interest:last-child { margin-bottom: 0; }
  .interest .item-index { grid-row: 1 / 3; padding-top: 3px; }
  .interest h3 { margin: 0; font-size: 16px; }
  .interest p { grid-column: 2; font-size: 14px; }
  .selected-project { grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; padding-bottom: 24px; }
  .selected-project__preview { grid-column: 2; grid-row: auto; margin-bottom: 14px; max-width: 320px; }
  .selected-project > .record__date { grid-column: 2; text-align: left; margin-top: 8px; }
  .selected-project--illustrated > div, .selected-project--illustrated > .record__date { grid-column: 2; }
  .selected-project h3 { font-size: 17px; line-height: 1.5; }
  .selected-project p { font-size: 14px; }
  .selected-project__result p { font-size: 13px; }
  .selected-project__links p { font-size: 12px; }
  .record__heading { flex-direction: column; gap: 4px; margin-bottom: 7px; }
  .record__heading h3 { font-size: 16px; }
  .record__date { font-size: 11px; }
  .record__subtitle p, .record p, .record li { font-size: 14px; }
  .record { margin-bottom: 26px; }
  .publication-list li { padding-left: 36px; }
  .publication-list li p { font-size: 14px; }
  .page-heading { margin-bottom: 30px; }
  .page-heading h1 { font-size: 38px; letter-spacing: -1px; }
  .page-heading .eyebrow { font-size: 10px; }
  .section-nav { gap: 10px 20px; font-size: 12px; }
  .research-project h3 { font-size: 20px; }
  .research-project > p { font-size: 14px; }
    .note-row { display: block; }
  .note-row h2 { font-size: 21px; margin-top: 8px; }
  .site-footer { margin-top: 36px; }
  .site-footer__inner { font-size: 11px; }
  body.layout--single #main { padding: 36px 24px; }
  body.layout--single .page__title { font-size: 29px; }
  body.layout--single .page__content p, body.layout--single .page__content li { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .site-header, .site-footer, .contact-links, .section-nav, .back-link { display: none; }
  body { display: block; background: white; }
  #main.profile-main { max-width: none; padding: 0; }
  .profile-main h1 { font-size: 32px; }
  .profile-section { margin-top: 24px; }
  .record, .publication-list li { break-inside: avoid; }
  .research-project details > * { display: block !important; }
  .research-project summary, .project-figure__open { display: none !important; }
  a, a:visited { color: inherit; text-decoration: none; }
}
@media (max-width: 380px) {
  .intro { grid-template-columns: minmax(0, 1fr) 80px; column-gap: 12px; }
  .intro h1 { font-size: 32px; letter-spacing: -1px; }
  .intro__portrait img { width: 80px; height: 104px; }
  .intro__body > .intro__role { font-size: 11px; }
  .intro__body > .eyebrow { font-size: 8px; letter-spacing: .8px; }
}
/* Archive pages share the same reading width as the newer profile pages. */
body.layout--posts #main, body.layout--archive #main, body.layout--category #main {
  max-width: var(--measure); padding: 54px 40px; margin: 0 auto;
}
body.layout--posts #main > .sidebar, body.layout--archive #main > .sidebar, body.layout--category #main > .sidebar { display: none; }
body.layout--posts .archive, body.layout--archive .archive, body.layout--category .archive { float: none; width: 100%; padding: 0; }
.archive .page__title { font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 400; letter-spacing: -1px; }
.archive__item-title { font-size: 20px; line-height: 1.4; }
.archive__item-excerpt { font-size: 14px; color: var(--muted); }
.archive__subtitle { font-size: 24px; color: var(--ink); border-bottom-color: var(--line); }
.archive-link { font-size: 14px; }
@media (max-width: 600px) {
  body.layout--posts #main, body.layout--archive #main, body.layout--category #main { padding: 36px 24px; }
  .archive__item-title { font-size: 18px; }
}
