/* Hallmark · v2.0.0 · theme: almanac (deal: manual, by hand from index.json; scripts blocked in this harness) · genre: editorial · redesign: full · scope: site · job: visit, browse the trips · copy: verbatim · signature: the travel map, every visited country printed in ink, the latest in magenta · hero: Stage (/), Banner (/trips/), Split (trip, work, about, gallery pages) · nav: edge-aligned wordmark, three page links and the resume as the one outlined control · footer: an ink band, the email set large over the contact links and the side pages · photos: the owner's own, true colour */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, a personal site argues little; it leads with the map of where he has been instead of a portrait and a bio */
/* Hallmark · waive 42 · wordmark, three page links, one outlined resume control · the site has exactly three sections and a resume, nothing else belongs in the bar */
/* Hallmark · waive 83 · every photograph is the owner's own travel photo · the trip pages exist to show those photographs, the job of the site */
/* Hallmark · waive 49b · titles like March Madness Wins Cluster run two lines at 320px, never three · each Project title is the real name of the work and cannot shorten */
/* Hallmark · dismissed 44c · on trip, work and gallery pages the detector reads the All trips crumb as the hero; the Split hero fills the first screen */
/* Hallmark · dismissed 72 · the overflow measured on the atlas sheet is the trip index scrolling inside its own box */
/* Hallmark · waive 78 · the Overview head is an annotation beside the prose · each work page is a Long Document of one Report or Model write-up */
/* Hallmark · answered F15 · trip and photo grids keep a tighter card gutter than the text columns so the photographs read as one set */

:root {
  --color-paper: oklch(84% 0.012 245); --color-paper-2: oklch(81% 0.012 245); --color-paper-3: oklch(77% 0.012 245);
  --color-ink: oklch(16% 0.020 245); --color-ink-2: oklch(24% 0.018 245); --color-muted: oklch(38% 0.016 245);
  --color-rule: oklch(73% 0.013 240); --color-rule-2: oklch(32% 0.018 240);
  --color-accent: oklch(45% 0.180 350); --color-accent-2: oklch(37% 0.160 350); --color-accent-ink: oklch(97% 0.006 245); --color-focus: oklch(46% 0.190 350);
  --color-sheet: oklch(93.5% 0.008 245);
  --color-plate: oklch(98.5% 0.004 245);
  --color-scrim: oklch(16% 0.020 245 / 0.92);
  --color-land: oklch(88% 0.010 245);
  --color-land-edge: oklch(80% 0.012 245);
  --color-visited: oklch(30% 0.020 245);
  --color-visited-hover: oklch(40% 0.030 245);

  --font-display: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Newsreader", ui-serif, Georgia, serif;
  --font-outlier: "IBM Plex Mono", ui-monospace, monospace;

  --radius-card: 0; --radius-pill: 2px; --rule-hair: 1px; --rule-bar: 2px; --shadow-card: none;
  --tracking-display: -0.02em; --display-weight: 600;

  --space-3xs: 0.25rem; --space-2xs: 0.5rem; --space-xs: 0.75rem; --space-sm: 1rem; --space-md: 1.5rem;
  --space-lg: 2rem; --space-xl: 3rem; --space-2xl: 4rem; --space-3xl: 6rem; --space-4xl: 8rem;

  --text-sm: 0.875rem; --text-base: 1.0625rem; --text-lede: 1.25rem; --text-title: 1.5rem;
  --text-section: clamp(2.25rem, 1.5rem + 1.8vw, 3rem);
  --text-display: clamp(3rem, 1.6rem + 4.6vw, 6rem);

  --container: 1440px;
  --gutter: max(var(--space-sm), 5vw);
  --control-h: 2.875rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--color-rule-2) var(--color-paper); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font: 400 var(--text-base)/1.55 var(--font-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: var(--display-weight); color: var(--color-ink);
  letter-spacing: var(--tracking-display); line-height: 1.05; margin: 0;
  overflow-wrap: break-word; min-width: 0; text-wrap: balance;
}
p { margin: 0; }
p + p { margin-top: var(--space-sm); }
a { color: var(--color-ink); text-decoration-color: var(--color-accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:active { color: var(--color-accent-2); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.num, time { font-family: var(--font-outlier); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-sm); top: var(--space-sm); z-index: 10; padding: var(--space-2xs) var(--space-sm); background: var(--color-ink); color: var(--color-paper); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 65ch; }
.prose p { text-wrap: pretty; }
.lede { font-size: var(--text-lede); line-height: 1.45; color: var(--color-ink-2); max-width: 40ch; }
.meta { font-size: var(--text-sm); color: var(--color-muted); }

/* Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-h);
  padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill);
  font: 500 var(--text-sm)/1 var(--font-display); color: var(--color-ink); background: transparent;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}
.btn:hover { background: var(--color-paper-3); }
.btn:active { background: var(--color-rule); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); border-color: var(--color-accent-2); }
.btn--primary:active { background: var(--color-ink); border-color: var(--color-ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

/* Nav */
.site-nav { border-bottom: var(--rule-bar) solid var(--color-ink); }
.site-nav .wrap { display: flex; align-items: center; gap: var(--space-lg); min-height: 4.5rem; }
.wordmark { font: 600 var(--text-lede)/1 var(--font-display); letter-spacing: var(--tracking-display); text-decoration: none; color: var(--color-ink); white-space: nowrap; }
.site-nav nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.site-nav ul a { font: 500 var(--text-base)/1 var(--font-display); text-decoration: none; white-space: nowrap; padding-block: var(--space-2xs); }
.site-nav ul a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); }
.site-nav ul a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); }
.site-nav .btn { min-height: 2.5rem; }
@media (max-width: 40rem) {
  .site-nav .wrap { gap: var(--space-sm); min-height: 4rem; }
  .site-nav ul { gap: var(--space-sm); }
  .site-nav .btn { display: none; }
}

