/* ============================================================
   LIVING ARCHITECTURE — prototype design system (0.4, Light model)
   Self-contained: nothing here touches the live site's CSS.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette — deep blue and forest carry the atmosphere, cyan is the structure's light, champagne marks */
  --bg: #101419;
  --forest: #18251f;
  --midnight: #273c50;
  --mineral: #849eaa;
  --cyan: #6fb9cf;
  --amber: #c0a477;
  --ivory: #e9e5db;

  --ink: var(--ivory);
  --ink-2: rgba(233, 229, 219, 0.68);
  --ink-3: rgba(233, 229, 219, 0.56);
  --hair: rgba(233, 229, 219, 0.13);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5.6vw, 92px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
img { max-width: 100%; display: block; }
::selection { background: rgba(111, 185, 207, 0.3); color: #fff; }

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 5px;
  border-radius: 2px;
}

/* film grain: keeps large dark fields from banding and feeling digital */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: -80px;
  z-index: 95;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--forest);
  font-size: 13px;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 14px; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mineral);
}

/* ---------- navigation: always present, never clever ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3.2vh, 30px) var(--gutter);
  background: linear-gradient(to bottom, rgba(16, 20, 25, 0.78), rgba(16, 20, 25, 0));
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.logo {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo span { color: var(--amber); }
.nav-links { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav-links a {
  position: relative;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.nav .logo, .nav-links a, .menu-btn { transition: color 0.3s var(--ease); }
/* over the ivory room the navigation turns to ink */
.nav.on-light { background: none; }
.nav.on-light .logo, .nav.on-light .menu-btn { color: var(--forest); }
.nav.on-light .nav-links a { color: rgba(24, 37, 31, 0.72); }
.nav.on-light .nav-links a:hover, .nav.on-light .nav-links a:focus-visible { color: var(--forest); }
.nav.on-light .nav-links a::after, .nav.on-light .menu-btn i, .nav.on-light .menu-btn i::before { background: var(--forest); }
.menu-open .nav.on-light .logo, .menu-open .nav.on-light .menu-btn { color: var(--ink); }
.menu-open .nav.on-light .menu-btn i, .menu-open .nav.on-light .menu-btn i::before { background: var(--ink); }

/* small-screen menu */
.menu-btn {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 0 0 12px;
  margin-right: -2px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 11.5px/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.menu-btn i { position: relative; width: 22px; height: 1px; background: currentColor; transform: translateY(-3px); transition: transform 0.4s var(--ease); }
.menu-btn i::before { content: ""; position: absolute; left: 0; top: 6px; width: 22px; height: 1px; background: currentColor; transition: transform 0.4s var(--ease); }
.menu-open .menu-btn i { transform: translateY(0) rotate(45deg); }
.menu-open .menu-btn i::before { transform: translateY(-6px) rotate(-90deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(104px, 17vh, 150px) var(--gutter) clamp(28px, 5vh, 48px);
  background:
    radial-gradient(90% 60% at 10% 100%, rgba(24, 37, 31, 0.95), transparent 70%),
    radial-gradient(80% 50% at 100% 0%, rgba(39, 60, 80, 0.6), transparent 72%),
    var(--bg);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.menu[hidden] { display: none; }
.menu-open .menu { opacity: 1; }
.menu nav { display: grid; }
.menu nav a {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 11vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.menu nav a:last-child { border-bottom: 1px solid var(--hair); }
.menu nav a span { font: 500 11px/1 var(--sans); letter-spacing: 0.2em; color: var(--amber); }
.menu-open .menu nav a { opacity: 1; transform: none; }
.menu-open .menu nav a:nth-child(2) { transition-delay: 0.05s; }
.menu-open .menu nav a:nth-child(3) { transition-delay: 0.1s; }
.menu-open .menu nav a:nth-child(4) { transition-delay: 0.15s; }
.menu-foot { font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.9; color: var(--ink-3); }

/* ---------- the journey: a tall track with a pinned stage ---------- */
.journey { position: relative; height: 320vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(85% 70% at 14% 96%, rgba(27, 48, 38, 0.98), transparent 72%),
    radial-gradient(60% 55% at 84% 10%, rgba(39, 60, 80, 0.55), transparent 72%),
    radial-gradient(46% 50% at 72% 62%, rgba(24, 44, 36, 0.5), transparent 75%),
    var(--bg);
}
/* vignette so the frame closes in around the object (before the scene is live, or without WebGL) */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 10, 13, 0.6) 100%);
}
/* once live, the scene draws its own atmosphere and vignette; the stage only eases its lower edge into the page */
.is-live .stage::after { background: linear-gradient(to bottom, transparent 84%, var(--bg) 100%); }

#world {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  transition: opacity 0.9s var(--ease);
}
#world.dragging { cursor: grabbing; }
#world:focus-visible { outline-offset: -8px; }
.is-live #world { opacity: 1; }

