/* gonzalovega.com: "Lab ledger" (DESIGN.md, 2026-11-23).
   Cool light ground, white cards, Geist and Geist Mono, one teal. The levels map is the one memorable thing. */

/* ---------------------------------------------------------------- tokens */
:root {
  --ground: #f3f4f2;
  --surface: #ffffff;
  --ink: #121414;
  --muted: #565c5a;
  --rule: #d7dbd8;
  --accent: #00a1c2;
  --band: #00809b;
  --link: #0a6b80;
  --foot: #121414;
  --foot-ink: #eceeed;
  --foot-muted: #a2aaa7;
  --foot-rule: #2c3331;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --text: clamp(1.125rem, 1.08rem + 0.15vw, 1.1875rem);
  --deck: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --h1: clamp(2.5rem, 1.45rem + 4.4vw, 4.75rem);
  --h2: clamp(1.6875rem, 1.35rem + 1.3vw, 2.25rem);
  --name: clamp(3.25rem, 1.5rem + 7.2vw, 7rem);

  --wide: 1240px;
  --gutter: 1rem;
  --measure: 66ch;
  --radius: 20px;
  --gap: clamp(6rem, 4rem + 6vw, 10rem);
  --map-cols: minmax(0, 4.2fr) repeat(8, minmax(0, 1fr));

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101312;
    --surface: #191d1c;
    --ink: #eceeed;
    --muted: #a2aaa7;
    --rule: #2c3331;
    --accent: #22bcd9;
    --band: #3cc8e2;
    --link: #6fd2e5;
    --foot: #0a0c0b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #101312;
  --surface: #191d1c;
  --ink: #eceeed;
  --muted: #a2aaa7;
  --rule: #2c3331;
  --accent: #22bcd9;
  --band: #3cc8e2;
  --link: #6fd2e5;
  --foot: #0a0c0b;
  color-scheme: dark;
}

@media (min-width: 900px) {
  :root { --gutter: 2.5rem; }
}

@view-transition { navigation: auto; }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, .h1 {
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
h1, .h1 { font-size: var(--h1); letter-spacing: -0.04em; line-height: 1; }
h2 { font-size: var(--h2); }
h3 { font-size: 1.3125rem; letter-spacing: -0.015em; }

p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
cite { font-style: italic; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

.nw { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--ground); padding: 0.75rem 1rem; border-radius: 999px;
  font-family: var(--mono); font-size: 0.875rem;
}
.skip:focus { top: 1rem; }

.label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.3;
}
.label a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.label a:hover { color: var(--ink); }

.section-h { margin-bottom: 2rem; max-width: 18em; }

.arr { display: inline-block; transition: transform 160ms ease-out; }
a:hover .arr { transform: translateX(4px); }