/* Sections */
.section { padding-block: var(--space-4xl); }
.section--tight { padding-block: var(--space-3xl); }
.section--well { background: var(--color-paper-2); border-top: var(--rule-bar) solid var(--color-rule-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-xl); }
.section-head h2 { font-size: var(--text-section); }
.section-head a { font: 500 var(--text-base)/1 var(--font-display); white-space: nowrap; }

/* Sheet: the printed page laid on the slate */
.sheet { background: var(--color-sheet); border-top: var(--rule-bar) solid var(--color-ink); }

/* Home hero: Stage */
.hero-stage { padding-block: var(--space-2xl); min-height: calc(100svh - 4.5rem - var(--rule-bar)); display: grid; align-items: center; }
@media (max-width: 60rem) { .hero-stage { min-height: 0; } }
.hero-stage .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); align-items: center; }
.hero-stage h1 { font-size: var(--text-display); letter-spacing: -0.035em; line-height: 0.95; }
.hero-stage .lede { margin-top: var(--space-md); }
.hero-stage .meta { margin-top: var(--space-xs); }
.hero-stage .actions { margin-top: var(--space-lg); }
.hero-map { padding: var(--space-md); }
.hero-map figcaption { display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-sm); padding-top: var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
@media (max-width: 60rem) {
  .hero-stage .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
}

/* Bio */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); }
.split > h2 { font-size: var(--text-section); }
@media (max-width: 52rem) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); } }

/* Trip cards */
.trip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--space-md); list-style: none; margin: 0; padding: 0; }
.trip-card a { display: block; text-decoration: none; }
.trip-card .photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--color-paper-3); }
.trip-card img { width: 100%; height: 100%; object-fit: cover; outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; }
.trip-card .caption { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-xs); padding-top: var(--space-xs); margin-top: var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
.trip-card h3 { font-size: var(--text-title); }
.trip-card time { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.trip-card a:hover h3 { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.trip-card a:focus-visible { outline-offset: 4px; }
@media (max-width: 64rem) { .trip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 48rem) { .trip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--space-sm); } .trip-card h3 { font-size: var(--text-lede); } .trip-card .caption { flex-direction: column; gap: var(--space-3xs); } }

