/* home.css: the one-page portfolio. Pine overview, cream about, three project chapters (pine head fading to cream),
   ops, credentials, pine contact. Section transitions are gradient fades, not hard lines. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Line icons (drawn in by motion.js) ---------- */
.ic {
  flex: none;
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--copper-display);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-surface="pine"] .ic { stroke: var(--copper-on-pine); }
@media (prefers-reduced-motion: no-preference) {
  html.js-draw .ic { stroke-dasharray: 1 1; stroke-dashoffset: var(--d, 0); }
}

/* ---------- One topographic map under the whole page ----------
   The contour tile is fixed to the viewport, so the same lines run unbroken through cream and pine.
   Pine sections meet cream along a contour-shaped edge (a mask), with a copper contour line beside it. */
:root { --edge: clamp(44px, 6vw, 96px); }
body { background: var(--cream) url("../assets/topo-cream.svg") 0 0 / 1200px 1200px repeat fixed; }
.hero, .ch__head, .band, .contact { background: var(--pine) url("../assets/topo-pine.svg") 0 0 / 1200px 1200px repeat fixed; }
@media (hover: none), (pointer: coarse) {
  body, .hero, .ch__head, .band, .contact { background-attachment: scroll; }
}
.et, .eb {
  --mt: linear-gradient(#000 0 0);
  --mb: linear-gradient(#000 0 0);
  position: relative;
  -webkit-mask: var(--mt) top / 100% var(--edge) no-repeat, linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 12px) no-repeat, var(--mb) bottom / 100% var(--edge) no-repeat;
  mask: var(--mt) top / 100% var(--edge) no-repeat, linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--edge) + 12px) no-repeat, var(--mb) bottom / 100% var(--edge) no-repeat;
}
.et { border-top: var(--edge) solid transparent; }
.eb { border-bottom: var(--edge) solid transparent; }
.et::before, .eb::after { content: ""; position: absolute; left: 0; right: 0; height: var(--edge); pointer-events: none; background: var(--line-img) center / 100% 100% no-repeat; }
.et::before { top: calc(-1 * var(--edge)); }
.eb::after { bottom: calc(-1 * var(--edge)); }
.et1 { --mt: url("../assets/edge-t1.svg"); } .et1::before { --line-img: url("../assets/edge-line-t1.svg"); }
.et2 { --mt: url("../assets/edge-t2.svg"); } .et2::before { --line-img: url("../assets/edge-line-t2.svg"); }
.et3 { --mt: url("../assets/edge-t3.svg"); } .et3::before { --line-img: url("../assets/edge-line-t3.svg"); }
.et4 { --mt: url("../assets/edge-t4.svg"); } .et4::before { --line-img: url("../assets/edge-line-t4.svg"); }
.et5 { --mt: url("../assets/edge-t5.svg"); } .et5::before { --line-img: url("../assets/edge-line-t5.svg"); }
.et6 { --mt: url("../assets/edge-t6.svg"); } .et6::before { --line-img: url("../assets/edge-line-t6.svg"); }
.eb1 { --mb: url("../assets/edge-b1.svg"); } .eb1::after { --line-img: url("../assets/edge-line-b1.svg"); }
.eb2 { --mb: url("../assets/edge-b2.svg"); } .eb2::after { --line-img: url("../assets/edge-line-b2.svg"); }
.eb3 { --mb: url("../assets/edge-b3.svg"); } .eb3::after { --line-img: url("../assets/edge-line-b3.svg"); }
.eb4 { --mb: url("../assets/edge-b4.svg"); } .eb4::after { --line-img: url("../assets/edge-line-b4.svg"); }
.eb5 { --mb: url("../assets/edge-b5.svg"); } .eb5::after { --line-img: url("../assets/edge-line-b5.svg"); }
.eb6 { --mb: url("../assets/edge-b6.svg"); } .eb6::after { --line-img: url("../assets/edge-line-b6.svg"); }