.pill, .cta, .theme-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.375rem;
  border-radius: 999px; border: 1px solid var(--ink);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.005em;
  color: var(--ink); background: transparent; text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 120ms ease-out;
}
.pill:hover { background: var(--ink); color: var(--ground); }
.cta { background: var(--ink); color: var(--ground); }
.cta:hover { background: var(--link); border-color: var(--link); color: var(--surface); }
.pill:active, .cta:active, .theme-toggle:active { transform: scale(0.97); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.bar {
  max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  grid-template-areas: "name switch" "nav nav";
}
.name {
  grid-area: name;
  font-weight: 600; font-size: 1.125rem; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 52px;
}
.switch {
  grid-area: switch;
  font-size: 0.9375rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.25rem;
}
.switch:hover { color: var(--ink); }
.nav {
  grid-area: nav;
  margin-inline: calc(-1 * var(--gutter));
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}
.nav::-webkit-scrollbar { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; gap: 1.25rem; white-space: nowrap; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  font-size: 0.9375rem; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

@media (min-width: 960px) {
  .bar { grid-template-columns: auto 1fr auto; grid-template-areas: "name nav switch"; gap: 2rem; }
  .nav { margin: 0; -webkit-mask-image: none; mask-image: none; justify-self: end; }
  .nav ul { padding: 0; gap: 1.75rem; }
  .bar .switch { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
}

.es-hint { margin: 0; padding-top: 0.75rem; font-family: var(--mono); font-size: 0.875rem; }
.es-hint a { display: inline-flex; align-items: center; min-height: 44px; gap: 0.4rem; }

/* ---------------------------------------------------------------- home: hero and the gel */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "id" "gel" "ledger";
  row-gap: 1.75rem; padding-top: 2rem;
}
.hero__id { grid-area: id; }
.hero__name { font-size: var(--name); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; margin: 0; }
.hero__line { margin: 0.875rem 0 0; font-size: var(--deck); line-height: 1.35; color: var(--muted); }

.ledger { grid-area: ledger; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.ledger li {
  display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); gap: 0.75rem;
  padding: 0.875rem 0; border-top: 1px solid var(--rule);
  font-size: 1.0625rem; line-height: 1.45;
}
.ledger__year { font-family: var(--mono); font-size: 0.875rem; color: var(--muted); padding-top: 0.15em; }
.ledger strong { font-weight: 600; }
.ledger a { padding-block: 0.7rem; color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.ledger a:hover { color: var(--link); }

/* The gel: the eight levels as the ladder at left, one lane per room, a band at each level the room touches. */
.gel {
  grid-area: gel; margin: 0;
  --row: 2.25rem; --head: 10rem; --well: 0.875rem;
  background: var(--surface); border-radius: var(--radius); padding: 1rem 0.75rem 1rem 1rem;
}
.gel__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 2.7fr); column-gap: 0.625rem; }
.gel__ladder { list-style: none; margin: 0; padding: calc(var(--head) + var(--well) + 0.5rem) 0 0; }
.level {
  height: var(--row); display: flex; align-items: center;
  border-top: 1px solid var(--rule);
  font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.025em; color: var(--ink);
  transition: color 180ms ease-out;
}
.level:last-child { border-bottom: 1px solid var(--rule); }
.gel__lanes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0.375rem; }
.lane {
  display: grid; grid-template-rows: 1rem calc(var(--head) - 1.25rem) var(--well) auto; row-gap: 0.25rem;
  grid-template-areas: "year" "name" "well" "slab";
  color: var(--ink); text-decoration: none; border-radius: 10px;
  transition: opacity 180ms ease-out;
}
.lane__year { grid-area: year; justify-self: center; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.lane__name {
  grid-area: name; writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; align-self: end;
  font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
}
.lane__well { grid-area: well; margin: 0 22%; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 4px 4px; opacity: 0.45; }
.lane__slab {
  grid-area: slab; position: relative; height: calc(8 * var(--row));
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px) var(--row)),
    color-mix(in srgb, var(--accent) 6%, var(--surface));
  border-radius: 6px;
}
.band {
  position: absolute; left: 12%; right: 12%;
  top: calc(var(--r) * var(--row) + var(--row) * 0.27); height: calc(var(--row) * 0.46);
  background: var(--band); border-radius: 3px;
}
.gel__caption { margin: 1rem 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); max-width: 34em; }
.lane:hover .lane__name, .lane:focus-visible .lane__name { color: var(--link); }

/* Pointing at a lane shows only that room's levels. */
.gel:has(.lane:is(:hover, :focus-visible)) .lane:not(:hover, :focus-visible) { opacity: 0.25; }
.gel:has(.lane:is(:hover, :focus-visible)) .level { color: color-mix(in srgb, var(--muted) 45%, var(--surface)); }
.gel:has(.lane[data-room="cardiosmile"]:is(:hover, :focus-visible)) .level[data-rooms~="cardiosmile"],
.gel:has(.lane[data-room="operations"]:is(:hover, :focus-visible)) .level[data-rooms~="operations"],
.gel:has(.lane[data-room="happinetics"]:is(:hover, :focus-visible)) .level[data-rooms~="happinetics"],
.gel:has(.lane[data-room="meditation"]:is(:hover, :focus-visible)) .level[data-rooms~="meditation"] { color: var(--ink); }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 35rem);
    grid-template-areas: "id gel" "ledger gel";
    column-gap: clamp(3rem, 5vw, 5.5rem); row-gap: 3rem; padding-top: 4.5rem; align-items: start;
  }
  .ledger li { grid-template-columns: 7.5rem minmax(0, 1fr); font-size: 1.125rem; }
  .gel { --row: 3.25rem; --head: 10rem; --well: 1rem; padding: 1.5rem 1.5rem 1.25rem; }
  .lane__name { font-size: 0.875rem; }
  .level { font-size: 1.75rem; letter-spacing: -0.03em; }
}

