/* alessandrozanichelli.com — redesign v3, iteration 2
   One family: Archivo (variable, weight 100–900, width 62–125), served with the site.
   Colour: Giallo Parma, Lake-Lugano ink, a cool paper white. Red only for losses.
   Grid: 12 columns. Every section = a 3-column rail (what this is) + a 9-column body (the thing itself). */

@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-ext-standard-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-standard-italic.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  --parma: #F2B937; --parma-deep: #E2A920; --ink: #14263D; --paper: #F4F5F2; --muted: #566273; --line: #CBD0D6; --loss: #B3261E;

  --bg: var(--paper); --fg: var(--ink); --fg-2: var(--muted); --rule: var(--ink);
  --hero-bg: var(--parma); --hero-fg: var(--ink); --hero-fg-2: #4A3B0C; --hero-line: rgba(20, 38, 61, .28); --hero-band: var(--parma-deep);
  --deep-bg: var(--ink); --deep-fg: #F4F5F2; --deep-fg-2: #AEB8C5; --deep-line: #2E4460; --deep-accent: var(--parma);
  --lead-fill: rgba(242, 185, 55, .55); --loss-fill: rgba(179, 38, 30, .10); --tint: #E9EBE6;

  /* spacing: 4 · 8 · 16 · 24 · 40 · 64 · 104 · 168 */
  --s1: .25rem; --s2: .5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.5rem; --s6: 4rem; --s7: 6.5rem; --s8: 10.5rem;
  --gutter: clamp(20px, 4.2vw, 72px);
  --gap: clamp(16px, 2vw, 32px);
  --measure: 36rem;

  --fs-micro: .8125rem; --fs-small: .9375rem; --fs-text: 1.125rem; --fs-lead: 1.375rem; --fs-h3: 1.5rem;
  --fs-h2: clamp(2.25rem, 1.15rem + 3.4vw, 4.5rem);
  --fs-hero: clamp(2.25rem, 1rem + 3.4vw, 4.6rem);
  --lh-text: 1.6;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1D2E; --fg: #E8ECEF; --fg-2: #9EAABA; --line: #2A3A50; --rule: #E8ECEF; --loss: #FF8A7A; --tint: #13243A;
  --hero-bg: #14263D; --hero-fg: var(--parma); --hero-fg-2: #C9D1DA; --hero-line: rgba(242, 185, 55, .3); --hero-band: #1C324E;
  --deep-bg: #0A1420; --deep-fg: #E8ECEF; --deep-fg-2: #9EAABA; --deep-line: #22344B;
  --lead-fill: rgba(242, 185, 55, .30); --loss-fill: rgba(255, 138, 122, .13);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s4); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; } }
body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif; font-size: var(--fs-text); line-height: var(--lh-text);
  font-variation-settings: "wdth" 100; font-kerning: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; transition: text-decoration-thickness .12s; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--parma); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .contact :focus-visible, .page-head :focus-visible { outline-color: var(--hero-fg); }