/* Shared section heading, lede, small headings */
.sec-h { font-size: var(--fs-l); font-weight: 400; }
.lede { margin-top: var(--s3); max-width: 62ch; }
.lede strong { color: var(--ink); font-weight: 600; }
.sub {
  display: flex; align-items: center; gap: var(--s3);
  margin-bottom: var(--s3);
  font-family: var(--font-body); font-size: var(--fs-s); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.sub::before { content: ""; width: 24px; height: 2px; background: var(--copper-display); }
.sub--gap { margin-top: var(--s6); }
.big { font-size: var(--fs-body-l); line-height: 1.55; }
strong { font-weight: 600; }
.source { margin-top: var(--s3); font-size: var(--fs-s); color: var(--ink-2); }

/* ---------- 1. Overview (hero) ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-block: calc(var(--nav-h) + var(--s6)) var(--s6);
  color: var(--on-pine);
}
.hero__ridge, .hero__ridge3d { position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--edge)); z-index: 0; width: 100%; pointer-events: none; }
.hero__ridge { height: clamp(72px, 14svh, 140px); }
.hero__ridge3d { height: clamp(150px, 34svh, 340px); opacity: 0; transition: opacity 900ms var(--ease-out); }
.hero.has-ridge3d .hero__ridge { display: none; }
.hero.has-ridge3d .hero__ridge3d { opacity: 1; }
.hero__ridge-back { fill: var(--pine-2); }
.hero__ridge-front { fill: var(--pine-deep); }
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--s5);
  row-gap: var(--s6);
  align-items: center;
}
.hero__text { grid-column: 1 / 8; grid-row: 1; }
.hero__kicker { font-size: var(--fs-s); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-pine-2); }
.hero__name { margin-top: var(--s3); font-size: var(--fs-xl); line-height: .98; white-space: nowrap; }
.hero__pos { margin-top: var(--s4); max-width: 30ch; font-family: var(--font-display); font-size: var(--fs-m); font-weight: 300; line-height: 1.22; letter-spacing: -.01em; color: var(--on-pine); }
.hero__status { margin-top: var(--s4); font-size: var(--fs-body-l); color: var(--on-pine-2); }
.hero__status strong { color: var(--on-pine); }
.hero__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); margin-top: var(--s5); }
.hero__acts .text-link { text-decoration-color: var(--line-pine); }
.hero__portrait { grid-column: 8 / 13; grid-row: 1; justify-self: end; width: 100%; max-width: 480px; }
.hero__portrait img {
  width: 100%;
  height: clamp(280px, 52svh, 560px);
  object-fit: cover;
  object-position: 50% 14%;
  border-radius: var(--r-0);
}

/* Work index: the hero's one glass moment, over the ridgeline */
.hero__index {
  grid-column: 1 / 13;
  grid-row: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s5);
  padding: var(--s3) var(--s5);
  background: var(--glass-stats);
  border: 1px solid var(--line-pine);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}
@supports not (backdrop-filter: blur(1px)) { .hero__index { background: var(--pine-deep); } }
.hero__index-h { font-size: var(--fs-s); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-pine-2); }
.hero__index ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero__index li { border-left: 1px solid var(--line-pine); }
.hero__index a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--s3);
  min-height: 64px;
  align-content: center;
  padding: var(--s2) var(--s4);
  text-decoration: none;
  transition: background var(--dur-1) var(--ease-out);
}
.hero__index a:hover { background: var(--pine-2); }
.hero__i-n { grid-row: 1 / 3; font-family: var(--font-display); font-size: var(--fs-m); line-height: 1; color: var(--copper-on-pine); }
.hero__i-t { font-weight: 600; line-height: 1.3; }
.hero__index a:hover .hero__i-t { text-decoration: underline; text-decoration-color: var(--copper-on-pine); text-underline-offset: 4px; }
.hero__i-m { font-size: var(--fs-s); line-height: 1.35; color: var(--on-pine-2); }

@media (max-width: 1099px) {
  .hero__index { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .hero__index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__index li:nth-child(odd) { border-left: 0; }
  .hero__index li:nth-child(n+3) { border-top: 1px solid var(--line-pine); }
  .hero__index a { padding-inline: var(--s3); }
}
@media (max-width: 719px) {
  .hero { justify-content: flex-start; min-height: auto; padding-block: calc(var(--nav-h) + var(--s5)) var(--s7); }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 96px; column-gap: var(--s4); row-gap: 0; align-items: start; }
  .hero__text { display: contents; }
  .hero__kicker { grid-column: 1 / -1; grid-row: 1; }
  .hero__name { grid-column: 1; grid-row: 2; align-self: end; white-space: normal; }
  .hero__portrait { grid-column: 2; grid-row: 2; width: 96px; margin-top: var(--s3); }
  .hero__portrait img { width: 96px; height: 112px; object-position: 50% 12%; }
  .hero__pos, .hero__status, .hero__acts, .hero__index { grid-column: 1 / -1; }
  .hero__pos { grid-row: 3; max-width: none; }
  .hero__status { grid-row: 4; margin-top: var(--s3); font-size: var(--fs-body); }
  .hero__acts { grid-row: 5; margin-top: var(--s4); }
  .hero__index { grid-row: 6; margin-top: var(--s5); padding: var(--s2) var(--s3); }
  .hero__index ol { grid-template-columns: minmax(0, 1fr); }
  .hero__index li, .hero__index li:nth-child(n+3) { border-left: 0; border-top: 1px solid var(--line-pine); }
  .hero__index li:first-child { border-top: 0; }
  .hero__index a { min-height: 52px; padding-inline: 0; }
  .hero__ridge3d { height: 200px; }
}

