/* ==========================================================================
   Aarti Kava — The Vantage Point
   Design tokens → base → layout → components → pages
   ========================================================================== */

/* Fonts are self-hosted (SIL Open Font License) so the site never waits on a third party */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("../fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "League Spartan"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/league-spartan.woff2") format("woff2"); }

:root {
  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "League Spartan", "Helvetica Neue", Arial, sans-serif;

  /* Day: paper, ink, copper at golden hour */
  --paper: #f3ede2;
  --paper-deep: #e8dfcf;
  --card: #faf6ef;
  --ink: #1c1a17;
  --ink-2: #4b453e;
  --ink-3: #7d7368;
  --rule: rgba(28, 26, 23, 0.14);
  --accent: #a4562a;
  --accent-soft: rgba(164, 86, 42, 0.12);
  --dusk: #3c3857;
  --sage: #66735a;

  /* Landscape */
  --sky-top: #e6d6bd;
  --sky-bottom: #f3ede2;
  --sun: #e9a867;
  --sun-glow: rgba(233, 168, 103, 0.35);
  --r1: #d9cdbd;
  --r2: #bfb2a6;
  --r3: #8d839a;
  --r4: #5d5870;
  --r5: #2c2a36;
  --mist: rgba(243, 237, 226, 0.55);
  --stars: 0;

  /* Book spines */
  --b1: #3c3857;
  --b2: #a4562a;
  --b3: #66735a;
  --b4: #1c1a17;
  --b5: #c9a878;
  --b6: #6e3b4e;
  --b7: #3f5a63;
  --b8: #d7cbb6;
  --gilt: #e2c48e;
  --wood-top: #cdb28e;
  --wood-bottom: #a88a64;
  --lights: 0;
  --r15: #cdc1b6;
  --p1: #cbbfca; --p2: #b0a4b8;
  --cloud: #fbf7f0;
  --city: #b9afb0;

  /* Space & shape */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --read: 680px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light;
}

/* Dusk: the same view after sunset */
:root[data-theme="dusk"] {
  --paper: #15141b;
  --paper-deep: #1d1c26;
  --card: #1f1e28;
  --ink: #efe8dc;
  --ink-2: #c7beb1;
  --ink-3: #9a9185;
  --rule: rgba(239, 232, 220, 0.14);
  --accent: #e39a63;
  --accent-soft: rgba(227, 154, 99, 0.14);
  --dusk: #a9a3d6;
  --sage: #a3b394;

  --sky-top: #0f0e17;
  --sky-bottom: #2a2536;
  --sun: #efe3c8;
  --sun-glow: rgba(239, 227, 200, 0.18);
  --r1: #3a3448;
  --r2: #2f2b3d;
  --r3: #252233;
  --r4: #1c1a28;
  --r5: #121118;
  --mist: rgba(42, 37, 54, 0.5);
  --stars: 1;

  --b1: #4c4775;
  --b2: #b86a3a;
  --b3: #5d6a52;
  --b4: #2e2c3a;
  --b5: #a88b5f;
  --b6: #7a4459;
  --b7: #3f5f69;
  --b8: #4a4556;
  --gilt: #c9a86e;
  --wood-top: #3a3129;
  --wood-bottom: #2a231d;
  --lights: 1;
  --r15: #353043;
  --p1: #3f3752; --p2: #342e47;
  --cloud: #6a6385;
  --city: #3b3650;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

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

::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 50, "WONK" 0;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5.6rem); font-weight: 350; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 350; }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
h4 { font-size: 1.15rem; }

em, .italic { font-style: italic; }
h1 em, h2 em, h3 em, .display em {
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--accent);
}

p { margin: 0 0 1.1em; }
strong { font-weight: 500; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

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

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--read { max-width: calc(var(--read) + var(--gutter) * 2); }

.section { padding: clamp(72px, 11vw, 160px) 0; position: relative; }
.section--tight { padding: clamp(48px, 7vw, 96px) 0; }
.section--deep { background: var(--paper-deep); }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 30em;
}

.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.grid-2 { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 820px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 22px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow--down { transform: translateY(3px); }

.link-arrow {
  font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule);
  padding-bottom: 2px; transition: border-color 0.3s;
}
.link-arrow:hover { border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--rule);
}
.site-header.is-hidden { transform: translateY(-100%); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-family: var(--serif); font-size: 1.28rem; font-weight: 400;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .mark-peak { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.brand .mark-sun { fill: var(--accent); transition: transform 0.6s var(--ease); transform-origin: center; }
.brand:hover .mark-sun { transform: translateY(-2px); }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 30px; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 0.95rem; font-weight: 400; position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-tools { display: flex; align-items: center; gap: 10px; }

.theme-toggle, .menu-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dusk"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dusk"] .theme-toggle .i-moon { display: block; }

.nav-resume { display: none; padding: 10px 18px 8px; font-size: 0.88rem; }

.menu-toggle span { display: block; width: 16px; height: 1px; background: currentColor; position: relative; }
.menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: currentColor;
  transition: transform 0.3s var(--ease);
}
.menu-toggle span::before { top: -5px; }
.menu-toggle span::after { top: 5px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: var(--paper);
  padding: 110px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--serif); font-size: 2.3rem; text-decoration: none; line-height: 1.25;
}
.mobile-menu .btn { margin-top: 24px; align-self: flex-start; font-family: var(--sans); font-size: 1rem; }
.menu-open { overflow: hidden; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-resume { display: inline-flex; }
  .menu-toggle, .mobile-menu { display: none; }
}

/* ---------- Hero: the vantage point ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.hero-sky {
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%);
  transition: background 0.8s var(--ease);
}
.hero-copy {
  position: relative; z-index: 2;
  padding-top: clamp(120px, 18vh, 190px);
  will-change: transform, opacity;
}
.hero-eyebrow {
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500;
  color: var(--ink-2); margin-bottom: 22px;
}
.hero h1 { max-width: 12.5em; margin-bottom: 26px; }
.hero-sub { max-width: 34em; color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.2rem); margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.landscape {
  position: relative; z-index: 1;
  flex: 1 0 auto;
  height: clamp(280px, 50vh, 620px);
  margin-top: clamp(24px, 4vh, 48px);
  pointer-events: none;
}
.landscape svg { width: 100%; height: 100%; display: block; overflow: visible; }
.landscape .layer { will-change: transform; transition: fill 0.8s var(--ease); }
.landscape a { pointer-events: auto; }
.landscape .stars { opacity: var(--stars); transition: opacity 1s var(--ease); }

@media (max-width: 700px) {
  .landscape { height: clamp(260px, 44vh, 420px); margin-top: 24px; }
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; z-index: 3; transform: translateX(-50%);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none;
  opacity: 0.85;
}
:root[data-theme="dusk"] .scroll-cue { color: var(--ink-2); }
.scroll-cue::after {
  content: ""; width: 1px; height: 38px; background: currentColor;
  animation: cue 2.4s var(--ease) infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Design from the pause ---------- */
.pause { background: var(--paper-deep); position: relative; overflow: hidden; }
.pause-horizon { position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky-top) 70%, transparent), transparent); }
.pause .lede { max-width: 24em; }
.pause-steps { list-style: none; margin: clamp(56px, 8vw, 96px) 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; position: relative; }
@media (min-width: 900px) { .pause-steps { grid-template-columns: repeat(4, 1fr); gap: 0 36px; } }
.pause-step { position: relative; padding: 34px 0 30px; border-top: 1px solid var(--rule); }
.pause-step::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper-deep); border: 1px solid var(--ink-2);
}
.pause-step--build { border-top-color: var(--accent); }
.pause-step--build::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.pause-step .n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.05rem; display: block; margin-bottom: 10px; }
.pause-step h3 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); margin-bottom: 8px; }
.pause-step p { color: var(--ink-2); margin: 0; font-size: 0.97rem; }
/* The breath: a slow, quiet pulse travelling along the line before "build" */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .pause-steps::after {
    content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 18%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: breath 7s var(--ease) infinite; opacity: 0;
  }
  .pause-steps.is-visible::after { opacity: 1; }
}
@keyframes breath { 0% { transform: translateX(0); } 60% { transform: translateX(420%); } 100% { transform: translateX(420%); opacity: 0; } }
.pause-note { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; color: var(--ink-2); }
.pause-note em { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

/* ---------- Proof row (calm, static) ---------- */
.proof { border-block: 1px solid var(--rule); }
.proof-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .proof-grid { grid-template-columns: repeat(4, 1fr); } }
.proof-item { padding: clamp(24px, 3vw, 36px) clamp(12px, 2vw, 28px); border-left: 1px solid var(--rule); }
.proof-item:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 899px) { .proof-item:nth-child(3) { border-left: 0; padding-left: 0; } .proof-item:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.proof-item b { display: block; font-family: var(--serif); font-weight: 350; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; color: var(--accent); letter-spacing: -0.02em; margin-bottom: 10px; }
.proof-item span { font-size: 0.92rem; color: var(--ink-2); line-height: 1.4; display: block; }

/* ---------- The shelf, with an open book beside it ---------- */
.shelf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(40px, 6vw, 64px); }
.shelf-head p { max-width: 30em; margin: 0; }
.studio-shelf { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px); align-items: end; }
@media (min-width: 1000px) { .studio-shelf { grid-template-columns: 7fr 5fr; } }
.studio-shelf > * { min-width: 0; }

.shelf-unit { position: relative; }
.spines {
  display: flex; align-items: flex-end; gap: 5px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 40px 4px 0; /* headroom so a lifted spine is never clipped */
  scroll-snap-type: x proximity;
}
.spines::-webkit-scrollbar { display: none; }
.spine {
  --h: 380px; --w: 64px; --c: var(--b1); --ct: #f4ede2;
  flex: 0 0 auto; position: relative;
  width: var(--w); height: var(--h);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.22) 100%),
    var(--c);
  color: var(--ct);
  border-radius: 3px 3px 2px 2px;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 18px 0 14px;
  scroll-snap-align: start;
  box-shadow: 1px 0 0 rgba(0,0,0,0.12);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), filter 0.5s var(--ease);
  cursor: pointer;
}
/* gilt bands top and bottom */
.spine::before, .spine::after {
  content: ""; position: absolute; left: 14%; right: 14%; height: 5px;
  border-top: 1px solid var(--gilt); border-bottom: 1px solid var(--gilt); opacity: 0.7;
}
.spine::before { top: 10px; }
.spine::after { bottom: 34px; }
.spine .t {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--serif); font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.1; font-weight: 400;
  white-space: nowrap; flex: 1; display: flex; align-items: center; padding: 18px 0 12px; letter-spacing: 0.01em;
}
.spine .yr { font-size: 0.68rem; letter-spacing: 0.1em; font-weight: 500; opacity: 0.85; }
/* bookmark ribbon marks a full case study */
.spine .mark {
  position: absolute; top: -12px; right: 12px; width: 9px; height: 26px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.spine[aria-selected="true"], .spine:focus-visible {
  transform: translateY(-16px);
  box-shadow: 1px 0 0 rgba(0,0,0,0.12), 8px 18px 22px -14px rgba(40, 28, 16, 0.45);
}
@media (hover: hover) {
  .spine:hover { transform: translateY(-16px); box-shadow: 1px 0 0 rgba(0,0,0,0.12), 8px 18px 22px -14px rgba(40, 28, 16, 0.45); }
}
.spine--lean { transform: rotate(-5deg); transform-origin: bottom left; margin-left: 10px; }
.spine--lean[aria-selected="true"], .spine--lean:focus-visible { transform: rotate(-5deg) translateY(-12px); }
@media (hover: hover) { .spine--lean:hover { transform: rotate(-5deg) translateY(-12px); } }

.shelf-board {
  height: 14px; position: relative; border-radius: 2px;
  background: linear-gradient(180deg, var(--wood-top), var(--wood-bottom));
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 10px 18px 28px -16px rgba(40, 28, 16, 0.45);
}
.shelf-object { position: absolute; right: 2%; bottom: 14px; width: 64px; height: 120px; pointer-events: none; }
.shelf-object * { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-linecap: round; }
.shelf-object .vase { fill: var(--card); }
@media (max-width: 999px) { .shelf-object { display: none; } }
.shelf-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; font-size: 0.85rem; color: var(--ink-3); }