p { margin: 0 0 1em; }
h1, h2, h3, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20; }
.wrap { padding-inline: var(--gutter); max-width: 1600px; margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); padding-block: var(--s4); font-size: var(--fs-small); line-height: 1.3; }
.top .me { font-size: 1.0625rem; font-weight: 720; text-decoration: none; letter-spacing: -.005em; white-space: nowrap; padding-block: 6px; }
.top .menu { display: flex; align-items: center; gap: var(--s5); }
.top nav { display: flex; gap: var(--s4); }
.top nav a, .top .tools button { padding-block: 6px; }
.top nav a { min-width: 24px; text-align: center; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 calc(100% - 3px); transition: background-size .18s; }
.top nav a:hover, .top nav a[aria-current="page"] { background-size: 100% 1.5px; }
.top .tools { display: flex; gap: var(--s3); padding-left: var(--s5); border-left: 1px solid var(--hero-line); }
.top button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.top .tools button { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.top .tools button:hover { text-decoration-thickness: 2px; }
.menu-btn { display: none; padding-block: 6px !important; font-weight: 650; }

/* ---------- Hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-fg); display: flex; flex-direction: column; min-height: 0; }
.hero > .wrap { width: 100%; }
.nw { white-space: nowrap; }
.hero-main { flex: 1; display: flex; align-items: center; padding-block: clamp(48px, 9vh, 120px) clamp(32px, 5vh, 64px); }
.claim { font-size: var(--fs-hero); line-height: .98; letter-spacing: -.02em; font-weight: 760; font-variation-settings: "wdth" 66; margin: 0; }
.claim a { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .1em; text-decoration-skip-ink: all; transition: text-decoration-thickness .15s; }
.claim a:hover, .claim a:focus-visible, .claim a.lit { text-decoration-thickness: .11em; }
.hero-base { padding-bottom: var(--s5); }
.hero-base .grid { border-top: 1px solid var(--hero-line); padding-top: var(--s4); align-items: start; }
.intro { grid-column: 1 / span 5; font-size: var(--fs-lead); line-height: 1.42; letter-spacing: -.003em; margin: 0; max-width: 26em; }
.glosses { grid-column: 7 / -1; display: grid; grid-template-columns: max-content 1fr; gap: 7px var(--s4); font-size: var(--fs-small); line-height: 1.4; color: var(--hero-fg-2); }
.glosses dt { font-weight: 700; color: var(--hero-fg); font-variation-settings: "wdth" 88; }
.glosses dt a { text-decoration: none; }
.glosses :is(dt, dd) { transition: opacity .18s; }
.hero.pointing .glosses :is(dt, dd) { opacity: .4; }
.hero.pointing .glosses .lit { opacity: 1; }

.seismo-fig { position: relative; }
.seismo { height: clamp(96px, 15vh, 168px); }
.seismo svg { width: 100%; height: 100%; overflow: visible; }
.seismo .band { fill: var(--hero-band); }
.seismo .zero { stroke: var(--hero-fg); stroke-width: 1; opacity: .3; vector-effect: non-scaling-stroke; }
.seismo .line { fill: none; stroke: var(--hero-fg); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.seismo-axis { position: relative; height: 1.7em; font-size: .75rem; color: var(--hero-fg-2); }
.seismo-axis span { position: absolute; top: 4px; transform: translateX(-50%); }
.seismo-axis span:first-child { transform: none; }
.seismo-cap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--s3) var(--s4); font-size: var(--fs-micro); line-height: 1.45; color: var(--hero-fg-2); }
.seismo-cap span { grid-column: 1 / span 8; max-width: 52em; }
.seismo-cap a { grid-column: 10 / -1; justify-self: end; color: var(--hero-fg); font-weight: 680; font-size: var(--fs-small); }
@media (prefers-reduced-motion: no-preference) {
  .js .seismo .line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 2.6s cubic-bezier(.45,.05,.2,1) .2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Sections: rail + body ---------- */
.sec { padding-block: var(--s7); }
.sec + .sec { border-top: 1px solid var(--line); }
.rail { grid-column: 1 / span 3; align-self: start; position: sticky; top: var(--s4); padding-right: var(--s3); font-size: var(--fs-small); line-height: 1.5; color: var(--fg-2); }
.rail .name { display: block; color: var(--fg); font-weight: 700; font-size: 1rem; font-variation-settings: "wdth" 90; margin-bottom: var(--s3); padding-top: 3px; border-top: 2px solid var(--rule); padding-top: var(--s2); }
.rail p { margin-bottom: .7em; max-width: 19em; }
.rail a { color: var(--fg); }
.body { grid-column: 4 / -1; min-width: 0; }
.h2 { font-size: var(--fs-h2); line-height: .98; letter-spacing: -.016em; font-weight: 740; font-variation-settings: "wdth" 76; text-wrap: balance; max-width: 15em; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; font-weight: 700; font-variation-settings: "wdth" 86; letter-spacing: -.005em; }
.lede { font-size: var(--fs-lead); line-height: 1.45; max-width: 34em; margin: var(--s4) 0 0; }
.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.meta { font-size: var(--fs-small); line-height: 1.5; color: var(--fg-2); }
.strong-link { font-weight: 680; }
.more { display: inline-flex; gap: .5em; align-items: baseline; font-weight: 680; }
.more::after { content: ""; width: .5em; height: .5em; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-.08em) rotate(45deg); transition: transform .15s; }
.more:hover::after { transform: translate(.2em, -.08em) rotate(45deg); }