/* Hero settles once (hero.js adds .is-settling). Nothing starts at opacity 0. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-rise { from { transform: translateY(10px); } }
  .hero.is-settling .hero__kicker,
  .hero.is-settling .hero__name,
  .hero.is-settling .hero__pos,
  .hero.is-settling .hero__status,
  .hero.is-settling .hero__acts,
  .hero.is-settling .hero__index { animation: hero-rise 520ms var(--ease-out) both; }
  .hero.is-settling .hero__pos { animation-delay: 60ms; }
  .hero.is-settling .hero__status { animation-delay: 120ms; }
  .hero.is-settling .hero__acts { animation-delay: 160ms; }
  .hero.is-settling .hero__index { animation-delay: 200ms; }
}

/* ---------- 2. About ---------- */
.about { padding-block: var(--s5) var(--sec-s); }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); row-gap: var(--s6); align-items: start; }
.about__main { grid-column: 1 / 8; }
.about__body { margin-top: var(--s4); max-width: 60ch; font-size: var(--fs-body-l); line-height: 1.6; }
.edu { grid-column: 8 / 13; color: var(--ink-2); border-top: 2px solid var(--ink); }
.edu strong { color: var(--ink); }
.edu li { padding-block: var(--s3); border-bottom: 1px solid var(--line); line-height: 1.5; }
.skills { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.skills__col { padding: var(--s4) 0 0; border-top: 1px solid var(--line-strong); }
.skills__col h3 { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); font-family: var(--font-display); font-size: var(--fs-m); font-weight: 400; line-height: 1.15; }
.skills__col li { line-height: 1.5; color: var(--ink-2); }
.skills__col li + li { margin-top: var(--s1); }
@media (max-width: 899px) {
  .about__main, .edu { grid-column: 1 / -1; }
  .skills { grid-template-columns: 1fr; gap: var(--s5); }
}

/* ---------- 3. Work ---------- */
.work { }
.work__intro { padding-top: var(--s5); padding-bottom: var(--s5); border-top: 1px solid var(--line); }

/* Chapter bar: sticky under the nav while the projects scroll by */
.chapbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: var(--cream-raised);
  border-block: 1px solid var(--line);
}
.chapbar__in { position: relative; display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.chapbar__in::-webkit-scrollbar { display: none; }
.chapbar a {
  flex: none;
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s4);
  font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.chapbar a:first-child { padding-left: 0; }
.chapbar a span { font-family: var(--font-display); font-size: var(--fs-body-l); font-weight: 400; color: var(--ink-2); }
.chapbar a:hover { color: var(--ink); }
.chapbar a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--copper-display); }
.chapbar__bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--copper-display); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.chapbar a, .chapbar__bar { margin-bottom: -1px; }

/* A chapter: pine head, fade, cream body */
.ch { scroll-margin-top: 0; } /* html scroll-padding already clears the nav and project bar */
.ch__head { color: var(--on-pine); padding-top: var(--sec-s); }
.ch__num { font-family: var(--font-display); font-size: var(--fs-m); line-height: 1; color: var(--copper-on-pine); }
.ch__title { margin-top: var(--s2); max-width: 18ch; font-size: var(--fs-xl); font-weight: 300; }
.ch__deck { margin-top: var(--s4); max-width: 46ch; font-size: var(--fs-body-l); line-height: 1.5; color: var(--on-pine-2); }
.ch__deck strong { color: var(--on-pine); }
.ch__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4) var(--s5); margin: var(--s6) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line-pine); }
.ch__facts dt { font-size: var(--fs-s); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-pine-2); }
.ch__facts dd { margin: var(--s1) 0 0; font-weight: 500; line-height: 1.45; }
@media (max-width: 899px) { .ch__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .ch__facts { grid-template-columns: minmax(0, 1fr); } }
.ch__body { padding-top: var(--s4); padding-bottom: var(--sec-s); }
.ch__body > * + * { margin-top: var(--sec-s); }
.ch__body > .sub + * { margin-top: 0; }