/* The open book: details for the selected spine */
.book-panel { position: relative; min-height: 520px; }
.book-page {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 12px 22px 40px -28px rgba(40, 28, 16, 0.35);
  overflow: hidden; display: flex; flex-direction: column;
}
.js .book-page { position: absolute; inset: auto 0 0 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s; }
.js .book-page.is-active { opacity: 1; visibility: visible; transform: none; position: relative; }
.no-js .book-page:not(:first-child) { display: none; }
.book-media { aspect-ratio: 16 / 10; background: var(--paper-deep); overflow: hidden; display: grid; place-items: center; }
.book-media img { width: 100%; height: 100%; object-fit: cover; }
.book-media--contain img { object-fit: contain; padding: 16px; }
.book-media--type { background: var(--c); color: var(--ct, #f4ede2); font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); text-align: center; padding: 30px; line-height: 1.15; }
.book-body { padding: clamp(22px, 3vw, 32px); }
.book-body .kicker { margin-bottom: 12px; }
.book-body h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); margin-bottom: 10px; }
.book-body p { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 18px; }
.book-body .outcomes { margin-bottom: 20px; }
@media (max-width: 999px) { .book-panel { min-height: 0; } }

/* ---------- Work: the archive (collapsed) ---------- */
.archive { border-top: 1px solid var(--rule); }
.archive details { border-bottom: 1px solid var(--rule); }
.archive summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 8px 28px; align-items: baseline;
  padding: 26px 0; transition: padding 0.35s var(--ease);
}
@media (min-width: 820px) { .archive summary { grid-template-columns: 110px 1fr 1fr 40px; } }
.archive summary::-webkit-details-marker { display: none; }
.archive summary:hover { padding-left: 10px; }
.archive summary .yr { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.archive summary h3 { margin: 0; font-size: clamp(1.25rem, 1.9vw, 1.55rem); }
.archive summary .what { color: var(--ink-2); font-size: 0.95rem; }
.archive summary .plus { width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; justify-self: end; transition: transform 0.35s var(--ease), background 0.35s; }
.archive summary .plus::before { content: "+"; font-size: 1rem; line-height: 1; }
.archive details[open] summary .plus { transform: rotate(45deg); background: var(--ink); color: var(--paper); }
@media (max-width: 819px) { .archive summary .what { grid-column: 1 / -1; } .archive summary .yr { grid-column: 1 / -1; } }
.archive-body { display: grid; grid-template-columns: 1fr; gap: 24px 48px; padding: 0 0 36px; }
@media (min-width: 820px) { .archive-body { grid-template-columns: 110px 5fr 4fr; } .archive-body > :first-child { grid-column: 2; } }
.archive-body p { color: var(--ink-2); margin-bottom: 14px; }
.archive-body img { border-radius: 4px; max-height: 360px; width: auto; margin: 0 auto; }
.archive-body .img-wrap { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 18px; display: grid; place-items: center; }

/* ---------- Journal formats ---------- */
.format { display: inline-block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; padding: 5px 10px 3px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); margin-right: 8px; }
.format--soon { border-style: dashed; color: var(--ink-3); }
.entry--soon { cursor: default; }
.entry--soon:hover { padding-left: 0; }
.entry--soon h3 { color: var(--ink-2); }

/* ---------- M-shape ---------- */
.mshape-wrap { display: grid; gap: clamp(40px, 6vw, 80px); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 980px) { .mshape-wrap { grid-template-columns: 4fr 7fr; } }

.mshape {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(4px, 0.7vw, 10px);
  align-items: end; height: clamp(360px, 42vw, 520px); position: relative;
  border-bottom: 1px solid var(--ink);
}
.mshape li {
  height: calc(var(--h) * 100%);
  background: linear-gradient(180deg, var(--bar, var(--r3)) 0%, color-mix(in srgb, var(--bar, var(--r3)) 55%, var(--paper)) 100%);
  border-radius: 999px 999px 0 0;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 12px;
  transform-origin: bottom; transform: scaleY(0.04);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 60ms);
}
.mshape.is-visible li { transform: scaleY(1); }
.mshape li span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: clamp(0.64rem, 0.9vw, 0.82rem); letter-spacing: 0.06em; font-weight: 500;
  color: #fff; white-space: nowrap; text-transform: uppercase;
}
.mshape li.peak { --bar: var(--accent); }
.mshape li.peak span { font-size: clamp(0.7rem, 1vw, 0.9rem); }
.mshape li.low span { color: var(--ink); }
.mshape-legend { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; font-size: 0.85rem; color: var(--ink-2); }
.mshape-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.m-compare { display: flex; gap: 28px; margin: 30px 0 0; }
.m-compare figure { margin: 0; font-size: 0.8rem; color: var(--ink-3); text-align: center; }
.m-compare svg { width: 88px; height: 64px; display: block; margin-bottom: 8px; }
.m-compare svg * { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.m-compare .m svg * { stroke: var(--accent); }

/* ---------- Principles ---------- */
.principles { counter-reset: p; display: grid; gap: 0; }
.principle {
  display: grid; grid-template-columns: 1fr; gap: 12px 48px;
  padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--rule);
}
.principle:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 820px) { .principle { grid-template-columns: 80px 5fr 6fr; align-items: baseline; } }
.principle .n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.2rem; }
.principle h3 { margin: 0; }
.principle p { margin: 0; color: var(--ink-2); }