/* ---------- Research ---------- */
.verdict { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--s6); border-top: 2px solid var(--rule); }
.verdict > div { padding: var(--s4) var(--s5) 0 0; }
.verdict > div + div { border-left: 1px solid var(--line); padding-left: var(--s5); padding-right: 0; }
.verdict .q { font-size: var(--fs-small); color: var(--fg-2); margin: 0 0 var(--s3); }
.verdict .fig { margin: 0; font-size: clamp(3.25rem, 1.6rem + 4.2vw, 6.5rem); line-height: .9; font-weight: 720; font-variation-settings: "wdth" 68; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.verdict .unit { display: block; font-size: 1rem; line-height: 1.3; font-weight: 650; margin: var(--s2) 0 0; }
.verdict .ans { font-size: 1.25rem; line-height: 1.3; font-weight: 700; margin: var(--s5) 0 var(--s2); max-width: 20em; }
.verdict p { font-size: 1rem; line-height: 1.55; max-width: 28em; }
.verdict .neg { color: var(--loss); }

details.terms { margin-top: var(--s5); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.terms summary { cursor: pointer; list-style: none; padding-block: var(--s3); font-weight: 680; display: flex; justify-content: space-between; align-items: center; }
details.terms summary::-webkit-details-marker { display: none; }
details.terms summary::after { content: "+"; font-size: 1.5rem; line-height: 1; font-weight: 300; }
details.terms[open] summary::after { content: "–"; }
details.terms dl { display: grid; grid-template-columns: minmax(10em, 14em) 1fr; gap: var(--s3) var(--s5); padding-bottom: var(--s4); font-size: 1rem; line-height: 1.55; }
details.terms dt { font-weight: 680; }
details.terms dd { max-width: 40em; }

.chart { margin-top: var(--s7); }
.chart-head { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: var(--s4); }
.chart-head h3 { grid-column: 1 / span 5; }
.chart-head p { grid-column: 6 / -1; margin: 0; }
.how { margin: var(--s4) 0 0; max-width: 46em; font-size: 1rem; line-height: 1.55; }
.plot-wrap { padding-left: 3.3em; margin-bottom: 1.9em; }
.plot { position: relative; }
.plot:focus-visible { outline-offset: 10px; }
.plot svg { width: 100%; height: clamp(240px, 28vw, 400px); overflow: visible; touch-action: pan-y; }
.plot .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .zero { stroke: var(--fg); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .lead { fill: var(--lead-fill); }
.plot .lag { fill: var(--loss-fill); }
.plot .line { fill: none; stroke: var(--fg); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.plot .line.bench { stroke: var(--fg-2); stroke-width: 1.5; }
.plot .line.pass { stroke-dasharray: 5 4; stroke-width: 1.5; }
.plot .rec { fill: var(--fg); opacity: .06; }
.plot .cliff { stroke: var(--loss); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 3; }
.plot .lab { position: absolute; font-size: var(--fs-micro); line-height: 1.3; color: var(--fg-2); white-space: nowrap; pointer-events: none; }
.plot .lab.yl { left: 0; transform: translate(calc(-100% - 10px), -50%); }
.plot .lab.x { transform: translateX(-50%); top: calc(100% + 8px); }
.plot .lab.strong { color: var(--fg); font-weight: 650; }
.plot .lab.end { left: calc(100% + 10px); transform: translateY(-50%); }
.plot .note { position: absolute; font-size: .875rem; line-height: 1.4; max-width: 16em; white-space: normal; color: var(--fg); border-left: 2px solid var(--loss); padding-left: 10px; }
.plot .note b { color: var(--loss); }
.plot .readout { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--fg); opacity: 0; pointer-events: none; }
.plot .readout span { position: absolute; top: -2em; left: 0; transform: translateX(-50%); background: var(--fg); color: var(--bg); font-size: .75rem; line-height: 1.5; padding: 2px 8px; white-space: nowrap; border-radius: 2px; font-variant-numeric: tabular-nums; }
.plot.reading .readout { opacity: 1; }
.explain { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); margin-top: var(--s6); }
.explain .prose { grid-column: 1 / span 4; }
.small-chart { grid-column: 6 / -1; }
.small-chart h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s4); }
.small-chart .plot-wrap { padding-right: 8.6em; }
.small-chart .plot svg { height: clamp(190px, 16vw, 240px); }
.small-chart .meta { margin-top: var(--s4); }
.res-foot { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: baseline; }