/* Two-column rows */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6) var(--s8); align-items: start; }
.split--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--flip > .split__a { order: 2; }
.split > .split__a:only-child { grid-column: 1 / -1; max-width: 62ch; }
.split__a, .split__b { min-width: 0; }
@media (max-width: 899px) {
  .split, .split--wide, .split--even { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .split--flip > .split__a { order: 0; }
}

/* Bold stat callouts */
.callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--s6); border-top: 2px solid var(--ink); }
.callouts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 479px) { .callouts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s4); } .callouts--4 li:nth-child(3) { padding-left: 0; border-left: 0; } }
.callouts li { padding: var(--s4) var(--s4) 0 0; }
.callouts li + li { padding-left: var(--s4); border-left: 1px solid var(--line); }
.callout__n { display: block; font-family: var(--font-display); font-size: var(--fs-stat); font-weight: 400; line-height: 1; letter-spacing: -.02em; color: var(--copper-display); }
.callout__l { display: block; margin-top: var(--s2); font-size: var(--fs-s); font-weight: 600; }

/* Steps with icons */
.steps { border-top: 2px solid var(--ink); }
.steps li, .rules li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s4); align-items: start; padding-block: var(--s4); border-bottom: 1px solid var(--line); }
.steps li p, .rules li p { line-height: 1.55; }

/* Pine bands: simulator and bot map */
.band { padding-block: var(--sec-s); color: var(--on-pine); }
.band--pine { padding-bottom: var(--s5); }
.band--map { padding-top: var(--s5); }
.band__h { font-size: var(--fs-l); font-weight: 400; color: var(--on-pine); }
.band__p { margin-top: var(--s3); max-width: 52ch; font-size: var(--fs-body-l); line-height: 1.5; color: var(--on-pine-2); }
.band__p strong { color: var(--on-pine); }
.split--sim { align-items: center; }
.rules { margin-top: var(--s5); border-top: 1px solid var(--line-pine); }
.rules li { border-bottom-color: var(--line-pine); color: var(--on-pine-2); }
.rules li strong { color: var(--on-pine); }
.split--sim .split__b { display: flex; justify-content: center; }
.split--sim .split__b > [data-sim] { width: 100%; }
.band--map [data-botmap] { margin-top: var(--s5); }

/* Figures: never shown past their real pixel width */
.fig img, .fig video { max-width: 100%; height: auto; border-radius: var(--r-1); }
.fig figcaption { margin-top: var(--s2); font-size: var(--fs-s); line-height: 1.45; color: var(--ink-2); }
.fig--svg img { width: 100%; }
.band .fig figcaption { color: var(--on-pine-2); }
.fig--profile img { width: 100%; max-width: 718px; border: 1px solid var(--line); }
.fig--video video { background: var(--pine); max-height: 640px; width: auto; }

/* Officer manual: a document card */
.manual { padding-top: var(--s5); padding-bottom: var(--sec-s); }
.manual__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s3) var(--s8); align-items: baseline; }
.manual__note { max-width: 60ch; }
.manual__doc { margin-top: var(--s5); padding: var(--s6); background: var(--cream-raised); border: 1px solid var(--line-strong); border-top: 4px solid var(--copper-display); border-radius: var(--r-1); }
.manual__title { font-size: var(--fs-m); font-weight: 400; }
.manual__cols { columns: 2 340px; column-gap: var(--s7); margin-top: var(--s5); }
.manual__sec { break-inside: avoid; padding-bottom: var(--s5); }
.manual__sec h5 { margin-bottom: var(--s2); font-size: var(--fs-body); font-weight: 600; }
.manual__sec p { font-size: var(--fs-body); line-height: 1.55; color: var(--ink-2); }
.manual__sec p + p { margin-top: var(--s2); }
.manual__sec strong { color: var(--ink); }
.manual code { padding: 0 4px; background: var(--cream-2); border-radius: 3px; font-family: ui-monospace, Consolas, monospace; font-size: .92em; color: var(--ink); }
@media (max-width: 899px) { .manual__head { grid-template-columns: 1fr; } .manual__doc { padding: var(--s5) var(--s4); } }