/* Work table */
.ledger { width: 100%; border-collapse: collapse; }
.ledger caption { text-align: left; }
.ledger th { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); text-align: left; padding: var(--space-xs) var(--space-sm); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.ledger td { padding: var(--space-md) var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); vertical-align: baseline; }
.ledger tbody tr { transition: background-color 120ms ease-out; }
.ledger tbody tr:hover { background: var(--color-paper); }
.ledger .title a { font: 600 var(--text-title)/1.15 var(--font-display); letter-spacing: var(--tracking-display); text-decoration: none; }
.ledger .title a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }
.ledger .docs { text-align: right; white-space: nowrap; }
.ledger .docs a + a { margin-left: var(--space-sm); }
.ledger-sheet { padding: var(--space-md) var(--space-lg) var(--space-lg); }
@media (max-width: 48rem) {
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger tr { padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
  .ledger td { border: 0; padding: var(--space-3xs) 0; }
  .ledger .docs { text-align: left; }
  .ledger-sheet { padding: var(--space-sm); }
}

/* Footer: ink band */
.site-footer { background: var(--color-ink); color: var(--color-paper); padding-block: var(--space-3xl) var(--space-xl); }
.site-footer a { color: var(--color-sheet); }
.site-footer a:focus-visible { outline-color: var(--color-sheet); }
.site-footer .mail { font: 600 clamp(1.5rem, 1rem + 2.6vw, 3rem)/1.05 var(--font-display); letter-spacing: var(--tracking-display); overflow-wrap: break-word; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--space-2xl); padding-bottom: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.footer-grid h2 { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-rule); letter-spacing: 0; margin-bottom: var(--space-xs); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.footer-grid li a { font: 500 var(--text-base)/1.4 var(--font-display); }
.footer-intro p { color: var(--color-rule); max-width: 46ch; margin-top: var(--space-sm); }
.footer-base { padding-top: var(--space-md); font-size: var(--text-sm); color: var(--color-rule); }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-intro { grid-column: 1 / -1; } }