/* The page's one orchestrated moment: each band runs down its lane from the well and settles at its level. */
@keyframes run {
  from { transform: translateY(calc(-1 * (var(--r) * var(--row) + var(--row) * 0.27 + var(--well) + 0.25rem))); opacity: 0; }
  12% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .band { animation: run calc(520ms + var(--r) * 90ms) cubic-bezier(0.22, 0.8, 0.25, 1) calc(250ms + var(--i) * 140ms) both; }
}

/* ---------------------------------------------------------------- home: the work, as an index */
.map { margin-top: var(--gap); }
.map__rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.map-row { display: grid; row-gap: 0.5rem; padding: 1.5rem 0 1.375rem; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.map-row__name { font-size: clamp(1.75rem, 1.15rem + 2.3vw, 3rem); letter-spacing: -0.04em; line-height: 1.02; }
.map-row__line { color: var(--muted); font-size: 1.0625rem; line-height: 1.5; max-width: 38em; }
.map-row__extra { font-size: 0.9375rem; font-weight: 600; color: var(--link); }
.map-row:hover .map-row__name { color: var(--link); }
@media (min-width: 960px) {
  .map-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 3rem; align-items: start; padding: 2rem 0; }
  .map-row__name { grid-column: 1; grid-row: 1 / span 2; }
  .map-row__line, .map-row__extra { grid-column: 2; }
}

/* ---------------------------------------------------------------- home: belief, evidence, writing, about */
.belief { margin-top: var(--gap); }
.belief p {
  max-width: 21em; margin: 0;
  font-size: clamp(1.625rem, 0.95rem + 2.9vw, 3rem); line-height: 1.16; letter-spacing: -0.03em;
  color: var(--muted); text-wrap: pretty;
}
.belief__lead { color: var(--ink); }

.record, .latest { margin-top: var(--gap); }

.evidence { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.ev {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr);
  grid-template-areas: "year source" "body body" "link link";
  column-gap: 0.75rem; row-gap: 0.375rem;
  padding: 1.125rem 0 0.5rem; border-top: 1px solid var(--rule);
}
.ev__year { grid-area: year; font-family: var(--mono); font-size: 0.875rem; color: var(--muted); padding-top: 0.15em; }
.ev__source { grid-area: source; font-size: 1rem; color: var(--muted); }
.ev__body { grid-area: body; line-height: 1.5; }
.ev__title { font-weight: 500; }
.ev__note { color: var(--muted); }
.ev__link {
  grid-area: link; justify-self: start;
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
}
@media (min-width: 960px) {
  .ev {
    grid-template-columns: 5rem 15rem minmax(0, 1fr) 11rem;
    grid-template-areas: "year source body link";
    column-gap: 1.5rem; align-items: baseline; padding: 1.25rem 0;
  }
  .ev__link { justify-self: end; min-height: 0; }
}