/* ---------- Infrastructure (deep band) ---------- */
/* the projects (home section and /projects) sit on the page background, like every other section */
#projects, .projects-page { --deep-bg: var(--bg); --deep-fg: var(--fg); --deep-fg-2: var(--fg-2); --deep-line: var(--line); }
.deep { background: var(--deep-bg); color: var(--deep-fg); }
.deep .rail, .deep .meta { color: var(--deep-fg-2); }
.deep .rail .name { color: var(--deep-fg); border-color: var(--deep-fg); }
.sec.deep, .sec.deep + .sec { border-top: 0; }
.deep .lede { color: var(--deep-fg); }
.hops { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); position: relative; counter-reset: hop; }
.hops::before { content: ""; position: absolute; left: 7px; right: 0; top: 7px; border-top: 1px solid var(--deep-fg-2); }
.hops li { position: relative; padding-top: var(--s5); }
.hops li::before { content: ""; position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--deep-bg); border: 1.5px solid var(--deep-fg); }
.hops li.here::before { background: var(--deep-accent); border-color: var(--deep-accent); }
.hops b { display: block; font-size: 1.25rem; line-height: 1.2; font-weight: 700; font-variation-settings: "wdth" 86; }
.hops span { display: block; margin-top: var(--s2); font-size: var(--fs-small); line-height: 1.5; color: var(--deep-fg-2); max-width: 17em; }
.hops code { font-family: inherit; font-weight: 650; color: var(--deep-fg); }
.facts { margin-top: var(--s6); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); border-top: 1px solid var(--deep-line); padding-top: var(--s4); }
.facts dt { font-size: var(--fs-micro); color: var(--deep-fg-2); margin-bottom: var(--s1); }
.facts dd { font-size: 1rem; line-height: 1.45; }
.facts dd strong { display: block; font-size: 2.25rem; line-height: 1; font-weight: 700; font-variation-settings: "wdth" 70; margin-bottom: var(--s1); letter-spacing: -.01em; }