/* Page heads (Banner and Split) */
.page-head { padding-block: var(--space-xl); }
.page-head h1 { font-size: var(--text-display); letter-spacing: -0.035em; line-height: 0.95; }
.banner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-xl); align-items: end; }
.banner .lede { max-width: 46ch; }
@media (max-width: 52rem) { .banner { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }
.crumb { display: inline-block; margin-bottom: var(--space-md); font: 500 var(--text-sm)/1 var(--font-display); }

/* Trips: the atlas */
.atlas { display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); }
.atlas-main { padding: var(--space-md) var(--space-lg) var(--space-lg); border-right: var(--rule-hair) solid var(--color-rule); min-width: 0; }
.atlas-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-sm); padding-bottom: var(--space-sm); margin-bottom: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.atlas-tools fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs); }
.atlas-tools legend { float: left; margin-right: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.chip {
  min-height: var(--control-h); padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-ink); font: 500 var(--text-sm)/1 var(--font-display); cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.chip .num { font-size: var(--text-sm); }
.chip:hover { background: var(--color-paper-2); }
.chip:active { background: var(--color-paper-3); }
.chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-sheet); border-color: var(--color-ink); }
.atlas-stats { display: flex; gap: var(--space-xl); flex-wrap: wrap; margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
.stat { display: grid; gap: var(--space-3xs); align-content: start; }
.atlas-stats p + p { margin-top: 0; }
.stat .num { font-variant-numeric: tabular-nums; font-size: var(--text-title); font-weight: 500; color: var(--color-ink); }
.stat span:last-child { font-size: var(--text-sm); color: var(--color-muted); }
.atlas-index { padding: var(--space-md) var(--space-md) var(--space-lg); max-height: 38rem; overflow-y: auto; }
.atlas-index h2 { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); letter-spacing: 0; padding-bottom: var(--space-2xs); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.atlas-index ol { list-style: none; margin: 0; padding: 0; }
.atlas-index li a { display: flex; justify-content: space-between; gap: var(--space-sm); padding: var(--space-2xs) var(--space-3xs); border-bottom: var(--rule-hair) solid var(--color-rule); text-decoration: none; transition: background-color 120ms ease-out; }
.atlas-index li a:hover, .atlas-index li a.is-hot { background: var(--color-paper); }
.atlas-index li a.is-hot span:first-child { color: var(--color-accent); }
.atlas-index time { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.atlas-index [hidden] { display: none; }
@media (max-width: 64rem) {
  .atlas { grid-template-columns: minmax(0, 1fr); }
  .atlas-main { border-right: 0; border-bottom: var(--rule-hair) solid var(--color-rule); padding: var(--space-sm); }
  .atlas-index { display: none; }
}

/* The map itself */
.map { position: relative; aspect-ratio: 2 / 1; width: 100%; }
.map--locator { aspect-ratio: 3 / 2; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map .sphere { fill: var(--color-sheet); }
.map .graticule { fill: none; stroke: var(--color-rule); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.map .land { fill: var(--color-land); stroke: var(--color-land-edge); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.map .visited { fill: var(--color-visited); stroke: var(--color-sheet); stroke-width: 0.6; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill 120ms ease-out, opacity 160ms ease-out; }
.map .visited:hover, .map .visited.is-hot { fill: var(--color-visited-hover); }
.map .visited.is-latest, .map .visited.is-focus { fill: var(--color-accent); }
.map .visited.is-dim { opacity: 0.25; }
.map .visited:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; fill: var(--color-accent); stroke: var(--color-accent-ink); stroke-width: 2.5; }
.map .pin circle { fill: var(--color-sheet); stroke: var(--color-ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map .pin.is-latest circle, .map .pin.is-focus circle { stroke: var(--color-accent); fill: var(--color-accent); }
.map .pin.is-dim { opacity: 0.2; }
.map .pin text { font: 500 14px/1 var(--font-display); fill: var(--color-ink); paint-order: stroke; stroke: var(--color-sheet); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map .pin { pointer-events: none; }
.map-g { transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-muted); font-size: var(--text-sm); }

.map-pop {
  position: absolute; z-index: 5; width: 16rem; max-width: calc(100% - var(--space-sm)); background: var(--color-sheet);
  border: var(--rule-hair) solid var(--color-rule-2); border-top: var(--rule-bar) solid var(--color-ink); padding: var(--space-xs);
}
.map-pop[hidden] { display: none; }
.map-pop h3 { font-size: var(--text-base); margin-bottom: var(--space-2xs); }
.map-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.map-pop li a { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-xs); align-items: center; text-decoration: none; }
.map-pop li img { width: 3.5rem; height: 3.5rem; object-fit: cover; }
.map-pop li strong { display: block; font: 600 var(--text-base)/1.2 var(--font-display); }
.map-pop li a:hover strong { text-decoration: underline; text-decoration-color: var(--color-accent); }
.map-pop time { font-size: var(--text-sm); color: var(--color-muted); }
.map-pop .close { position: absolute; top: var(--space-3xs); right: var(--space-3xs); width: 2rem; height: 2rem; border: 0; background: transparent; color: var(--color-ink); font: 400 var(--text-title)/1 var(--font-display); cursor: pointer; }
.map-pop .close:hover { color: var(--color-accent); }

/* Year groups */
.year { padding-top: var(--space-2xl); }
.year + .year { margin-top: var(--space-xl); }
.year-head { display: flex; align-items: baseline; gap: var(--space-md); padding-bottom: var(--space-sm); margin-bottom: var(--space-lg); border-bottom: var(--rule-bar) solid var(--color-rule-2); }
.year-head h2 { font: 500 var(--text-section)/1 var(--font-outlier); letter-spacing: -0.04em; }
.year-head p { color: var(--color-muted); }
.year[hidden], .trip-card[hidden] { display: none; }

/* Trip and gallery pages */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: start; padding-block: var(--space-2xl) var(--space-3xl); }
.feature h1 { font-size: var(--text-display); letter-spacing: -0.035em; line-height: 0.95; }
.feature .when { display: block; margin-top: var(--space-sm); color: var(--color-muted); }
.feature .prose { margin-top: var(--space-lg); font-size: var(--text-lede); line-height: 1.5; }
.feature .locator { margin-top: var(--space-xl); padding: var(--space-sm); }
.feature .locator figcaption { margin-top: var(--space-2xs); }
.feature-photo { position: sticky; top: var(--space-md); }
@media (max-width: 56rem) { .feature { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } .feature-photo { position: static; } }

.photo-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--color-paper-3); cursor: zoom-in; }
.photo-btn img { width: 100%; outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; transition: opacity 120ms ease-out; }
.photo-btn:hover img { opacity: 0.92; }
.photo-btn:focus-visible { outline-offset: 4px; }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.gallery .photo-btn { aspect-ratio: 4 / 5; overflow: hidden; }
.gallery .photo-btn img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 56rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); } }