.w-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.w-row {
  display: grid; gap: 0.375rem; padding: 1.25rem 0; border-top: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.w-row__meta {
  display: flex; gap: 1rem;
  font-family: var(--mono); font-size: 0.8125rem; color: var(--muted);
}
.w-row__text { display: grid; gap: 0.375rem; }
.w-row__title { font-size: 1.3125rem; line-height: 1.2; }
.w-row__excerpt { color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 60ch; }
.w-row .arr { display: none; }
.w-row:hover .w-row__title { color: var(--link); }
.in-en { display: inline-block; vertical-align: 0.2em; padding: 0.1em 0.45em; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
@media (min-width: 960px) {
  .w-row { grid-template-columns: 13rem minmax(0, 1fr) 2rem; gap: 1.5rem; align-items: baseline; padding: 1.5rem 0; }
  .w-row__meta { flex-direction: column; gap: 0.25rem; }
  .w-row .arr { display: inline-block; justify-self: end; color: var(--muted); }
  .w-row__title { font-size: 1.5rem; }
}

.more { margin: 2rem 0 0; }

.home-about { margin-top: var(--gap); margin-bottom: var(--gap); display: grid; gap: 1.75rem; }
.home-about__card { margin: 0; display: flex; gap: 1rem; align-items: center; }
.home-about__portrait { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.home-about__card figcaption { display: grid; gap: 0.15rem; font-size: 0.9375rem; color: var(--muted); }
.home-about__body > p:first-of-type { font-size: var(--deck); line-height: 1.45; max-width: 34em; }
@media (min-width: 960px) {
  .home-about { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 4.5rem; align-items: start; }
  .home-about__card { flex-direction: column; align-items: stretch; }
  .home-about__portrait { width: 100%; border-radius: var(--radius); }
}

/* ---------------------------------------------------------------- room pages */
.room__head { padding-top: 2rem; }
.room__head h1 { max-width: 14em; }
.deck { font-size: var(--deck); line-height: 1.42; color: var(--muted); max-width: 32em; margin: 1.25rem 0 0; text-wrap: pretty; }
.room__meta { display: grid; gap: 0.75rem; margin-top: 2.5rem; }

.facts { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 0.25rem 1.25rem; }
.facts div { padding: 0.875rem 0; border-top: 1px solid var(--rule); display: grid; gap: 0.2rem; }
.facts div:first-child { border-top: 0; }
.facts dt { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; font-size: 1.0625rem; line-height: 1.4; }
.facts dd a { color: var(--link); padding-block: 0.75rem; }

.room__levels { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; }
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.levels li { display: grid; grid-template-rows: 30px auto; justify-items: center; border-left: 1px dashed var(--rule); }
.levels li:last-child { border-right: 1px dashed var(--rule); }
.levels__cell { position: relative; width: 100%; }
.levels .on .levels__cell::before {
  content: ""; position: absolute; top: 50%; height: 14px; left: 14%; right: 14%;
  transform: translateY(-50%); background: var(--band); border-radius: 3px;
}
.levels__name {
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 0.625rem 0 0; min-height: 6.25rem;
  font-family: var(--mono); font-size: 0.8125rem; color: var(--muted);
}
.levels .on .levels__name { color: var(--ink); font-weight: 500; }
@keyframes fill { from { transform: translateY(-50%) scaleX(0); } to { transform: translateY(-50%) scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .levels .on .levels__cell::before {
    transform-origin: left center;
    animation: fill 420ms cubic-bezier(0.22, 0.8, 0.25, 1) calc(200ms + var(--i) * 80ms) both;
  }
}

@media (min-width: 960px) {
  .room__head { padding-top: 4rem; }
  .room__meta { gap: 1rem; margin-top: 3.5rem; }
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); padding: 1.5rem 0; }
  .facts div { border-top: 0; border-left: 1px solid var(--rule); padding: 0.25rem 1.75rem; gap: 0.5rem; align-content: start; }
  .facts div:first-child { border-left: 0; }
  .room__levels { padding: 1rem 1.75rem 1.5rem; }
  .levels__name { writing-mode: horizontal-tb; transform: none; min-height: 0; padding-top: 0.75rem; font-size: 0.8125rem; }
}

.room__body { padding-bottom: var(--gap); }
.part { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.part > h2 { margin-bottom: 1.25rem; }
.part__body { max-width: var(--measure); }
.part__body > :last-child { margin-bottom: 0; }
@media (min-width: 960px) {
  .room__body { padding-top: 1rem; }
  .part { display: grid; grid-template-columns: 19rem minmax(0, var(--measure)); column-gap: 3rem; margin-top: 5.5rem; }
  .part > h2 { font-size: 1.75rem; margin: 0; }
  .door, .room__cta { margin-left: 22rem; }
}

.dated { list-style: none; margin: 0 0 1.5em; padding: 0; border-bottom: 1px solid var(--rule); }
.dated li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.875rem 0; border-top: 1px solid var(--rule); line-height: 1.5; }
.dated__when { font-family: var(--mono); font-size: 0.875rem; color: var(--muted); padding-top: 0.15em; }

.part__body .evidence { margin: 0.5rem 0 1.75rem; }
@media (min-width: 960px) {
  .part__body .ev { grid-template-columns: 4rem 12rem minmax(0, 1fr); grid-template-areas: "year source body" ". . link"; row-gap: 0; }
  .part__body .ev__link { justify-self: start; min-height: 44px; }
}

.door {
  margin-top: 4rem; background: var(--surface); border-radius: var(--radius); padding: 1.75rem 1.25rem;
  max-width: calc(var(--measure) + 4rem);
}
.door h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.door p:last-child { margin: 1.5rem 0 0; }
@media (min-width: 960px) { .door { padding: 2.5rem; } }

.room__cta { margin-top: 3.5rem; margin-bottom: 0; }
.close { margin-top: 1.5rem; font-size: var(--deck); line-height: 1.45; }

/* ---------------------------------------------------------------- prose, plain pages */
.prose { max-width: var(--measure); }
.prose h2 { margin: 3rem 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.75rem; }
.lede { font-size: var(--deck); line-height: 1.45; }
.small { font-size: 1rem; color: var(--muted); }

.plain { padding-top: 2.5rem; padding-bottom: var(--gap); }
.plain__head { margin-bottom: 2.5rem; }
.about .plain__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.about__portrait { width: 112px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; background: var(--surface); padding: 6px; }
@media (min-width: 960px) {
  .plain { padding-top: 5rem; }
  .about .plain__head { max-width: calc(var(--measure) + 0rem); }
  .about__portrait { width: 200px; border-radius: var(--radius); padding: 8px; }
}

.training { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 0.5rem 0 1rem; }
.training th { text-align: left; font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; color: var(--muted); padding: 0 0.75rem 0.75rem 0; }
.training td { padding: 0.75rem 0.75rem 0.75rem 0; border-top: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.training td:first-child { font-family: var(--mono); font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .training thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .training tr { display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); border-top: 1px solid var(--rule); padding: 0.75rem 0; }
  .training td { border: 0; padding: 0; }
  .training td:nth-child(3) { grid-column: 2; color: var(--muted); }
}

.writing .w-list { margin-top: 1rem; }

/* ---------------------------------------------------------------- essays */
.essay { padding-top: 2.5rem; padding-bottom: var(--gap); }
.essay__head { margin-bottom: 2.5rem; }
.essay__head h1 { max-width: 15em; }
.essay__head h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem); }
.essay__head .label a { min-height: 44px; }
.sep { margin-inline: 0.6rem; opacity: 0.6; }
.essay .prose { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.7; }
.essay .prose p.lead, .essay .prose .lead {
  font-size: clamp(1.3125rem, 1.15rem + 0.6vw, 1.625rem); line-height: 1.42; letter-spacing: -0.015em;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.75rem;
}
.essay .prose h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); margin: 3rem 0 1rem; }
.essay .prose blockquote { margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid var(--accent); font-size: 1.15em; }
.essay .prose li { margin-bottom: 0.5em; }
.back { margin-top: 3.5rem; }
@media (min-width: 960px) { .essay { padding-top: 5rem; } }