/* a line drawing of the same structure: shown before WebGL is ready and whenever it isn't available */
.fallback {
  position: absolute;
  z-index: 0;
  left: 71%;
  top: 50%;
  width: min(50vw, 92vh);
  max-width: none;
  transform: translate(-50%, -50%);
  opacity: 0.7;
  transition: opacity 1.2s var(--ease);
}
.is-live .fallback { opacity: 0; }

/* opening copy */
.copy {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  bottom: clamp(96px, 17vh, 190px);
  width: min(45vw, 640px);
  pointer-events: none;
  will-change: opacity, transform;
}
.copy h1 {
  margin-top: clamp(16px, 2.6vh, 30px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 5.7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.copy .eyebrow span { display: block; margin-top: 7px; color: var(--ink-3); }
.copy h1 em { font-weight: 300; }
.copy .sub {
  margin-top: clamp(18px, 3vh, 34px);
  max-width: 34ch;
  font-size: clamp(1rem, 1.15vw, 1.14rem);
  line-height: 1.6;
  color: var(--ink-2);
}
/* one orchestrated entrance, nothing else moves on load */
.copy > * { opacity: 0; transform: translateY(18px); animation: rise 1.3s var(--ease) forwards; }
.copy > .eyebrow { animation-delay: 0.25s; }
.copy > h1 { animation-delay: 0.4s; }
.copy > .sub { animation-delay: 0.62s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* world-view caption: one line that says what the object is */
.caption {
  position: absolute;
  z-index: 3;
  left: 0; right: 0;
  top: clamp(92px, 14.5vh, 150px);
  width: min(600px, 46vw);
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.caption-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.caption-sub { margin: 12px auto 0; max-width: 44ch; font-size: 13.5px; color: var(--ink-2); }

/* destinations: readable text in fixed places, tied to the structure by a leader line */
.dest { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.d {
  position: absolute;
  display: grid;
  gap: 7px;
  width: min(250px, 20.5vw);
  padding: 10px 0 14px;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}
.d[data-id="quant"], .d[data-id="self"] { left: var(--gutter); }
.d[data-id="build"], .d[data-id="exp"] { right: calc(var(--gutter) + 26px); text-align: right; justify-items: end; }
.d[data-id="quant"], .d[data-id="build"] { top: 31%; }
.d[data-id="self"], .d[data-id="exp"] { top: 63%; }
.d-num { font-size: 11px; font-weight: 500; letter-spacing: 0.22em; color: var(--amber); }
.d-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.35rem, 1.95vw, 1.8rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.d-desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.d::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0.14);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.d[data-id="build"]::after, .d[data-id="exp"]::after { transform-origin: right; }
.d:hover::after, .d:focus-visible::after, .d.is-active::after { transform: scaleX(1); }
.d .d-name { transition: color 0.3s var(--ease); }
.d.is-active .d-name { color: #fff; }

.leaders { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.leaders g { opacity: 0; }
.leaders path { fill: none; stroke: var(--mineral); stroke-opacity: 0.6; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.leaders circle { fill: var(--bg); stroke: var(--amber); stroke-width: 1.2; transition: fill 0.3s var(--ease); }
.leaders path { transition: stroke-opacity 0.3s var(--ease); }
.leaders g.is-active path { stroke: var(--amber); stroke-opacity: 0.9; }
.leaders g.is-active circle { fill: var(--amber); }

/* numbered markers on the structure (portrait only, where there is no room for leader lines).
   Real buttons: tapping one highlights its row in the list below. */
.tags { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: none; }
.tag {
  position: absolute;
  left: 0; top: 0;
  margin: -13px 0 0 -13px;
  width: 26px; height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--amber);
  border-radius: 50%;
  background: rgba(16, 20, 25, 0.86);
  font: 500 9.5px/1 var(--sans);
  letter-spacing: 0.04em;
  color: var(--ivory);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.tag::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }   /* 46px touch target */
.tag.is-active { background: var(--amber); color: var(--bg); }

/* scroll position within the pinned sequence */
.rail {
  position: absolute;
  z-index: 3;
  right: calc(var(--gutter) * 0.5);
  top: 50%;
  width: 1px;
  height: 120px;
  margin-top: -60px;
  background: var(--hair);
}
.rail b {
  position: absolute;
  left: -1px;
  top: 0;
  width: 3px;
  height: 24px;
  background: var(--amber);
  will-change: transform;
}

.hint {
  position: absolute;
  z-index: 3;
  bottom: clamp(22px, 4.6vh, 44px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
  transition: opacity 0.8s var(--ease);
}
.hint-scroll { left: var(--gutter); }
.hint-scroll span { display: inline-block; margin-left: 8px; color: var(--amber); animation: nudge 2.6s var(--ease) infinite; }
.hint-drag { right: var(--gutter); }
.hint-drag::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--amber);
}
.hint.gone { opacity: 0; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(5px); } }

/* ---------- shared section pieces ---------- */
.about h2, .explore h2, .experience h2, .connect h2 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.2vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.explore-head { max-width: 900px; }
.num { font-size: 12px; font-weight: 500; letter-spacing: 0.2em; color: var(--amber); }
.todo { color: var(--ink-3); font-style: italic; }
.about, .explore, .experience { scroll-margin-top: 0; }

/* ---------- the person ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 110px);
  padding: clamp(96px, 18vh, 200px) var(--gutter) clamp(72px, 12vh, 140px);
  background: radial-gradient(70% 60% at 0% 100%, rgba(24, 37, 31, 0.9), transparent 70%), var(--bg);
}
.about-lead h2 { max-width: 11em; }
.about-body { padding-top: clamp(8px, 4.6vh, 52px); }
.about-lead { display: flex; flex-direction: column; }
.about-lead .facts { margin-top: auto; padding-top: clamp(40px, 8vh, 80px); border-bottom: 0; }
.about-lead .facts > div:last-child { border-bottom: 1px solid var(--hair); }
.about-body p { max-width: 46ch; color: var(--ink-2); font-size: 1.05rem; line-height: 1.65; }
.about-body p + p { margin-top: 1.1em; }
.about-body .lede { font-family: var(--serif); font-weight: 300; font-size: clamp(1.45rem, 2.2vw, 2.05rem); line-height: 1.28; letter-spacing: -0.012em; color: var(--ink); max-width: 24em; }
.facts { margin: clamp(32px, 6vh, 56px) 0 0; border-bottom: 1px solid var(--hair); }
.facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--hair); }
.facts dt, .ledger dt { font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mineral); padding-top: 0.25em; }
.facts dd, .ledger dd { margin: 0; font-size: 15px; line-height: 1.5; }
.principles {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(64px, 12vh, 130px);
  border-top: 1px solid var(--hair);
}
.principles li { padding-top: 22px; }
.principles .num { font-family: var(--serif); font-style: italic; font-size: 15px; letter-spacing: 0.04em; }
.principles h3 { margin-top: 12px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.35rem, 1.9vw, 1.75rem); line-height: 1.12; letter-spacing: -0.012em; }
.principles p { margin-top: 10px; max-width: 34ch; font-size: 15px; color: var(--ink-2); }

/* ---------- selected work ---------- */
.explore {
  position: relative;
  padding: clamp(88px, 15vh, 170px) var(--gutter) clamp(72px, 12vh, 140px);
  background: linear-gradient(to bottom, var(--bg), #0f1716 60%, #111b18);
}
.rows { margin-top: clamp(44px, 9vh, 100px); border-bottom: 1px solid var(--hair); }
.row {
  display: grid;
  grid-template-columns: 72px minmax(0, 0.8fr) minmax(0, 2fr);
  column-gap: clamp(18px, 3vw, 48px);
  align-items: start;
  padding: clamp(30px, 5.4vh, 56px) 0;
  border-top: 1px solid var(--hair);
  scroll-margin-top: 88px;
}
.row > .num { padding-top: 0.85em; }
.row h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.row:target > .num { color: var(--ivory); }
.row-main p { margin-top: 12px; color: var(--ink-2); max-width: 30ch; }
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 2.6vw, 40px); }
.item h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.008em; }
.item h4 a { border-bottom: 1px solid var(--hair); transition: border-color 0.3s var(--ease); }
.item h4 a:hover, .item h4 a:focus-visible { border-color: var(--amber); }
.item p { margin-top: 9px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.item .meta { margin-top: 12px; font-size: 11.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.item .meta .todo { text-transform: none; letter-spacing: 0; font-size: 13px; }
.item > .todo { margin-top: 9px; }
/* real screenshots of real work */
.shot { display: block; margin-bottom: 16px; }
.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  filter: saturate(0.6) brightness(0.92);
  transition: filter 0.5s var(--ease), border-color 0.5s var(--ease);
}
.shot:hover img, .shot:focus-visible img, .item:hover .shot img { filter: none; border-color: rgba(192, 164, 119, 0.55); }

/* ---------- experience ---------- */
.experience {
  padding: clamp(88px, 15vh, 170px) var(--gutter) clamp(88px, 15vh, 170px);
  background: linear-gradient(to bottom, #111b18, var(--forest));
  scroll-margin-top: 0;
}
.timeline { margin-top: clamp(44px, 9vh, 100px); border-bottom: 1px solid var(--hair); }
.job {
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(0, 1fr) minmax(0, 1.5fr);
  column-gap: clamp(18px, 3vw, 48px);
  align-items: start;
  padding: clamp(24px, 4.2vh, 40px) 0;
  border-top: 1px solid var(--hair);
}
.when { padding-top: 0.6em; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.job h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.12; letter-spacing: -0.012em; }
.where { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.did { display: grid; gap: 9px; }
.did li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.did li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 9px; height: 1px; background: var(--amber); }
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 110px); margin-top: clamp(56px, 10vh, 110px); }
.ledger dl { margin: 18px 0 0; border-bottom: 1px solid var(--hair); }
.ledger dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--hair); }
.ledger dd { color: var(--ink-2); }
.ledger dd b { display: block; margin-bottom: 3px; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.25; color: var(--ink); }

