:root {
  --ultra: #0E0F0C;
  --ultra-deep: #1C1E19;
  --on-ultra: #FFFFFF;
  --on-ultra-muted: #B7BAB0;
  --on-ultra-faint: rgba(255, 255, 255, 0.22);
  --wash: rgba(255, 255, 255, 0.05);
  --shade: rgba(0, 0, 0, 0.35);
  --glow: rgba(182, 255, 59, 0.07);
  --hero-dot: 255, 255, 255;
  --hero-lit: 182, 255, 59;
  --hero-note: var(--marker);
  --marker: #B6FF3B;
  --marker-ink: #0E0F0C;
  --desk: #121410;
  --grid: rgba(255, 255, 255, 0.045);
  --field-dot: 255, 255, 255;
  --field-lit: 182, 255, 59;
  --ink: #F4F5F0;
  --ink-2: #A9AD9F;
  --desk-note: var(--marker);
  --seal: #B6FF3B;
  --paper-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 18px 34px -16px rgba(0, 0, 0, 0.85);
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --serif: "Newsreader", Georgia, serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  color-scheme: dark;
}

/* Main look: white page, ink type, neon green used as a highlighter */
:root[data-theme="white"] {
  --desk: #FFFFFF;
  --grid: rgba(14, 15, 12, 0.05);
  --field-dot: 14, 15, 12;
  --field-lit: 74, 140, 0;
  --ink: #0E0F0C;
  --ink-2: #5E6257;
  --desk-note: #0E0F0C;
  --seal: #0E0F0C;
  --paper-shadow: 0 1px 0 rgba(14, 15, 12, 0.06), 0 18px 30px -18px rgba(14, 15, 12, 0.35);
  color-scheme: light;
}
:root[data-theme="white"] :is(.console, .contact) {
  --ultra: #FFFFFF;
  --ultra-deep: #F2F3EE;
  --on-ultra: #0E0F0C;
  --on-ultra-muted: #5E6257;
  --on-ultra-faint: rgba(14, 15, 12, 0.16);
  --wash: rgba(14, 15, 12, 0.03);
  --shade: rgba(14, 15, 12, 0.03);
  --glow: rgba(182, 255, 59, 0.16);
  --hero-note: #0E0F0C;
  --hero-dot: 14, 15, 12;
  --hero-lit: 74, 140, 0;
}
:root[data-theme="white"] .contact { border-top: 1.5px solid rgba(14, 15, 12, 0.1); }

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

.desk { overflow-x: clip; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip { position: absolute; left: 1rem; top: -3rem; z-index: 5; padding: 0.5rem 0.75rem; background: var(--marker); color: var(--marker-ink); }
.skip:focus { top: 1rem; }

.wrap { max-width: 74rem; margin-inline: auto; padding-inline: max(1rem, 4vw); }

.field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Handwritten margin notes */

.scribble {
  position: absolute;
  font: 700 1.5rem/1.05 var(--hand);
  color: var(--ultra);
  transform: rotate(-4deg);
  pointer-events: none;
  max-width: 13rem;
}
.scribble svg { width: 3.25rem; height: 2.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; display: block; }

/* ---------- Hero ---------- */

.console {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 85% 0%, var(--glow), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, var(--shade), transparent 70%),
    var(--ultra);
  color: var(--on-ultra);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem max(1rem, 4vw) 3.5rem;
}
.console > :not(.field) { position: relative; z-index: 1; }
.console > .bar { z-index: 3; }

.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem; }
.mark { display: inline-flex; align-items: center; gap: 0.7rem; font: 700 0.95rem/1.2 var(--display); letter-spacing: -0.01em; text-decoration: none; }
.mark:hover { text-decoration: none; }

/* The logo: a face whose eyes follow you around the page */
.logo { width: 2.4rem; height: 2.4rem; flex: none; overflow: visible; transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.mark:hover .logo { transform: rotate(-8deg) scale(1.08); }
.logo-face { fill: #2C2D28; stroke: rgba(255, 255, 255, 0.55); stroke-width: 2; }
.logo-smile { fill: var(--marker); transform-box: fill-box; transform-origin: center; transition: transform 0.3s; }
.mark:hover .logo-smile { transform: scaleX(1.25); }
.eye { transform-box: fill-box; transform-origin: center; }
.eye.blink { animation: blink 0.22s ease-in-out; }
@keyframes blink { 50% { transform: scaleY(0.08); } }
.pupil { transition: transform 0.12s ease-out; }
/* What Harsh is up to right now: a solid pill so the field's labels pass behind it */
.bar .now {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  background: var(--ultra-deep);
  box-shadow: 0 6px 18px -8px rgba(12, 13, 11, 0.6);
  font: 500 0.875rem/1.2 var(--text);
  color: var(--on-ultra);
  position: relative;
  overflow: hidden;
}
.now-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--marker);
  color: var(--marker-ink);
  font: 700 0.75rem/1 var(--mono);
}
.now-tag .now-dot { background: var(--marker-ink); width: 0.4rem; height: 0.4rem; animation-name: beacon-ink; }
@keyframes beacon-ink { 0% { box-shadow: 0 0 0 0 rgba(13, 14, 12, 0.5); } 70%, 100% { box-shadow: 0 0 0 0.45rem rgba(13, 14, 12, 0); } }
.bar .now::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sheen 5s ease-in-out 2.5s infinite;
  pointer-events: none;
}
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .bar .now::after { animation: none; } }
.now-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--marker); box-shadow: 0 0 0 0 rgba(182, 255, 59, 0.6); animation: beacon 2.4s ease-out infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(182, 255, 59, 0.55); } 70%, 100% { box-shadow: 0 0 0 0.6rem rgba(182, 255, 59, 0); } }
.bar nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-weight: 500; margin-left: auto; }

/* Profile links: round icons that hop on hover and drop a preview of the profile */
.socials { gap: 0.6rem; }
.social { position: relative; }
.social > a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 50%;
  background: var(--wash);
  color: var(--on-ultra);
  transition: transform 0.25s ease-out, background 0.2s, color 0.2s, border-color 0.2s;
}
.social > a:hover, .social > a:focus-visible { background: var(--on-ultra); color: var(--ultra); border-color: var(--on-ultra); }
.ico { width: 1.1rem; height: 1.1rem; flex: none; }
.social > a:hover .ico { animation: hop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-4px) rotate(-14deg) scale(1.15); } 100% { transform: none; } }
.ico-mail .flap { transform-box: fill-box; transform-origin: center top; transition: transform 0.3s; }
.social > a:hover .ico-mail .flap { transform: scaleY(-1) translateY(-2px); }