/* ---------- Journal cards ---------- */
.entries { display: grid; gap: 0; }
.entry {
  display: grid; grid-template-columns: 1fr; gap: 6px 40px;
  padding: 30px 0; border-top: 1px solid var(--rule); text-decoration: none;
  transition: padding 0.4s var(--ease);
}
.entry:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 820px) { .entry { grid-template-columns: 160px 1fr 140px; align-items: baseline; } }
.entry:hover { padding-left: 14px; color: var(--ink); }
.entry:hover h3 { color: var(--accent); }
.entry .date { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.entry h3 { margin: 0 0 6px; transition: color 0.3s; }
.entry p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.entry .where { font-size: 0.82rem; color: var(--ink-3); text-align: left; }
@media (min-width: 820px) { .entry .where { text-align: right; } }

/* ---------- Now card ---------- */
.now-card {
  background: var(--card); border: 1px solid var(--rule); padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius); position: relative;
}
.now-card .stamp {
  position: absolute; top: 22px; right: 22px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); padding: 6px 10px 4px; border-radius: 999px;
}
.now-list { list-style: none; padding: 0; margin: 0; }
.now-list li { padding: 14px 0; border-bottom: 1px dashed var(--rule); display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.now-list li:last-child { border-bottom: 0; }
.now-list b { font-weight: 500; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }

/* ---------- Two doors (contact) ---------- */
.doors { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .doors { grid-template-columns: 1fr 1fr; } }
.door {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 300px; padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none;
  background: var(--card);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.door:hover { background: var(--ink); color: var(--paper); transform: translateY(-4px); }
.door:hover .muted { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.door h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 12px; }
.door .go { display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.door .go svg { width: 36px; height: 36px; transition: transform 0.4s var(--ease); }
.door:hover .go svg { transform: translateX(6px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--r5); color: #efe8dc; padding: clamp(72px, 10vw, 130px) 0 36px; position: relative; overflow: hidden; }
:root[data-theme="dusk"] .site-footer { background: #0d0c12; }
.site-footer a:hover { color: #eaa877; }
.footer-big { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 13em; margin-bottom: 40px; }
.footer-big em { color: #eaa877; font-variation-settings: "SOFT" 100, "WONK" 1; }
.footer-mail { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 2rem); text-decoration: none; border-bottom: 1px solid rgba(239,232,220,0.35); padding-bottom: 4px; word-break: break-all; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; margin-top: 80px; padding-top: 30px; border-top: 1px solid rgba(239,232,220,0.18); font-size: 0.92rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: #9d9487; font-weight: 500; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 60px; font-size: 0.8rem; color: #9d9487; }
.footer-ridge { position: absolute; left: 0; right: 0; top: 0; height: 60px; opacity: 0.5; }
.footer-ridge path { fill: none; stroke: rgba(239,232,220,0.2); stroke-width: 1; }

/* ---------- Page heads (inner pages) ---------- */
.page-head { padding-top: clamp(140px, 20vh, 220px); padding-bottom: clamp(48px, 7vw, 90px); position: relative; }
.page-head h1 { max-width: 14em; }
.page-head .lede { margin-top: 10px; color: var(--ink-2); }
.page-head .horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none; }
.page-head .horizon path { fill: var(--paper-deep); }

/* ---------- Work index ---------- */
.volume {
  display: grid; grid-template-columns: 1fr; gap: 28px 64px;
  padding: clamp(48px, 7vw, 90px) 0; border-top: 1px solid var(--rule);
}
@media (min-width: 900px) { .volume { grid-template-columns: 5fr 6fr; align-items: start; } .volume:nth-of-type(even) .volume-media { order: 2; } }
.volume-media {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 36px); display: grid; place-items: center; min-height: 280px;
}
.volume-media img { max-height: 520px; width: auto; border-radius: 6px; }
.volume-media--spine {
  background: var(--c); color: #f4ede2; border: 0; min-height: 320px;
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); text-align: center; line-height: 1.1; padding: 40px;
}
.volume-media--spine small { display: block; font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; margin-top: 18px; }
.volume .no { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; margin-bottom: 10px; display: block; }
.volume h2 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 24px 0 28px; padding: 20px 0; border-block: 1px solid var(--rule); }
.facts dt { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.facts dd { margin: 4px 0 0; font-size: 0.98rem; }
.outcomes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.outcomes li { background: var(--accent-soft); color: var(--accent); padding: 7px 14px 5px; border-radius: 999px; font-size: 0.86rem; font-weight: 500; }

.curiosity { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 700px) { .curiosity { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .curiosity { grid-template-columns: repeat(3, 1fr); } }
.curio {
  border: 1px dashed var(--ink-3); border-radius: var(--radius); padding: 28px; min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between; background: transparent;
}
.curio .yr { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.curio h3 { margin: 18px 0 8px; }
.curio p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.curio--placeholder { opacity: 0.7; }

/* ---------- Case study (a chapter) ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 100%; transform: scaleX(0); transform-origin: left; z-index: 60; }

.chapter-head { padding-top: clamp(140px, 20vh, 210px); padding-bottom: clamp(40px, 6vw, 70px); }
.chapter-head .crumbs { font-size: 0.85rem; color: var(--ink-3); margin-bottom: 30px; }
.chapter-head .crumbs a { text-decoration: none; }
.chapter-head h1 { font-size: clamp(3rem, 8vw, 7rem); max-width: 10em; }
.chapter-head .deck { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.3rem, 2.3vw, 1.9rem); color: var(--ink-2); max-width: 26em; line-height: 1.35; }

.meta-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 26px 0; border-block: 1px solid var(--rule); margin-top: 40px; }
@media (min-width: 900px) { .meta-strip { grid-template-columns: repeat(5, 1fr); } }
.meta-strip dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.meta-strip dd { margin: 6px 0 0; font-size: 0.95rem; line-height: 1.4; }

.tldr {
  margin: clamp(40px, 6vw, 70px) 0 0; display: grid; gap: 22px; grid-template-columns: 1fr;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px);
}
@media (min-width: 900px) { .tldr { grid-template-columns: 1fr 1fr 1fr; } }
.tldr h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.tldr p { margin: 0; font-size: 0.98rem; color: var(--ink-2); }

.reader { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 1100px) { .reader { grid-template-columns: 200px minmax(0, 1fr); gap: 72px; } }

.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: 110px; align-self: start; font-size: 0.86rem; }
  .toc h4 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
  .toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
  .toc li { counter-increment: toc; }
  .toc a { display: flex; gap: 10px; padding: 7px 0; text-decoration: none; color: var(--ink-3); transition: color 0.3s; line-height: 1.3; }
  .toc a::before { content: counter(toc, upper-roman); font-family: var(--serif); font-style: italic; min-width: 28px; }
  .toc a.is-active, .toc a:hover { color: var(--ink); }
  .toc a.is-active::before { color: var(--accent); }
}

.prose { max-width: var(--read); }
.prose h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose p strong { color: var(--ink); }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose .dropcap::first-letter {
  font-family: var(--serif); float: left; font-size: 4.6em; line-height: 0.82; padding: 0.06em 0.1em 0 0; color: var(--accent); font-weight: 400;
}

.chapter { padding: clamp(56px, 8vw, 100px) 0; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.chapter:first-of-type { border-top: 0; padding-top: 0; }
.chapter-no { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.05rem; display: block; margin-bottom: 14px; }

.marginalia {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; margin: 32px 0; font-family: var(--serif);
  font-style: italic; font-size: 1.1rem; color: var(--ink); line-height: 1.5;
}
.marginalia small { display: block; font-family: var(--sans); font-style: normal; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }

.pull {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.15; letter-spacing: -0.02em;
  margin: clamp(40px, 6vw, 70px) 0; max-width: 18em;
}
.pull em { color: var(--accent); font-variation-settings: "SOFT" 100, "WONK" 1; }

.figure { margin: clamp(32px, 5vw, 56px) 0; }
.figure--wide { margin-left: calc(-1 * min(0px, 0px)); }
@media (min-width: 1480px) { .figure--wide { width: calc(100% + 120px); } }
.figure .frame { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(10px, 2vw, 24px); overflow: hidden; }
.figure .frame--dark { background: #121118; border-color: #121118; }
.figure img { width: 100%; border-radius: 3px; cursor: zoom-in; }
.figure figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--ink-3); display: flex; gap: 12px; }
.figure figcaption b { color: var(--accent); font-weight: 500; white-space: nowrap; }

.three-up { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 30px 0; }
@media (min-width: 720px) { .three-up { grid-template-columns: repeat(3, 1fr); } }
.three-up > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; }
.three-up h4 { margin-bottom: 8px; }
.three-up p { font-size: 0.95rem; margin: 0; }
.three-up .who { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; display: block; margin-bottom: 8px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin: 36px 0; }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); padding: 26px 22px; }
.stat b { display: block; font-family: var(--serif); font-weight: 350; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; color: var(--accent); margin-bottom: 10px; letter-spacing: -0.02em; }
.stat span { font-size: 0.9rem; color: var(--ink-2); }

.shipped { display: grid; gap: 24px; grid-template-columns: 1fr; margin: 30px 0; }
@media (min-width: 720px) { .shipped { grid-template-columns: 1fr 1fr; } }
.shipped h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
.shipped ul { list-style: none; padding: 0; margin: 0; }
.shipped li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 0.96rem; }
.shipped .cut li { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 1px; }

.next-chapter { display: block; text-decoration: none; padding: clamp(56px, 8vw, 100px) 0; border-top: 1px solid var(--rule); }
.next-chapter .kicker { margin-bottom: 12px; }
.next-chapter h2 { transition: color 0.3s; }
.next-chapter:hover h2 { color: var(--accent); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 11, 16, 0.92); display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 4px; }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: end; }
@media (min-width: 900px) { .about-hero { grid-template-columns: 7fr 4fr; } }
.portrait {
  aspect-ratio: 4 / 5; background: var(--paper-deep); border-radius: 200px 200px 4px 4px; overflow: hidden; position: relative;
  display: grid; place-items: center; border: 1px solid var(--rule);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph { text-align: center; color: var(--ink-3); font-size: 0.85rem; padding: 30px; }
.portrait .ph svg { width: 70%; margin: 0 auto 14px; }
.portrait .ph svg * { fill: none; stroke: var(--ink-3); stroke-width: 1; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
@media (min-width: 820px) { .timeline::before { left: 167px; } }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 4px 48px; padding: 0 0 38px 34px; position: relative; }
@media (min-width: 820px) { .timeline li { grid-template-columns: 120px 1fr; padding-left: 0; } }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 1px solid var(--ink); }
@media (min-width: 820px) { .timeline li::before { left: 162px; } }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline .when { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 4px; }
@media (min-width: 820px) { .timeline .what { padding-left: 40px; } }
.timeline h3 { margin-bottom: 4px; font-size: clamp(1.25rem, 1.8vw, 1.55rem); }
.timeline .where { font-size: 0.88rem; color: var(--accent); margin-bottom: 8px; display: block; }
.timeline p { color: var(--ink-2); margin: 0; }

.skills { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: sk; }
@media (min-width: 820px) { .skills { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.skills li { list-style: none; counter-increment: sk; padding: 20px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 42px 1fr; }
.skills li::before { content: counter(sk, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--accent); }
.skills b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; display: block; margin-bottom: 4px; }
.skills span { color: var(--ink-2); font-size: 0.95rem; }
.skills-list { padding: 0; margin: 0; }

.facets { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .facets { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .facets { grid-template-columns: repeat(4, 1fr); } }
.facet { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; }
.facet b { font-family: var(--serif); font-weight: 350; font-size: 2.4rem; line-height: 1; color: var(--accent); display: block; margin-bottom: 12px; }
.facet h4 { margin-bottom: 6px; }
.facet p { margin: 0; font-size: 0.93rem; color: var(--ink-2); }

.resume-band {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
}
.resume-band h3 { margin: 0 0 6px; color: var(--paper); }
.resume-band p { margin: 0; color: color-mix(in srgb, var(--paper) 72%, transparent); }
.resume-band .btn { border-color: var(--paper); color: var(--paper); }
.resume-band .btn:hover { background: var(--paper); color: var(--ink); }
.resume-band .btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Offerings ---------- */
.offers { display: grid; grid-template-columns: 1fr; gap: 0; }
.offer { display: grid; grid-template-columns: 1fr; gap: 10px 48px; padding: 34px 0; border-top: 1px solid var(--rule); }
.offer:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .offer { grid-template-columns: 5fr 6fr 2fr; align-items: baseline; } }
.offer h3 { margin: 0; }
.offer p { margin: 0; color: var(--ink-2); }
.offer .len { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
@media (min-width: 900px) { .offer .len { text-align: right; } }

/* ---------- Article ---------- */
.article-head { padding-top: clamp(140px, 20vh, 210px); padding-bottom: 40px; }
.article-head .date { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.article-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); margin-top: 18px; }
.article { padding-bottom: clamp(72px, 10vw, 140px); }
.article .prose p { font-size: 1.08em; line-height: 1.75; }
.article .prose p:first-of-type::first-letter { font-family: var(--serif); float: left; font-size: 4.2em; line-height: 0.82; padding: 0.06em 0.1em 0 0; color: var(--accent); }
.draft-flag { display: inline-block; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 12px 4px; border-radius: 999px; font-weight: 500; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

.no-js .reveal { opacity: 1; transform: none; }
.no-js .mshape li { transform: none; }

/* ---------- Landscape details ---------- */
.landscape .lights { opacity: var(--lights); transition: opacity 1.2s var(--ease); }
.landscape .lights circle { fill: #f3cf8e; }
@media (prefers-reduced-motion: no-preference) {
  .landscape .lights circle { animation: twinkle 5s ease-in-out infinite; }
  .landscape .lights circle:nth-child(3n) { animation-delay: -1.7s; }
  .landscape .lights circle:nth-child(3n+1) { animation-delay: -3.1s; }
}
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---------- Paper grain: a quiet, tactile texture ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07; mix-blend-mode: multiply;
}
:root[data-theme="dusk"] body::after { opacity: 0.05; mix-blend-mode: screen; }
@media print { body::after { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .mshape li { transform: none; }
}

@media print {
  .site-header, .site-footer, .scroll-cue, .theme-toggle, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}

.hero h1 em { white-space: nowrap; }

/* Let grid children shrink so the horizontally scrolling shelf stays inside the viewport */
.mshape-wrap > *, .grid-2 > *, .reader > *, .volume > * { min-width: 0; }

/* ---------- Figma prototype (click to load) ---------- */
.proto { margin: clamp(40px, 6vw, 72px) 0; }
.proto-stage {
  background: var(--paper-deep); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 48px); display: grid; place-items: center;
}
.proto-device {
  position: relative; width: 100%; background: #111; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.5);
}
.proto--mobile .proto-device { max-width: 380px; aspect-ratio: 9 / 19; border-radius: 42px; border: 10px solid #111; }
.proto--desktop .proto-device { aspect-ratio: 16 / 10; border-radius: 10px; border: 1px solid var(--rule); }
.proto-device iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.proto-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.proto-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: transparent; border: 0; color: #f4ede2; cursor: pointer; font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.04em; padding: 20px; text-align: center;
}
.proto-play .ring {
  width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(244,237,226,0.7); display: grid; place-items: center;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.proto-play:hover .ring { transform: scale(1.08); background: var(--accent); border-color: var(--accent); }
.proto-play svg { width: 22px; height: 22px; margin-left: 4px; fill: currentColor; }
.proto-play small { font-weight: 300; opacity: 0.75; letter-spacing: 0; }
.proto-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 0.85rem; color: var(--ink-3); }
.proto-meta b { color: var(--accent); font-weight: 500; }

/* ---------- Phone galleries & side-by-side figures ---------- */
.phones { display: grid; gap: clamp(12px, 2.4vw, 28px); grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); align-items: end; }
.phones figure { margin: 0; text-align: center; }
.phones img { width: 100%; border-radius: 0; cursor: zoom-in; }
.phones figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--ink-3); }
@media (max-width: 560px) { .phones { --n: 2 !important; } }
.split { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; align-items: center; margin: clamp(32px, 5vw, 56px) 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--narrow-img { grid-template-columns: 2fr 3fr; } }
.split .prose { max-width: none; }
.numbered { list-style: none; padding: 0; margin: 24px 0; counter-reset: n; }
.numbered li { counter-increment: n; padding: 18px 0 18px 44px; border-top: 1px solid var(--rule); position: relative; }
.numbered li::before { content: counter(n) "."; position: absolute; left: 0; top: 16px; font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.15rem; }
.numbered b { display: block; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.numbered span { color: var(--ink-2); }
.credits { font-size: 0.92rem; color: var(--ink-2); margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--rule); }
.credits h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 10px; }
.credits ul { list-style: none; padding: 0; margin: 0; }
.credits li { padding: 4px 0; }
.figure .frame--plain { background: transparent; border: 0; padding: 0; }
.figure .frame--scroll { max-height: 640px; overflow-y: auto; overscroll-behavior: contain; }

/* Case study arc: what everyone saw → what the pause revealed → what we built → what changed */
@media (min-width: 1000px) { .tldr--arc { grid-template-columns: repeat(4, 1fr); } }
.tldr--arc > div { position: relative; }
.tldr--arc .revealed h4 { color: var(--ink); }
.tldr--arc .revealed h4::after { content: " ✦"; color: var(--accent); }
@media (min-width: 1000px) {
  .tldr--arc > div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
}

/* Stars sit on the sky layer, behind the sun and moon; they appear at dusk */
.landscape .stars circle, .landscape .stars .spark { fill: #f1e6cf; }
.landscape .stars .spark { opacity: 0.9; }
/* Skyline variation: shown with #city, replacing the far peak */
.landscape .skyline { display: none; }
.hero--city .landscape .skyline { display: inline; }
.hero--city .landscape .peak-far { display: none; }

/* ==========================================================================
   Review round 2
   ========================================================================== */

/* ---------- Golden-ratio spacing (φ ≈ 1.618): 8 · 13 · 21 · 34 · 55 · 89 · 144 ---------- */
:root { --s1: 8px; --s2: 13px; --s3: 21px; --s4: 34px; --s5: 55px; --s6: 89px; --s7: 144px; }
.section { padding-block: clamp(var(--s5), 9vw, var(--s7)); }
.section--tight { padding-block: clamp(var(--s4), 6vw, var(--s6)); }
.grid-2 { gap: clamp(var(--s4), 5vw, var(--s6)); }
.grid-3 { gap: clamp(var(--s3), 3.5vw, var(--s5)); }
h1, h2, h3, h4 { margin-bottom: 0.618em; }
.kicker { margin-bottom: var(--s3); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--narrow-img { grid-template-columns: 1fr 1.618fr; } }
@media (min-width: 980px) { .mshape-wrap { grid-template-columns: 1fr 1.618fr; } }

/* ---------- Principles: numeral close to the heading, wider copy ---------- */
@media (min-width: 820px) {
  .principle { grid-template-columns: var(--s4) minmax(0, 1fr) minmax(0, 1.618fr); gap: var(--s2) var(--s5); }
}
.principle { padding-block: clamp(var(--s3), 3vw, var(--s4)); }

/* ---------- Skills as simple bars ---------- */
.skillbars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.skillbars li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 2.2em; align-items: center; gap: var(--s3); font-size: 0.95rem; }
.skillbars .name { color: var(--ink); }
.skillbars .bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.skillbars .bar i { display: block; height: 100%; width: calc(var(--v) * 10%); background: var(--r3); border-radius: inherit; transform-origin: left; transform: scaleX(0.02); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 50ms); }
.skillbars li.peak .bar i { background: var(--accent); }
.skillbars li.peak .name { font-weight: 500; }
.skillbars .val { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 0.85rem; text-align: right; }
.skillbars.is-visible .bar i, .no-js .skillbars .bar i { transform: none; }
@media (max-width: 560px) { .skillbars li { grid-template-columns: minmax(0, 1fr) 2.2em; } .skillbars .bar { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .skillbars .bar i { transform: none; } }

/* ---------- Shelf, round 2: calmer books, steady panel on the left, a lamp ---------- */
:root {
  --b1: #6d6b80; --b2: #b3845f; --b3: #8b957a; --b4: #4d4742; --b5: #d8c6a6; --b6: #8f6d72; --b7: #6e8487; --b8: #e6dccb;
}
:root[data-theme="dusk"] {
  --b1: #55536a; --b2: #94684a; --b3: #69735b; --b4: #37322f; --b5: #9d8a6a; --b6: #6f5157; --b7: #52666a; --b8: #4d4858;
}
@media (min-width: 1000px) {
  .studio-shelf { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); }
  .studio-shelf .book-panel { order: -1; }
}
.spine { border-radius: 2px 2px 1px 1px; padding: var(--s3) 0 var(--s2); box-shadow: 1px 0 0 rgba(0,0,0,0.1); }
.spine::before { top: 12px; height: 0; border-bottom: 0; opacity: 0.55; }
.spine::after { bottom: 36px; height: 0; border-bottom: 0; opacity: 0.55; }
.spine .t { font-size: clamp(0.98rem, 1.15vw, 1.12rem); }
.spine { transition: transform 0.7s cubic-bezier(0.34, 1.26, 0.64, 1), box-shadow 0.7s var(--ease), filter 0.5s var(--ease); }
.spine[aria-selected="true"], .spine:focus-visible { transform: translateY(-13px) rotate(-1.2deg); }
@media (hover: hover) { .spine:hover { transform: translateY(-13px) rotate(-1.2deg); } }
.spines:has(.spine[aria-selected="true"]) .spine:not([aria-selected="true"]) { filter: saturate(0.75) brightness(1.02); }

/* The open book keeps one size: every page sits in the same grid cell */
.book-panel { display: grid; min-height: 0; }
.book-panel > .book-page { grid-area: 1 / 1; }
.js .book-page, .js .book-page.is-active { position: relative; inset: auto; transform: none; }
.js .book-page { opacity: 0; visibility: hidden; transition: opacity 0.18s ease, visibility 0s linear 0.18s; }
.js .book-page.is-active { opacity: 1; visibility: visible; transition: opacity 0.32s ease 0.12s, visibility 0s; }
.book-media { aspect-ratio: 16 / 10; }
.book-media img { object-fit: cover; }
.book-media--contain img { object-fit: contain; padding: var(--s3); }
.book-body { display: flex; flex-direction: column; align-items: flex-start; }
.book-body .btn, .book-body .link-arrow { margin-top: auto; }

/* Lamp bookend: glows when you browse the shelf */
.shelf-object { display: none; }
.shelf-lamp { position: absolute; right: 1%; bottom: 14px; width: 70px; height: 150px; pointer-events: none; z-index: 2; }
.shelf-lamp .shade { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.2; }
.shelf-lamp .line { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; }
.shelf-lamp .base { fill: var(--ink-2); }
.shelf-lamp .bulb { fill: #f6d9a0; opacity: 0; transition: opacity 0.6s var(--ease); }
.lamp-glow {
  position: absolute; right: 0; bottom: 0; width: 60%; height: 120%; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 88% 48%, rgba(246, 205, 140, 0.34), rgba(246, 205, 140, 0) 62%);
  opacity: 0; transition: opacity 0.8s var(--ease);
}
.shelf-unit:hover .lamp-glow, .shelf-unit:focus-within .lamp-glow { opacity: 1; }
.shelf-unit:hover .shelf-lamp .bulb, .shelf-unit:focus-within .shelf-lamp .bulb { opacity: 1; }
:root[data-theme="dusk"] .lamp-glow { opacity: 0.45; }
:root[data-theme="dusk"] .shelf-lamp .bulb { opacity: 0.8; }
@media (max-width: 999px) { .shelf-lamp, .lamp-glow { display: none; } }
.spines { padding-right: 84px; }
@media (max-width: 999px) { .spines { padding-right: 4px; } }

/* ---------- Case study header: hero visual + clear hierarchy ---------- */
.cs-hero { display: grid; grid-template-columns: 1fr; gap: clamp(var(--s4), 4vw, var(--s5)); align-items: center; }
@media (min-width: 1000px) { .cs-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); } }
.cs-hero h1 { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.cs-visual { margin: 0; border-radius: 6px; overflow: hidden; background: var(--paper-deep); aspect-ratio: 4 / 3; box-shadow: 12px 22px 48px -30px rgba(40, 28, 16, 0.4); }
.cs-visual img { width: 100%; height: 100%; object-fit: cover; }
.cs-visual--contain img { object-fit: contain; padding: var(--s3); }

.cs-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); margin: clamp(var(--s4), 5vw, var(--s5)) 0 0; padding-top: var(--s4); border-top: 1px solid var(--ink); }
@media (min-width: 900px) { .cs-key { grid-template-columns: 1.618fr 1fr 1.618fr 1.618fr; } }
.cs-key dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: var(--s1); }
.cs-key dd { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.2; font-weight: 400; }
.cs-key dd small { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }
.cs-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-top: var(--s4); }
@media (min-width: 900px) { .cs-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cs-metrics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cs-metrics div { background: var(--paper); padding: var(--s3); }
.cs-metrics b { display: block; font-family: var(--serif); font-weight: 350; font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1; color: var(--accent); letter-spacing: -0.02em; margin-bottom: var(--s1); }
.cs-metrics span { font-size: 0.88rem; color: var(--ink-2); }
.cs-scope { margin-top: var(--s3); font-size: 0.9rem; color: var(--ink-2); }
.cs-scope b { font-weight: 500; color: var(--ink); }

/* Header and body share one left edge on wide screens */
@media (min-width: 1100px) {
  .reader { grid-template-columns: 170px minmax(0, 1fr); gap: var(--s5); }
  .chapter-head { padding-left: calc(var(--gutter) + 170px + var(--s5)); }
}

/* Calmer pull quotes */
.pull { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.25; margin: clamp(var(--s4), 4vw, var(--s5)) 0; max-width: 24em; padding-left: var(--s3); border-left: 2px solid var(--accent); }
.pull::before { content: "\201C"; }
.pull::after { content: "\201D"; }
.pull--plain::before, .pull--plain::after { content: none; }
.learning { margin: clamp(var(--s4), 4vw, var(--s5)) 0; padding: clamp(var(--s3), 3vw, var(--s4)); background: var(--card); border: 1px solid var(--rule); border-radius: 6px; max-width: var(--read); }
.learning .kicker { margin-bottom: var(--s2); }
.learning p.big { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.15; margin: 0 0 var(--s2); letter-spacing: -0.015em; }
.learning p { margin: 0; color: var(--ink-2); }

/* Findings: two lists side by side */
.findings { display: grid; grid-template-columns: 1fr; gap: var(--s4); margin: var(--s4) 0; max-width: var(--read); }
@media (min-width: 720px) { .findings { grid-template-columns: 1fr 1fr; } }
.findings h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.findings dl { margin: 0; }
.findings dt { font-family: var(--serif); font-size: 1.1rem; margin-top: var(--s2); }
.findings dd { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }

/* Equal pair of visuals */
.pair { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin: var(--s4) 0; }
@media (min-width: 720px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair figure { margin: 0; }
.pair .frame { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: var(--s3); }
.pair img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.pair figcaption { margin-top: var(--s2); font-size: 0.85rem; color: var(--ink-3); }
.pair figcaption b { color: var(--accent); font-weight: 500; margin-right: 8px; }

/* Screens exported on white sit on a white card, so the white is intentional */
.phones--card { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: clamp(var(--s3), 3vw, var(--s4)); }
.phones--card figcaption { color: #7d7368; }

/* ---------- More case studies (end of each case study) ---------- */
.more-cases { padding-block: clamp(var(--s5), 7vw, var(--s6)); border-top: 1px solid var(--rule); }
.more-cases-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.more-cases-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 720px) { .more-cases-grid { grid-template-columns: 1fr 1fr; } }
.case-card { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.case-card:hover { transform: translateY(-4px); box-shadow: 10px 20px 40px -28px rgba(40, 28, 16, 0.4); color: var(--ink); }
.case-card .img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-deep); }
.case-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.case-card:hover .img img { transform: scale(1.03); }
.case-card .body { padding: var(--s3); }
.case-card .kicker { margin-bottom: var(--s1); }
.case-card h3 { margin-bottom: var(--s1); transition: color 0.3s; }
.case-card:hover h3 { color: var(--accent); }
.case-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* ==========================================================================
   Review round 3
   ========================================================================== */

/* Principles sit inset from their rules */
.principle { padding-inline: var(--s3); }

/* Journal article: group paragraphs under their headings */
.article .prose p { margin-bottom: 0.8em; }
.article .prose h2 { margin-top: var(--s5); margin-bottom: var(--s2); font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.article .prose h2 + p { margin-top: 0; }

/* Right-hand copy starts level with the left-hand title (under its kicker) */
@media (min-width: 820px) { .align-title { padding-top: calc(0.78rem * 1.6 + var(--s3) + var(--s1)); } }

/* Work page: shorter intro so the work shows in the first view */
.page-head--compact { padding-top: clamp(120px, 16vh, 170px); padding-bottom: var(--s4); }
.page-head--compact h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin-bottom: var(--s2); }
.page-head--compact .lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); max-width: 34em; }
.volume-media--cover { padding: 0; overflow: hidden; }
.volume-media--cover img { width: 100%; max-height: none; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }

/* Design system: three challenges */
.challenges { display: grid; grid-template-columns: 1fr; gap: var(--s4); margin: var(--s4) 0; }
@media (min-width: 720px) { .challenges { grid-template-columns: repeat(3, 1fr); gap: var(--s3); } }
.challenges figure { margin: 0; }
.challenges .img { background: #fff; border: 1px solid var(--rule); border-radius: 6px; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; }
.challenges .img img { width: 82%; height: 82%; object-fit: contain; }
.challenges h4 { margin: var(--s3) 0 var(--s1); }
.challenges p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* Design system: roadmap drawn in HTML so it never crops */
.roadmap-wrap { overflow-x: auto; margin: var(--s4) 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); }
.roadmap { position: relative; min-width: 760px; padding: var(--s5) var(--s3) var(--s3) 120px; font-size: 0.8rem; }
.roadmap .row { position: relative; height: 34px; margin-bottom: 8px; }
.roadmap .row-label { position: absolute; left: -108px; top: 8px; width: 100px; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.roadmap .bar { position: absolute; top: 0; height: 30px; left: calc(var(--from) / 9 * 100%); width: calc((var(--to) - var(--from)) / 9 * 100%); border-radius: 8px; padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2b2740; }
.roadmap .bar--strategy { background: #f5e3b8; }
.roadmap .bar--build { background: #d9d4f5; }
.roadmap .bar--build-2 { background: #c6bff0; }
.roadmap .bar--docs { background: #f3d68a; }
.roadmap .bar--prod { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
:root[data-theme="dusk"] .roadmap .bar:not(.bar--prod) { filter: saturate(0.8) brightness(0.9); }
.roadmap .phase { position: absolute; top: 0; bottom: 38px; left: calc(120px + (100% - 120px - var(--s3)) * var(--at) / 9); border-left: 1px dashed var(--ink-3); }
.roadmap .phase span { position: absolute; top: 6px; left: 6px; white-space: nowrap; font-family: var(--serif); font-size: 0.95rem; color: var(--ink); }
.roadmap .phase small { display: block; font-family: var(--sans); font-size: 0.68rem; color: var(--ink-3); max-width: 13em; white-space: normal; line-height: 1.3; }
.roadmap .months { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin-top: var(--s2); }
.roadmap .months span { background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 4px; padding: 4px 8px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Design system: type scale specimen */
.typescale { margin: var(--s4) 0; border-top: 1px solid var(--ink); }
.typescale .step { display: grid; grid-template-columns: 7.5em 5.5em minmax(0, 1fr); gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.typescale .name { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.typescale .spec { font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.typescale .sample { color: var(--ink); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typescale .serif { font-family: var(--serif); }
.typescale .caps { text-transform: uppercase; letter-spacing: 0.06em; }
.typescale .skip { color: var(--accent); }
@media (max-width: 560px) { .typescale .step { grid-template-columns: 1fr auto; } .typescale .sample { grid-column: 1 / -1; } }
.type-rules { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin: var(--s4) 0; }
@media (min-width: 720px) { .type-rules { grid-template-columns: repeat(3, 1fr); } }
.type-rules div { border-top: 2px solid var(--accent); padding-top: var(--s2); }
.type-rules h4 { margin-bottom: var(--s1); }
.type-rules p { margin: 0; font-size: 0.93rem; color: var(--ink-2); }

.cross-link { display: flex; gap: var(--s2); align-items: center; margin: var(--s4) 0; padding: var(--s3); background: var(--accent-soft); border-radius: 6px; max-width: var(--read); font-size: 0.95rem; }
.cross-link a { font-weight: 500; }

/* About: skills as cards */
.known { display: grid; grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s4); }
@media (min-width: 720px) { .known { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .known { grid-template-columns: repeat(5, 1fr); } }
.known article { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.known article:hover { transform: translateY(-4px); box-shadow: 10px 20px 36px -26px rgba(40, 28, 16, 0.4); }
.known svg { width: 44px; height: 44px; }
.known svg * { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.known h3 { font-size: 1.15rem; margin: 0; }
.known p { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

/* About: off the clock, illustrated, with small surprises on hover */
.offclock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s4); }
@media (min-width: 720px) { .offclock { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .offclock { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.offclock li { list-style: none; text-align: center; }
.offclock button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: var(--s2); width: 100%; padding: var(--s3) var(--s1); border-radius: 12px; transition: background 0.3s; }
.offclock button:hover, .offclock button:focus-visible { background: var(--card); }
.offclock button:focus-visible { outline: 2px solid var(--accent); }
.offclock svg { width: 72px; height: 72px; overflow: visible; }
.offclock svg .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.offclock svg .fl { fill: var(--accent); opacity: 0.85; }
.offclock svg .fl2 { fill: var(--r3); opacity: 0.6; }
.offclock span { font-size: 0.88rem; color: var(--ink-2); line-height: 1.3; }
.offclock .note { font-family: var(--serif); font-style: italic; font-size: 0.85rem; color: var(--accent); min-height: 1.3em; opacity: 0; transition: opacity 0.3s; }
.offclock button.is-open .note { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .offclock .anim { transform-box: fill-box; transform-origin: center; }
  .offclock button:hover .spin, .offclock button.is-open .spin { animation: spin 1.2s linear infinite; }
  .offclock button:hover .float, .offclock button.is-open .float { animation: float 2.4s ease-in-out infinite; }
  .offclock button:hover .roll, .offclock button.is-open .roll { animation: roll 1.4s var(--ease) both; }
  .offclock button:hover .bubble, .offclock button.is-open .bubble { animation: bubble 1.6s ease-out infinite; }
  .offclock button:hover .bubble:nth-of-type(2), .offclock button.is-open .bubble:nth-of-type(2) { animation-delay: 0.5s; }
  .offclock button:hover .blink, .offclock button.is-open .blink { animation: blink 2.2s infinite; }
  .offclock button:hover .wag, .offclock button.is-open .wag { animation: wag 0.8s ease-in-out infinite alternate; transform-origin: 0% 100%; }
  .offclock button:hover .draw, .offclock button.is-open .draw { stroke-dasharray: 60; animation: draw 1.4s ease forwards; }
  .offclock button:hover .note-fly, .offclock button.is-open .note-fly { animation: notefly 1.8s ease-out infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, -6px); } }
@keyframes roll { 0% { transform: translateX(-18px) rotate(-200deg); } 100% { transform: translateX(0) rotate(0); } }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0.9; } 100% { transform: translateY(-16px); opacity: 0; } }
@keyframes blink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@keyframes wag { from { transform: rotate(-10deg); } to { transform: rotate(14deg); } }
@keyframes draw { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }
@keyframes notefly { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(10px, -14px); opacity: 0; } }

/* ---------- Landscape, round 4: meaning, clouds, layer-by-layer fade ---------- */
.landscape .layer { transition: opacity 0.2s linear; }
.landscape .clouds { opacity: 0.9; }
:root[data-theme="dusk"] .landscape .clouds { opacity: 0.45; }
.range-label text { font-family: var(--serif); font-style: italic; font-size: 19px; fill: var(--ink); opacity: 0.38; letter-spacing: 0.02em; transition: opacity 0.4s var(--ease); }
.range-label--light text { fill: #f4ede2; opacity: 0.5; }
:root[data-theme="dusk"] .range-label text { fill: #efe8dc; opacity: 0.4; }
.range-label:hover text, .range-label:focus text { opacity: 0.85; }
.landscape a.range-label { pointer-events: auto; }
@media (max-width: 899px) { .range-label { display: none; } }
/* Wide screens: keep the landscape tall enough that the sun and the figure both fit */
.landscape { height: max(clamp(280px, 50vh, 620px), calc(100vw / 3.4)); }
@media (max-width: 700px) { .landscape { height: clamp(260px, 44vh, 420px); } }

/* ==========================================================================
   Review round 5
   ========================================================================== */
/* The skills behind lasting change */
.toolkit { border-block: 1px solid var(--rule); }
.toolkit-head { display: grid; grid-template-columns: 1fr; gap: var(--s3); align-items: end; margin-bottom: var(--s4); }
@media (min-width: 900px) { .toolkit-head { grid-template-columns: 1.618fr 1fr; } }
.toolkit-head h2 { margin: 0; }
.toolkit-head p { margin: 0; }
.toolkit-grid { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 820px) { .toolkit-grid { grid-template-columns: repeat(3, 1fr); } }
.toolkit-grid h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); margin-bottom: var(--s2); }
.toolkit-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.toolkit-grid li { font-size: 0.95rem; padding: 7px 14px 5px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); transition: border-color 0.3s, color 0.3s; }
.toolkit-grid li:hover { border-color: var(--accent); color: var(--accent); }

/* The open book: fuller, and dressed in its spine's colour */
.book-page {
  border-radius: 3px 8px 8px 3px; border-left: 0; position: relative; padding-left: 14px;
  background: linear-gradient(90deg, var(--c) 0 14px, var(--card) 14px);
  box-shadow: 12px 22px 40px -28px rgba(40, 28, 16, 0.35), 2px 2px 0 -1px var(--card), 3px 3px 0 -1px var(--rule), 5px 5px 0 -2px var(--card), 6px 6px 0 -2px var(--rule);
}
.book-page::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,0.12), transparent); pointer-events: none; }
.book-media { aspect-ratio: 4 / 3; border-bottom: 3px solid var(--c); }
.book-body .kicker { color: var(--ink-2); }
.book-body .kicker::before { background: var(--c); width: 21px; height: 3px; }
.book-body .btn--solid { background: var(--c); border-color: var(--c); color: #fff; }
.book-body .btn--solid:hover { filter: brightness(1.1); background: var(--c); }
#bk-8 .btn--solid, #bk-8 .book-media { color: var(--ink); }

/* Type scale that keeps its hierarchy on tablets: body 16.5–18px, each step clearly above the last */
body { font-size: clamp(16.5px, 0.3vw + 14.4px, 18px); }
h1 { font-size: clamp(2.6rem, 5.6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.3rem); }
h3 { font-size: clamp(1.3rem, 1.6vw, 1.65rem); }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.8rem); }
.hero-sub { font-size: clamp(1.1rem, 1.1vw + 0.55rem, 1.3rem); }
#pause-title.lede { font-size: clamp(1.8rem, 3.1vw, 2.7rem); line-height: 1.2; }
.principle p, .pause-step p, .book-body p { font-size: 1em; font-weight: 300; }
.pause-step p { font-size: 0.95em; }

/* ==========================================================================
   Hero, round 6: forms rising from still water, journal markers
   ========================================================================== */
:root { --water-top: #e2d6c6; --water-bottom: #efe7da; --ripple: rgba(255, 255, 255, 0.75); }
:root[data-theme="dusk"] { --water-top: #221f2e; --water-bottom: #17151e; --ripple: rgba(239, 227, 200, 0.28); }
.landscape .ripples ellipse { fill: none; stroke: var(--ripple); stroke-width: 1.2; }
.landscape .ripples .glint { fill: none; stroke: var(--ripple); stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; }

/* Markers on the peaks, linking to journal entries */
.pin { cursor: pointer; }
.pin line { stroke: var(--ink); stroke-width: 1; opacity: 0.5; }
.pin circle.dot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill 0.3s; }
.pin circle.halo { fill: var(--accent); opacity: 0; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .pin circle.halo { animation: halo 3.4s var(--ease) infinite; } }
@keyframes halo { 0% { opacity: 0.4; transform: scale(0.6); } 70%, 100% { opacity: 0; transform: scale(2.6); } }
.pin text { font-family: var(--serif); font-style: italic; font-size: 17px; fill: var(--ink); paint-order: stroke; stroke: var(--sky-bottom); stroke-width: 5px; stroke-linejoin: round; transition: fill 0.3s; }
.pin--soon line { stroke-dasharray: 3 4; }
.pin--soon circle.dot { fill: transparent; }
.pin--soon text { opacity: 0.75; }
.pin:hover circle.dot, .pin:focus circle.dot { fill: var(--accent); stroke: var(--accent); }
.pin:hover text, .pin:focus text { fill: var(--accent); }
.landscape .pins a { pointer-events: auto; }
@media (max-width: 899px) { .landscape .pins { display: none; } }

/* The hero dissolves into the next section's colour, not white */
.hero-fade { position: absolute; inset: 0; background: var(--paper-deep); opacity: 0; pointer-events: none; z-index: 2; }
.landscape { z-index: 1; }
.hero-copy { z-index: 3; }


/* ---------- Lamp light spills past the shelf ---------- */
#work { overflow-x: clip; }
.lamp-glow { right: -22%; bottom: -60px; width: 95%; height: 175%; background: radial-gradient(ellipse at 76% 58%, rgba(246, 205, 140, 0.36), rgba(246, 205, 140, 0.12) 38%, rgba(246, 205, 140, 0) 66%); }

/* ---------- On my mind: notes pinned from the notebook ---------- */
.notes { background: var(--paper-deep); overflow-x: clip; }
.notes-wrap { display: grid; grid-template-columns: 1fr; gap: clamp(var(--s4), 5vw, var(--s6)); align-items: start; }
@media (min-width: 1000px) { .notes-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); } }
.now-strip { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.now-strip ul { list-style: none; padding: 0; margin: 0 0 var(--s2); display: grid; gap: var(--s1); font-size: 0.93rem; color: var(--ink-2); }
.now-strip b { font-weight: 500; color: var(--ink); }
.notes-board { display: grid; grid-template-columns: 1fr; gap: var(--s4); padding-top: var(--s2); }
@media (min-width: 720px) { .notes-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .notes-board .note:first-child { grid-column: 1 / -1; } }
.note {
  position: relative; display: flex; flex-direction: column; gap: var(--s2); text-decoration: none; color: var(--ink);
  padding: var(--s4) var(--s3) var(--s3);
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, color-mix(in srgb, var(--dusk) 12%, transparent) 27px 28px),
    var(--card);
  border-radius: 3px; box-shadow: 0 1px 0 var(--rule), 8px 16px 30px -22px rgba(40, 28, 16, 0.45);
  transform: rotate(var(--r, 0deg)); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.note.reveal { transform: rotate(var(--r, 0deg)) translateY(24px); }
.note.reveal.is-visible, .no-js .note.reveal { transform: rotate(var(--r, 0deg)); }
.note:hover, a.note:focus-visible { transform: rotate(0deg) translateY(-6px); box-shadow: 0 1px 0 var(--rule), 12px 24px 40px -24px rgba(40, 28, 16, 0.5); color: var(--ink); }
.tape { position: absolute; top: -10px; left: 50%; width: 88px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in srgb, var(--accent) 22%, var(--paper)); opacity: 0.85; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.note-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.stamp { border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 4px 10px 2px; letter-spacing: 0.1em; }
.stamp--soon { border-style: dashed; border-color: var(--ink-3); color: var(--ink-3); }
.note-sketch { width: 48px; height: 48px; }
.note-sketch * { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.note h3 { margin: 0; font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
.note p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.note-more { font-weight: 500; font-size: 0.92rem; margin-top: auto; }
.note--soon { cursor: default; }
.note--soon:hover { transform: rotate(var(--r, 0deg)) translateY(-3px); }
.landscape { height: max(clamp(280px, 50vh, 620px), calc(100vw / 3.15)); }
@media (max-width: 700px) { .landscape { height: clamp(260px, 44vh, 420px); } }

/* ---------- Round 8: illustrations from the inbox ---------- */
.three-up .ill { display: block; height: 110px; width: auto; margin: 0 0 var(--s3); }
.three-up .icon-ill { display: block; width: 56px; height: 56px; border-radius: 50%; margin: 0 0 var(--s3); }
[data-theme="dusk"] .three-up .ill { filter: brightness(0.92); }
/* How I lead: numeral sits close to its heading; tighter gap under the section title */
.principles { margin-top: var(--s4); }
@media (min-width: 820px) {
  .principle { column-gap: var(--s3); }
  .principle p { padding-left: var(--s4); }
}
/* M chart: as tall as the text beside it, no taller */
@media (min-width: 980px) {
  .mshape-wrap { align-items: stretch; }
  .mshape-wrap > div:last-child { display: flex; flex-direction: column; }
  .mshape { height: auto; flex: 1; min-height: 300px; }
}
/* Case study header with a portrait cover: text takes the wide column, the cover shows whole, like a book jacket */
@media (min-width: 1000px) { .cs-hero--cover { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.cs-visual--cover { aspect-ratio: 1900 / 2076; max-height: min(78vh, 720px); justify-self: center; width: 100%; max-width: calc(min(78vh, 720px) * 1900 / 2076); }
.cs-visual--cover img { object-fit: cover; }
@media (max-width: 999px) { .cs-visual--cover { max-width: 460px; justify-self: start; } }

/* ---------- Round 9: watches case study polish ---------- */
/* Self-hosted Fraunces defaults to its "wonky" letterforms; Google Fonts served it with them off. Match the original. */
html { font-variation-settings: "WONK" 0, "SOFT" 0; }

/* Stats fill their row, whatever the count (no empty cells) */
.stats { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }

/* Side-by-side figures keep their own proportions */
.pair { align-items: start; }
.pair .frame { aspect-ratio: auto; display: block; }
.pair img { height: auto; }

/* Images that bring their own background: no extra frame around them */
.figure .frame--bare { background: none; border: 0; padding: 0; }
.figure .frame--bare img { border-radius: var(--radius); }

/* White-background artwork sits on a white card with room around it */
.figure .frame--white { background: #fcfcfc; border-color: #ece8e1; padding: clamp(var(--s3), 4vw, var(--s5)); display: grid; place-items: center; }
.figure .frame--white img { width: auto; max-width: 100%; max-height: 360px; }

/* Text-led split: the words get the wider column */
@media (min-width: 900px) { .split--text-wide { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); } }

/* Content that should run to the right edge of the main column */
.chapter .principles, .chapter .cross-link { max-width: none; }
.cross-link { justify-content: space-between; flex-wrap: wrap; }
.cross-link a { margin-left: auto; white-space: nowrap; }

/* Findings: a little more air */
.findings { gap: calc(var(--s4) * 1.1) calc(var(--s5) * 1.1); margin-block: calc(var(--s4) * 1.1); }
.findings dt { margin-top: calc(var(--s2) * 1.1); }
.findings dd { line-height: 1.65; }

/* Stakeholder illustrations a little taller */
.three-up .ill { height: 140px; }

/* Homepage shelf: the open book is wider, so its height changes less between books */
@media (min-width: 1000px) { .studio-shelf { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr); } }
/* Diagram on a white ground that should melt into the page, not sit in a card */
.figure .frame--blend { background: none; border: 0; padding: 0; }
.figure .frame--blend img { mix-blend-mode: multiply; border-radius: 0; }
:root[data-theme="dusk"] .figure .frame--blend { background: #fcfcfc; padding: var(--s3); border-radius: var(--radius); }
:root[data-theme="dusk"] .figure .frame--blend img { mix-blend-mode: normal; }
/* A white-ground figure that runs full width and a little past the text column on wide screens */
.figure .frame--full img { width: 100%; max-height: none; }
@media (min-width: 1200px) { .figure--bleed { margin-inline: calc(-1 * var(--s5)); } }
/* Headings wrap into even lines instead of leaving one word hanging */
h1, h2, h3 { text-wrap: balance; }
.split--text-wide h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
/* The hero dissolves into exactly the colour at the top of the next section (sky tint over the deep paper), in both modes */
.hero-fade { background: color-mix(in srgb, var(--sky-top) 70%, var(--paper-deep)); }

/* ---------- Leadership in numbers: a slow, endless strip between How I think and the skills ---------- */
.metrics { background: var(--paper); border-block: 1px solid var(--rule); overflow: hidden; padding-block: var(--s4); }
.metrics-track { display: flex; width: max-content; animation: metrics-scroll 95s linear infinite; }
.metrics:hover .metrics-track, .metrics:focus-within .metrics-track { animation-play-state: paused; }
.metrics-list { display: flex; list-style: none; margin: 0; padding: 0; }
.metric { display: flex; align-items: baseline; gap: var(--s2); padding-inline: var(--s5); border-left: 1px solid var(--rule); white-space: nowrap; }
.metric b { font-family: var(--serif); font-weight: 350; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.metric span { font-size: 0.95rem; color: var(--ink-2); line-height: 1.3; }
@keyframes metrics-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .metrics-track { animation: none; width: auto; }
  .metrics-list[aria-hidden] { display: none; }
  .metrics-list { flex-wrap: wrap; row-gap: var(--s3); padding-inline: var(--s3); }
}
.toolkit { border-top: 0; }
/* Dusk: the lamp is the brightest thing on the shelf */
:root[data-theme="dusk"] .lamp-glow { opacity: 0.85; background: radial-gradient(ellipse at 76% 58%, rgba(255, 214, 150, 0.5), rgba(255, 205, 140, 0.18) 40%, rgba(255, 205, 140, 0) 68%); }
:root[data-theme="dusk"] .shelf-unit:hover .lamp-glow, :root[data-theme="dusk"] .shelf-unit:focus-within .lamp-glow { opacity: 1; }
:root[data-theme="dusk"] .shelf-lamp .bulb { opacity: 1; fill: #ffe3ad; filter: drop-shadow(0 0 6px rgba(255, 214, 150, 0.9)); }
:root[data-theme="dusk"] .shelf-lamp .shade { fill: #3a3346; stroke: #d8c7a6; }
/* Dusk: the pale Side projects spine turns dark, so its title switches to light text */
:root[data-theme="dusk"] #sp-8 { --ct: #f4ede2 !important; }

/* ---------- The open book: one size, one anatomy ----------
   Every book fills the same cell and lays out the same parts in the same places:
   cover (16:10) · kicker · title (two-line slot) · summary (three-line slot) · tags · button at the foot.
   Switching books changes the content, never the shape. */
.book-panel > .book-page { align-self: stretch; display: flex; flex-direction: column; }
.book-page .book-media { aspect-ratio: 16 / 10; flex: none; }
.book-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.book-body h3 { line-height: 1.15; min-height: 2.3em; margin-bottom: var(--s2); }
.book-body > p:not(.kicker) { line-height: 1.55; min-height: 4.65em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: var(--s3); }
.book-body .outcomes { margin: 0 0 var(--s3); gap: var(--s1); }
.book-body .btn { margin-top: auto; }
.book-body .kicker { font-size: 0.7rem; letter-spacing: 0.16em; }
/* Dusk: the notes lift clearly off the purple ground */
:root[data-theme="dusk"] .note {
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(239, 232, 220, 0.07) 27px 28px),
    #2e2a3c;
  box-shadow: 0 0 0 1px rgba(239, 232, 220, 0.12), 10px 18px 34px -18px rgba(0, 0, 0, 0.75);
}
:root[data-theme="dusk"] .note:hover, :root[data-theme="dusk"] a.note:focus-visible { box-shadow: 0 0 0 1px rgba(227, 154, 99, 0.45), 12px 24px 40px -18px rgba(0, 0, 0, 0.8); }
:root[data-theme="dusk"] .note p { color: #d6cdc0; }
:root[data-theme="dusk"] .note-meta { color: #b3aa9d; }

/* ---------- Page-load entrance: the opening lines of every page rise in, one after another ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .page-head > *, .cs-hero > div > *, .cs-hero > .cs-visual, .article-head > * {
    animation: rise 0.9s var(--ease) both;
  }
  .hero-copy > :nth-child(2), .page-head > :nth-child(2), .cs-hero > div > :nth-child(2), .article-head > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3), .page-head > :nth-child(3), .cs-hero > div > :nth-child(3), .article-head > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4), .page-head > :nth-child(4), .cs-hero > div > :nth-child(4), .article-head > :nth-child(4) { animation-delay: 0.24s; }
  .hero-copy > :nth-child(n+5), .page-head > :nth-child(n+5), .cs-hero > div > :nth-child(n+5), .article-head > :nth-child(n+5) { animation-delay: 0.32s; }
  .cs-hero > .cs-visual { animation-delay: 0.2s; animation-duration: 1.2s; }
  .landscape { animation: fade-in 1.4s var(--ease) 0.2s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Dusk, refined: three clear surface levels, calmer images, deeper shadows ----------
   page (#15141b) → deep sections (#1c1a25) → raised cards (#272433, with a hairline light edge).
   Before, cards were almost the same shade as the page, so everything read as one flat sheet. */
:root[data-theme="dusk"] {
  --paper-deep: #1c1a25;
  --card: #272433;
  --rule: rgba(239, 232, 220, 0.16);
  --b2: #a85d31;
  color-scheme: dark;
}
/* Raised things get a light hairline so their edges read in the dark */
:root[data-theme="dusk"] .book-page,
:root[data-theme="dusk"] .three-up > div,
:root[data-theme="dusk"] .figure .frame:not(.frame--bare):not(.frame--blend),
:root[data-theme="dusk"] .learning,
:root[data-theme="dusk"] .cross-link,
:root[data-theme="dusk"] .door,
:root[data-theme="dusk"] .stats,
:root[data-theme="dusk"] .tldr { box-shadow: inset 0 0 0 1px rgba(239, 232, 220, 0.08); }
/* Shadows are black, not brown, after dark */
:root[data-theme="dusk"] .book-page { box-shadow: 12px 22px 44px -26px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(239, 232, 220, 0.07); }
:root[data-theme="dusk"] .cs-visual { box-shadow: 12px 24px 50px -28px rgba(0, 0, 0, 0.9); }
/* Bright white artwork is dimmed a touch so it doesn't glare against the dark page */
:root[data-theme="dusk"] .figure img, :root[data-theme="dusk"] .cs-visual img, :root[data-theme="dusk"] .book-media img,
:root[data-theme="dusk"] .volume-media img, :root[data-theme="dusk"] .phones img, :root[data-theme="dusk"] .archive img { filter: brightness(0.9) contrast(1.02); }
:root[data-theme="dusk"] .figure .frame--white { background: #e9e5de; border-color: transparent; }
:root[data-theme="dusk"] .figure .frame--blend { background: #e9e5de; }
:root[data-theme="dusk"] .phones--card { background: #e9e5de; border-color: transparent; }
/* Buttons on the warm accent use dark text for contrast */
:root[data-theme="dusk"] .btn--solid:hover,
:root[data-theme="dusk"] .resume-band .btn--solid { color: #1a1410; }
/* Chips and tags a little brighter */
:root[data-theme="dusk"] { --accent-soft: rgba(227, 154, 99, 0.16); }
/* Footer sits clearly below the page, with a soft edge */
:root[data-theme="dusk"] .site-footer { background: #0c0b11; border-top: 1px solid rgba(239, 232, 220, 0.08); }
/* The grain is quieter at night */
:root[data-theme="dusk"] body::after { opacity: 0.035; }
:root[data-theme="dusk"] .phones--card figcaption { color: #4b453e; }
/* The lamp is off until you reach for the books, in both modes; at dusk it switches on brighter */
:root[data-theme="dusk"] .lamp-glow { opacity: 0; }
:root[data-theme="dusk"] .shelf-lamp .bulb { opacity: 0; }
:root[data-theme="dusk"] .shelf-unit:hover .lamp-glow, :root[data-theme="dusk"] .shelf-unit:focus-within .lamp-glow { opacity: 1; }
:root[data-theme="dusk"] .shelf-unit:hover .shelf-lamp .bulb, :root[data-theme="dusk"] .shelf-unit:focus-within .shelf-lamp .bulb { opacity: 1; }
/* External-link arrow: a small square icon no taller than the text's capitals */
.ext { display: inline-block; width: 0.7em; height: 0.7em; vertical-align: 0.02em; margin-left: 0.1em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* Cycling: a calm ride. The wheels turn slowly, the street's markings slide past, the bike barely bobs */
.offclock .spoke { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .offclock button:hover .spoke, .offclock button.is-open .spoke { animation: spin 2.4s linear infinite; }
  .offclock button:hover .road, .offclock button.is-open .road { animation: road 1.8s linear infinite; }
  .offclock button:hover .ride, .offclock button.is-open .ride { animation: ride-bob 1.2s ease-in-out infinite alternate; }
}
@keyframes road { from { transform: translateX(0); } to { transform: translateX(-18px); } }
@keyframes ride-bob { from { transform: translateY(0); } to { transform: translateY(-0.8px); } }
/* Fourteen small drawings: seven to a row on wide screens, so the grid stays even */
@media (min-width: 1100px) { .offclock { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: no-preference) {
  .offclock button:hover .glide, .offclock button.is-open .glide { animation: glide 1.6s ease-in-out infinite alternate; }
}
@keyframes glide { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
/* The kitten: rosy cheeks, shiny eyes, fine whiskers */
.offclock .blush { fill: var(--accent); opacity: 0.28; }
.offclock .shine { fill: #fff; }
.offclock .thin { stroke-width: 1; }
.offclock .blink { transform-box: fill-box; transform-origin: center; }
/* Spotting patterns: scattered dots, and under the lens three of them line up */
.offclock .dot { fill: var(--ink-3); opacity: 0.55; }
.offclock .lens { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.offclock .acc { stroke: var(--accent); }
.offclock .accdot { fill: var(--accent); }
/* Painting: a palette with four colours and a brush just dipped in the orange */
.offclock .paint { stroke: none; }
.offclock .p1 { fill: var(--accent); }
.offclock .p2 { fill: var(--b1); }
.offclock .p3 { fill: var(--b3); }
.offclock .p4 { fill: var(--b5); }
.offclock .brush { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }
.offclock .tip { fill: var(--accent); }
/* Off the clock, compact: smaller drawings, tighter blocks, and the one-liner floats above as a bubble instead of reserving space */
.offclock { gap: var(--s2); }
.offclock li { position: relative; }
.offclock button { gap: var(--s1); padding: var(--s2) var(--s1); position: relative; }
.offclock svg { width: 56px; height: 56px; }
.offclock span { font-size: 0.85rem; }
.offclock .note {
  position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translate(-50%, 4px); z-index: 3;
  width: max-content; max-width: 180px; min-height: 0; padding: 6px 12px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-size: 0.82rem; line-height: 1.35; text-align: center;
  pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease);
}
.offclock button:hover .note, .offclock button:focus-visible .note, .offclock button.is-open .note { opacity: 1; transform: translate(-50%, 0); }
/* Off the clock, final: the line sits under the label, takes no space until the drawing is first hovered, then stays */
.offclock { align-items: start; }
.offclock .note {
  position: static; transform: none; width: auto; max-width: none; background: none; color: var(--accent);
  padding: 0; border-radius: 0; font-size: 0.82rem; line-height: 1.35;
  max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.45s var(--ease), opacity 0.45s var(--ease);
}
.offclock button:hover .note, .offclock button:focus-visible .note, .offclock button.is-open .note { transform: none; max-height: 4em; opacity: 1; }
/* Once revealed, a drawing rests in its final pose; it only moves while the pointer is on it */
.offclock button.is-open:not(:hover):not(:focus-visible) :is(.anim, .spoke, .road, .ride, .glide, .draw, .note-fly) { animation: none; }

/* ---------- Journal page: topic filter, pinned board, earlier entries ---------- */
.topic-filter { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0 0 var(--s5); }
.topic-filter button { all: unset; cursor: pointer; padding: 8px 16px 6px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); font-size: 0.9rem; color: var(--ink-2); transition: border-color 0.25s, color 0.25s, background 0.25s; }
.topic-filter button:hover { border-color: var(--accent); color: var(--accent); }
.topic-filter button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.topic-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.journal-sub { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s3); }
.journal-page .notes-board { margin-bottom: var(--s6); }
.journal-note { margin: calc(-1 * var(--s2)) 0 var(--s3); font-size: 0.95rem; }
.journal-page [hidden] { display: none !important; }

/* ---------- Shelf bookend: a napping cat by day, the lamp by night ----------
   Day: the cat dozes; hover the shelf and she lifts her head and opens her eyes. Dusk: the lamp and its glow. */
.shelf-cat { position: absolute; right: 1.5%; bottom: 14px; width: 96px; height: 64px; pointer-events: none; z-index: 2; overflow: visible; }
.shelf-cat .cat-body { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; }
.shelf-cat .cat-ln { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.shelf-cat .cat-thin { stroke-width: 1; }
.shelf-cat .eyes-open circle { fill: var(--ink); }
.shelf-cat .eyes-open .cat-shine { fill: #fff; }
.shelf-cat .cat-nose { fill: var(--accent); }
.shelf-cat .cat-z { font-family: var(--serif); font-style: italic; font-size: 9px; fill: var(--ink-3); }
.shelf-cat .cat-z2 { font-size: 11px; }
.shelf-cat .cat-head { transform-box: view-box; transform-origin: 30px 56px; transition: transform 0.7s var(--ease); }
.shelf-cat .eyes-open { opacity: 0; transition: opacity 0.3s ease 0.25s; }
.shelf-cat .eyes-closed { transition: opacity 0.2s ease 0.2s; }
.shelf-cat .cat-z { transition: opacity 0.3s; }
@media (prefers-reduced-motion: no-preference) {
  .shelf-cat .cat-z { animation: cat-z 3.2s ease-in-out infinite; }
  .shelf-cat .cat-z2 { animation-delay: 1.1s; }
  .shelf-cat .cat-body:nth-of-type(1) { }
}
@keyframes cat-z { 0% { opacity: 0; transform: translate(0, 4px); } 40% { opacity: 0.9; } 100% { opacity: 0; transform: translate(4px, -6px); } }
.shelf-unit:hover .shelf-cat .cat-head, .shelf-unit:focus-within .shelf-cat .cat-head { transform: rotate(-10deg) translate(1px, -7px); }
.shelf-unit:hover .shelf-cat .eyes-open, .shelf-unit:focus-within .shelf-cat .eyes-open { opacity: 1; }
.shelf-unit:hover .shelf-cat .eyes-closed, .shelf-unit:focus-within .shelf-cat .eyes-closed { opacity: 0; }
.shelf-unit:hover .shelf-cat .cat-z, .shelf-unit:focus-within .shelf-cat .cat-z { opacity: 0; animation: none; }
/* The lamp stays in both modes; the cat is only there by day, curled up just left of the lamp */
.shelf-cat { right: calc(1% + 62px); width: 64px; height: 43px; }
:root[data-theme="dusk"] .shelf-cat { opacity: 0; visibility: hidden; }
/* Easter egg: switching to Dusk, she crouches and leaps up and out of the frame; switching to Day, she drops back in */
:root .shelf-cat.cat-leap-out, :root .shelf-cat.cat-leap-in, :root[data-theme] .shelf-cat.cat-leap-out, :root[data-theme] .shelf-cat.cat-leap-in { visibility: visible; opacity: 1; }
.shelf-cat.cat-leap-out { animation: cat-leap-out 0.9s cubic-bezier(0.3, 0, 0.6, 1) both; transform-origin: 50% 100%; }
.shelf-cat.cat-leap-in { animation: cat-leap-in 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both; transform-origin: 50% 100%; }
@keyframes cat-leap-out {
  0% { transform: none; opacity: 1; }
  18% { transform: translateY(1px) scale(1.05, 0.86); }
  42% { transform: translate(16px, -18px) rotate(10deg) scale(0.97, 1.05); opacity: 1; }
  78% { transform: translate(52px, 40px) rotate(28deg); opacity: 1; }
  100% { transform: translate(66px, 96px) rotate(34deg); opacity: 0; }
}
@keyframes cat-leap-in {
  0% { transform: translate(66px, 96px) rotate(24deg); opacity: 0; }
  20% { opacity: 1; }
  55% { transform: translate(18px, -22px) rotate(-8deg) scale(0.97, 1.05); }
  78% { transform: translate(0, 0) scale(1.07, 0.84); }
  90% { transform: translate(0, -3px) scale(0.98, 1.03); }
  100% { transform: none; opacity: 1; }
}

@media (max-width: 999px) { .shelf-cat { display: none; } }
.shelf-cat.on-books { right: auto; z-index: 3; }

/* Calico: cream fur with orange and dark patches, pink ears and cheeks */
.shelf-cat .cat-fur { fill: #fffaf2; }
.shelf-cat .cat-edge { fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; }
.shelf-cat .cat-stroke { stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; }
.shelf-cat .cat-orange { fill: #e39a5c; }
.shelf-cat .cat-dark { fill: #3d3531; }
.shelf-cat .cat-pink { fill: #efb2b0; }
.shelf-cat .cat-blush { fill: #ef9f9c; opacity: 0.5; }
.shelf-cat .cat-nose { fill: #e0878d; }
.shelf-cat .cat-tail { fill: none; stroke: #e39a5c; stroke-width: 4.2; stroke-linecap: round; }
.shelf-cat .cat-head { transform-origin: 32px 58px; }
.shelf-cat .eyes-open circle:not(.cat-shine) { fill: #2a2522; }
/* By day the lamp stays off: no glow, even when you browse */
:root:not([data-theme="dusk"]) .lamp-glow, :root:not([data-theme="dusk"]) .shelf-lamp .bulb { opacity: 0 !important; }

/* Spines: crisp, readable titles in every state.
   The lift no longer tilts (rotated text blurs), the year is full strength and a touch larger,
   and the orange spine is a shade deeper so cream text clears 5:1. */
:root { --b2: #974a21; }
:root[data-theme="dusk"] { --b2: #974a21; }
.spine .yr { opacity: 1; font-size: 0.74rem; font-weight: 600; }
.spine .t, .spine .yr { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22); }
.spine[aria-selected="true"], .spine:focus-visible { transform: translateY(-13px); }
@media (hover: hover) { .spine:hover { transform: translateY(-13px); } }
.spines:has(.spine[aria-selected="true"]) .spine:not([aria-selected="true"]) { filter: saturate(0.85); }

/* Wide case study header, portrait cover shown whole: the cover sits in the middle of the wide frame,
   and a soft, blurred wash of the same image fills the sides, so nothing is cropped and the frame never looks empty */
.cs-visual--framed { position: relative; isolation: isolate; aspect-ratio: 16 / 10; background: var(--paper-deep); }
.cs-visual--framed .cs-backdrop { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(28px) saturate(1.1); opacity: 0.85; z-index: -1; }
.cs-visual--framed .cs-cover { position: relative; display: block; height: 100%; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.45); }
:root[data-theme="dusk"] .cs-visual--framed .cs-backdrop { opacity: 0.6; }

/* ---------- The core insight, as a feature: a watch annotated two ways ---------- */
.chapter--feature { background: var(--paper-deep); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-radius: 6px; }
.chapter--feature h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.insight-figure { margin: var(--s4) 0 var(--s3); }
.insight-figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.insight-figure figcaption { text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-2); margin-top: var(--s2); }
.ins-strap { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.4; }
.ins-case { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.ins-dial { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
.ins-crown { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; }
.ins-ticks { stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
.ins-hand { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.ins-pin { fill: var(--accent); }
.ins-line { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; }
.ins-warm { stroke: var(--accent); stroke-dasharray: none; stroke-width: 1.2; }
.ins-dot { fill: var(--ink-3); }
.ins-warm-dot { fill: var(--accent); }
.ins-head { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; fill: var(--ink-3); }
.ins-warm-t { fill: var(--accent); }
.ins-spec { font-family: var(--sans); font-size: 15px; fill: var(--ink-3); }
.ins-meaning { font-family: var(--serif); font-style: italic; font-size: 20px; fill: var(--ink); }
@media (max-width: 700px) { .ins-spec { font-size: 18px; } .ins-meaning { font-size: 22px; } .ins-head { font-size: 14px; } }

/* ---------- Findings as two structured cards: numbered rows, a coloured top edge per side ---------- */
.findings { max-width: none; gap: var(--s3); }
.findings > div { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--ink-3); border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s3); counter-reset: finding; }
.findings > div:nth-child(2) { border-top-color: var(--accent); }
.findings h4 { margin: 0 0 var(--s3); }
.findings > div:nth-child(1) h4 { color: var(--ink-2); }
.findings dl { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); }
.findings dt { grid-column: 2; margin-top: 0; padding-top: var(--s2); border-top: 1px solid var(--rule); font-size: 1.12rem; position: relative; }
.findings dt::before { counter-increment: finding; content: "0" counter(finding); position: absolute; left: calc(-1 * var(--s3) - 1.6em); top: calc(var(--s2) + 0.1em); font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--accent); width: 1.6em; }
.findings > div:nth-child(1) dt::before { color: var(--ink-3); }
.findings dd { grid-column: 2; margin: 4px 0 var(--s2); }
.findings dt:first-of-type { border-top: 0; padding-top: 0; }
.findings dt:first-of-type::before { top: 0.1em; }
.findings dl { padding-left: 2.2em; grid-template-columns: 1fr; }
.findings dt, .findings dd { grid-column: 1; }
/* Moodboard figure: aligned to the text column edges again, with 10% less inner padding */
@media (min-width: 1200px) { .figure--bleed { margin-inline: 0; } }
.figure .frame--white.frame--full { padding: calc(clamp(var(--s3), 4vw, var(--s5)) * 0.9); }

/* ---------- Related work: each surface is an image and its description, side by side ---------- */
.surfaces { display: grid; gap: var(--s5); margin-top: var(--s4); }
.surface { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 860px) {
  .surface { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .surface--flip .surface-media { order: 2; }
  .surface--wide { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
}
.surface-media { margin: 0; }
.surface--wide .surface-media img { width: 100%; border-radius: var(--radius); display: block; }
.surface .phones { max-width: 460px; justify-self: center; width: 100%; }
.surface-text h4 { font-size: 1.4rem; margin-bottom: var(--s1); }
.surface-text p { margin: 0; color: var(--ink-2); }
.surface--note { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4); }

/* ---------- About: an "at a glance" card in place of the portrait (until one exists) ---------- */
.at-a-glance { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: var(--s4); box-shadow: 12px 22px 44px -30px rgba(40, 28, 16, 0.35); }
.at-a-glance .kicker { margin-bottom: var(--s2); }
.glance-sketch { width: 100%; height: auto; display: block; margin-bottom: var(--s3); }
.glance-sketch .gs-sun { fill: var(--sun); }
.glance-sketch .gs-far { fill: none; stroke: var(--r3); stroke-width: 1.4; }
.glance-sketch .gs-near { fill: var(--card); stroke: var(--ink-2); stroke-width: 1.6; }
.glance-sketch .gs-water { stroke: var(--ink-3); stroke-width: 1; stroke-linecap: round; }
.at-a-glance dl { margin: 0; }
.at-a-glance dl > div { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s2); padding: 9px 0; border-top: 1px solid var(--rule); }
.at-a-glance dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding-top: 3px; }
.at-a-glance dd { margin: 0; font-size: 0.95rem; color: var(--ink); line-height: 1.4; }
.at-a-glance .glance-photo { width: 100%; border-radius: 4px; margin-bottom: var(--s3); }
@media (min-width: 900px) { .about-hero { align-items: center; } }
:root[data-theme="dusk"] .at-a-glance { box-shadow: 12px 22px 44px -26px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(239, 232, 220, 0.08); }
.curio--soon { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3); border-style: dashed; }
.curio--soon > div { max-width: 40em; }

/* ---------- Shelf bookend, final: the cat by day, the lamp by night ----------
   No jump: the two simply fade into each other when the theme changes. */
.shelf-cat.cat-leap-out, .shelf-cat.cat-leap-in { animation: none; }
.shelf-cat { right: 1.5%; width: 84px; height: 56px; transition: opacity 0.5s var(--ease), visibility 0s linear 0s; }
.shelf-cat.on-books { right: auto; }
:root[data-theme="dusk"] .shelf-cat { opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
.shelf-lamp, .lamp-glow { transition: opacity 0.5s var(--ease); }
:root:not([data-theme="dusk"]) .shelf-lamp { opacity: 0; visibility: hidden; }
:root:not([data-theme="dusk"]) .lamp-glow { display: none; }

/* Case study header, fixed: it starts at the page margin (in line with the logo and contents list), not indented to the reading column.
   The cover is shown plainly, filling a 4:3 frame, until wider covers arrive. */
@media (min-width: 1100px) { .chapter-head { padding-left: var(--gutter); } }
.cs-visual--cover-crop img { object-fit: cover; object-position: 50% 45%; }
/* Old and new prototypes, side by side */
.proto-pair { display: grid; gap: var(--s4); margin: var(--s3) 0 var(--s5); }
@media (min-width: 820px) { .proto-pair { grid-template-columns: 1fr 1fr; } }
.proto-pair .proto { margin: 0; }
.proto-pair .proto-device { max-width: 320px; }

/* ---------- The core insight: one watch, split. Left, the bare skeleton and its specs; right, the real watch and its story ---------- */
.insight-split { display: grid; gap: var(--s3); align-items: center; margin: var(--s4) 0 var(--s3); }
@media (min-width: 860px) { .insight-split { grid-template-columns: 1fr minmax(0, 1.15fr) 1fr; gap: var(--s4); } }
.is-watch { position: relative; aspect-ratio: 720 / 960; max-width: 380px; width: 100%; justify-self: center; border-radius: 6px; overflow: hidden; background: #fff; cursor: ew-resize; touch-action: pan-y; }
.is-watch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.is-photo { clip-path: inset(0 0 0 var(--split)); transition: clip-path 0.12s linear; }
.is-divider { position: absolute; top: 6%; bottom: 6%; left: var(--split); width: 1px; background: var(--accent); transform: translateX(-0.5px); transition: left 0.12s linear; }
.is-divider::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.is-head { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; margin: 0 0 var(--s2); }
.is-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.is-specs { text-align: right; }
.is-specs .is-head { color: var(--ink-3); }
.is-specs li { font-size: 0.95rem; color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px dashed var(--rule); }
.is-story .is-head { color: var(--accent); }
.is-story li { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; color: var(--ink); padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.insight-split figcaption { grid-column: 1 / -1; text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-2); }
.insight-split figcaption span { display: block; font-family: var(--sans); font-style: normal; font-size: 0.8rem; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 859px) { .is-specs { text-align: left; } .insight-split figcaption span { display: none; } }
:root[data-theme="dusk"] .is-watch { box-shadow: 0 20px 44px -24px rgba(0,0,0,0.8); }
:root[data-theme="dusk"] .is-watch img { filter: brightness(0.92); }
/* The split sits in its own card, so the centred caption belongs to the illustration */
.insight-split { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: var(--s4) var(--s4) var(--s3); box-shadow: 12px 24px 48px -32px rgba(40, 28, 16, 0.35); }
.insight-split figcaption { padding-top: var(--s3); border-top: 1px solid var(--rule); margin-top: var(--s1); }
:root[data-theme="dusk"] .insight-split { box-shadow: 12px 24px 48px -28px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(239, 232, 220, 0.08); }

/* ---------- The brief we wrote: each goal shows which personas it serves ---------- */
.persona-legend { list-style: none; margin: var(--s4) 0 var(--s3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.persona-legend li { display: flex; align-items: center; gap: var(--s1); font-size: 0.9rem; color: var(--ink-2); }
.pa { border-radius: 50%; object-fit: cover; display: block; background: #121212; }
.persona-legend .pa { width: 44px; height: 44px; }
.goals > .goal { display: flex; flex-direction: column; }
.goal p { flex: 1; }
.goal-for { display: flex; align-items: center; gap: var(--s1); margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--rule); }
.goal-for > span:first-child { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.pa-stack { display: flex; }
.pa-stack .pa { width: 36px; height: 36px; border: 2px solid var(--card); margin-left: -8px; }
.pa-stack .pa:first-child { margin-left: 0; }