.deep a { color: var(--deep-fg); }
.deep .meta a { color: inherit; }
.feature { margin-top: var(--s6); padding-top: var(--s4); border-top: 2px solid var(--deep-fg); }
.feature-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2) var(--s4); }
.feature-head .h3 { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem); font-variation-settings: "wdth" 76; }
.shot { margin-top: var(--s4); }
.shot a { display: block; }
.shot img, .gallery img { width: 100%; height: auto; border: 1px solid var(--deep-line); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--gap); margin-top: var(--s4); }
.gallery figure { margin: 0; }
.gallery a { display: block; }
.gallery a:hover img { border-color: var(--deep-accent); }
.gallery .wide { grid-column: 1 / -1; }
.gallery figcaption { font-size: var(--fs-micro); color: var(--deep-fg-2); margin-top: var(--s2); max-width: 40em; }
.shot a:hover img { border-color: var(--deep-accent); }
.shot figcaption { font-size: var(--fs-micro); color: var(--deep-fg-2); margin-top: var(--s2); }
.feature-body { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); margin-top: var(--s4); }
.feature-body p { grid-column: span 4; font-size: 1.0625rem; line-height: 1.55; }
.feature-body .links { grid-column: 1 / -1; }
.feature-sub { margin: var(--s2) 0 0; font-size: var(--fs-lead); line-height: 1.42; max-width: 30em; color: var(--deep-fg); }
.feature-body p.phase { grid-column: 1 / span 8; margin-top: var(--s4); font-size: 1rem; color: var(--deep-fg-2); }
.feature-body p.phase b { color: var(--deep-fg); font-weight: 680; }
.tfacts { margin-top: var(--s5); }
.tfacts-note { margin: var(--s2) 0 0; font-size: var(--fs-micro); }
.links.tlinks { margin-top: var(--s5); }
.tlink2 { margin: var(--s3) 0 var(--s5); font-size: var(--fs-small); }
.tlink2 a { color: var(--deep-fg-2); text-decoration-thickness: 1px; }
.tlink2 a:hover { color: var(--deep-fg); }
.links, .p-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; }
.plist { margin-top: var(--s6); border-top: 1px solid var(--deep-line); }
.prow { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--s4); border-bottom: 1px solid var(--deep-line); }
.p-name { grid-column: 1 / span 2; }
.p-name :is(h2, h3) { font-size: 1.25rem; line-height: 1.2; font-weight: 700; font-variation-settings: "wdth" 86; }
.p-name span { display: block; font-size: var(--fs-micro); color: var(--deep-fg-2); margin-top: 4px; }
.p-desc { grid-column: 3 / span 5; }
.p-desc p { font-size: 1.0625rem; line-height: 1.55; margin-bottom: .6em; max-width: 40em; }
.p-desc p.meta { font-size: var(--fs-small); }
.p-desc p:last-child { margin-bottom: 0; }
.p-links { grid-column: 8 / -1; justify-content: flex-end; align-items: baseline; padding-top: 2px; }
.infra { margin-top: var(--s7); padding-top: var(--s4); border-top: 2px solid var(--deep-fg); }
.infra .h3 { font-size: clamp(1.5rem, 1.1rem + 1.1vw, 2.25rem); font-variation-settings: "wdth" 80; max-width: 22em; }
.infra .lede { font-size: 1.1875rem; margin-top: var(--s3); }
.infra .hops { margin-top: var(--s5); }

.plist-short { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.plist-short .prow { align-items: baseline; padding-block: var(--s3); }
.plist-short .p-name { grid-column: 1 / span 3; text-decoration: none; }
.plist-short .p-name h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.plist-short .p-name:hover h3 { text-decoration-thickness: 2px; }
.plist-short .p-desc { grid-column: 4 / -1; margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--deep-fg); }
.deep .res-foot { border-top: 0; margin-top: var(--s5); padding-top: 0; }
#projects .shot { margin-top: var(--s5); }
.projects-page { padding-top: var(--s6); }
.projects-page .feature { margin-top: 0; }
.projects-page .feature + .feature { margin-top: var(--s7); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--deep-line); }
.toc li a { display: block; padding: 9px 0; text-decoration: none; color: var(--deep-fg-2); line-height: 1.3; font-size: var(--fs-small); }
.toc li a:hover { color: var(--deep-fg); }
.toc li a[aria-current="true"] { color: var(--deep-fg); font-weight: 700; box-shadow: inset 3px 0 0 var(--parma); padding-left: 10px; }
.projects-page .rail.toc .name { display: block; }
:target { scroll-margin-top: var(--s5); }