.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: var(--rule-bar) solid var(--color-rule-2); }
.pager a { display: grid; gap: var(--space-3xs); padding: var(--space-lg) var(--space-sm); text-decoration: none; transition: background-color 120ms ease-out; }
.pager a:hover { background: var(--color-paper-2); }
.pager a + a, .pager .next { text-align: right; }
.pager .next { grid-column: 2; }
.pager span { font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 40rem) { .pager { grid-template-columns: minmax(0, 1fr); } .pager .next { grid-column: 1; } .pager a + a { border-top: var(--rule-hair) solid var(--color-rule); } }
.pager strong { font: 600 var(--text-title)/1.1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); }
.pager a:hover strong { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }

/* Work detail */
.doc-head { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-2xl); align-items: end; padding-block: var(--space-2xl) var(--space-xl); }
.doc-head h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); letter-spacing: -0.03em; line-height: 1; }
.doc-head .lede { margin-top: var(--space-md); max-width: 60ch; }
.doc-head .actions { margin-top: var(--space-lg); }
.logo-plate { background: var(--color-sheet); padding: var(--space-md); display: grid; place-items: center; aspect-ratio: 16 / 9; }
.logo-plate img { max-height: 100%; width: auto; object-fit: contain; }
@media (max-width: 52rem) { .doc-head { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); } .logo-plate { max-width: 20rem; } }
.exhibit { padding: 0 0 var(--space-md); background: transparent; }
.exhibit-scroll { display: block; overflow-x: auto; cursor: zoom-in; }
.exhibit figcaption { padding-inline: 0; }
@media (max-width: 48rem) { .exhibit-scroll img { width: 44rem; max-width: none; } }
.exhibit img { margin-inline: auto; }
.exhibit figcaption { margin-top: var(--space-sm); padding-top: var(--space-xs); border-top: var(--rule-hair) solid var(--color-rule); }
.doc-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); }
.doc-body h2 { font-size: var(--text-title); }
@media (max-width: 52rem) { .doc-body { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
.about-grid .prose { font-size: var(--text-lede); line-height: 1.5; }
.about-photos { display: grid; gap: var(--space-md); }
.about-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 70%; outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; }
@media (max-width: 52rem) { .about-grid { grid-template-columns: minmax(0, 1fr); } .about-photos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

figure { margin: 0; }

/* Lightbox */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--color-scrim); color: var(--color-sheet); }
.lightbox::backdrop { background: var(--color-scrim); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--gutter); }
.lightbox-bar .count { font-size: var(--text-sm); }
.lightbox-bar .tools { display: flex; gap: var(--space-2xs); }
.lightbox .btn { color: var(--color-sheet); border-color: var(--color-rule-2); }
.lightbox .btn:hover { background: var(--color-ink-2); }
.lightbox .btn:focus-visible { outline-color: var(--color-sheet); }
.lightbox-stage { display: grid; place-items: center; padding: 0 var(--gutter) var(--space-md); min-height: 0; }
.lightbox-stage img { max-width: 100%; max-height: calc(100dvh - 6rem); object-fit: contain; }