/* Insights panel (Lambda) */
.insights .big { margin-top: 0; }
.panel { margin-top: var(--s5); padding-block: var(--s6); border-block: 2px solid var(--ink); }
.panel__top { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: center; padding-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.num { display: block; font-size: var(--fs-stat); font-weight: 400; line-height: 1.02; color: var(--copper-display); }
.num--hero { font-size: var(--fs-xl); font-weight: 300; line-height: 1; }
.lbl { display: block; margin-top: var(--s2); font-size: var(--fs-body); font-weight: 600; color: var(--ink); }
.panel__ring { display: flex; flex-direction: column; align-items: center; justify-self: center; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg { width: 168px; height: 168px; }
.ring__track { stroke: var(--cream-2); }
.ring__arc { stroke: var(--copper-display); }
.ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-m); font-weight: 400; color: var(--copper-display); }
.panel__stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: var(--s5); }
.panel__stats li { padding-inline: var(--s5); border-left: 1px solid var(--line); }
.panel__stats li:first-child { padding-left: 0; border-left: 0; }
.takeaway { margin-top: var(--s4); max-width: 62ch; font-size: var(--fs-body-l); line-height: 1.5; }
@media (max-width: 899px) {
  .panel__top { grid-template-columns: 1fr; gap: var(--s5); padding-bottom: var(--s5); }
  .panel__ring { justify-self: start; align-items: flex-start; }
}
@media (max-width: 719px) {
  .panel__stats { grid-template-columns: 1fr; padding-top: 0; }
  .panel__stats li { padding: var(--s3) 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .panel__stats li:last-child { border-bottom: 0; padding-bottom: 0; }
}

/* Pillars: a 2 by 2 grid */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s6); }
.pillar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: center; padding-top: var(--s4); border-top: 1px solid var(--line-strong); }
.pillar__fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-1); }
.pillar__text { line-height: 1.55; color: var(--ink-2); }
.pillar__name { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); font-family: var(--font-display); font-size: var(--fs-m); font-weight: 400; line-height: 1.12; color: var(--ink); }
.pillar > .pillar__text:only-child { grid-column: 1 / -1; }
@media (max-width: 899px) { .pillars { grid-template-columns: 1fr; gap: var(--s5); } }
@media (max-width: 479px) { .pillar { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; } .pillar__name { font-size: var(--fs-body-l); } }

/* Reflection lists */
.reflect .split__b { padding-left: var(--s6); border-left: 1px solid var(--line); }
.reflect p { line-height: 1.6; }
.ticks { margin-top: var(--s4); }
.ticks li { position: relative; padding-left: var(--s5); line-height: 1.5; }
.ticks li + li { margin-top: var(--s3); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--copper-display); }
.split__b > .ticks:first-of-type { margin-top: 0; }
@media (max-width: 899px) { .reflect .split__b { padding-left: 0; border-left: 0; padding-top: var(--s5); border-top: 1px solid var(--line); } }

/* Philanthropy: closes the Lambda chapter on cream-2 */
.phil { padding-block: var(--sec-s); }
.phil__grid { padding-top: var(--s5); border-top: 2px solid var(--ink); }
.phil__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s4) var(--s8); align-items: center; }
.phil__num { font-size: var(--fs-xl); font-weight: 300; line-height: 1; color: var(--copper-display); }
.phil__h { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); font-family: var(--font-display); font-size: var(--fs-m); line-height: 1.15; }
.phil__body p + p { max-width: 58ch; font-size: var(--fs-body-l); line-height: 1.5; }
@media (max-width: 899px) { .phil__grid { grid-template-columns: 1fr; } }

/* Mountain Dog mosaic: video, feed grid, concept art */
.mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6) var(--s5); align-items: start; margin-top: var(--s6); }
.mosaic:not(:has(*)) { display: none; }
/* Public build drops the video until it is cleared: the two images share the row */
.mosaic:not(:has(.mosaic__video)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mosaic > * { min-width: 0; }
.mosaic__video { display: grid; gap: var(--s3); align-items: start; }
.transcript { max-width: 40ch; }
.transcript summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: pointer; }
.transcript p { margin-top: var(--s2); color: var(--ink-2); }
.fig--video video { max-width: 100%; max-height: 520px; }
@media (max-width: 899px) { .mosaic { grid-template-columns: minmax(0, 1fr); } }

/* Engagement chart, drawn as SVG */
.chart { padding: var(--s5); background: var(--cream-raised); border: 1px solid var(--line); border-radius: var(--r-1); }
.chart__title { font-size: var(--fs-s); font-weight: 600; color: var(--ink); }
.chart__svg { display: block; width: 100%; height: auto; margin-top: var(--s3); overflow: visible; }
.chart__svg text { font-family: var(--font-body); font-size: 13px; fill: var(--ink-2); }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__base { stroke: var(--line-strong); }
.chart__avg { stroke: var(--copper-display); stroke-width: 2; stroke-dasharray: 6 5; }
.chart__svg .chart__avg-t { fill: var(--copper-text); font-weight: 600; }
.chart__line { fill: none; stroke: var(--pine); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--cream-raised); stroke: var(--pine); stroke-width: 2; }
.chart__svg .chart__peak { fill: var(--ink); font-weight: 600; }
.chart__svg .chart__xt { font-size: 12px; }
.chart figcaption { margin-top: var(--s3); }
@media (max-width: 559px) {
  .chart { padding: var(--s4); }
  .chart__svg text { font-size: 21px; }
  .chart__svg .chart__xt { font-size: 19px; }
  .chart__dot { r: 5; }
}