/* ---------------------------------------------------------------- 404 */
.nf { padding-bottom: 3rem; }
.nf-rule { max-width: var(--wide); margin: 0 auto; border: 0; border-top: 1px solid var(--rule); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--foot); color: var(--foot-ink); padding: 3.5rem 0 1.5rem; }
.site-footer a { color: var(--foot-ink); text-decoration: none; }
.site-footer a:hover { color: #6fd2e5; }
.foot-main {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.5rem; row-gap: 2.5rem;
  grid-template-areas: "name name" "logo logo" "work site";
}
.foot-main .foot-name { grid-area: name; margin: 0; }
.foot-col--work { grid-area: work; }
.foot-col--site { grid-area: site; }
.logo-band { grid-area: logo; place-self: center; color: #3cc8e2; }
.logo-band svg { width: 168px; height: auto; display: block; }
.foot-name a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-name { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); font-weight: 500; letter-spacing: -0.04em; margin: 0; }
.site-footer .label { color: var(--foot-muted); font-size: 0.8125rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; }
.foot-col .switch { font-family: var(--sans); text-transform: none; letter-spacing: 0; color: var(--foot-ink); padding: 0; }
.foot-base {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--foot-rule);
  font-family: var(--mono); font-size: 0.8125rem; color: var(--foot-muted);
}
.foot-base p { margin: 0; }
.theme-toggle { color: var(--foot-ink); border-color: var(--foot-rule); cursor: pointer; }
.theme-toggle:hover { border-color: var(--foot-ink); }
@media (min-width: 960px) {
  .site-footer { padding-top: 5rem; }
  .foot-main { grid-template-columns: 16rem 16rem minmax(0, 1fr); grid-template-areas: "name name logo" "work site logo"; }
  .logo-band svg { width: 232px; }
}

/* ---------------------------------------------------------------- reduced motion, print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .skip, .theme-toggle, .es-hint, .logo-band, .back, .nav { display: none !important; }
  .map__card, .facts, .room__levels, .door, .hero__card { background: none; border: 1px solid #ccc; }
  a { color: #000; }
}