/* ---------- Ventures ---------- */
.venture { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); margin-top: var(--s6); padding-top: var(--s4); border-top: 2px solid var(--rule); }
.venture + .venture { margin-top: var(--s6); }
.venture .years { grid-column: 1 / span 3; margin: 0; font-size: clamp(3.25rem, 1.2rem + 5.2vw, 7.5rem); line-height: .86; font-weight: 250; font-variation-settings: "wdth" 62; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.venture .v-body { grid-column: 4 / -1; }
.venture .h3 { font-size: clamp(1.625rem, 1.2rem + 1vw, 2.125rem); font-variation-settings: "wdth" 80; margin-bottom: var(--s4); }
.vfacts { display: grid; grid-template-columns: minmax(8em, 11em) 1fr; border-top: 1px solid var(--line); }
.vfacts dt, .vfacts dd { padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.vfacts dt { font-size: var(--fs-small); color: var(--fg-2); padding-right: var(--s4); }
.vfacts dd { font-size: 1.0625rem; line-height: 1.5; max-width: 34em; }

/* ---------- Story ---------- */
.story-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); margin-top: var(--s5); align-items: start; }
.story-grid .photo { grid-column: 1 / span 5; }
.story-grid .photo img { width: 100%; height: auto; aspect-ratio: 1247 / 935; object-fit: cover; }
.story-grid figcaption { font-size: var(--fs-micro); color: var(--fg-2); margin-top: var(--s2); }
.story-grid .prose { grid-column: 6 / -1; }
.signoff { margin: var(--s7) 0 0; font-size: clamp(2.5rem, .9rem + 5vw, 6.75rem); line-height: .92; font-weight: 250; font-variation-settings: "wdth" 62; letter-spacing: -.02em; }

/* ---------- Education ---------- */
.cv { margin-top: var(--s5); }
.cv-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--s4); border-top: 1px solid var(--line); }
.cv-row:first-child { border-top: 2px solid var(--rule); }
.cv-row .when { grid-column: 1 / span 2; color: var(--fg-2); font-variant-numeric: tabular-nums; font-size: 1rem; padding-top: 2px; }
.cv-row .what { grid-column: 3 / span 3; }
.cv-row .what b { display: block; font-weight: 700; line-height: 1.3; }
.cv-row .what span { display: block; color: var(--fg-2); font-size: var(--fs-small); line-height: 1.4; margin-top: 4px; }
.cv-row .detail { grid-column: 6 / -1; font-size: 1rem; line-height: 1.55; }
.cv-row .detail p { margin: 0; }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5) var(--gap); margin-top: var(--s6); }
.skills h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.skills p { font-size: 1rem; line-height: 1.55; margin: 0; }