/* ---------- connect: the one light room ---------- */
.connect {
  padding: clamp(96px, 18vh, 200px) var(--gutter);
  background: var(--ivory);
  color: var(--forest);
}
.connect .eyebrow { color: #566b5f; }
.connect h2 { max-width: 14em; }
.connect-note { margin-top: clamp(18px, 3vh, 28px); max-width: 38ch; font-size: 1.05rem; line-height: 1.6; color: #3d5247; }
.connect-links { display: flex; flex-wrap: wrap; gap: 10px 40px; margin-top: clamp(34px, 6vh, 60px); }
.connect-links a {
  display: inline-block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid rgba(24, 37, 31, 0.35);
  transition: border-color 0.3s var(--ease);
}
.connect-links a span { display: inline-block; margin-left: 6px; transition: transform 0.4s var(--ease); }
.connect-links a:hover span { transform: translate(3px, 0); }
.connect-links a:hover { border-color: var(--forest); }
.connect :focus-visible { outline-color: var(--forest); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  background: var(--ivory);
  border-top: 1px solid rgba(24, 37, 31, 0.14);
  color: #566b5f;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { border-bottom: 1px solid rgba(24, 37, 31, 0.3); }
.foot :focus-visible { outline-color: var(--forest); }

/* content sections on narrower screens */
@media (max-width: 1100px) {
  .row { grid-template-columns: 56px minmax(0, 1fr); row-gap: 28px; }
  .row .items { grid-column: 2; }
  .job { grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr); row-gap: 16px; }
  .job .did { grid-column: 2; }
}
@media (max-width: 760px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-body { padding-top: 28px; }
  .principles { grid-template-columns: minmax(0, 1fr); border-top: 0; margin-top: 56px; }
  .principles li { border-top: 1px solid var(--hair); padding: 20px 0 22px; }
  .facts > div, .ledger dl > div { grid-template-columns: 92px minmax(0, 1fr); }
  .row { grid-template-columns: 36px minmax(0, 1fr); }
  .items { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .item { padding: 20px 0; border-top: 1px solid var(--hair); }
  .item:first-child { padding-top: 0; border-top: 0; }
  .job { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .job .did { grid-column: 1; }
  .when { padding-top: 0; }
  .ledger { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
}

/* ---------- portrait: its own composition — words first, structure below, then a list ---------- */
@media (max-aspect-ratio: 9/10) {
  .journey { height: 215vh; }
  .copy { left: var(--gutter); right: var(--gutter); top: clamp(92px, 13.5vh, 150px); bottom: auto; width: auto; }
  .copy h1 { font-size: clamp(2.5rem, 11vw, 4.8rem); }
  .copy .sub { max-width: 32ch; }
  .fallback { left: 50%; top: 66%; width: 104vw; }

  .caption { top: 40.5%; left: var(--gutter); right: var(--gutter); width: auto; margin: 0; text-align: left; }
  .caption-title { font-size: clamp(1.25rem, 5.2vw, 1.9rem); }
  .caption-sub { display: none; }

  .leaders { display: none; }
  .tags { display: block; }
  .dest {
    inset: 48.5% var(--gutter) max(14px, 2.4vh) var(--gutter);
    display: grid;
    grid-auto-rows: 1fr;
  }
  .d, .d[data-id] {
    position: relative;
    inset: auto;
    width: auto;
    grid-template-columns: 40px 1fr;
    column-gap: 6px;
    row-gap: 3px;
    align-content: center;
    justify-items: start;
    text-align: left;
    padding: 6px 0;
    border-top: 1px solid var(--hair);
  }
  .d:last-child { border-bottom: 1px solid var(--hair); }
  .d-num { grid-row: 1 / span 2; align-self: start; padding-top: 0.75em; }
  .d-name { font-size: clamp(1.3rem, 5.6vw, 2rem); }
  .d-desc { grid-column: 2; font-size: clamp(12.5px, 3.3vw, 15px); line-height: 1.4; }
  .d::after { display: none; }
  .d.is-active { background: linear-gradient(to right, rgba(192, 164, 119, 0.14), transparent 70%); }
  .d.is-active .d-num { color: var(--ivory); }

  .rail { right: 8px; top: 24%; height: 72px; margin-top: 0; }
  .hint-drag { display: none; }
}
@media (max-aspect-ratio: 9/10) and (max-height: 700px) {
  .d-desc { display: none; }
  .copy .sub { font-size: 0.95rem; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .logo { font-size: 23px; }
  .foot { flex-direction: column; gap: 12px; }
}
@media (min-width: 761px) {
  .menu { display: none; }
}

/* ---------- no WebGL: the same page, without the pinned sequence ---------- */
.no-webgl .journey { height: auto; }
.no-webgl #world, .no-webgl .caption, .no-webgl .dest, .no-webgl .leaders, .no-webgl .tags, .no-webgl .rail, .no-webgl .hint { display: none; }
.no-webgl .fallback { opacity: 0.8; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .copy > * { animation: none; opacity: 1; transform: none; }
  .hint-scroll span { animation: none; }
  #world, .fallback, .d::after, .nav-links a::after, .menu, .menu nav a, .menu-btn i, .menu-btn i::before, .shot img { transition: none; }
}