/* Content calendar, rebuilt as a table */
.cal { margin-top: var(--s5); }
.cal__scroll { overflow-x: auto; background: var(--cream-raised); border: 1px solid var(--line); border-radius: var(--r-1); }
.cal__scroll:focus-visible { outline: 2px solid var(--copper-text); outline-offset: 3px; }
.cal__table { width: 100%; min-width: 1060px; border-collapse: collapse; font-size: var(--fs-s); line-height: 1.45; }
.cal__table th, .cal__table td { padding: var(--s3) var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cal__table thead th { position: sticky; top: 0; background: var(--cream-2); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.cal__table tbody tr:last-child > * { border-bottom: 0; }
.cal__table tbody th { position: sticky; left: 0; z-index: 1; min-width: 92px; background: var(--cream-raised); font-weight: 600; color: var(--ink); white-space: nowrap; box-shadow: 1px 0 0 var(--line); }
.cal__table thead th:first-child { left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line); }
.cal__time, .cal__kpi { display: block; margin-top: 2px; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.cal__cap { min-width: 220px; max-width: 280px; color: var(--ink); }
.cal__tags { min-width: 170px; color: var(--ink-2); }
.cal__tags span { display: inline-block; margin-right: 6px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.pill--life { background: var(--tint-life); }
.pill--dog { background: var(--tint-dog); }
.pill--art { background: var(--tint-art); }
.pill--food { background: var(--tint-food); }
.pill--reel { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pill--carousel { background: var(--pine); color: var(--on-pine); }
.cal__hint { display: none; }
@media (min-width: 720px) and (max-width: 1100px) { .cal__hint { display: inline; } }
/* Phones: each planned post becomes a card */
@media (max-width: 719px) {
  .cal__scroll { overflow: visible; background: none; border: 0; }
  .cal__table { min-width: 0; display: block; }
  .cal__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cal__table tbody { display: grid; gap: var(--s3); }
  .cal__table tr { display: grid; grid-template-columns: auto auto 1fr; gap: var(--s2) var(--s2); align-items: center; padding: var(--s4); background: var(--cream-raised); border: 1px solid var(--line); border-radius: var(--r-1); }
  .cal__table tbody th, .cal__table td { position: static; padding: 0; border: 0; box-shadow: none; background: none; min-width: 0; max-width: none; }
  .cal__table tbody th { grid-column: 1 / -1; display: flex; gap: var(--s2); align-items: baseline; }
  .cal__table tbody th .cal__time { display: inline; margin: 0; }
  .cal__table td[data-label="Source"] { justify-self: end; font-size: 13px; color: var(--ink-2); }
  .cal__table td[data-label="Angle"], .cal__table td.cal__cap, .cal__table td.cal__tags, .cal__table td[data-label="Call to action"] { grid-column: 1 / -1; }
  .cal__table td[data-label="Angle"]::before, .cal__table td.cal__cap::before, .cal__table td.cal__tags::before, .cal__table td[data-label="Call to action"]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
  .cal__table td[data-label="Call to action"] .cal__kpi { display: inline; margin-left: var(--s2); }
}

/* ---------- 4. Ops ---------- */
.ops { padding-block: var(--sec-m) var(--sec-s); }
.ops__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); margin-top: var(--s6); border-top: 2px solid var(--ink); }
.sys { padding-block: var(--s5); border-bottom: 1px solid var(--line); }
.sys h3 { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); font-family: var(--font-display); font-size: var(--fs-m); font-weight: 400; line-height: 1.15; }
.sys p { max-width: 58ch; color: var(--ink-2); }
.status { margin-top: var(--s3); font-size: var(--fs-s); font-weight: 600; color: var(--copper-text) !important; }
@media (max-width: 899px) { .ops__list { grid-template-columns: 1fr; } }

/* ---------- 5. Credentials ---------- */
.creds { padding-block: var(--sec-s); }
.cred { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s5); }
.cred__card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s5); background: var(--cream-raised); border: 1px solid var(--line); border-top: 3px solid var(--copper-display); border-radius: var(--r-1); }
.cred__name { font-family: var(--font-display); font-size: var(--fs-m); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
.cred__meta { font-size: var(--fs-s); font-weight: 500; color: var(--ink-2); }
@media (max-width: 999px) { .cred { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cred { grid-template-columns: minmax(0, 1fr); } }
.cred__view {
  margin-top: auto; min-height: 44px; padding: 0; border: 0; background: none; color: var(--copper-text);
  font-family: var(--font-body); font-size: var(--fs-s); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; cursor: pointer;
}
.cred__view:hover { text-decoration-color: currentColor; }
.certdlg { width: min(1100px, 94vw); max-height: 92vh; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-1); background: var(--cream-raised); color: var(--ink); }
.certdlg::backdrop { background: var(--scrim); }
.certdlg__close { display: flex; margin: 0 0 var(--s3) auto; }
.certdlg img { width: 100%; max-width: 1300px; height: auto; margin-inline: auto; }


/* ---------- 6. Contact ---------- */
.contact { padding-block: var(--sec-s) var(--sec-m); color: var(--on-pine); }
.contact__lede { max-width: 60ch; margin-top: var(--s4); font-size: var(--fs-body-l); line-height: 1.55; color: var(--on-pine-2); }
.contact__quote { margin-top: var(--s4); font-family: var(--font-display); font-size: var(--fs-m); font-style: italic; line-height: 1.25; color: var(--copper-on-pine); }
.contact__links { margin-top: var(--s6); border-top: 1px solid var(--line-pine); }
.contact__links li { border-bottom: 1px solid var(--line-pine); }
.contact__link { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s5); min-height: 72px; padding-block: var(--s4); color: var(--on-pine); text-decoration: none; }
.contact__k { font-size: var(--fs-s); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--on-pine-2); }
.contact__v { font-size: var(--fs-m); font-weight: 300; overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-pine); text-underline-offset: 6px; transition: text-decoration-color var(--dur-1); }
.contact__arrow { width: 24px; height: 24px; fill: none; stroke: var(--copper-on-pine); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-2) var(--ease-out); }
.contact__link:hover .contact__v { text-decoration-color: var(--copper-on-pine); }
.contact__link:hover .contact__arrow { transform: translate(2px, -2px); }
.contact__link:focus-visible { outline: 2px solid var(--copper-on-pine); outline-offset: 4px; border-radius: var(--r-1); }
@media (max-width: 599px) {
  .contact__link { grid-template-columns: minmax(0, 1fr) auto; }
  .contact__k { grid-column: 1 / -1; }
  .contact__v { font-size: min(var(--fs-m), 5.4vw); overflow-wrap: normal; }
}
@media (prefers-reduced-motion: reduce) { .contact__arrow { transition: none; } }