/* ---------- Reading ---------- */
.now { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.now .h2 { grid-column: 1 / span 5; }
.now .prose { grid-column: 6 / -1; }
.shelf { margin: var(--s6) 0 0; font-size: clamp(1.5rem, .85rem + 1.7vw, 2.625rem); line-height: 1.14; font-weight: 300; font-variation-settings: "wdth" 70; letter-spacing: -.01em; color: var(--fg-2); text-wrap: pretty; }
.shelf b { color: var(--fg); font-weight: 600; }
.shelf-note { margin-top: var(--s4); }

/* ---------- Contact ---------- */
.contact { background: var(--hero-bg); color: var(--hero-fg); padding-block: var(--s7) var(--s4); }
.contact .rail, .contact .rail .name { color: var(--hero-fg); border-color: var(--hero-fg); }
.contact .rail { position: static; }
.contact .mail { margin: 0; font-size: var(--fs-hero); line-height: 1; letter-spacing: -.018em; font-weight: 740; font-variation-settings: "wdth" 62; overflow-wrap: anywhere; }
.contact .mail a { text-decoration-thickness: .045em; text-underline-offset: .12em; }
.contact .mail a:hover { text-decoration-thickness: .09em; }
.contact .elsewhere { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: var(--s5) 0 0; font-size: 1.125rem; font-weight: 650; }
.colophon { margin-top: var(--s7); padding-top: var(--s3); border-top: 1px solid var(--hero-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); font-size: var(--fs-micro); color: var(--hero-fg-2); }
.colophon a { display: inline-block; padding-block: 4px; margin-block: -4px; }

/* ---------- Inner pages ---------- */
.page-head { background: var(--hero-bg); color: var(--hero-fg); }
.page-title { padding-block: clamp(40px, 9vh, 112px) var(--s5); }
.page-title h1 { font-size: clamp(2.6rem, .6rem + 5vw, 6.25rem); line-height: .9; letter-spacing: -.02em; font-weight: 760; font-variation-settings: "wdth" 66; max-width: 12em; }
.page-title .sub { margin: var(--s4) 0 0; font-size: var(--fs-lead); line-height: 1.42; max-width: 30em; }
.page-title .grid { border-top: 1px solid var(--hero-line); padding-top: var(--s4); margin-top: var(--s5); }
.page-title .grid .sub { grid-column: 1 / span 6; margin: 0; }
.story-text p { font-size: 1.1875rem; line-height: 1.62; max-width: 36rem; }
.story-text p.first { font-size: 1.5rem; line-height: 1.42; font-weight: 500; letter-spacing: -.005em; }
.chrono { list-style: none; margin: 0; padding: 0; }
.chrono li { padding-block: var(--s3); border-top: 1px solid var(--line); }
.chrono .when { display: block; color: var(--fg-2); font-size: var(--fs-micro); font-variant-numeric: tabular-nums; }
.chrono b { display: block; color: var(--fg); font-weight: 700; line-height: 1.3; margin-top: 2px; }
.chrono p { margin: 4px 0 0; font-size: var(--fs-micro); line-height: 1.45; }
.author { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); padding-block: var(--s4); border-top: 1px solid var(--line); }
.author:first-of-type { border-top: 2px solid var(--rule); }
.author h2 { grid-column: 1 / span 3; font-size: 1.5rem; line-height: 1.15; font-weight: 700; font-variation-settings: "wdth" 80; }
.author h2 .d { display: block; font-size: var(--fs-micro); font-weight: 400; color: var(--fg-2); font-variation-settings: "wdth" 100; margin-top: 6px; }
.author ul { grid-column: 4 / -1; list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--gap); }
.author li { break-inside: avoid; padding: 2px 0 10px; font-size: 1.0625rem; line-height: 1.4; }
.author li .y { color: var(--fg-2); font-size: var(--fs-small); margin-left: .45em; font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rail { grid-column: 1 / span 3; }
  .explain .prose, .small-chart { grid-column: 1 / -1; }
  .small-chart { margin-top: var(--s6); }
  .story-grid .photo, .story-grid .prose { grid-column: 1 / -1; }
  .story-grid .prose { margin-top: var(--s5); }
  .hops { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); }
  .hops::before { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s4); }
}
@media (max-width: 860px) {
  :root { --fs-text: 1.0625rem; --fs-lead: 1.25rem; --fs-hero: 9.6vw; }
  .sec { padding-block: var(--s6); }
  .rail { position: static; grid-column: 1 / -1; grid-row: 2; margin-top: var(--s5); padding-right: 0; }
  .rail .name { display: none; }
  .rail p { max-width: none; }
  .body { grid-column: 1 / -1; grid-row: 1; }
  .contact .rail { grid-row: auto; margin: 0 0 var(--s3); }
  .contact .body { grid-row: auto; }
  .contact .rail .name { display: block; }
  .contact .mail { font-size: 7.4vw; }
  .top { flex-wrap: wrap; padding-block: var(--s3); }
  .js .menu-btn { display: inline-block; }
  .js .top .menu { display: none; }
  .js .top.open .menu { display: flex; }
  .top .menu { width: 100%; flex-direction: column; align-items: stretch; gap: var(--s3); padding-block: var(--s2) var(--s3); }
  .top nav { flex-direction: column; gap: 0; font-size: 1.5rem; font-weight: 700; font-variation-settings: "wdth" 80; }
  .top nav a { padding-block: 8px; border-bottom: 1px solid var(--hero-line); background: none; }
  .top nav a[aria-current="page"] { text-decoration: underline; }
  .top .tools { border-left: 0; padding-left: 0; gap: var(--s4); }
  .hero { min-height: 0; }
  .hero-main { padding-block: var(--s5) var(--s5); }
  .claim { letter-spacing: -.012em; }
  .d-br { display: none; }
  .intro, .glosses { grid-column: 1 / -1; }
  .glosses { margin-top: var(--s5); font-size: .875rem; gap: 6px var(--s3); }
  .seismo-cap span, .seismo-cap a { grid-column: 1 / -1; justify-self: start; }
  .seismo-cap a { margin-top: var(--s2); }
  .seismo-axis span:nth-child(even) { display: none; }
  .verdict { grid-template-columns: 1fr; }
  .verdict > div { padding-right: 0; }
  .verdict > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: var(--s5); }
  details.terms dl { grid-template-columns: 1fr; gap: 4px; }
  details.terms dd { margin-bottom: var(--s3); }
  .chart-head h3, .chart-head p { grid-column: 1 / -1; }
  .chart-head p { margin-top: var(--s2); }
  .plot-wrap { padding-left: 2.8em; }
  .plot .note { font-size: .9375rem; max-width: none; left: -2.8em !important; right: 0; top: calc(100% + 3.2em) !important; }
  .plot-wrap.has-note { margin-bottom: 11em; }
  .feature-body p, .feature-body p.phase { grid-column: 1 / -1; }
  .p-name, .p-desc, .p-links { grid-column: 1 / -1; }
  .plist-short .p-name, .plist-short .p-desc { grid-column: 1 / -1; }
  .projects-page .toc { grid-row: 1; margin: 0 0 var(--s5); }
  .projects-page .body { grid-row: 2; }
  .p-desc { margin-top: var(--s2); }
  .p-links { justify-content: flex-start; margin-top: var(--s3); }
  .gallery { grid-template-columns: 1fr; }
  .hops, .facts { grid-template-columns: 1fr; }
  .hops { row-gap: var(--s4); }
  .hops::before { display: block; left: 7px; right: auto; top: 10px; bottom: 10px; border-top: 0; border-left: 1px solid var(--deep-fg-2); }
  .hops li { padding: 0 0 0 var(--s5); }
  .hops li::before { top: 4px; }
  .venture .years, .venture .v-body { grid-column: 1 / -1; }
  .venture .years { margin-bottom: var(--s4); }
  .vfacts { grid-template-columns: 1fr; }
  .vfacts dt { border-bottom: 0; padding-bottom: 0; }
  .cv-row .when, .cv-row .what, .cv-row .detail { grid-column: 1 / -1; }
  .cv-row .what { margin: 4px 0 var(--s2); }
  .skills { grid-template-columns: 1fr; gap: var(--s4); }
  .now .h2, .now .prose { grid-column: 1 / -1; }
  .now .prose { margin-top: var(--s4); }
  .author h2, .author ul { grid-column: 1 / -1; }
  .author ul { columns: 1; margin-top: var(--s3); }
  .page-title .grid .sub { grid-column: 1 / -1; }
}

@media print {
  .top .menu, .menu-btn, .seismo-fig, .readout { display: none; }
  .hero, .contact, .deep, .page-head { background: none; color: #000; }
  .rail { position: static; }
}
.page-title .crumb { margin: 0 0 var(--s2); }
.page-title .crumb a { color: inherit; }
.projects-page .privacy { margin: 0 0 var(--s5); max-width: 46em; }
.feature-body p b { font-weight: 680; }