.peek {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: -0.5rem;
  z-index: 30;
  width: 17.5rem;
  padding: 1rem;
  border-radius: 16px;
  font: 400 0.875rem/1.45 var(--text);
  text-align: left;
  box-shadow: 0 24px 48px -16px rgba(12, 13, 11, 0.45), 0 2px 6px rgba(12, 13, 11, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), visibility 0s linear 0.2s;
  pointer-events: none;
}
.peek::before { content: ""; position: absolute; top: -0.75rem; left: 0; right: 0; height: 0.75rem; }
@media (hover: hover) and (pointer: fine) {
  .social:hover .peek, .social:focus-within .peek {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0.08s, 0.08s, 0s;
    pointer-events: auto;
  }
}
.peek img { border-radius: 50%; object-fit: cover; flex: none; }
.peek-who { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.peek-who p { display: grid; line-height: 1.25; }
.peek-who b { font-weight: 600; font-size: 0.95rem; }
.peek-who span, .peek-muted { opacity: 0.65; }
.peek-name { font-weight: 600; font-size: 0.95rem; }
.peek-label { margin-top: 0.75rem; font-size: 0.75rem; opacity: 0.6; }
.peek-stat b { font-weight: 700; }
.peek-btn { display: inline-block; margin-top: 0.8rem; padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 600; font-size: 0.8rem; }

.peek-github { background: #0D1117; color: #E6EDF3; border: 1px solid #30363D; }
.peek-repos { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.peek-repos li { display: flex; align-items: center; gap: 0.5rem; font: 500 0.8rem/1.3 var(--mono); color: #4493F8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-repos li::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #3572A5; }

.peek-linkedin { padding: 0 1rem 1rem; overflow: hidden; background: #FFFFFF; color: #191919; border: 1px solid #E0DFDC; }
.peek-linkedin .peek-banner { height: 3.25rem; margin: 0 -1rem; background: linear-gradient(120deg, #0A66C2, #2C2D28); }
.peek-linkedin img { margin-top: -1.75rem; border: 3px solid #FFFFFF; }
.peek-linkedin .peek-name { margin-top: 0.4rem; }
.peek-linkedin .peek-btn { background: #0A66C2; color: #FFFFFF; }

.peek-x { background: #000000; color: #E7E9EA; border: 1px solid #2F3336; }
.peek-x .peek-btn { background: #EFF3F4; color: #0F1419; }

.peek-mail { background: #2C2D28; color: #FFFFFF; }
.peek-mail .peek-label { margin-top: 0; }
.peek-mail .peek-name { margin: 0.2rem 0 0.4rem; font-family: var(--display); font-size: 0.8rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.intro-ready .social > a { animation: drop-in 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; }
.intro-ready .social:nth-child(2) > a { animation-delay: 0.08s; }
.intro-ready .social:nth-child(3) > a { animation-delay: 0.16s; }
.intro-ready .social:nth-child(4) > a { animation-delay: 0.24s; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-14px); } }

/* ---------- Intro: the face wakes up, looks around, and the curtain lifts ---------- */

.intro { display: none; }
.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: #0E0F0C;
  color: #FFFFFF;
  cursor: pointer;
}
.intro-logo { width: clamp(6rem, 16vw, 9rem); overflow: visible; animation: pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.intro-logo .eye { animation: blink 0.22s ease-in-out 0.75s, blink 0.22s ease-in-out 1s; }
.intro-logo .pupil { animation: look 1.1s ease-in-out 0.55s both; }
.intro-smile { transform-box: fill-box; transform-origin: left; animation: swipe 0.45s ease-out 0.35s both; }
.intro-name { display: flex; gap: 0.5ch; font: 800 clamp(1.4rem, 4vw, 2.6rem)/1 var(--display); letter-spacing: -0.03em; overflow: hidden; }
.intro-name span { display: inline-block; animation: rise-up 0.6s cubic-bezier(0.2, 0.9, 0.2, 1) both; }
.intro-name span:nth-child(1) { animation-delay: 0.45s; }
.intro-name span:nth-child(2) { animation-delay: 0.55s; }
.intro-name span:nth-child(3) { animation-delay: 0.65s; }
.intro.leave { animation: curtain 0.75s cubic-bezier(0.7, 0, 0.2, 1) forwards; }
@keyframes pop { from { transform: scale(0) rotate(-25deg); } }
@keyframes look { 0%, 100% { transform: none; } 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
@keyframes swipe { from { transform: scaleX(0); } }
@keyframes rise-up { from { transform: translateY(110%); } }
@keyframes curtain { to { clip-path: inset(0 0 100% 0 round 0 0 50% 50%); } }
.intro { clip-path: inset(0 0 0 0 round 0); }

/* Project code links */
.ex-code { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.75rem; font: 500 0.875rem/1.2 var(--text); color: inherit; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; transition: gap 0.25s; }
.ex-code:hover { gap: 0.7rem; }
.ex-code:hover .ico { animation: hop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
.bar-tools { display: flex; align-items: center; gap: 0.75rem; }

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0.1em 0.4em;
  border: 1px solid currentColor;
  border-bottom-width: 2px;
  border-radius: 5px;
  font: 500 0.78em/1.3 var(--mono);
  text-align: center;
  opacity: 0.85;
}

.kbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  background: var(--wash);
  color: var(--on-ultra);
  font: 500 0.875rem/1 var(--text);
  cursor: pointer;
}
.kbd-btn:hover { border-color: var(--on-ultra); }

/* Theme change: no message, just the new colour sweeping out from the switch */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.theme-switch:active .knob { scale: 0.85; }

/* Flip switch: the knob shows the colour the page flips to */
.theme-switch {
  position: relative;
  width: 3.5rem;
  height: 1.9rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  background: var(--wash);
  cursor: pointer;
  padding: 0;
}
.theme-switch:hover { border-color: var(--on-ultra); }
.knob {
  position: absolute;
  top: 50%;
  left: 0.3rem;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: -0.6rem;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 0.3rem #2C2D28, 0 0 0 2px #FFFFFF;
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.3s;
}
.theme-switch[aria-checked="true"] .knob {
  transform: translateX(1.55rem);
  box-shadow: inset 0 0 0 0.6rem #2C2D28, 0 0 0 2px #FFFFFF;
}

.stage {
  flex: 1;
  width: 100%;
  max-width: 76rem;
  margin: clamp(2.5rem, 8vh, 6rem) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  align-content: start;
}

.ask { position: relative; }
.ask label { display: block; font: 500 0.95rem/1 var(--mono); color: var(--on-ultra-muted); margin-bottom: 1rem; }

.scribble-ask { color: var(--hero-note); left: 11rem; top: -1.6rem; display: flex; align-items: flex-end; gap: 0.25rem; max-width: none; white-space: nowrap; }
.scribble-ask svg { transform: translateY(1.1rem); }

.ask textarea {
  display: block;
  width: 100%;
  resize: none;
  overflow: hidden;
  border: 0;
  border-bottom: 2px solid var(--on-ultra-faint);
  padding: 0 4.5rem 0.75rem 0;
  background: transparent;
  color: var(--on-ultra);
  font: 800 clamp(1.75rem, 4.6vw, 3.75rem)/1.08 var(--display);
  letter-spacing: -0.03em;
  caret-color: var(--hero-note);
}
.ask textarea:focus { outline: none; border-bottom-color: var(--marker); }

.ask button {
  position: absolute;
  right: 0;
  bottom: 0.9rem;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  background: var(--marker);
  color: var(--marker-ink);
  font: 600 0.95rem/1 var(--text);
  cursor: pointer;
}
.ask button:hover { background: #CFFF7A; }
.ask button:focus-visible { outline-color: var(--on-ultra); }

.trace { margin-top: 1.25rem; font: 400 0.875rem/1.5 var(--mono); color: var(--on-ultra-muted); }
.trace summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.6rem; }
.trace summary::-webkit-details-marker { display: none; }
.trace summary::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.trace[open] summary::before { transform: rotate(45deg); }
.trace.running summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--marker);
  animation: pulse 0.9s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: 0.25; } to { opacity: 1; } }

.trace-lines { list-style: none; padding: 0.6rem 0 0 1rem; border-left: 1px solid var(--on-ultra-faint); margin-top: 0.6rem; }
.trace-lines li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; }
.trace-lines b { font-weight: 500; color: var(--on-ultra); }

.answer {
  margin-top: 2rem;
  font: 400 clamp(1.2rem, 2.1vw, 1.5rem)/1.55 var(--text);
  max-width: 44rem;
  min-height: 7.5em;
  text-shadow: 0 0 18px var(--ultra), 0 0 6px var(--ultra);
}

.cite {
  display: inline-flex;
  align-items: center;
  height: 1.55em;
  padding: 0 0.5em;
  margin: 0 0.1em;
  border-radius: 999px;
  background: var(--on-ultra);
  color: var(--ultra);
  font: 500 0.58em/1 var(--mono);
  text-decoration: none;
  text-shadow: none;
  vertical-align: 0.22em;
  white-space: nowrap;
}
.cite:hover { background: var(--marker); color: var(--marker-ink); }

.followups { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.followups button {
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--wash);
  backdrop-filter: blur(4px);
  color: var(--on-ultra);
  font: 500 0.95rem/1.2 var(--text);
  cursor: pointer;
}
.followups button:hover { border-color: var(--on-ultra); background: var(--ultra-deep); }

.graph { position: relative; padding-top: 2.1rem; }
.graph-title { font: 500 0.95rem/1 var(--mono); color: var(--on-ultra-muted); margin-bottom: 1rem; }

.flow { list-style: none; padding: 0; display: grid; gap: 1rem; width: 11rem; }
.flow li {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 0.65rem;
  background: var(--wash);
  backdrop-filter: blur(4px);
  font: 500 0.95rem/1 var(--mono);
  color: var(--on-ultra-muted);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.flow li + li::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: calc(-1rem - 1.5px);
  height: 1rem;
  border-left: 1.5px solid var(--on-ultra-faint);
}
.flow li::after { font-size: 0.75rem; }
.flow li[data-state="active"] { background: var(--on-ultra); border-color: var(--on-ultra); color: var(--ultra); }
.flow li[data-state="active"]::after { content: "running"; }
.flow li[data-state="done"] { border-color: var(--on-ultra); color: var(--on-ultra); }
.flow li[data-state="done"]::after { content: "done"; color: var(--on-ultra-muted); }

.loop {
  position: absolute;
  left: 11rem;
  width: 1.6rem;
  border: 1.5px dashed var(--on-ultra-faint);
  border-left: 0;
  border-radius: 0 0.7rem 0.7rem 0;
  pointer-events: none;
  transition: border-color 0.2s;
}
.loop.active { border-style: solid; border-color: var(--marker); }

.graph-note { margin-top: 1.5rem; font-size: 0.875rem; line-height: 1.5; color: var(--on-ultra-muted); max-width: 15rem; }

/* ---------- Exhibits ---------- */

.desk {
  position: relative;
  background-color: var(--desk);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.desk-head h2 {
  font: 800 clamp(2.5rem, 8vw, 6rem)/0.95 var(--display);
  letter-spacing: -0.045em;
}
.desk-head p { margin-top: 1rem; font: 400 1.35rem/1.4 var(--serif); font-style: italic; color: var(--ink-2); max-width: 36ch; }

/* Timeline ruler */
.ruler {
  list-style: none;
  position: relative;
  height: 7.5rem;
  margin: 3rem 0 3.5rem;
  padding: 0;
  font: 400 0.8125rem/1.3 var(--mono);
  color: var(--ink-2);
}
.ruler::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
  opacity: 0.35;
}
.ruler li {
  position: absolute;
  left: var(--at);
  bottom: calc(50% + 0.9rem);
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.ruler li.low { bottom: auto; top: calc(50% + 0.9rem); }
.ruler li::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.9rem;
  width: 10px;
  height: 10px;
  margin: 0 0 -5px -5px;
  border-radius: 50%;
  background: var(--desk);
  box-shadow: inset 0 0 0 2.5px var(--ink);
}
.ruler li.low::after { bottom: auto; top: -0.9rem; margin: -5px 0 0 -5px; }
.ruler li.now::after { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--marker); box-shadow: 0 0 0 0 rgba(182, 255, 59, 0.6); animation: beacon 2.4s ease-out infinite; }
:root[data-theme="white"] .ruler li.now::after { box-shadow: inset 0 0 0 2px #2C2D28; animation: none; }
.ruler li.now .tick-year { color: var(--desk-note); }
.ruler li.now:not(.low)::after { margin: 0 0 -6px -6px; }
.tick-year { display: block; font-weight: 500; color: var(--ink); }
.ruler li:first-child { transform: none; text-align: left; }
.ruler li:first-child::after { left: 5px; }
.ruler li:last-child { transform: translateX(-100%); text-align: right; }
.ruler li:last-child::after { left: calc(100% - 5px); }

/* Exhibit grid */
.exhibits { display: block; }
.ex { position: relative; scroll-margin-top: 2rem; }
/* Exhibits come in chapters; inside each, two columns stack on their own so short cards leave no holes */
.chapter + .chapter { margin-top: clamp(4rem, 8vw, 6.5rem); }
.chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  padding-bottom: 1rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
  border-bottom: 2px solid var(--ink);
}
.chapter-head h3 { font: 800 clamp(1.6rem, 3.4vw, 2.6rem)/1 var(--display); letter-spacing: -0.04em; }
.chapter-head p { font: 400 1.15rem/1.3 var(--serif); font-style: italic; color: var(--ink-2); }
.chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}
@media (min-width: 861px) { :is(section[aria-labelledby="ch-shipped"], section[aria-labelledby="ch-building"]) .chapter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.chapter-grid > .col { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3.25rem); min-width: 0; }
/* The last card in each column stretches, so a pair of cards ends on the same line;
   its links sit on the bottom edge so the extra room reads as intended */
.chapter-grid > .col > .ex:last-child { flex: 1; display: flex; flex-direction: column; }
.chapter-grid > .col > .ex:last-child > .ex-links { margin-top: auto; padding-top: 1.1rem; }
/* A full-width card under the pair: demo on the left, the story on the right */
.chapter-wide { margin-top: clamp(2rem, 4vw, 3.25rem); display: grid; gap: clamp(2rem, 4vw, 3.25rem); }
.chapter-wide .ex { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; align-content: start; }
.chapter-wide .ex > * { grid-column: 2; }
.chapter-wide .ex > :is(.shop, .briefing, .seal) { grid-column: 1; grid-row: 1 / span 8; }
.chapter-wide .ex > .placard { margin-top: 0.25rem; }
.chapter-wide .ex-bennett { grid-template-columns: auto minmax(0, 1fr); align-items: center; text-align: left; padding: 1.5rem 0; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.chapter-wide .ex-bennett .seal { width: 9rem; }
.chapter-wide .ex-bennett .ex-text { margin-top: 0; max-width: 34rem; }
@media (max-width: 860px) {
  .chapter-wide .ex, .chapter-wide .ex-bennett { grid-template-columns: minmax(0, 1fr); }
  .chapter-wide .ex > * , .chapter-wide .ex > :is(.shop, .briefing, .seal) { grid-column: 1; grid-row: auto; }
  .chapter-wide .ex > .placard { order: -1; }
}

.ex.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 6px var(--marker); } 100% { box-shadow: 0 0 0 6px transparent; } }

.placard { margin-bottom: 1.25rem; }
.placard h3 { font: 700 1.125rem/1.2 var(--display); letter-spacing: -0.02em; }
.placard p { margin-top: 0.3rem; font: 400 0.8125rem/1.3 var(--mono); opacity: 0.75; }

.ex-text { margin-top: 1.25rem; max-width: 42rem; }
.ex-stack { margin-top: 0.75rem; font: 400 0.8125rem/1.5 var(--mono); opacity: 0.7; }

.btn-ink, .btn-line {
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font: 600 0.9rem/1 var(--text);
  cursor: pointer;
}
.btn-ink { border: 0; background: var(--marker-ink); color: #fff; }
.btn-ink:hover { background: var(--ultra); }
.btn-line { border: 1.5px solid currentColor; background: transparent; }
.btn-line:hover { background: var(--marker); color: var(--marker-ink); border-color: var(--marker); }

.stamp {
  position: absolute;
  font: 800 1.1rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--ultra);
  border: 3px solid currentColor;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* Krishi: herbarium sheet */
.ex-krishi {
  background: #EDF1E2;
  color: #1E2A16;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 4px;
  box-shadow: var(--paper-shadow);
}
.specimen { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; }
.leaf-wrap { position: relative; background: #F7F8F0; border: 1px solid #CBD5B4; padding: 1rem 1rem 0.75rem; }
.leaf-stage { position: relative; overflow: hidden; }
.leaf { display: block; width: 100%; max-width: 13rem; margin-inline: auto; }
.leaf-photo { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.leaf-photo[hidden], .leaf[hidden] { display: none; }
.scanbar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #B6FF3B; box-shadow: 0 0 12px 2px #B6FF3B; opacity: 0; }
.scanning .scanbar { animation: scan 1.3s ease-in-out; }
@keyframes scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.krishi-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.upload { display: inline-flex; align-items: center; color: #1E2A16; }
.upload:focus-within { outline: 2px solid var(--ultra); outline-offset: 3px; }
.upload-note { margin-top: 0.75rem; font: 400 0.8125rem/1.4 var(--mono); color: #5B6A4C; }
.leaf-body { fill: var(--leaf, #4E7A3A); transition: fill 0.4s ease; }
.leaf-veins { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 2; stroke-linecap: round; }
.spots circle { fill: var(--spot, #5A3B1E); opacity: 0.85; }
.specimen-label { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px solid #CBD5B4; display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font: 400 0.95rem/1.3 var(--serif); }
.latin { font-style: italic; }
.sample { color: #5B6A4C; }

.votes-title { font: 500 0.8125rem/1 var(--mono); color: #5B6A4C; }
.vote-list { list-style: none; padding: 0; margin-top: 0.75rem; display: grid; gap: 0.45rem; }
.vote-list li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 2.6rem; gap: 0.5rem; align-items: center; font: 400 0.8125rem/1.25 var(--mono); }
.vote-list li[hidden] { display: none; }
.vote-list .who { color: #5B6A4C; }
.vote-list .label { font-family: var(--serif); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vote-list .dissent .label { text-decoration: line-through; color: #8A957C; }
.vote-list .conf { text-align: right; }
.verdict { margin: 1rem 0 1.1rem; padding: 0.75rem 0.9rem; background: #1E2A16; color: #F2F5E8; border-radius: 3px; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.verdict span { font: 400 0.8125rem/1 var(--mono); opacity: 0.75; }
.verdict strong { font: 600 1.25rem/1.1 var(--serif); }
.ex-krishi .btn-ink { background: #1E2A16; }
.ex-krishi .btn-ink:hover { background: #3C5A28; }

.accuracy { margin-top: 1.5rem; display: grid; gap: 0.5rem; }
.acc-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 4rem; gap: 0.75rem; align-items: center; font: 400 0.8125rem/1 var(--mono); }
.acc-bar { height: 0.7rem; background: rgba(30, 42, 22, 0.1); border-radius: 2px; overflow: hidden; }
.acc-bar i { display: block; height: 100%; width: var(--v); background: #3C5A28; }
.acc-row:last-of-type .acc-bar i { background: #1E2A16; }
.acc-row b { font-weight: 500; text-align: right; }
.acc-axis { font: 400 0.75rem/1 var(--mono); color: #5B6A4C; padding-left: 7.25rem; }

.scribble-krishi { right: 1rem; top: -2.3rem; transform: rotate(-3deg); max-width: none; white-space: nowrap; }

/* Papers: stacked printed sheets */
.ex-papers { padding-top: 0.5rem; }
.paper-stack { position: relative; height: 25rem; margin: 0.5rem 0 1.25rem; }
.sheet {
  position: absolute;
  inset: 0 1.5rem 1.5rem 0;
  background: #FFFFFF;
  color: #1A1A1A;
  padding: 2rem 1.75rem;
  box-shadow: var(--paper-shadow);
  font-family: var(--serif);
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), z-index 0s 0.2s;
  overflow: hidden;
}
.sheet[data-order="0"] { transform: rotate(-2deg); z-index: 2; }
.sheet[data-order="1"] { transform: translate(1.5rem, 1.25rem) rotate(3deg); z-index: 1; }
.sheet[data-order="2"] { transform: translate(-1.25rem, 2.25rem) rotate(-4deg); z-index: 0; }
.venue { font: 400 0.85rem/1.3 var(--serif); font-style: italic; color: #555; text-align: center; }
.sheet h4 { margin-top: 1.1rem; font: 600 1.35rem/1.25 var(--serif); text-align: center; text-wrap: balance; }
.authors { margin-top: 0.75rem; text-align: center; font-size: 0.95rem; }
.abstract { margin-top: 1.25rem; font-size: 0.95rem; line-height: 1.5; text-align: justify; hyphens: auto; }
.sheet .stamp { right: 1.25rem; bottom: 1.5rem; }
.ex-papers .btn-line { color: var(--ink); }

/* Arcflip: scoring console */
.ex-arcflip {
  background: #0B0B0A;
  color: #F3F4F2;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 16px;
  box-shadow: var(--paper-shadow);
}
.ranker { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 1.75rem; align-items: start; }
.weights { display: grid; gap: 1rem; }
.weight label { display: flex; justify-content: space-between; font: 400 0.8125rem/1 var(--mono); color: #CACCC5; }
.weight output { color: #B6FF3B; }
.weight input { width: 100%; margin-top: 0.5rem; accent-color: #B6FF3B; }
.ranking { list-style: none; padding: 0; display: grid; gap: 0.4rem; position: relative; }
.ranking li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) 2.4rem;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}
.ranking li:first-child { background: rgba(182, 255, 59, 0.14); }
.ranking .rank { font: 500 0.8125rem/1 var(--mono); color: #CACCC5; }
.ranking .score { font: 500 0.875rem/1 var(--mono); text-align: right; color: #B6FF3B; }
.ranking .meter { position: absolute; left: 0; bottom: 0; height: 2px; background: #B6FF3B; opacity: 0.6; transition: width 0.3s ease; }
.ex-arcflip .ex-text { color: #DDDEDA; }
.scribble-arcflip { left: -0.5rem; top: -2.6rem; transform: rotate(-6deg); }

/* InboxKit: ticket */
.ticket {
  position: relative;
  background: #FFFFFF;
  color: #0D0E0C;
  padding: 1.5rem 1.5rem 1.25rem;
  font: 400 0.875rem/1.45 var(--mono);
  box-shadow: var(--paper-shadow);
  border-radius: 4px;
  -webkit-mask: radial-gradient(circle at 0 6.2rem, transparent 0.6rem, #000 0.62rem) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 6.2rem, transparent 0.6rem, #000 0.62rem) right / 51% 100% no-repeat;
          mask: radial-gradient(circle at 0 6.2rem, transparent 0.6rem, #000 0.62rem) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 6.2rem, transparent 0.6rem, #000 0.62rem) right / 51% 100% no-repeat;
}
.t-head { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: #232420; font-size: 0.8125rem; }
.t-clock { margin-left: auto; color: #0D0E0C; font-variant-numeric: tabular-nums; }
.t-state { color: #B45A00; font-weight: 500; }
.t-steps li { transition: opacity 0.35s ease, transform 0.35s ease; }
.t-steps li.pending { opacity: 0; transform: translateY(6px); }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ticket .btn-line { color: #0D0E0C; }
.ticket.closed .t-state { color: #1E7A3A; }
.t-title { margin-top: 0.9rem; padding-bottom: 1.1rem; border-bottom: 2px dashed #E2E3DF; font: 600 1.15rem/1.35 var(--text); }
.t-steps { list-style: none; padding: 0; margin: 1rem 0 1.25rem; display: grid; gap: 0.7rem; }
.t-steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 0.75rem; }
.t-steps time { color: #232420; grid-row: span 2; }
.lane { display: inline-block; justify-self: start; font-size: 0.75rem; padding: 0.05rem 0.45rem; border-radius: 4px; background: #F4F4F3; color: #2C2E28; margin-bottom: 0.15rem; }
.stamp-resolved { right: 1.25rem; bottom: 4.5rem; color: #1E7A3A; opacity: 0; transform: rotate(-12deg) scale(1.6); transition: opacity 0.25s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.ticket.closed .stamp-resolved { opacity: 0.85; transform: rotate(-12deg) scale(1); }
.scribble-inboxkit { right: 0.5rem; top: -1.9rem; transform: rotate(4deg); }

/* TalentScout: chat */
.ex-talentscout {
  background: #F2F2F1;
  color: #0D0E0C;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 28px;
  box-shadow: var(--paper-shadow);
}
.chat { background: #FFFFFF; border-radius: 18px; padding: 1rem; }
.chat-log { display: flex; flex-direction: column; gap: 0.55rem; min-height: 7rem; max-height: 16rem; overflow-y: auto; padding-bottom: 0.25rem; }
.msg { max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 16px; font-size: 0.95rem; line-height: 1.4; }
.msg.bot { align-self: flex-start; background: #F4F4F3; border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: #2C2E28; color: #fff; border-bottom-right-radius: 4px; }
.msg.typing { color: #232420; font-family: var(--mono); font-size: 0.8125rem; }
.chat-pick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #F4F4F3; }
.chat-pick button { border: 1.5px solid #E0E1DE; background: transparent; border-radius: 999px; padding: 0.4rem 0.8rem; font-size: 0.875rem; cursor: pointer; }
.chat-pick button:hover { border-color: #2C2E28; color: #2C2E28; }

/* RedditMind: briefing */
.ex-redditmind {
  background: #FFE2D3;
  color: #2A140A;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 6px;
  box-shadow: var(--paper-shadow);
}
.briefing { position: relative; background: #FFFBF8; padding: 1.25rem 1.25rem 1rem; border-top: 6px solid #FF4500; }
.b-date { font: 700 1.1rem/1.2 var(--display); letter-spacing: -0.02em; }
.briefing ol { list-style: none; padding: 0; margin-top: 0.9rem; counter-reset: b; }
.briefing li { padding: 0.75rem 0; border-top: 1px solid #F3D9CC; }
.b-sub { font: 500 0.75rem/1 var(--mono); color: #C23A00; }
.briefing h4 { margin-top: 0.35rem; font: 600 1rem/1.3 var(--text); }
.b-why { margin-top: 0.25rem; font: 400 0.95rem/1.35 var(--serif); font-style: italic; color: #6B4A3A; }
.b-foot { font: 400 0.75rem/1.4 var(--mono); color: #8A6A5A; padding-top: 0.6rem; border-top: 1px solid #F3D9CC; }
.sticker {
  position: absolute;
  right: -0.9rem;
  top: -1.2rem;
  background: var(--marker);
  color: var(--marker-ink);
  font: 700 1.35rem/1 var(--hand);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transform: rotate(7deg);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.35);
}

/* Assistant */
.ex-assistant {
  background: var(--ultra);
  color: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 20px;
  box-shadow: var(--paper-shadow);
}
.used { font: 800 clamp(1.5rem, 3.4vw, 2.5rem)/1.05 var(--display); letter-spacing: -0.035em; max-width: 16ch; }
.ex-assistant .ex-text { color: #EBEBE9; }
.ex-assistant .btn-ink { margin-top: 1.25rem; background: var(--marker); color: var(--marker-ink); }
.ex-assistant .btn-ink:hover { background: #CFFF7A; }

/* Bennett seal */
.ex-bennett { text-align: center; }
.seal { width: min(14rem, 100%); color: var(--ultra); transform: rotate(-8deg); }
.seal-edge { fill: none; stroke: currentColor; stroke-width: 3; stroke-dasharray: 2 4; }
.seal-inner { fill: none; stroke: currentColor; stroke-width: 2; }
.seal-ring { font: 500 12.5px var(--mono); fill: currentColor; letter-spacing: 0.04em; }
.seal-num { font: 800 34px var(--display); fill: currentColor; text-anchor: middle; dominant-baseline: middle; letter-spacing: -1px; }
.seal-cap { font: 500 12px var(--mono); fill: currentColor; text-anchor: middle; }
.ex-bennett .ex-text { margin-top: 0.75rem; font-family: var(--serif); font-size: 1.05rem; color: var(--ink-2); }
.seal { color: var(--seal); }

/* Handwritten notes on the desk */
.scribble:not(.scribble-ask) { color: var(--desk-note); }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 100% 100%, var(--shade), transparent 70%),
    var(--ultra);
  color: var(--on-ultra);
  padding-block: clamp(4rem, 10vw, 7rem) 2.5rem;
}
.contact > :not(.field) { position: relative; z-index: 1; }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.contact h2 { font: 800 clamp(2.5rem, 7vw, 5.5rem)/0.95 var(--display); letter-spacing: -0.045em; }
.contact-sub { margin-top: 1rem; font: 400 1.35rem/1.4 var(--serif); font-style: italic; color: var(--on-ultra-muted); }
.mail {
  margin-top: 1.75rem;
  border: 0;
  background: var(--marker);
  color: var(--marker-ink);
  padding: 0.25em 0.5em;
  border-radius: 0.3em;
  font: 700 clamp(1rem, 2vw, 1.5rem)/1.2 var(--display);
  letter-spacing: -0.02em;
  cursor: copy;
  white-space: nowrap;
  overflow-wrap: anywhere;
  text-align: left;
}
.mail:hover { background: #CFFF7A; }
.copy-status { min-height: 1.5em; margin-top: 0.6rem; font: 400 0.875rem/1.5 var(--mono); color: var(--on-ultra-muted); }

.note { background: var(--wash); backdrop-filter: blur(6px); border: 1.5px solid var(--on-ultra-faint); border-radius: 18px; padding: 1.25rem; }
.note label { font: 700 1.6rem/1 var(--hand); color: var(--hero-note); }
.note textarea {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border: 0;
  border-bottom: 1.5px solid var(--on-ultra-faint);
  background: transparent;
  color: var(--on-ultra);
  font: 400 1.05rem/1.5 var(--text);
  resize: vertical;
  padding: 0 0 0.5rem;
}
.note textarea::placeholder { color: var(--on-ultra-muted); opacity: 0.7; }
.note textarea:focus { outline: none; border-bottom-color: var(--marker); }
.note button { margin-top: 1rem; border: 0; border-radius: 999px; padding: 0.65rem 1.1rem; background: var(--on-ultra); color: var(--ultra); font: 600 0.95rem/1 var(--text); cursor: pointer; }
.note button:hover { background: var(--marker); color: var(--marker-ink); }

.contact .fine { margin-top: 4rem; font: 400 0.8125rem/1.5 var(--mono); color: var(--on-ultra-muted); }

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  background: transparent;
  color: var(--on-ultra);
  font: 600 0.95rem/1 var(--text);
  cursor: pointer;
}
.btn-resume::before { content: ""; width: 0.9rem; height: 0.7rem; border: 2px solid currentColor; border-radius: 2px; box-shadow: inset 0 -3px 0 currentColor; }
.btn-resume:hover { background: var(--marker); color: var(--marker-ink); border-color: var(--marker); }

.assumed { margin-bottom: 0.75rem; font: 400 0.875rem/1.4 var(--mono); color: var(--on-ultra-muted); text-shadow: none; }
.assumed b { font-weight: 500; color: var(--on-ultra); }

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

/* Background behind the exhibits, pinned to the viewport while you scroll */
.desk-field { position: sticky; top: 0; inset: auto; display: block; height: 100vh; margin-bottom: -100vh; }
.desk > .wrap { position: relative; z-index: 1; }

/* ---------- Command palette ---------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 1rem 1rem;
  background: rgba(12, 13, 11, 0.5);
  backdrop-filter: blur(4px);
}
.palette[hidden] { display: none; }
.palette-box {
  --pal-bg: #10100F;
  --pal-ink: #F7F7F6;
  --pal-rule: #191A17;
  --pal-muted: #C9CBC4;
  width: min(40rem, 100%);
  background: var(--pal-bg);
  color: var(--pal-ink);
  border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
:root[data-theme="white"] .palette-box { --pal-bg: #FFFFFF; --pal-ink: #161614; --pal-rule: #EFEFEE; --pal-muted: #2E302A; }
.palette-input { width: 100%; border: 0; border-bottom: 1px solid var(--pal-rule); padding: 1.1rem 1.25rem; background: transparent; color: inherit; font: 500 1.15rem/1.3 var(--text); }
.palette-input:focus { outline: none; }
.palette-input::placeholder { color: var(--pal-muted); }
.palette-list { list-style: none; margin: 0; padding: 0.5rem; max-height: 55vh; overflow-y: auto; }
.palette-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0.85rem; border-radius: 10px; cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--ultra); color: #FFFFFF; }
.palette-list .group { flex: none; font: 400 0.75rem/1 var(--mono); opacity: 0.7; }
.palette-list .none { color: var(--pal-muted); cursor: default; }
.palette-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0.7rem 1.25rem; border-top: 1px solid var(--pal-rule); font: 400 0.75rem/1.4 var(--mono); color: var(--pal-muted); }

/* ---------- Terminal ---------- */

.terminal { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(8, 8, 7, 0.6); backdrop-filter: blur(4px); }
.terminal[hidden] { display: none; }
.term-window {
  width: min(52rem, 100%);
  height: min(34rem, 85vh);
  display: flex;
  flex-direction: column;
  background: #090908;
  color: #F3F4F2;
  border: 1px solid #191A17;
  border-radius: 12px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(182, 255, 59, 0.05);
  font: 400 0.9rem/1.55 var(--mono);
  overflow: hidden;
  animation: rise 0.18s ease-out;
}
.term-bar { display: flex; align-items: center; gap: 1rem; padding: 0.55rem 0.9rem; background: #0E0E0D; color: #CACCC5; font-size: 0.8rem; }
.term-dots { display: inline-flex; gap: 0.4rem; }
.term-dots i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #FF5F57; }
.term-dots i:nth-child(2) { background: #FEBC2E; }
.term-dots i:nth-child(3) { background: #28C840; }
.term-close { margin-left: auto; border: 1px solid #1F201D; border-radius: 6px; padding: 0.2rem 0.6rem; background: transparent; color: #E3E4E1; font: inherit; cursor: pointer; }
.term-close:hover { border-color: #E3E4E1; }
.term-out { flex: 1; overflow-y: auto; padding: 1rem 1.1rem 0.25rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out .cmd { color: #B6FF3B; }
.term-out .err { color: #FF9C94; }
.term-out .dim { color: #AEB1A6; }
.term-out .art { color: #C9CAC4; line-height: 1.2; }
.term-line { display: flex; gap: 0.6rem; padding: 0.25rem 1.1rem 1rem; }
.prompt { flex: none; color: #C9CAC4; }
.term-line input { flex: 1; min-width: 0; border: 0; background: transparent; color: #FFFFFF; font: inherit; caret-color: #B6FF3B; }
.term-line input:focus { outline: none; }

/* ---------- Résumé printer ---------- */

.printer-stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12vh;
  overflow: hidden;
  background: rgba(12, 13, 11, 0.6);
  backdrop-filter: blur(6px);
}
.printer-stage[hidden] { display: none; }
.printer { position: relative; z-index: 2; width: 22rem; max-width: 86vw; }
.printer-body {
  height: 4.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.2rem;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(#1C1D1A, #11110F);
  color: #E3E4E1;
  font: 500 0.8rem/1 var(--mono);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.led { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #B6FF3B; box-shadow: 0 0 10px #B6FF3B; }
.printing .led { animation: pulse 0.25s ease-in-out infinite alternate; }
.slot { height: 0.6rem; margin: 0 1.2rem; border-radius: 0 0 6px 6px; background: #080807; }
/* The sheet slides down out of the slot; the wrapper hides it until then. */
.printout { position: relative; z-index: 1; width: 18rem; max-width: 74vw; margin-top: -0.3rem; overflow: hidden; }
.printout-sheet {
  position: relative;
  min-height: 21rem;
  padding: 1.2rem 1.2rem 1.5rem;
  background: #FFFFFF;
  color: #0D0E0C;
  transform: translateY(-100%);
}
.po-name { font: 800 1.05rem/1.2 var(--display); letter-spacing: -0.02em; }
.po-role { margin-top: 0.2rem; font: italic 400 1rem/1.3 var(--serif); color: #232420; }
.po-line { margin-top: 0.7rem; padding-bottom: 0.55rem; border-bottom: 1px dashed #E2E3DF; font: 400 0.8rem/1.3 var(--mono); }
.stamp-print { right: 1rem; bottom: 1.3rem; opacity: 0; }
.plane { position: absolute; z-index: 3; left: 50%; top: 42%; width: 6rem; margin-left: -3rem; opacity: 0; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.35)); }
.plane-wing { fill: #FFFFFF; stroke: #0D0E0C; stroke-width: 1.5; stroke-linejoin: round; }
.plane-fold { fill: #F2F2F1; stroke: #0D0E0C; stroke-width: 1.5; stroke-linejoin: round; }
.printer-skip { position: absolute; bottom: 1.5rem; font: 400 0.8rem/1 var(--mono); color: #E3E4E1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 60;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #0D0E0C;
  color: #FFFFFF;
  font: 500 0.9rem/1.3 var(--text);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 200%);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .chapter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .bar nav { margin-left: 0; }
  .bar-tools { margin-left: auto; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
  .graph { order: -1; padding-top: 0; }
  .graph-title, .graph-note, .loop, .scribble-ask { display: none; }
  .flow { width: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .flow li { padding: 0.4rem 0.65rem; font-size: 0.8125rem; border-radius: 999px; }
  .flow li + li::before, .flow li::after { display: none; }

  .chapter-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-inner { grid-template-columns: minmax(0, 1fr); }

  .ruler { height: auto; margin: 2rem 0 2.5rem; padding-left: 1.25rem; border-left: 2px solid var(--ink); display: grid; gap: 0.75rem; }
  .ruler::before { display: none; }
  .ruler li, .ruler li.low, .ruler li:first-child, .ruler li:last-child { position: relative; left: auto; top: auto; bottom: auto; transform: none; text-align: left; white-space: normal; }
  .ruler li::after, .ruler li.low::after, .ruler li:first-child::after, .ruler li:last-child::after { left: -1.25rem; top: 0.35rem; bottom: auto; margin: 0 0 0 -6px; }
  .tick-year { display: inline; margin-right: 0.5rem; }
}

@media (max-width: 600px) {
  .specimen, .ranker { grid-template-columns: minmax(0, 1fr); }
  .paper-stack { height: 27rem; }
  .sheet { padding: 1.5rem 1.25rem; }
  .ask textarea { padding-right: 0; }
  .ask button { position: static; margin-top: 0.85rem; }
  .scribble-krishi { display: none; }
  .mail { white-space: normal; }
  .scribble-arcflip, .scribble-inboxkit { top: -2.1rem; }
  .sticker { right: -0.25rem; }
}

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




/* ---------- Stamp: airmail envelope with a live postmark ---------- */
.ex-stamp {
  background: #FFCC00;
  color: #111111;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 10px;
  box-shadow: var(--paper-shadow);
}
.envelope {
  position: relative;
  background: #FFFFFF;
  padding: 1.75rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
  border-radius: 4px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.45);
}
.envelope::before, .envelope::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  background: repeating-linear-gradient(-45deg, #D92B2B 0 12px, #FFFFFF 12px 20px, #2347C9 20px 32px, #FFFFFF 32px 40px);
}
.envelope::before { top: 0; border-radius: 4px 4px 0 0; }
.envelope::after { bottom: 0; border-radius: 0 0 4px 4px; }
.stamp-form { display: flex; gap: 0.5rem; max-width: 24rem; padding: 0.3rem; border: 2.5px solid #111111; border-radius: 12px; background: #FFFFFF; }
.stamp-form input { flex: 1; min-width: 0; border: 0; padding: 0.45rem 0.6rem; font: 600 1rem/1.2 var(--text); color: #111111; background: transparent; }
.stamp-form input:focus { outline: none; }
.stamp-form:focus-within { box-shadow: 0 0 0 3px #FFCC00; }
.ex-stamp .btn-ink { background: #111111; border-radius: 8px; }
.ex-stamp .btn-ink:hover { background: #333333; }
.stamp-try { margin-top: 0.6rem; font-size: 0.8125rem; color: #555555; }
.stamp-try button { border: 0; background: none; padding: 0 0.15rem; font: inherit; font-weight: 600; color: #111111; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.stamp-rows { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.5rem; max-width: min(22rem, calc(100% - 8.5rem)); }
.stamp-rows li { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: 0.15rem 0.75rem; padding: 0.55rem 0; border-top: 1.5px dashed #D9D9D9; font-size: 0.875rem; }
.stamp-rows span { font: 700 0.8125rem/1.4 var(--mono); }
.stamp-rows em { font-style: normal; color: #555555; }
.stamp-rows li[data-state="pass"] span::after { content: " ✓"; color: #1E7A3A; }
.stamp-rows li[data-state="warn"] span::after { content: " !"; color: #B45A00; }
.stamp-rows li[data-state="fail"] span::after { content: " ✗"; color: #C62828; }
.stamp-rows li[data-state="pass"] em, .stamp-rows li[data-state="warn"] em, .stamp-rows li[data-state="fail"] em { color: #111111; font-family: var(--mono); font-size: 0.78rem; overflow-wrap: anywhere; }
.stamp-rows li.loading em { opacity: 0.45; }
.postmark {
  position: absolute;
  right: clamp(0.75rem, 3vw, 1.75rem);
  top: 6.25rem;
  width: clamp(6.5rem, 18vw, 8.5rem);
  color: #1E7A3A;
  transform: rotate(-14deg);
  mix-blend-mode: multiply;
  opacity: 0.25;
  transition: color 0.2s;
}
.postmark[data-grade="?"] { color: #8A8A8A; }
.postmark[data-grade="C"], .postmark[data-grade="D"] { color: #B45A00; }
.postmark[data-grade="F"] { color: #C62828; }
.postmark.thump { animation: thump 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes thump { 0% { transform: rotate(-14deg) scale(1.9); opacity: 0; } 60% { opacity: 0.95; } 100% { transform: rotate(-14deg) scale(1); opacity: 0.9; } }
.pm-ring { font: 700 9px var(--mono); letter-spacing: 1.5px; fill: currentColor; }
.pm-grade { font: 800 34px var(--display); fill: currentColor; text-anchor: middle; dominant-baseline: middle; }
.stamp-more { margin-top: 1rem; font-size: 0.875rem; color: #333333; }
.stamp-more a { font-weight: 700; color: #111111; }
.ex-stamp .ex-code { color: #111111; }

/* ---------- Clypso: sample outputs streaming in ---------- */
.ex-clypso {
  background: #080807;
  color: #EFEFED;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 22px;
  box-shadow: var(--paper-shadow);
}
.clyp { border: 1px solid #10100E; border-radius: 16px; padding: 0.9rem; background: #0B0B0A; }
.clyp-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.clyp-tabs button { border: 0; border-radius: 999px; padding: 0.4rem 0.65rem; background: transparent; color: #A9A5B8; font: 500 0.8125rem/1 var(--text); cursor: pointer; }
.clyp-tabs button[aria-selected="true"] { background: #11110F; color: #FFFFFF; }
.clyp-video { display: flex; align-items: center; gap: 0.7rem; margin: 0.9rem 0 0.75rem; padding: 0.8rem; border-radius: 12px; background: linear-gradient(120deg, #0F0F0D, #0B0C0A 60%, #3A2A1E); font: 400 1.15rem/1.25 var(--serif); font-style: italic; }
.clyp-play { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #FFFFFF; position: relative; }
.clyp-play::after { content: ""; position: absolute; left: 0.72rem; top: 0.55rem; border-left: 0.6rem solid #080807; border-top: 0.4rem solid transparent; border-bottom: 0.4rem solid transparent; }
.clyp-out { display: grid; gap: 0.5rem; min-height: 11rem; }
.clyp-card { padding: 0.65rem 0.75rem; border-radius: 10px; background: #0D0E0C; border-top: 2px solid var(--c); font-size: 0.875rem; line-height: 1.45; animation: clyp-in 0.4s ease-out both; }
.clyp-card h4 { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.25rem; font: 600 0.78rem/1 var(--text); color: #FFFFFF; }
.clyp-card h4::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--c); }
.clyp-card ul { margin: 0; padding-left: 1rem; }
.clyp-card .mono { font-family: var(--mono); font-size: 0.78rem; color: #A9A5B8; }
@keyframes clyp-in { from { opacity: 0; transform: translateY(6px); } }
.clyp-note { margin-top: 0.9rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: rgba(182, 255, 59, 0.12); border: 1px solid rgba(182, 255, 59, 0.35); color: #FFE9A3; font-size: 0.8125rem; line-height: 1.45; }

/* ---------- Treadle: enamel pedal, run lamp and paper tape ---------- */
.ex-treadle {
  background: #16241D;
  color: #E7E6D8;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 4px;
  box-shadow: var(--paper-shadow);
}
.floor { display: grid; justify-items: center; gap: 0.8rem; padding: 1.25rem 0.5rem 0.9rem; border-radius: 4px; background: radial-gradient(70% 60% at 60% 30%, #2C4537, #16241D 80%); }
.pedal {
  position: relative;
  width: 8.5rem;
  height: 10.5rem;
  border: 0;
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(180deg, #4C6E5B, #3D5A4A 40%, #2F4739);
  box-shadow: 0 2px 0 #5E8470 inset, 0 16px 0 -4px #213328, 0 26px 30px -10px rgba(0, 0, 0, 0.7);
  transform: perspective(500px) rotateX(18deg);
  transition: transform 0.09s ease-out, box-shadow 0.09s;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.pedal[aria-pressed="true"] { transform: perspective(500px) rotateX(30deg) translateY(6px); box-shadow: 0 2px 0 #5E8470 inset, 0 6px 0 -4px #213328, 0 12px 16px -8px rgba(0, 0, 0, 0.7); transition-duration: 0.16s; }
.pedal-lamp { position: absolute; left: 1rem; top: 0.9rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: #5A2A1A; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35); transition: background 0.16s, box-shadow 0.16s; }
.pedal[aria-pressed="true"] .pedal-lamp { background: #FF5A1F; box-shadow: 0 0 14px 4px rgba(255, 90, 31, 0.6); transition-duration: 0.09s; }
.pedal-plate { position: absolute; right: 0.8rem; top: 0.75rem; padding: 0.15rem 0.4rem; background: #E7E6D8; color: #14201A; font: 600 0.6rem/1.2 var(--mono); border-radius: 2px; }
.pedal-grip { position: absolute; left: 1rem; right: 1rem; top: 3rem; bottom: 1.4rem; background: repeating-linear-gradient(180deg, #0F1311 0 0.7rem, transparent 0.7rem 1.35rem); border-radius: 3px; opacity: 0.9; }
.floor-state { font-size: 0.875rem; text-align: center; min-height: 2.6em; }
.tape { list-style: none; margin: 0; padding: 0.7rem 0.85rem 1rem; width: min(100%, 22rem); min-height: 6.25rem; max-height: 6.25rem; overflow: hidden; background: #E7E6D8; color: #14201A; font: 400 0.75rem/1.5 var(--mono); display: flex; flex-direction: column; justify-content: flex-end; -webkit-mask: linear-gradient(transparent, #000 35%); mask: linear-gradient(transparent, #000 35%); clip-path: polygon(0 0, 100% 0, 100% 92%, 95% 100%, 90% 92%, 85% 100%, 80% 92%, 75% 100%, 70% 92%, 65% 100%, 60% 92%, 55% 100%, 50% 92%, 45% 100%, 40% 92%, 35% 100%, 30% 92%, 25% 100%, 20% 92%, 15% 100%, 10% 92%, 5% 100%, 0 92%); }
.ex-treadle .ex-code { color: #E7E6D8; }

/* ---------- RealCheck: a product page and its grade ---------- */
.ex-realcheck {
  background: #E9F3EC;
  color: #14251A;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 18px;
  box-shadow: var(--paper-shadow);
}
.shop { position: relative; background: #FFFFFF; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.45); }
.shop-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.75rem; background: #F1F3F4; border-bottom: 1px solid #E2E5E7; }
.shop-dots { width: 2.6rem; height: 0.6rem; background: radial-gradient(circle, #FF5F57 0.3rem, transparent 0.31rem) 0 / 0.9rem 0.6rem repeat-x; flex: none; }
.shop-url { flex: 1; min-width: 0; padding: 0.25rem 0.6rem; border-radius: 999px; background: #FFFFFF; font: 400 0.75rem/1.3 var(--mono); color: #5F6368; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.5rem 0.2rem 0.25rem; border-radius: 8px; background: #FFFFFF; border: 1px solid #DADCE0; font: 800 0.9rem/1 var(--display); }
.rc-icon { width: 1.25rem; height: 1.25rem; border-radius: 5px; background: #2E7D4F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='5.5'/%3E%3Cpath d='M15 15l4.5 4.5'/%3E%3C/svg%3E") center / 0.9rem no-repeat; }
.rc-badge b { min-width: 0.8em; text-align: center; transition: color 0.3s; }
.rc-badge.graded b { color: #C2410C; animation: flip 0.5s ease-out; }
@keyframes flip { 0% { transform: rotateX(90deg); } 100% { transform: none; } }
.shop-head { padding: 0.9rem 1rem 0.4rem; }
.shop-name { font: 600 1rem/1.3 var(--text); }
.shop-stars { font-size: 0.8125rem; color: #5F6368; }
.shop-stars span { color: #E8A317; letter-spacing: 1px; }
.reviews { list-style: none; margin: 0; padding: 0.25rem 1rem 0.75rem; display: grid; gap: 0.45rem; }
.reviews li { position: relative; padding: 0.55rem 0.7rem; border-radius: 8px; background: #F8F9FA; font-size: 0.8125rem; line-height: 1.45; transition: background 0.3s, box-shadow 0.3s; }
.reviews li b { display: block; font-size: 0.8125rem; }
.rv-meta { display: block; margin-top: 0.1rem; font: 400 0.72rem/1.3 var(--mono); color: #80868B; }
.reviews li.flagged { background: #FFF4E5; box-shadow: inset 3px 0 0 #E8710A; }
.reviews li.flagged::after { content: attr(data-flag); display: inline-block; margin-top: 0.35rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: #E8710A; color: #FFFFFF; font: 600 0.7rem/1.3 var(--text); animation: clyp-in 0.3s ease-out both; }
.reviews li.read-these { box-shadow: inset 3px 0 0 #2E7D4F; background: #EEF7F1; }
.reviews.scanning li { animation: scan 0.9s ease-in-out both; animation-delay: calc(var(--n) * 90ms); }
@keyframes scan { 40% { background: #E6F4EA; } }
.rc-report { margin: 0 1rem 0.75rem; padding: 0.75rem 0.85rem; border-radius: 10px; background: #14251A; color: #E9F3EC; animation: clyp-in 0.35s ease-out both; }
.rc-verdict { display: flex; gap: 0.7rem; align-items: center; font-size: 0.875rem; line-height: 1.4; }
.rc-verdict b { flex: none; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 8px; background: #C2410C; color: #FFFFFF; font: 800 1.2rem/1 var(--display); }
.rc-checks { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.2rem; font: 400 0.75rem/1.4 var(--mono); }
.rc-checks li::before { margin-right: 0.45rem; }
.rc-checks .bad::before { content: "✗"; color: #FDBA74; }
.rc-checks .ok::before { content: "✓"; color: #86EFAC; }
.shop-actions { padding: 0 1rem 1rem; }
.ex-realcheck .btn-ink { background: #2E7D4F; }
.ex-realcheck .btn-ink:hover { background: #246640; }
.rc-note { margin-top: 0.75rem; font: 400 0.75rem/1.4 var(--mono); opacity: 0.75; }

/* ---------- Waystub: a timetable sketch ---------- */
.ex-waystub {
  background: #FFFFFF;
  color: #1A1A1A;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 2px;
  box-shadow: var(--paper-shadow);
  border-top: 6px solid #1A1A1A;
}
.tt-head { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid #1A1A1A; font: 600 0.8125rem/1.3 var(--mono); }
.tt-head span:last-child { font-weight: 400; color: #666666; }
.tt-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tt-day { min-height: 13rem; padding: 0.6rem 0.5rem 0.8rem; border-right: 1px solid #1A1A1A; transition: background 0.2s; }
.tt-day:last-child { border-right: 0; }
.tt-day.over { background: #F4F1E8; }
.tt-day.target { background: #FFF6D6; cursor: pointer; }
.tt-day h4 { display: flex; justify-content: space-between; font: 700 0.8125rem/1.2 var(--display); letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.tt-day h4 span { font: 400 0.72rem/1.2 var(--mono); color: #666666; }
.tt-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.tt-stop {
  position: relative;
  display: grid;
  grid-template-columns: 2.9rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: baseline;
  padding: 0.45rem 0.5rem;
  border: 1px solid #1A1A1A;
  border-radius: 3px;
  background: #FFFFFF;
  font-size: 0.78rem;
  line-height: 1.25;
  cursor: grab;
  -webkit-mask: radial-gradient(circle at 2.85rem 0, transparent 0.25rem, #000 0.26rem) top / 100% 51% no-repeat, radial-gradient(circle at 2.85rem 100%, transparent 0.25rem, #000 0.26rem) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle at 2.85rem 0, transparent 0.25rem, #000 0.26rem) top / 100% 51% no-repeat, radial-gradient(circle at 2.85rem 100%, transparent 0.25rem, #000 0.26rem) bottom / 100% 51% no-repeat;
}
.tt-stop span { min-width: 0; }
.tt-stop time { font: 600 0.78rem/1.25 var(--mono); font-variant-numeric: tabular-nums; border-right: 1px dashed #1A1A1A; padding-right: 0.3rem; }
.tt-stop.closed { background: #FFE9E2; border-color: #C62828; }
.tt-stop.closed::after { content: "Closed today"; grid-column: 2; font: 600 0.68rem/1.2 var(--mono); color: #C62828; }
.tt-stop.picked { outline: 2px solid #2C2D28; outline-offset: 1px; }
.tt-stop.dragging { opacity: 0.4; }
.tt-stop:focus-visible { outline: 2px solid #2C2D28; outline-offset: 2px; }
.tt-end { margin-top: 0.5rem; font: 400 0.72rem/1.3 var(--mono); color: #666666; }
.tt-end.late { color: #B45A00; font-weight: 600; }
.tt-warn { min-height: 1.4em; margin-top: 0.6rem; padding-top: 0.5rem; border-top: 2px solid #1A1A1A; font: 400 0.78rem/1.4 var(--mono); }
.tt-warn.clear { color: #1E7A3A; }

@media (max-width: 600px) {
  .postmark { position: static; display: block; margin: 1rem 0 0 auto; }
  .stamp-rows { max-width: none; }
  .tt-days { grid-template-columns: 1fr; }
  .tt-day { border-right: 0; border-bottom: 1px solid #1A1A1A; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .postmark.thump, .clyp-card, .reviews.scanning li, .rc-badge.graded b, .reviews li.flagged::after { animation: none; }
  .postmark.thump { opacity: 0.9; }
}


/* ---------- Link cards: live sites and code, shown as small cards ---------- */
.ex-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.1rem; }
.link-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.5rem 0.9rem 0.5rem 0.5rem;
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), border-color 0.2s, background 0.2s, box-shadow 0.25s;
}
.link-card:hover, .link-card:focus-visible {
  transform: translateY(-3px);
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 10%, transparent);
  box-shadow: 0 12px 22px -14px rgba(0, 0, 0, 0.5);
}
.lc-icon { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: currentColor; }
.lc-icon .ico { width: 1.25rem; height: 1.25rem; color: #FFFFFF; mix-blend-mode: normal; }
.lc-github .lc-icon { background: #0D1117; }
.lc-text { display: grid; min-width: 0; line-height: 1.2; }
.lc-text b { font: 600 0.9rem/1.2 var(--text); }
.lc-text small { font: 400 0.75rem/1.3 var(--mono); opacity: 0.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.lc-arrow { flex: none; width: 1rem; height: 1rem; opacity: 0.6; transition: transform 0.25s, opacity 0.2s; }
.link-card:hover .lc-arrow { transform: translate(2px, -2px); opacity: 1; }
.link-card:hover .lc-icon .ico { animation: hop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
/* The icon tile is drawn in the card's own text colour, so its glyph needs the opposite */
.ex-clypso .lc-site .lc-icon .ico, .ex-treadle .lc-site .lc-icon .ico, .ex-assistant .lc-site .lc-icon .ico { color: #111111; }
.ex-links .btn-ink { margin: 0; }

/* Education: a quiet centred sign-off under the last chapter */
.edu { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin: clamp(3.5rem, 7vw, 5rem) auto 0; text-align: left; }
.edu-seal { flex: none; width: 6.25rem; height: 6.25rem; color: var(--seal); transform: rotate(-8deg); }
.edu p { display: grid; gap: 0.3rem; }
.edu b { font: 700 1.4rem/1.2 var(--display); letter-spacing: -0.03em; }
.edu span { font: 400 1rem/1.4 var(--mono); color: var(--ink-2); }

/* =========================================================
   v2: sources rack, real contact box, and the motion layer
   ========================================================= */

/* Sources rack: the projects the agent can read; hits light up, reads get ticked */
.rack { margin-top: 1.75rem; width: 15rem; }
.rack .graph-title { margin-bottom: 0.7rem; }
.rack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rack-list li {
  position: relative;
  padding: 0.28rem 0.55rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 999px;
  font: 500 0.72rem/1 var(--mono);
  color: var(--on-ultra-muted);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.rack-list li.hit { background: var(--marker); border-color: var(--marker); color: var(--marker-ink); transform: translateY(-3px) scale(1.06); }
.rack-list li.read { transform: none; }
.rack-list li.read::after { content: "✓"; margin-left: 0.3rem; font-weight: 700; }
.rack-list li.dim { opacity: 0.4; }

/* The real contact box */
.mailbox {
  position: relative;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 22px;
  background: var(--wash);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.mailbox::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  pointer-events: none;
  animation: drift-glow 9s ease-in-out infinite alternate;
}
@keyframes drift-glow { to { transform: translate(-40%, 30%); } }
.mailbox-title { font: 800 1.35rem/1.1 var(--display); letter-spacing: -0.03em; }
.mailbox-sub { margin-top: 0.35rem; font: 400 0.875rem/1.4 var(--mono); color: var(--on-ultra-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; }
.fld { position: relative; display: block; }
.fld-area { margin-top: 0.75rem; }
.fld input, .fld textarea {
  width: 100%;
  padding: 1.35rem 0.9rem 0.55rem;
  border: 1.5px solid var(--on-ultra-faint);
  border-radius: 14px;
  background: var(--ultra);
  color: var(--on-ultra);
  font: 400 1rem/1.4 var(--text);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.fld textarea { min-height: 8rem; }
.fld span {
  position: absolute;
  left: 0.95rem;
  top: 0.95rem;
  font: 400 0.95rem/1 var(--text);
  color: var(--on-ultra-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.25s cubic-bezier(0.3, 1.3, 0.5, 1), color 0.2s;
}
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--on-ultra); box-shadow: 0 0 0 4px var(--glow), 0 0 0 1px var(--marker); }
.fld input:focus + span, .fld textarea:focus + span,
.fld input:not(:placeholder-shown) + span, .fld textarea:not(:placeholder-shown) + span { transform: translateY(-0.55rem) scale(0.72); color: var(--on-ultra); }
.fld.bad input, .fld.bad textarea { border-color: #E5484D; animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mailbox-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
.send {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--marker);
  color: var(--marker-ink);
  font: 700 0.95rem/1 var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.25s;
}
.send:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(116, 190, 0, 0.8); }
.send .plane { width: 1.1rem; height: 1.1rem; transition: transform 0.3s; }
.send:hover .plane { transform: translate(3px, -3px) rotate(-8deg); }
.send.flying .plane { animation: fly 0.9s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
.send.flying .send-label { opacity: 0.4; }
@keyframes fly { 30% { transform: translate(-6px, 4px) rotate(10deg); } 100% { transform: translate(220px, -160px) rotate(-25deg) scale(0.6); opacity: 0; } }
.send[disabled] { cursor: progress; }
.mailbox-status { font: 400 0.875rem/1.4 var(--mono); color: var(--on-ultra-muted); }
.mailbox.sent .fld, .mailbox.sent .field-row { opacity: 0.45; transition: opacity 0.4s; }
.mailbox-status a { color: inherit; }

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto; z-index: 90; height: 3px; background: var(--marker); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* Custom cursor: a green dot that swells over anything clickable */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor span { display: block; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: rgba(182, 255, 59, 0.9); box-shadow: 0 0 0 1.5px #0E0F0C; transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.cursor.on { opacity: 1; }
.cursor.big span { transform: scale(2.6); background: rgba(182, 255, 59, 0.35); }
.cursor.down span { transform: scale(0.7); }

/* Reveal: cards rise in and chapter titles decode as they scroll into view */
.reveal-ready .ex, .reveal-ready .chapter-head, .reveal-ready .edu { opacity: 0; transform: translateY(36px) rotateX(8deg); transform-origin: 50% 0; }
.reveal-ready .ex.in, .reveal-ready .chapter-head.in, .reveal-ready .edu.in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1); }
.chapter-head { position: relative; }
.chapter-head::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--marker); transform: scaleX(0); transform-origin: left; }
.chapter-head.in::after { transform: scaleX(1); transition: transform 1.1s cubic-bezier(0.7, 0, 0.2, 1) 0.2s; }

.reveal-ready .ex.in.settled { transition: transform 0.25s ease-out; }

/* Card tilt with a moving glare */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.16), transparent 45%); opacity: 0; transition: opacity 0.3s; z-index: 3; }
.tilt:hover .tilt-glare { opacity: 1; }

@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .ex, .reveal-ready .chapter-head, .reveal-ready .edu { opacity: 1; transform: none; }
  .mailbox::before, .send.flying .plane { animation: none; }
  .cursor { display: none; }
}


/* ---------- v2 spacing: no empty blocks inside stretched or wide cards ---------- */
/* Wide cards: demo on the left, the story centred beside it */
.chapter-wide .ex { grid-template-rows: none; align-items: center; }
.chapter-wide .ex > .ex-story { grid-column: 2; grid-row: 1; }
.chapter-wide .ex > :is(.shop, .briefing, .timetable) { grid-row: 1; grid-column: 1; }
/* Arcflip keeps its own height; the InboxKit column beside it has no card to match */
.chapter-grid > .col > .ex-arcflip:last-child { flex: 0 0 auto; }
/* Less dead space after the last chapter */
.desk { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
@media (max-width: 860px) { .chapter-wide .ex > .ex-story, .chapter-wide .ex > :is(.shop, .briefing, .timetable) { grid-column: 1; grid-row: auto; } }

/* Direct email options under the contact box */
.mailbox-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1.5px dashed var(--on-ultra-faint); font: 400 0.8125rem/1.3 var(--mono); color: var(--on-ultra-muted); }
.alt-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border: 1.5px solid var(--on-ultra-faint); border-radius: 999px; color: var(--on-ultra); font: 600 0.8125rem/1 var(--text); text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.alt-link svg { width: 1rem; height: 1rem; }
.alt-link:hover { border-color: var(--on-ultra); background: var(--marker); color: var(--marker-ink); transform: translateY(-2px); }

/* ---------- More motion ---------- */
.burst { position: fixed; z-index: 96; width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 2px solid #B6FF3B; border-radius: 50%; pointer-events: none; animation: burst 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes burst { to { transform: scale(7); opacity: 0; border-width: 1px; } }
.ask button[type="submit"], .send, .mail, .btn-resume { transition: translate 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), transform 0.2s, box-shadow 0.25s, background 0.2s; }

/* Accuracy bars fill as their numbers count */
.acc-bar i { transform-origin: left; }
.reveal-ready .acc-bar i:not(.fill) { transform: scaleX(0); }
.acc-bar i.fill { transform: scaleX(1); transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Headings rise letter by letter */
.word { display: inline-block; white-space: nowrap; }
.letter { display: inline-block; transform: translateY(0.9em) rotate(8deg); opacity: 0; }
.risen .letter { transform: none; opacity: 1; transition: transform 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) var(--d), opacity 0.4s ease var(--d); }

/* Link cards: a light sweep crosses them on hover */
.link-card { position: relative; overflow: hidden; }
.link-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(182, 255, 59, 0.35) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.link-card:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }

@media (prefers-reduced-motion: reduce) { .letter { transform: none; opacity: 1; } .burst { display: none; } }

/* HV wordmark beside the face */
.mark { gap: 0.7rem; }
.mark-hv { position: relative; font: 800 1.35rem/1 var(--display); letter-spacing: -0.04em; padding-bottom: 0.3rem; }
.mark-hv::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.28rem; border-radius: 99px; background: var(--marker); transform-origin: left; transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1); }
.mark:hover .mark-hv::after { transform: scaleX(1.25); }
.intro-nick { font: 400 clamp(1.15rem, 2.4vw, 1.5rem)/1.4 var(--serif); font-style: italic; color: #FFFFFF; animation: rise-up 0.6s cubic-bezier(0.2, 0.9, 0.2, 1) 0.9s both; }

/* Nickname line: the two names in highlighter */
.nick { margin-bottom: 1.6rem; font: 400 clamp(1.15rem, 2vw, 1.45rem)/1.35 var(--serif); font-style: italic; color: var(--on-ultra); }
.nick mark, .intro-nick mark {
  padding: 0 0.3em;
  border-radius: 0.25em;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 60% / 0% 85%;
  color: inherit;
  font-style: normal;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85em;
  letter-spacing: -0.02em;
  animation: mark-in 0.7s cubic-bezier(0.6, 0, 0.2, 1) backwards;
  background-size: 100% 85%;
}
.nick mark { --from: var(--on-ultra); --to: var(--marker-ink); color: var(--to); }
.intro-nick mark { --from: #FFFFFF; --to: #0E0F0C; color: var(--to); }
.nick mark + * , .nick mark:last-of-type { animation-delay: 0.45s; }
.intro-nick mark { animation-delay: 1.1s; }
.intro-nick mark:last-of-type { animation-delay: 1.35s; }
@keyframes mark-in { from { color: var(--from); background-size: 0% 85%; } to { background-size: 100% 85%; color: var(--to); } }
@media (prefers-reduced-motion: reduce) { .nick mark, .intro-nick mark { animation: none; background-size: 100% 85%; } }