.measure { max-width: 62ch; }

/* ---------- Added in the audit pass ---------- */
/* About: what I'm looking for */
.about__seek { margin-top: var(--s4); max-width: 60ch; padding-left: var(--s4); border-left: 3px solid var(--copper-display); font-size: var(--fs-body-l); line-height: 1.55; }

/* Results at a glance */
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--s5); border-top: 2px solid var(--ink); }
.glance li + li { border-left: 1px solid var(--line); }
.glance a { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s4) var(--s4) var(--s4) 0; text-decoration: none; color: var(--ink); }
.glance li + li a { padding-left: var(--s4); }
.glance a:hover .glance__t { text-decoration: underline; text-decoration-color: var(--copper-display); text-underline-offset: 4px; }
.glance__n { font-family: var(--font-display); font-size: var(--fs-stat); font-weight: 400; line-height: 1; letter-spacing: -.02em; color: var(--copper-display); }
.glance__t { font-weight: 600; line-height: 1.4; }
.glance__s { margin-top: auto; font-size: var(--fs-s); line-height: 1.4; color: var(--ink-2); }
@media (max-width: 1023px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance li:nth-child(3) { border-left: 0; }
  .glance li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .glance li:nth-child(3) a { padding-left: 0; }
}
@media (max-width: 479px) {
  .glance { grid-template-columns: minmax(0, 1fr); }
  .glance li + li { border-left: 0; border-top: 1px solid var(--line); }
  .glance li + li a { padding-left: 0; }
}

/* Philanthropy dates */
.phil__when { margin-bottom: var(--s2); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }

/* Mountain Dog: brand identity and personas as text */
.brand { display: grid; gap: var(--s5); }
.brand__head { max-width: 62ch; }
.brand__story { margin-top: var(--s3); color: var(--ink-2); }
.brand__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: var(--s5) var(--s6); border-top: 2px solid var(--ink); padding-top: var(--s4); }
.brand__k { margin-bottom: var(--s3); font-size: var(--fs-s); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.brand__k--gap { margin-top: var(--s5); }
.brand__tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.brand__tags li { padding: 2px var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 600; }
.brand__type li { font-family: var(--font-display); font-size: var(--fs-body-l); line-height: 1.6; }
.brand__type span { font-family: var(--font-body); font-size: var(--fs-s); color: var(--ink-2); }
.swatches li { display: flex; align-items: center; gap: var(--s3); font-variant-numeric: tabular-nums; font-weight: 600; }
.swatches li + li { margin-top: var(--s3); }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); }
.sw--1 { background: var(--mdc-1); }
.sw--2 { background: var(--mdc-2); }
.sw--3 { background: var(--mdc-3); }
.personas__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.persona { padding-top: var(--s4); border-top: 2px solid var(--ink); }
.persona__name { font-size: var(--fs-m); font-weight: 400; }
.persona__dl { margin: var(--s3) 0 0; }
.persona__dl div { padding-block: var(--s2); border-bottom: 1px solid var(--line); }
.persona__dl dt { font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.persona__dl dd { margin: 2px 0 0; line-height: 1.5; }
@media (max-width: 899px) {
  .brand__grid, .personas__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Hero motion toggle (WCAG 2.2.2) */
.hero__motion {
  position: absolute; left: max(var(--g), env(safe-area-inset-left, 0px)); bottom: var(--s3); z-index: 2;
  min-height: 36px; padding: 0 var(--s3);
  border: 1px solid var(--line-pine); border-radius: var(--r-1);
  background: rgba(12, 33, 28, .6); color: var(--on-pine-2);
  font-size: var(--fs-s); font-weight: 500; cursor: pointer;
}
.hero__motion:hover { color: var(--on-pine); border-color: var(--on-pine-2); }

/* Lightbox (lightbox.js) */
.zoomable { cursor: zoom-in; }
.lb { width: min(1400px, 96vw); max-height: 94vh; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-1); background: var(--cream-raised); color: var(--ink); }
.lb::backdrop { background: rgba(12, 33, 28, .82); }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s3); }
.lb__cap { font-size: var(--fs-s); color: var(--ink-2); }
.lb__img { display: block; max-width: 100%; max-height: calc(94vh - 96px); width: auto; height: auto; margin-inline: auto; border-radius: var(--r-1); }

/* ---------- Audit pass: medium ---------- */
.skills__note { grid-column: 1 / -1; margin-bottom: calc(-1 * var(--s2)); font-size: var(--fs-s); color: var(--ink-2); }
.skill-link { color: inherit; text-decoration: underline; text-decoration-color: var(--copper-display); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.skill-link:hover { color: var(--ink); text-decoration-thickness: 2px; }

/* Manual summary row */
.manual__sum { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s5); min-height: 44px; cursor: pointer; list-style: none; }
.manual__sum::-webkit-details-marker { display: none; }
.manual__more { font-size: var(--fs-s); font-weight: 600; color: var(--copper-text); text-decoration: underline; text-underline-offset: 4px; }
.manual__more::after { content: " +"; }
.manual__doc[open] .manual__more::after { content: " \2212"; }
.manual__doc:not([open]) { padding-block: var(--s4); }

/* Achievement post: show the whole image instead of cropping its logos */
.pillar__fig--pending img { aspect-ratio: auto 387 / 345; object-fit: contain; }

/* Credentials without a date: no empty column */

/* Portrait: a touch warmer so the cool studio backdrop sits with pine and copper */
.hero__portrait img { filter: sepia(.14) saturate(.92) contrast(1.02); }

/* Phones: the project bar scrolls away; chapter titles one size smaller */
@media (max-width: 719px) {
  .chapbar { position: static; }
  .ch__title { font-size: var(--fs-l); }
}

/* ---------- Audit pass: low ---------- */
/* Phones: the project bar wraps instead of hiding its last tabs */
@media (max-width: 719px) {
  .chapbar__in { flex-wrap: wrap; overflow: visible; column-gap: var(--s3); }
  .chapbar a { min-height: 40px; padding: 0; }
}
/* While the overview is on screen, its own Resume button is enough */
.nav.is-over-hero .nav__resume { visibility: hidden; }

/* Print: a clean, ink-on-white copy */
@media print {
  .nav, .skip, .hero__ridge, .hero__ridge3d, .hero__motion, .chapbar, [data-sim], .band--pine .split__b, .lb, .cmd, [data-cmd], .zoomable + figcaption::after, .footer__scene, .footer__frame::before, .footer__frame::after { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  body *, body *::before, body *::after { background: transparent !important; color: #000 !important; box-shadow: none !important; }
  .et, .eb { -webkit-mask: none !important; mask: none !important; border: 0 !important; }
  .et::before, .eb::after { display: none !important; }
  .hero { min-height: 0 !important; padding-top: 0 !important; }
  .hero__index { display: none !important; }
  .footer { min-height: 0 !important; }
  .panel, .persona, .pillar, .sys, .cred__card, .manual__sec, figure, .glance li, .callouts li { break-inside: avoid; }
  h2, h3, h4, h5 { break-after: avoid; }
  a[href^="http"]::after, a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 11px; }
  .ic { stroke: #000 !important; }
}
