:root {
  color-scheme: light;
  --paper: #f9f6ef; --ink: #273043; --dim: #49556a;
  --teal: #315893; --teal-deep: #28477f; --rule: #aeb8c7;
  --faint: #dce5f3; --panel: #e9edf4; --lift: #f0f0f3; --focus: #234b9b;
  --display: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: ui-monospace, "Cascadia Mono", "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1c1d20; --ink: #f2eee7; --dim: #c7c8cd;
    --teal: #9aafe4; --teal-deep: #a2b7eb; --rule: #646976;
    --faint: #393c46; --panel: #282b32; --lift: #24262c; --focus: #b2c6ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1d20; --ink: #f2eee7; --dim: #c7c8cd;
  --teal: #9aafe4; --teal-deep: #a2b7eb; --rule: #646976;
  --faint: #393c46; --panel: #282b32; --lift: #24262c; --focus: #b2c6ff;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 var(--body); }
::selection { background: var(--faint); color: var(--ink); }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
img, svg { max-width: 100%; height: auto; }
h1,h2,h3,p,ul,dl,dd { margin: 0; }
h1,h2,h3 { font-family: var(--display); font-weight: 400; }
h1 { font-size: clamp(2.5rem, 5.05vw, 4.85rem); line-height: 1.01; letter-spacing: -.047em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
h3 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); line-height: 1.12; letter-spacing: -.025em; }
.wrap { width: min(calc(100% - 4rem), 70rem); margin-inline: auto; }
.skip { position: absolute; z-index: 4; transform: translateY(-170%); left: 1rem; top: 1rem; padding: .45rem .7rem; background: var(--paper); border: 1px solid var(--rule); }
.skip:focus { transform: none; }
.top { border-bottom: 1px solid var(--rule); }
.topbar { min-height: 5.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.brand { display: inline-flex; min-height: 44px; align-items: center; color: var(--teal-deep); }
.brand svg { width: clamp(10rem, 21vw, 14rem); display: block; }
.toplinks,.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(.85rem, 2.7vw, 2.2rem); padding: 0; list-style: none; }
.site-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .93rem; text-decoration: none; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; height: 5px; bottom: 6px; border-top: 1px solid var(--teal); border-radius: 56% 44% 40% 38%; transform: rotate(-4deg); opacity: 0; }
.site-nav a:hover::after, .site-nav [aria-current]::after { opacity: 1; }
.appearance[hidden] { display: none; }
.appearance { position: relative; display: flex; align-items: center; min-height: 44px; }
.appearance select { appearance: none; min-height: 36px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; padding: .25rem 1.75rem .25rem .65rem; font: .875rem var(--body); cursor: pointer; }
.appearance svg { position: absolute; right: .58rem; width: .65rem; color: var(--teal); pointer-events: none; }
.eyebrow { font: 700 .875rem/1.4 var(--label); letter-spacing: .13em; text-transform: uppercase; color: var(--teal-deep); }
.hero { padding-block: clamp(2.4rem, 4.6vw, 4rem) clamp(2rem, 4.1vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4.4vw, 4rem); }
.hero h1 { margin-block: .63rem 1.1rem; max-width: 19ch; }
.hero .intro { max-width: 55ch; font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--dim); }
.actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .45rem 1.15rem; align-items: center; }
.actions a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.actions .primary { background: var(--teal-deep); color: var(--paper); border-radius: 3px; padding: 0 .9rem; text-decoration: none; }
.actions .primary:hover { text-decoration: underline; }
.plate { margin: 0; background: var(--panel); border: 1px solid var(--rule); padding: clamp(.65rem, 2vw, 1.25rem); color: var(--teal-deep); }
.plate svg { display: block; width: 100%; }
.plate .plate-grid { stroke: var(--rule); opacity: .53; }
.plate .plate-label { font: 600 13px var(--label); letter-spacing: .07em; fill: currentColor; }
.plate .plate-result { font: italic 19px var(--display); fill: currentColor; }
.plate .plate-stroke { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.plate .echo { opacity: .58; stroke-width: .85; }
.plate .plate-notes { border-top: 1px solid var(--rule); margin-top: .35rem; padding: .6rem .2rem .05rem; font: italic .95rem/1.4 var(--display); color: var(--dim); }
.section { border-top: 1px solid var(--rule); padding-block: clamp(2rem, 4.2vw, 3.25rem); }
.section-head { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 1.6fr); gap: .65rem 2rem; align-items: end; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.section-head h2 { margin-top: .3rem; }
.section-head > p { color: var(--dim); max-width: 45ch; }
.lead-case { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .88fr); gap: 1.1rem 2rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--rule); background: var(--lift); }
.lead-case + .lead-case { margin-top: 1rem; }
.lead-case h3 { margin: .38rem 0 .5rem; }
.lead-case p:not(.eyebrow) { max-width: 53ch; color: var(--dim); }
.lead-case .actions { margin-top: .55rem; }
.facts { display: grid; align-content: center; }
.facts div { padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font: 700 .875rem/1.4 var(--label); color: var(--teal-deep); }
.facts dd { color: var(--ink); line-height: 1.45; margin-top: .19rem; }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.75rem; }
.project + .project { border-left: 1px solid var(--rule); padding-left: 2.75rem; }
.project h3 { margin-block: .3rem .55rem; }
.project p:not(.eyebrow) { max-width: 50ch; color: var(--dim); }
.project .actions { margin-top: .6rem; }
.archive { margin-top: 1.65rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.archive summary { color: var(--teal-deep); font-weight: 650; cursor: pointer; width: fit-content; }
.archive ul { padding-left: 1.2rem; margin-top: .8rem; }
.footer { border-top: 1px solid var(--rule); padding-block: 1.25rem 2.2rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem 1.5rem; color: var(--dim); }
.footer a + a { margin-left: .75rem; }
.article-head { padding-block: clamp(2.3rem, 5vw, 4.25rem) clamp(1.65rem, 4vw, 3rem); }
.article-head h1 { max-width: 18ch; margin-block: .55rem .8rem; }
.article-head > p:last-child { max-width: 64ch; font-size: clamp(1rem, 1.7vw, 1.2rem); color: var(--dim); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; gap: 1.25rem 3rem; }
.article-copy { min-width: 0; }
.article-copy > p { max-width: 67ch; margin-bottom: 1rem; }
.article-copy > h2, .evidence > h2 { margin-bottom: .85rem; }
.article-copy > h2:not(:first-child) { margin-top: 1.75rem; }
.jump { border-top: 1px solid var(--rule); padding-top: .55rem; }
.jump nav ul { list-style: none; padding: 0; }
.jump a { display: inline-flex; align-items: center; min-height: 38px; }
.evidence > p { margin-bottom: .85rem; color: var(--dim); }
.data-table { border-collapse: collapse; width: 100%; font-size: .965rem; line-height: 1.53; }
.data-table th,.data-table td { border: 1px solid var(--rule); text-align: left; padding: .7rem .75rem; vertical-align: top; }
.data-table thead th { background: var(--panel); font-weight: 650; }
.data-table tbody th { color: var(--teal-deep); font-weight: 650; width: 21%; }
.data-table td { width: 39.5%; }
.case-end { margin-top: 1.2rem; max-width: 67ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 53rem) {
  .hero { grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr); gap: 1.4rem; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .jump { grid-row: 1; }
  .jump nav ul { display: flex; flex-wrap: wrap; gap: 0 1rem; }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2rem); }
  .topbar { flex-wrap: wrap; gap: 0 .75rem; padding-block: .45rem; }
  .toplinks { justify-content: space-between; width: 100%; gap: .15rem .6rem; }
  .site-nav ul { gap: 0 .9rem; }
  .hero,.section-head,.lead-case,.projects { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 2.1rem 1.75rem; }
  .hero h1 { text-wrap: initial; }
  .plate { display: none; }
  .project + .project { border-top: 1px solid var(--rule); border-left: 0; padding: 1rem 0 0; }
}
@media (max-width: 32rem) {
  .data-table,.data-table thead,.data-table tbody { display: block; }
  .data-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .data-table th,.data-table td { display: block; width: auto !important; font-size: .875rem; padding: .55rem; overflow-wrap: break-word; }
  .data-table thead th:first-child { position: absolute; width: 1px !important; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
  .data-table tbody th { grid-column: 1/-1; background: var(--lift); }
  .data-table tr > :last-child { border-left: 0; }
  .data-table tbody tr > * { border-top: 0; }
}
@media print {
  :root, :root[data-theme] { color-scheme: light; --paper: #fff; --ink: #121212; --dim: #292929; --teal-deep: #121212; --rule: #999; --lift: #fff; --panel: #eee; }
  .toplinks,.plate,.skip,.jump,.footer { display: none; }
  .wrap { width: 100%; }
  h1 { font-size: 32pt; }
  .data-table tr { break-inside: avoid; }
}

/* Document and résumé reading pages */
.document-actions { margin: 0 0 .85rem; }
.resume-copy > *, .resume-section > * { max-width: 72ch; }
.resume-section { margin-top: 1.6rem; }
.resume-section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .45rem; }
.resume-section h3 { font: 650 1.05rem/1.4 var(--body); margin-bottom: .2rem; }
.resume-section ul { padding-left: 1.2rem; margin-top: .45rem; }
.resume-section li + li { margin-top: .35rem; }