/* 404 */
.lost { padding-block: var(--space-4xl); }
.lost h1 { font-size: var(--text-display); }
.lost p { margin-top: var(--space-md); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Map labels appear once a region is zoomed in */
.map svg.is-world .pin text:not(.latest-label):not(.city-label) { display: none; }
.map .pin .latest-label { font-size: 18px; fill: var(--color-accent); }
.map--compact .pin .latest-label { font-size: 22px; }
.map .visited.is-host { fill: color-mix(in oklch, var(--color-visited) 30%, var(--color-land)); cursor: default; }
.map .pin .city-label { font-size: 36px; font-weight: 600; fill: var(--color-accent); }
.map .pin.is-focus .latest-ring { fill: none; }
.map .pin { transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 160ms ease-out; }
.map .pin .latest-ring { fill: none; stroke: var(--color-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.map--compact { aspect-ratio: 16 / 9; }
@media (max-width: 60rem) { .map--compact { aspect-ratio: 2 / 1; } }

/* Home bio: the heading over one travel photograph */
.split--bio { align-items: start; }
.bio-side { display: grid; gap: var(--space-lg); align-content: start; }
.bio-side h2 { font-size: var(--text-section); }
.bio-photo a { display: block; }
.bio-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; transition: opacity 120ms ease-out; }
.bio-photo a:hover img { opacity: 0.92; }
.bio-photo figcaption { margin-top: var(--space-2xs); }
.split--bio .prose { font-size: var(--text-lede); line-height: 1.5; }
@media (max-width: 52rem) { .bio-photo { max-width: 22rem; } }

/* Home projects: a card per project, the logo on a plate */
.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--space-md); }
.project-card { display: grid; align-content: start; border-top: var(--rule-bar) solid var(--color-ink); background: var(--color-sheet); }
.project-link { display: grid; gap: var(--space-2xs); padding: var(--space-sm) var(--space-sm) 0; text-decoration: none; }
.project-card .plate { position: relative; aspect-ratio: 16 / 9; background: var(--color-plate); margin-bottom: var(--space-xs); outline: var(--rule-hair) solid var(--color-rule); outline-offset: -1px; overflow: hidden; }
.project-card .plate img { position: absolute; inset: var(--space-md); width: calc(100% - 2 * var(--space-md)); height: calc(100% - 2 * var(--space-md)); object-fit: contain; }
.project-card h3 { font-size: var(--text-title); line-height: 1.15; }
.project-card p { color: var(--color-muted); }
.project-link:hover h3 { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.project-card .docs { display: flex; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) var(--space-sm); margin: var(--space-xs) 0 0; border-top: var(--rule-hair) solid var(--color-rule); }
.project-card:first-child { grid-column: span 2; }
.project-card:first-child .plate { aspect-ratio: 32 / 9; }
.project-card:first-child h3 { font-size: var(--text-section); }
@media (max-width: 72rem) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .project-grid { grid-template-columns: minmax(0, 1fr); } .project-card:first-child { grid-column: auto; } .project-card:first-child .plate { aspect-ratio: 16 / 9; } .project-card:first-child h3 { font-size: var(--text-title); } }

/* Work: background beside a collage of every project's exhibit */
.background { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: start; }
.background h2 { font-size: var(--text-section); margin-bottom: var(--space-lg); }
.background .prose { font-size: var(--text-lede); line-height: 1.5; }
.collage { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.collage li:nth-child(1), .collage li:nth-child(7) { grid-column: span 2; }
.collage a { display: grid; gap: var(--space-3xs); height: 100%; text-decoration: none; }
.collage .tile { height: 10.5rem; background: var(--color-plate); outline: var(--rule-hair) solid var(--color-rule-2); outline-offset: -1px; overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: opacity 120ms ease-out; }
.collage span { font: 500 var(--text-sm)/1.25 var(--font-display); color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collage a:hover img { opacity: 0.85; }
.collage a:hover span { text-decoration: underline; text-decoration-color: var(--color-accent); }
@media (max-width: 60rem) { .background { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); } }
@media (max-width: 36rem) { .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); } .collage li:nth-child(7) { grid-column: auto; } }
