:root {
  --ink: #0b1220;
  --ink-deep: #070c15;
  --panel: #151e2b;
  --panel-raised: #1b2736;
  --text: #f4f1e8;
  --muted: #bcc6d2;
  --border: #65758a;
  --border-soft: #344357;
  --warm: #efb66f;
  --cyan: #79d5d8;
  --plum: #c6aad8;
  --dawn: #f1c9ab;
  --danger-soft: #f0a6a6;
  --header-height: 66px;
  --page-gutter: clamp(1rem, 4vw, 3rem);
  --content: 1180px;
  --measure: 68ch;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  min-width: 0;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(121, 213, 216, 0.035), transparent 22rem),
    var(--ink);
  color: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.18vw, 1.125rem);
  line-height: 1.68;
  overflow-wrap: break-word;
}

main {
  display: block;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan);
  text-decoration-line: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

button,
summary {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 4px;
}

::selection {
  background: var(--warm);
  color: var(--ink-deep);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 4.5vw, 4.4rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  letter-spacing: -0.025em;
}

p,
li,
dd {
  max-width: var(--measure);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  background: var(--warm);
  color: var(--ink-deep);
  font-weight: 800;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(11, 18, 32, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
  display: flex;
  width: min(100%, calc(var(--content) + 2 * var(--page-gutter)));
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 0.85rem);
  min-width: 0;
}

.header-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(255, 179, 71, 0.45);
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.14), rgba(255, 179, 71, 0.04));
  color: var(--warm);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 179, 71, 0.12);
  font-family: var(--mono);
  font-size: clamp(0.64rem, 0.9vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}
.header-greeting::before {
  content: "●";
  display: inline-block;
  font-size: 0.52rem;
  color: #70e4e3;
  animation: quest-pulse-dot 2s infinite ease-in-out;
}

@media (max-width: 480px) {
  .header-brand { gap: 0.4rem; }
  .header-greeting { font-size: 0.6rem; padding: 0.15rem 0.35rem; }
}
@media (max-width: 350px) {
  .header-brand { gap: 0.3rem; }
  .header-greeting { font-size: 0.52rem; padding: 0.1rem 0.25rem; }
}

.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 780;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 28px;
  height: 28px;
  border: 2px solid var(--warm);
  color: var(--warm);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1;
  place-items: center;
}

.desktop-nav,
.header-tools,
.site-footer nav,
.text-links,
.action-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.desktop-nav {
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1rem;
}

.desktop-nav a,
.header-tools > a,
.site-footer a {
  min-height: 44px;
  padding-block: 0.58rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 690;
  text-decoration: none;
}

.desktop-nav a:hover,
.header-tools > a:hover,
.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.header-tools {
  flex-shrink: 0;
  gap: 0.8rem;
}

.motion-toggle,
.mobile-nav summary {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.motion-toggle {
  padding: 0.55rem 0.75rem;
}

.motion-toggle:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.85;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  display: grid;
  padding-inline: 0.75rem;
  list-style: none;
  place-items: center;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav nav {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  display: grid;
  width: min(17rem, calc(100vw - 2rem));
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel-raised);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.mobile-nav nav a {
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--ink-deep);
}

.footer-inner {
  min-height: 110px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.shell,
.chapter-inner {
  width: min(100%, calc(var(--content) + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.home-hero,
.chapter {
  position: relative;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.home-hero {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  border-bottom: 1px solid var(--border-soft);
  background:
    linear-gradient(100deg, rgba(11, 18, 32, 0.98) 5%, rgba(11, 18, 32, 0.88) 50%, rgba(11, 18, 32, 0.5)),
    #10192c;
}

.hero-inner {
  display: grid;
  width: min(100%, calc(var(--content) + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 6rem) var(--page-gutter) clamp(2rem, 5vh, 4rem);
  align-items: center;
  grid-template-columns: minmax(0, 0.94fr) minmax(380px, 1.06fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.chapter-label,
.status-line,
.exhibit-kicker,
.contribution-ref,
.source-kicker,
.case-eyebrow {
  color: var(--warm);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.075em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-support {
  max-width: 58ch;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.2vw, 1.3rem);
}

.hero-status {
  margin-bottom: 1.4rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.68rem 1rem;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--panel);
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.button-primary {
  border-color: var(--warm);
  background: var(--warm);
  color: var(--ink-deep);
}

.button:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--ink-deep);
}

.hero-route {
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.also-live {
  display: inline-block;
  margin-top: 1rem;
  color: var(--cyan);
  font-weight: 710;
}

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  background: #0e1725;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  isolation: isolate;
}

.scene picture,
.scene img {
  width: 100%;
  height: 100%;
}

.scene img {
  object-fit: cover;
  image-rendering: pixelated;
}

.reaction,
.reaction > span,
.reaction i {
  position: absolute;
  display: block;
}

.reaction-lamp {
  z-index: 2;
  top: 34%;
  right: 18%;
  width: 13%;
  height: 24%;
  background: radial-gradient(circle, rgba(239, 182, 111, 0.52), transparent 70%);
  filter: blur(2px);
  opacity: 1;
  transition: opacity 700ms ease-out, filter 700ms ease-out;
}

html[data-motion="on"] .scene:not(.is-reacted) .reaction-lamp {
  filter: blur(0);
  opacity: 0.25;
}

.reaction-bus {
  inset: 0;
}

.pixel-bus {
  right: 12%;
  bottom: 17%;
  width: 24%;
  height: 18%;
  border: 4px solid #0a111d;
  background: #e2b56d;
  box-shadow: inset 0 -14px #b76f50;
  transform: translateX(0);
  transition: transform 950ms cubic-bezier(0.16, 0.76, 0.22, 1);
}

.pixel-bus::before {
  content: "";
  position: absolute;
  inset: 12% 10% 44%;
  background: repeating-linear-gradient(90deg, #8dc8c7 0 20%, #132739 20% 25%);
}

.pixel-bus i {
  bottom: -10px;
  width: 20px;
  height: 20px;
  border: 5px solid #070c15;
  background: #7f8b94;
}

.pixel-bus i:first-child { left: 14%; }
.pixel-bus i:last-child { right: 14%; }

html[data-motion="on"] .scene:not(.is-reacted) .pixel-bus {
  transform: translateX(145%);
}

.reaction-path-light {
  z-index: 2;
  right: 34%;
  bottom: 20%;
  width: 33%;
  height: 8%;
  background: radial-gradient(ellipse, rgba(239, 182, 111, 0.5), transparent 72%);
  opacity: 1;
  transition: opacity 650ms ease-out;
}

html[data-motion="on"] .scene:not(.is-reacted) .reaction-path-light {
  opacity: 0;
}

.reaction-signal {
  z-index: 2;
  inset: 0;
}

.signal-track {
  right: 12%;
  bottom: 20%;
  width: 64%;
  height: 4px;
  background: #356d77;
}

.signal-track::before {
  content: "";
  position: absolute;
  inset: -5px 0;
  background: repeating-linear-gradient(90deg, transparent 0 14%, rgba(121, 213, 216, 0.25) 14% 16%);
}

.signal-track i {
  top: -6px;
  left: calc(100% - 8px);
  width: 16px;
  height: 16px;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
  transition: left 900ms ease-in-out;
}

html[data-motion="on"] .scene:not(.is-reacted) .signal-track i {
  left: 0;
}

.reaction-service-lights {
  z-index: 2;
  inset: 0;
}

.light-row {
  right: 16%;
  bottom: 29%;
  display: flex;
  gap: 14px;
}

.light-row i {
  position: relative;
  width: 11px;
  height: 11px;
  background: var(--warm);
  box-shadow: 0 0 15px rgba(239, 182, 111, 0.85);
  opacity: 1;
  transition: opacity 250ms linear;
}

html[data-motion="on"] .scene:not(.is-reacted) .light-row i {
  opacity: 0.12;
}

.scene.is-reacted .light-row i:nth-child(2) { transition-delay: 120ms; }
.scene.is-reacted .light-row i:nth-child(3) { transition-delay: 240ms; }
.scene.is-reacted .light-row i:nth-child(4) { transition-delay: 360ms; }

.reaction-reading-light {
  z-index: 2;
  inset: 0;
  background: linear-gradient(105deg, transparent 28%, rgba(239, 182, 111, 0.18) 46%, transparent 64%);
  transform: translateX(32%);
  transition: transform 850ms ease-in-out;
}

html[data-motion="on"] .scene:not(.is-reacted) .reaction-reading-light {
  transform: translateX(-55%);
}

.reaction-shutter {
  z-index: 2;
  top: 23%;
  right: 15%;
  width: 27%;
  height: 44%;
  overflow: hidden;
}

.shutter-panel {
  inset: 0;
  background: repeating-linear-gradient(0deg, #354150 0 7px, #27313d 7px 10px);
  transform: translateY(-102%);
  transition: transform 1000ms cubic-bezier(0.55, 0.08, 0.2, 1);
}

html[data-motion="on"] .scene:not(.is-reacted) .shutter-panel {
  transform: translateY(0);
}

.chapter {
  border-bottom: 1px solid var(--border-soft);
}

.chapter-inner {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.chapter-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(2.2rem, 6vw, 6rem);
}

.chapter:nth-of-type(even) .chapter-grid > .scene {
  order: 2;
}

.chapter-heading {
  margin-bottom: 2.4rem;
}

.chapter-label span {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.55rem;
  border: 1px solid currentColor;
  place-items: center;
}

.chapter-intro {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.transition-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 2.25rem;
  align-items: center;
  color: var(--warm);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-summary,
.technical-exhibit,
.contribution-card,
.experience-card,
.writing-card,
.source-edition-card,
.case-section,
.index-group,
.plain-block,
.search-panel {
  border: 1px solid var(--border-soft);
  background: var(--panel);
}

.project-summary {
  padding: clamp(1.35rem, 3vw, 2.1rem);
}

.project-summary + .project-summary {
  margin-top: 1rem;
}

.project-heading {
  display: flex;
  margin-bottom: 1.1rem;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.project-heading h3 {
  margin: 0;
}

.status-line {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.status-dot {
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  margin-right: 0.45rem;
  border: 1px solid var(--warm);
  background: var(--warm);
}

.case-link {
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.project-problem {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 720;
}

.metric {
  margin-bottom: 1.25rem;
  color: var(--warm);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.text-links {
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.source-note,
.tradeoff {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--cyan);
  background: rgba(7, 12, 21, 0.48);
  color: var(--muted);
  font-size: 0.88rem;
}

.graveyard-grid,
.contribution-grid,
.experience-grid,
.writing-grid,
.source-grid,
.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.graveyard-grid .project-summary + .project-summary {
  margin-top: 0;
}

.technical-pair {
  display: grid;
  gap: 1rem;
}

.technical-exhibit {
  padding: clamp(1.4rem, 3vw, 2rem);
}

.flow-diagram {
  display: grid;
  margin: 1.7rem 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.flow-diagram li {
  position: relative;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  background: var(--ink-deep);
}

.flow-diagram li + li {
  border-left: 0;
}

.flow-diagram li + li::before {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: -0.55rem;
  color: var(--cyan);
  transform: translateY(-50%);
}

.flow-diagram span,
.flow-diagram strong,
.flow-diagram small {
  display: block;
}

.flow-diagram span {
  margin-bottom: 0.5rem;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.flow-diagram small,
.state-diagram small,
.state-diagram span {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.state-diagram {
  display: grid;
  margin: 1.7rem 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.state-diagram > div {
  padding: 1rem;
  border: 1px solid var(--border-soft);
  background: var(--ink-deep);
}

.state-diagram > div + div {
  border-left: 0;
}

.state-diagram strong,
.state-diagram span,
.state-diagram small {
  display: block;
}

.state-fresh { box-shadow: inset 0 4px var(--cyan); }
.state-retained { box-shadow: inset 0 4px var(--warm); }
.state-empty { box-shadow: inset 0 4px var(--danger-soft); }

.contribution-card,
.experience-card,
.writing-card {
  padding: 1.4rem;
}

.contribution-ref {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.experience-card .period,
.writing-card .language-tag,
.source-meta {
  color: var(--warm);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
}

.experience-card .role {
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.synthetic-replay {
  margin: 1.25rem 0 0;
  border: 1px solid var(--border);
  background: var(--ink-deep);
}

.replay-bar {
  display: flex;
  min-height: 42px;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.replay-map {
  position: relative;
  height: 240px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49%, #1f4d50 49% 51%, transparent 51%),
    linear-gradient(0deg, transparent 49%, #1f4d50 49% 51%, transparent 51%),
    #173033;
}

.route {
  position: absolute;
  height: 12px;
  background: #86b6ae;
  box-shadow: 0 -3px #243e41, 0 3px #243e41;
}

.route-a { top: 43%; left: -5%; width: 75%; transform: rotate(-12deg); }
.route-b { top: 64%; right: -4%; width: 58%; transform: rotate(19deg); }
.stop {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 3px solid var(--text);
  background: #315d5e;
}
.stop-a { top: 30%; left: 18%; }
.stop-b { top: 49%; left: 52%; }
.stop-c { right: 17%; bottom: 20%; }
.map-bus {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink-deep);
  background: var(--warm);
  color: var(--ink-deep);
  font: 800 0.72rem var(--mono);
  place-items: center;
}
.bus-a { top: 37%; left: 35%; }
.bus-b { right: 27%; bottom: 24%; }
.map-building {
  position: absolute;
  width: 15%;
  height: 22%;
  background: #1f4549;
  box-shadow: inset 0 0 0 3px #2c5b5f;
}
.building-a { top: 8%; right: 9%; }
.building-b { bottom: 4%; left: 7%; }
.synthetic-replay figcaption {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.synthetic-replay figcaption strong {
  color: var(--text);
}

.final-copy {
  font-size: clamp(1.08rem, 1.3vw, 1.28rem);
}

/* Homepage - a compact field journal carried by one continuous landscape. */
.home-hero h1,
.chapter h2,
.chapter h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 600;
}

.home-hero {
  min-height: calc(100svh - var(--header-height));
  overflow: hidden;
  background: #0a111e;
}

.hero-inner {
  width: min(100%, calc(1280px + 2 * var(--page-gutter)));
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(3rem, 7vh, 5.5rem);
  grid-template-columns: minmax(0, 0.78fr) minmax(480px, 1.22fr);
  gap: clamp(2rem, 4vw, 4.5rem);
}

.home-hero h1 {
  max-width: 10ch;
  margin-bottom: 1.1rem;
  font-size: clamp(4.5rem, 6.6vw, 6.25rem);
  font-weight: 560;
  letter-spacing: -0.062em;
  line-height: 0.88;
}

.home-hero h1 em {
  display: block;
  color: var(--warm);
  font-weight: 500;
}

.home-hero h1 > span {
  white-space: nowrap;
}

.hero-support {
  max-width: 47ch;
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.55;
}

.hero-status,
.hero-evidence {
  font-size: 0.78rem;
  letter-spacing: 0.025em;
}

.hero-evidence {
  max-width: 52ch;
  margin: 1.5rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-soft);
  color: #94a3b5;
  font-family: var(--mono);
  line-height: 1.55;
}

.hero-scene {
  margin-right: calc(var(--page-gutter) * -1);
}

.home-hero .scene,
.chapter .scene {
  border: 0;
  box-shadow: none;
}

.hero-scene .scene {
  aspect-ratio: 6 / 5;
  box-shadow: -32px 34px 0 rgba(5, 10, 17, 0.55);
}

.hero-scene .scene::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid rgba(121, 213, 216, 0.18);
  pointer-events: none;
}

.chapter {
  overflow: hidden;
}

.chapter-inner {
  padding-block: clamp(4.25rem, 6.5vw, 6.25rem);
}

.chapter h2 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 4.6vw, 4.7rem);
  font-weight: 560;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.chapter-heading {
  margin-bottom: 1.5rem;
}

.chapter-label {
  display: flex;
  margin-bottom: 1.25rem;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
}

.chapter-label::after {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.chapter .chapter-label::after {
  display: none;
}

.chapter-label span {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
}

.chapter-intro {
  max-width: 51ch;
  font-size: 1.03rem;
  line-height: 1.62;
}

.transition-link {
  margin-top: 1.8rem;
  font-size: 0.76rem;
}

#in-use {
  background: #0e1c25;
}

.capy-mast,
.engineering-mast {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.capy-mast .chapter-heading,
.engineering-mast .chapter-heading {
  margin-bottom: 0;
}

.capy-landscape .scene {
  aspect-ratio: 16 / 8.4;
}

.capy-detail {
  display: grid;
  margin-top: 2.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid #36545a;
  align-items: start;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

.chapter .project-summary,
.chapter .contribution-card,
.chapter .experience-card,
#writing .writing-card,
.chapter .technical-exhibit {
  border: 0;
  background: transparent;
}

.chapter .project-summary {
  padding: 0;
}

.chapter .project-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(188, 198, 210, 0.24);
}

.chapter .project-summary > p:last-of-type {
  margin-bottom: 0;
}

.chapter .status-line,
.chapter .contribution-ref {
  font-size: 0.73rem;
}

.chapter .metric {
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.capy-detail .synthetic-replay {
  margin: 0;
  border-color: #46666d;
}

.capy-detail .replay-map {
  height: 215px;
}

#graveyard {
  background: #171422;
}

.graveyard-mast {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.28fr) minmax(350px, 0.72fr);
}

.graveyard-landscape .scene {
  aspect-ratio: 16 / 8.5;
}

.graveyard-heading {
  position: relative;
  z-index: 3;
  margin-left: -3rem;
  padding: clamp(2.2rem, 4vw, 3.5rem);
  border-top: 2px solid var(--plum);
  background: #211b2d;
  box-shadow: 24px 28px 0 rgba(7, 8, 14, 0.3);
}

.graveyard-heading .chapter-heading {
  margin: 0;
}

.graveyard-heading h2 {
  max-width: 11ch;
  font-size: clamp(2.65rem, 4vw, 4.15rem);
}

.graveyard-grid {
  margin-top: 3.25rem;
  gap: 0;
}

.graveyard-grid .project-summary {
  padding: 0 clamp(1.75rem, 3.5vw, 3.25rem) 0 0;
}

.graveyard-grid .project-summary + .project-summary {
  padding-right: 0;
  padding-left: clamp(1.75rem, 3.5vw, 3.25rem);
  border-left: 1px solid #463a50;
}

#engineering {
  background: #0b1720;
}

.engineering-mast {
  margin-bottom: 3.25rem;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.engineering-landscape .scene {
  aspect-ratio: 16 / 8;
}

.technical-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 5rem);
}

.chapter .technical-exhibit {
  padding: 1.9rem 0 0;
  border-top: 1px solid #3e5561;
}

.chapter .technical-exhibit h3 {
  max-width: 19ch;
  font-size: clamp(1.75rem, 2.5vw, 2.45rem);
  line-height: 1.08;
}

.chapter .flow-diagram,
.chapter .state-diagram {
  margin-block: 1.35rem;
}

.chapter .flow-diagram li,
.chapter .state-diagram > div {
  background: rgba(5, 12, 18, 0.72);
}

.chapter .tradeoff {
  min-height: 6.5rem;
  margin-top: 1rem;
  background: rgba(5, 12, 18, 0.42);
}

.contribution-grid {
  margin-top: 3rem;
  gap: 0;
}

.chapter .contribution-card {
  padding: 1.5rem 2.75rem 0 0;
  border-top: 1px solid #3e5561;
}

.chapter .contribution-card + .contribution-card {
  padding-right: 0;
  padding-left: 2.75rem;
  border-left: 1px solid #3e5561;
}

.chapter .contribution-card h3 {
  font-size: 1.55rem;
}

#experience {
  background: #101a26;
}

.experience-mast {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.experience-landscape .scene {
  aspect-ratio: 16 / 8.6;
}

.experience-heading {
  position: relative;
  z-index: 2;
  margin-left: -2.5rem;
  padding: 2.75rem 0 2.75rem 3.25rem;
  background: #101a26;
}

.experience-heading .chapter-heading {
  margin: 0;
}

.experience-grid {
  margin-top: 2.75rem;
  border-top: 1px solid #394958;
  grid-template-columns: 1fr;
  gap: 0;
}

.chapter .experience-card {
  display: grid;
  padding: 1.4rem 0;
  border-bottom: 1px solid #394958;
  align-items: start;
  grid-template-columns: 4.25rem minmax(190px, 0.52fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.experience-number {
  margin: 0;
  color: #6f8092;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.experience-role .period,
.experience-role h3,
.experience-role .role,
.experience-summary {
  margin-bottom: 0;
}

.experience-role h3 {
  font-size: 1.4rem;
}

.experience-role .role {
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.experience-summary {
  color: var(--muted);
}

.method-note {
  max-width: 72ch;
  margin: 1rem 0 0;
  color: #91a0b0;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
}

#writing {
  background: #1c171b;
}

.writing-layout {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(3rem, 7vw, 7rem);
}

.writing-copy .chapter-heading {
  margin-bottom: 2rem;
}

#writing .writing-grid {
  border-top: 1px solid #4c4142;
  grid-template-columns: 1fr;
  gap: 0;
}

#writing .writing-card {
  display: grid;
  padding: 1.35rem 0;
  border-bottom: 1px solid #4c4142;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  column-gap: 1.5rem;
}

#writing .writing-card .language-tag {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
}

#writing .writing-card h3,
#writing .writing-card p,
#writing .writing-card a {
  grid-column: 2;
}

#writing .writing-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.5rem;
}

#writing .writing-card p:not(.language-tag) {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

#writing .writing-card a {
  justify-self: start;
  font-size: 0.88rem;
}

.writing-landscape {
  min-height: 100%;
}

.writing-landscape .scene {
  height: 100%;
  min-height: 650px;
  aspect-ratio: auto;
}

.writing-landscape .scene img {
  object-position: center;
}

#next {
  display: grid;
  min-height: 690px;
  background: #18221f;
  isolation: isolate;
}

#next::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 14, 17, 0.84) 0 38%, rgba(8, 14, 17, 0.3) 68%, transparent);
  pointer-events: none;
}

.final-landscape {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.final-landscape .scene {
  height: 100%;
  aspect-ratio: auto;
}

.final-inner {
  display: flex;
  min-height: 690px;
  padding-block: 4.5rem;
  align-items: center;
}

.final-panel {
  width: min(100%, 590px);
  padding: 2.75rem 3rem;
  border-top: 2px solid var(--warm);
  background: rgba(8, 14, 18, 0.9);
  box-shadow: 22px 24px 0 rgba(37, 52, 48, 0.62);
}

.final-panel h2 {
  max-width: 10ch;
}

.final-panel .chapter-heading {
  margin-bottom: 1.3rem;
}

.hero-product {
  min-width: 0;
}

.cuco-product-view {
  width: 100%;
  margin: 0;
  border: 1px solid #767a70;
  overflow: hidden;
  background: #f3f1e9;
  color: #20231f;
  box-shadow: 30px 34px 0 #050a11;
  font-size: 0.82rem;
  line-height: 1.35;
}

.cuco-product-bar {
  display: grid;
  min-height: 58px;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid #cac9c0;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.cuco-product-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 800;
}

.cuco-product-brand img {
  width: 30px;
  height: 30px;
}

.cuco-product-bar > strong {
  font-size: 0.85rem;
}

.cuco-product-controls {
  display: flex;
  justify-self: end;
  gap: 0.35rem;
}

.cuco-product-controls i {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding-inline: 0.45rem;
  border: 1px solid #b8b9b0;
  align-items: center;
  font-style: normal;
  font-weight: 700;
}

.cuco-product-body {
  display: grid;
  min-height: 430px;
  grid-template-columns: 165px minmax(0, 1fr);
}

.cuco-product-body aside {
  display: flex;
  padding: 1.3rem 1rem;
  border-right: 1px solid #cac9c0;
  flex-direction: column;
}

.cuco-product-body aside p {
  margin-bottom: 1rem;
  color: #6c7069;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cuco-product-body aside ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0.8rem;
  list-style: none;
}

.cuco-product-body aside li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.cuco-product-body aside li i {
  width: 0.7rem;
  height: 0.7rem;
  background: #7895a6;
}

.cuco-product-body aside li .account-personal { background: #c89a5f; }
.cuco-product-body aside li .account-project { background: #8f7897; }

.cuco-product-body aside > span {
  margin-top: auto;
  color: #777b74;
  font-size: 0.68rem;
}

.cuco-week {
  min-width: 0;
  padding-top: 0.75rem;
}

.cuco-days {
  display: grid;
  height: 58px;
  margin-left: 32px;
  padding-inline: 0.35rem;
  border-bottom: 1px solid #cac9c0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cuco-days span {
  display: grid;
  color: #777b74;
  font-size: 0.64rem;
  place-items: center;
  text-transform: uppercase;
}

.cuco-days b {
  color: #20231f;
  font-size: 0.92rem;
}

.cuco-grid {
  position: relative;
  height: 348px;
  margin-left: 32px;
  background:
    linear-gradient(90deg, transparent calc(20% - 1px), #ddddd6 20%, transparent calc(20% + 1px), transparent calc(40% - 1px), #ddddd6 40%, transparent calc(40% + 1px), transparent calc(60% - 1px), #ddddd6 60%, transparent calc(60% + 1px), transparent calc(80% - 1px), #ddddd6 80%, transparent calc(80% + 1px)),
    repeating-linear-gradient(180deg, transparent 0 57px, #ddddd6 58px);
}

.cuco-time {
  position: absolute;
  left: -27px;
  color: #8a8d86;
  font-size: 0.6rem;
}

.time-nine { top: 4px; }
.time-noon { top: 116px; }
.time-three { top: 232px; }

.cuco-now-line {
  position: absolute;
  z-index: 2;
  top: 184px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #b47d60;
}

.cuco-now-line::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b47d60;
}

.cuco-event {
  position: absolute;
  display: flex;
  width: calc(20% - 10px);
  min-height: 58px;
  padding: 0.55rem;
  border-left: 3px solid #49687a;
  flex-direction: column;
  background: #dce8ea;
  color: #263740;
}

.cuco-event b {
  font-size: 0.69rem;
}

.cuco-event small {
  margin-top: 0.2rem;
  color: #59665f;
  font-size: 0.6rem;
}

.event-review { top: 19px; left: 2%; }
.event-focus { top: 77px; left: 22%; min-height: 95px; border-color: #6e7d62; background: #e2e8d9; }
.event-lunch { top: 150px; left: 42%; border-color: #b3884e; background: #eee2c8; }
.event-research { top: 208px; left: 62%; min-height: 86px; border-color: #7f6888; background: #e7dce9; }
.event-build { top: 71px; left: 82%; min-height: 118px; border-color: #49687a; }

.cuco-product-view figcaption {
  display: flex;
  min-height: 64px;
  padding: 0.9rem 1.1rem;
  border-top: 1px solid #cac9c0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cuco-product-view figcaption span {
  color: #71756d;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cuco-product-view figcaption strong {
  font-size: 0.82rem;
}

.engineering-mast {
  display: block;
  max-width: 820px;
  margin-bottom: 3rem;
}

.engineering-mast h2 {
  max-width: 12ch;
}

.experience-mast {
  display: block;
}

.experience-mast .chapter-heading {
  display: grid;
  margin-bottom: 2.75rem;
  align-items: end;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 2rem 4rem;
}

.experience-mast .chapter-label {
  grid-column: 1 / -1;
}

.experience-mast h2 {
  max-width: 14ch;
  margin-bottom: 0;
}

.experience-mast .chapter-intro {
  margin-bottom: 0;
}

.writing-copy h2 {
  max-width: 9ch;
}

.final-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Third pass: one flagship, one feature, and a quieter supporting record. */
.hero-inner {
  display: block;
  min-height: 0;
  padding-block: clamp(4rem, 7vw, 6.5rem);
}

.hero-intro {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1.05fr) minmax(370px, 0.95fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.hero-title-block .eyebrow {
  margin-bottom: 1.2rem;
}

.home-hero h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(4.7rem, 7vw, 6.8rem);
  line-height: 0.9;
}

.home-hero h1 em {
  display: inline;
}

.hero-pitch {
  padding-bottom: 0.4rem;
}

.hero-pitch .also-live {
  margin-top: 1.15rem;
  font-size: 0.92rem;
}

.hero-product {
  width: min(100%, 1120px);
  margin: clamp(2.75rem, 5vw, 4.5rem) 0 0 auto;
}

.cuco-product-body {
  min-height: 475px;
}

.cuco-grid {
  height: 393px;
}

.time-noon { top: 131px; }
.time-three { top: 262px; }
.cuco-now-line { top: 205px; }
.event-focus { top: 87px; min-height: 108px; }
.event-lunch { top: 169px; }
.event-research { top: 234px; min-height: 96px; }
.event-build { top: 80px; min-height: 132px; }

.chapter-inner {
  padding-block: clamp(4rem, 5.5vw, 5.25rem);
}

.chapter h2 {
  font-size: clamp(2.8rem, 4vw, 4rem);
}

.chapter-intro {
  color: #c9d1da;
  font-size: 1.08rem;
}

.chapter .chapter-label,
.chapter .status-line,
.chapter .contribution-ref,
.chapter .exhibit-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.045em;
}

.capy-mast {
  display: block;
}

.capy-mast .chapter-heading {
  display: grid;
  margin-bottom: 2.5rem;
  align-items: end;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem 5rem;
}

.capy-mast .chapter-label {
  grid-column: 1 / -1;
}

.capy-mast h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(3rem, 4.5vw, 4.5rem);
}

.capy-mast .chapter-intro {
  margin: 0;
}

.capy-landscape .scene {
  aspect-ratio: 3.15 / 1;
}

.capy-landscape .scene img {
  object-position: center 56%;
}

.capy-detail {
  margin-top: 2.2rem;
  padding-top: 2.2rem;
}

#graveyard .chapter-inner {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.graveyard-mast {
  display: block;
}

.graveyard-heading {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.graveyard-heading h2 {
  max-width: 8ch;
  font-size: clamp(3rem, 4.4vw, 4.5rem);
}

.graveyard-grid {
  margin: 0;
  grid-template-columns: 1fr;
  gap: 0;
}

.graveyard-grid .project-summary,
.graveyard-grid .project-summary + .project-summary {
  margin: 0;
  padding: 0 0 2.3rem;
  border: 0;
}

.graveyard-grid .project-summary + .project-summary {
  padding-top: 2.3rem;
  border-top: 1px solid #514558;
}

.graveyard-grid .project-heading {
  border: 0;
}

#engineering {
  border-color: #c8c4b9;
  background: #e8e5dc;
  color: #1e292c;
}

#engineering h2,
#engineering h3,
#engineering strong {
  color: #172426;
}

#engineering a {
  color: #176169;
}

#engineering a:hover {
  color: #0e363b;
}

#engineering .chapter-intro,
#engineering .technical-exhibit > p,
#engineering .flow-diagram small,
#engineering .state-diagram span,
#engineering .state-diagram small {
  color: #445356;
}

#engineering .exhibit-kicker,
#engineering .flow-diagram span {
  color: #8a5723;
}

.engineering-mast {
  max-width: none;
  margin-bottom: 2.5rem;
}

.engineering-mast .chapter-heading {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 4rem;
}

.engineering-mast h2 {
  max-width: none;
  margin: 0;
}

.engineering-mast .chapter-intro {
  margin: 0;
}

#engineering .technical-exhibit {
  padding-top: 1.5rem;
  border-color: #aaa99f;
}

#engineering .flow-diagram li,
#engineering .state-diagram > div {
  border-color: #bcbab0;
  background: #f4f1e9;
}

#engineering .flow-diagram li + li,
#engineering .state-diagram > div + div {
  border-left-color: #bcbab0;
}

#engineering .tradeoff {
  min-height: 0;
  border-color: #27727a;
  background: #dadfd8;
  color: #35484b;
}

.open-source-line {
  display: grid;
  margin-top: 2.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #aaa99f;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2rem;
}

.open-source-line > p {
  margin: 0;
  color: #5b6261;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.open-source-line ul {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
}

.open-source-line li {
  color: #3d4a4c;
  font-size: 0.9rem;
}

.open-source-line li a,
.open-source-line li span {
  display: block;
}

.open-source-line li a {
  margin-bottom: 0.35rem;
  font-weight: 760;
}

#experience h2,
#writing h2 {
  max-width: none;
  font-family: var(--sans);
  font-size: clamp(2.5rem, 3.7vw, 3.7rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
}

.experience-mast .chapter-heading,
.writing-copy .chapter-heading {
  display: grid;
  margin-bottom: 2.7rem;
  align-items: end;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 4rem;
}

.experience-grid {
  margin-top: 0;
  border: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

.chapter .experience-card {
  display: block;
  padding: 0;
  border: 0;
}

.experience-number {
  margin-bottom: 1.1rem;
  color: #718298;
}

.experience-role h3 {
  font-size: 1.65rem;
}

.experience-summary {
  margin-top: 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.method-note {
  margin-top: 2.3rem;
  font-size: 0.8rem;
}

.writing-layout {
  display: block;
}

#writing .writing-grid {
  border: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

#writing .writing-card {
  display: block;
  padding: 0;
  border: 0;
}

#writing .writing-card .language-tag,
#writing .writing-card h3,
#writing .writing-card p {
  margin-bottom: 0.75rem;
}

#writing .writing-card h3 {
  font-size: 1.65rem;
}

#writing .writing-card h3 a {
  color: var(--text);
  text-decoration-color: #675861;
}

#writing .writing-card p:not(.language-tag) {
  color: #c9c0c5;
  font-size: 0.98rem;
  line-height: 1.6;
}

#writing .writing-copy > p:last-child {
  margin: 2.5rem 0 0;
}

#next,
.final-inner {
  min-height: 640px;
}

/* Real product media and the final unified composition. */
.cuco-product-view {
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.cuco-product-screens {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.cuco-product-screens img {
  width: 100%;
  border: 1px solid #43505b;
  box-shadow: 18px 22px 0 #050a11;
}

.cuco-product-view figcaption {
  min-height: 0;
  margin-top: 1.75rem;
  padding: 0;
  border: 0;
  color: var(--text);
}

.cuco-product-view figcaption span {
  color: #94a3b5;
}

.cuco-product-view figcaption strong {
  color: var(--text);
  font-size: 1rem;
}

.capy-detail {
  grid-template-columns: minmax(280px, 0.54fr) minmax(0, 1.46fr);
  gap: clamp(2.5rem, 5vw, 5rem);
}

.capy-product-view {
  margin: 0;
}

.capy-product-screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.capy-product-screens img {
  width: 100%;
  border: 1px solid #41535b;
  box-shadow: 10px 12px 0 rgba(4, 9, 13, 0.5);
}

.capy-product-view figcaption {
  margin-top: 1rem;
  color: #bdc8d2;
  font-size: 0.92rem;
}

.capy-product-view figcaption strong {
  color: var(--text);
}

#in-use,
#graveyard,
#engineering,
#experience,
#writing {
  border-color: #22313d;
  background: #0d1822;
  color: var(--text);
}

#graveyard .chapter-inner {
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
}

.graveyard-heading h2 {
  max-width: 10ch;
}

#engineering .engineering-mast h2 {
  color: var(--text);
}

#engineering .engineering-mast .chapter-intro {
  color: #c9d1da;
}

#engineering .technical-pair {
  padding: clamp(1.75rem, 4vw, 3.25rem);
  background: #e8e5dc;
  color: #1e292c;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  gap: 0;
}

#engineering .technical-exhibit {
  padding: 0 clamp(1.5rem, 3vw, 3rem) 0 0;
  border: 0;
}

#engineering .technical-exhibit + .technical-exhibit {
  padding-right: 0;
  padding-left: clamp(1.5rem, 3vw, 3rem);
  border-left: 1px solid #aaa99f;
}

#engineering .technical-exhibit h3 {
  font-size: clamp(1.75rem, 2.65vw, 2.7rem);
}

#engineering .technical-exhibit + .technical-exhibit h3 {
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
}

#experience h2,
#writing h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.experience-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  grid-template-rows: repeat(2, auto);
  gap: 1.2rem clamp(3rem, 7vw, 7rem);
}

.chapter .experience-card:first-child {
  padding-right: 2rem;
  grid-row: 1 / 3;
}

.chapter .experience-card:first-child h3 {
  font-size: clamp(2.25rem, 3vw, 3rem);
}

.chapter .experience-card:not(:first-child) {
  display: grid;
  align-items: start;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 1.5rem;
}

.chapter .experience-card:not(:first-child) .experience-summary {
  margin-top: 0;
}

#writing .writing-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  grid-template-rows: repeat(2, auto);
  gap: 1.4rem clamp(3rem, 7vw, 7rem);
}

#writing .writing-card:first-child {
  padding-right: 2rem;
  grid-row: 1 / 3;
}

#writing .writing-card:first-child h3 {
  font-size: clamp(2.25rem, 3vw, 3rem);
}

#writing .writing-card:not(:first-child) {
  display: grid;
  align-items: start;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.5rem;
}

#writing .writing-card:not(:first-child) p {
  margin: 0;
}

#next,
.final-inner {
  min-height: 490px;
}

#next::after {
  background: linear-gradient(90deg, rgba(8, 14, 17, 0.92) 0 42%, rgba(8, 14, 17, 0.38) 70%, transparent);
}

.final-inner {
  padding-block: 3rem;
}

.final-panel h2 {
  max-width: 12ch;
  font-size: clamp(3rem, 4.5vw, 4.6rem);
}

.home-page .site-footer nav {
  display: none;
}

.home-page .footer-inner {
  min-height: 76px;
}

.page-hero,
.case-hero {
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(145deg, #101c2f, var(--ink));
}

.page-hero .shell,
.case-hero .shell {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.page-hero h1,
.case-hero h1 {
  max-width: 15ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.page-hero p:last-child,
.case-hero .lead {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.page-body,
.case-body {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.case-nav {
  display: flex;
  margin: 0 0 2rem;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.case-nav a {
  min-height: 44px;
  padding-block: 0.5rem;
  font-size: 0.85rem;
}

.case-sections {
  display: grid;
  max-width: 900px;
  gap: 1rem;
}

.case-section {
  padding: clamp(1.4rem, 4vw, 2.4rem);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.case-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.evidence-list,
.feature-list {
  padding-left: 1.3rem;
}

.evidence-list li + li,
.feature-list li + li {
  margin-top: 0.5rem;
}

.feature-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}

.feature-status > div {
  padding: 1.25rem;
  background: var(--panel);
}

.feature-status h3 {
  font-size: 1.08rem;
}

.plain-document {
  width: min(100%, calc(940px + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 6rem) var(--page-gutter);
}

.plain-header {
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--text);
}

.plain-header h1 {
  max-width: none;
  margin-bottom: 0.35rem;
  font-size: clamp(2.8rem, 8vw, 5rem);
}

.plain-header .plain-role {
  color: var(--warm);
  font-family: var(--mono);
}

.plain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.plain-block {
  margin-top: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.plain-block h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.plain-list {
  display: grid;
  gap: 1.3rem;
}

.plain-item + .plain-item {
  padding-top: 1.3rem;
  border-top: 1px solid var(--border-soft);
}

.plain-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1.2rem;
}

.index-group,
.search-panel,
.source-edition-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.index-group h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-list li {
  padding-block: 0.8rem;
  border-top: 1px solid var(--border-soft);
}

.index-list strong,
.index-list span,
.index-list small {
  display: block;
}

.index-list span,
.index-list small {
  color: var(--muted);
}

.search-panel {
  margin-bottom: 2rem;
}

.search-form {
  display: flex;
  max-width: 760px;
  gap: 0.6rem;
}

.search-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-form input {
  min-width: 0;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0;
  flex: 1;
  background: var(--ink-deep);
  color: var(--text);
  font: inherit;
}

.search-form button {
  min-height: 48px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--warm);
  border-radius: 0;
  background: var(--warm);
  color: var(--ink-deep);
  font-weight: 800;
  cursor: pointer;
}

.search-status {
  min-height: 1.7em;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.search-results {
  display: grid;
  margin-top: 1rem;
  gap: 0.7rem;
}

.search-result {
  padding: 1rem;
  border: 1px solid var(--border-soft);
  background: var(--ink-deep);
}

.search-result h3 {
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-result mark {
  background: var(--warm);
  color: var(--ink-deep);
}

.source-edition-card h2,
.source-edition-card h3 {
  margin-bottom: 0.4rem;
}

.source-meta {
  margin-bottom: 1rem;
  color: var(--muted);
}

.source-file-list {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.source-file-list li {
  border-top: 1px solid var(--border-soft);
}

.source-file-list a {
  display: flex;
  min-height: 44px;
  padding-block: 0.65rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.source-file-list small {
  flex-shrink: 0;
  color: var(--muted);
}

.source-file-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-meta {
  overflow-wrap: anywhere;
}

.source-viewer {
  width: min(100%, calc(1380px + 2 * var(--page-gutter)));
  margin-inline: auto;
  padding: 2rem var(--page-gutter) 5rem;
}

.source-breadcrumbs {
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.source-viewer h1 {
  max-width: none;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  overflow-wrap: anywhere;
}

.code-frame {
  max-width: 100%;
  margin: 1.5rem 0 0;
  border: 1px solid var(--border);
  overflow: auto;
  background: #070c15;
}

.code-frame pre {
  min-width: max-content;
  margin: 0;
  padding: 1.25rem;
  color: #dce6ef;
  font: 0.82rem/1.55 var(--mono);
  tab-size: 2;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 62px;
  }

  .hero-inner,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .capy-mast,
  .capy-detail,
  .graveyard-mast,
  .engineering-mast,
  .experience-mast,
  .writing-layout,
  .technical-pair {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding-top: 2.8rem;
    align-items: start;
  }

  .hero-intro,
  #graveyard .chapter-inner {
    grid-template-columns: 1fr;
  }

  .hero-intro {
    gap: 2.5rem;
  }

  .capy-mast .chapter-heading,
  .engineering-mast .chapter-heading,
  .experience-mast .chapter-heading,
  .writing-copy .chapter-heading {
    display: block;
  }

  .capy-mast h2,
  .engineering-mast h2,
  .experience-mast h2,
  .writing-copy h2 {
    margin-bottom: 1rem;
  }

  #graveyard .graveyard-heading {
    margin: 0;
  }

  .open-source-line {
    grid-template-columns: 1fr;
  }

  #engineering .technical-pair,
  .experience-grid,
  #writing .writing-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  #engineering .technical-exhibit,
  #engineering .technical-exhibit + .technical-exhibit {
    padding: 0;
    border-left: 0;
  }

  #engineering .technical-exhibit + .technical-exhibit {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #aaa99f;
  }

  .chapter .experience-card:first-child,
  #writing .writing-card:first-child {
    padding-right: 0;
    grid-row: auto;
  }

  #experience h2,
  #writing h2 {
    white-space: normal;
  }

  .hero-scene {
    max-width: 680px;
    margin-right: 0;
  }

  .hero-product {
    max-width: 760px;
  }

  .experience-mast .chapter-heading {
    display: block;
  }

  .experience-mast h2,
  .experience-mast .chapter-intro {
    margin-bottom: 1rem;
  }

  .capy-mast,
  .engineering-mast,
  .writing-layout {
    gap: 2.5rem;
  }

  .capy-detail {
    gap: 2.25rem;
  }

  .graveyard-heading {
    margin: -2rem 1.5rem 0;
  }

  .engineering-landscape {
    order: -1;
  }

  .experience-heading {
    margin: -2rem 1.5rem 0;
    padding: 2.5rem;
    border-top: 2px solid #6f8092;
  }

  .chapter .technical-exhibit + .technical-exhibit {
    margin-top: 2.5rem;
  }

  .writing-landscape .scene {
    min-height: 430px;
  }

  .chapter:nth-of-type(even) .chapter-grid > .scene {
    order: initial;
  }

  .chapter-copy {
    order: -1;
  }

  .graveyard-grid,
  .index-grid {
    grid-template-columns: 1fr;
  }

  .flow-diagram,
  .state-diagram {
    grid-template-columns: 1fr;
  }

  .flow-diagram li + li,
  .state-diagram > div + div {
    border-top: 0;
    border-left: 1px solid var(--border-soft);
  }

  .flow-diagram li + li::before {
    content: "↓";
    top: -0.65rem;
    left: 1rem;
    transform: none;
  }
}

@media (max-width: 639px) {
  body {
    font-size: 1.0625rem;
  }

  .site-header {
    backdrop-filter: none;
  }

  .header-inner {
    gap: 0.6rem;
  }

  .wordmark span:last-child,
  .motion-toggle,
  .header-tools > a:first-of-type {
    display: none;
  }

  .header-tools {
    gap: 0.55rem;
  }

  .header-tools > a {
    font-size: 0.78rem;
  }

  .hero-inner {
    padding-top: 2rem;
    gap: 2rem;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding-bottom: 0;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }

  .home-hero h1 {
    font-size: clamp(3.55rem, 17vw, 4.45rem);
  }

  .home-hero h1 > span {
    white-space: normal;
  }

  .hero-product {
    margin-inline: calc(var(--page-gutter) * -1);
  }

  .cuco-product-view {
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .cuco-product-bar {
    grid-template-columns: 1fr auto;
  }

  .cuco-product-bar > strong {
    display: none;
  }

  .cuco-product-controls i:nth-child(2) {
    display: none;
  }

  .cuco-product-body {
    min-height: 350px;
    grid-template-columns: 1fr;
  }

  .cuco-product-body aside {
    display: none;
  }

  .cuco-grid {
    height: 278px;
  }

  .cuco-now-line { top: 146px; }
  .event-review { top: 14px; }
  .event-focus { top: 61px; min-height: 76px; }
  .event-lunch { top: 119px; }
  .event-research { top: 165px; min-height: 70px; }
  .event-build { top: 56px; min-height: 94px; }

  .cuco-event {
    width: calc(20% - 6px);
    min-height: 48px;
    padding: 0.35rem;
  }

  .cuco-event b {
    font-size: 0.58rem;
    overflow-wrap: anywhere;
  }

  .cuco-event small {
    display: none;
  }

  .cuco-product-view figcaption {
    min-height: 58px;
  }

  .cuco-product-screens,
  .capy-product-screens {
    display: grid;
    padding: 0 var(--page-gutter) 1rem;
    overflow-x: auto;
    grid-template-columns: repeat(3, 72%);
    gap: 0.85rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .cuco-product-screens img,
  .capy-product-screens img {
    box-shadow: 8px 10px 0 rgba(4, 9, 13, 0.55);
    scroll-snap-align: start;
  }

  .capy-product-screens {
    padding-inline: 0;
  }

  .cuco-product-view figcaption {
    padding-inline: var(--page-gutter);
  }

  .hero-scene {
    margin-inline: calc(var(--page-gutter) * -1);
  }

  .hero-scene .scene {
    aspect-ratio: 4 / 3;
    box-shadow: none;
  }

  .action-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.6rem;
  }

  .action-row .button {
    width: 100%;
  }

  .scene {
    aspect-ratio: 3 / 2;
  }

  .capy-landscape .scene {
    aspect-ratio: 3 / 2;
  }

  .chapter-inner {
    padding-block: 3.75rem;
  }

  .chapter h2 {
    font-size: clamp(2.55rem, 12vw, 3.45rem);
  }

  .chapter-grid {
    gap: 1.7rem;
  }

  .project-heading {
    flex-direction: column;
  }

  .case-link {
    min-height: 44px;
    padding-block: 0.55rem;
  }

  .graveyard-grid,
  .contribution-grid,
  .experience-grid,
  .writing-grid,
  .source-grid,
  .feature-status {
    grid-template-columns: 1fr;
  }

  .chapter .experience-card:not(:first-child),
  #writing .writing-card:not(:first-child) {
    display: block;
  }

  .graveyard-heading,
  .experience-heading {
    margin: -1.2rem 0 0;
    padding: 1.75rem 1.25rem;
    box-shadow: none;
  }

  #graveyard .graveyard-heading {
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .graveyard-grid {
    margin-top: 2.5rem;
  }

  .graveyard-grid .project-summary,
  .graveyard-grid .project-summary + .project-summary {
    padding: 1.5rem 0 2rem;
    border-top: 1px solid #463a50;
    border-left: 0;
  }

  .graveyard-grid .project-summary + .project-summary {
    margin-top: 2.25rem;
  }

  .chapter .contribution-card,
  .chapter .contribution-card + .contribution-card {
    padding: 1.4rem 0 0;
    border-left: 0;
  }

  .chapter .contribution-card + .contribution-card {
    margin-top: 2rem;
  }

  .chapter .experience-card {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 1rem;
  }

  .experience-grid,
  #writing .writing-grid,
  .open-source-line ul {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .experience-mast .chapter-heading,
  .writing-copy .chapter-heading {
    display: block;
  }

  .experience-summary {
    grid-column: 2;
  }

  #writing .writing-card {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  #writing .writing-card .language-tag,
  #writing .writing-card h3,
  #writing .writing-card p,
  #writing .writing-card a {
    grid-column: 1;
    grid-row: auto;
  }

  .writing-landscape .scene {
    min-height: 330px;
  }

  #next,
  .final-inner {
    min-height: 560px;
  }

  #next::after {
    background: rgba(8, 14, 17, 0.5);
  }

  .final-panel {
    padding: 1.75rem 1.25rem;
    background: rgba(8, 14, 18, 0.92);
    box-shadow: 10px 12px 0 rgba(37, 52, 48, 0.62);
  }

  .footer-inner {
    padding-block: 1.5rem;
    align-items: start;
    flex-direction: column;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }

  .search-form {
    flex-direction: column;
  }

  .replay-map {
    height: 190px;
  }
}

/* Pixel-world layer: every homepage chapter is one stop in the same game map. */
.world-marker {
  display: inline-grid;
  margin: 0 0 1.6rem;
  padding: 0.35rem;
  border: 1px solid rgba(220, 229, 236, 0.46);
  align-items: center;
  grid-template-columns: 88px auto;
  gap: 0.8rem;
  background: rgba(5, 11, 18, 0.78);
  box-shadow: 6px 6px 0 rgba(3, 8, 13, 0.72);
}

.world-marker img {
  width: 88px;
  height: 50px;
  object-fit: cover;
  image-rendering: pixelated;
}

.world-marker p {
  margin: 0;
  padding-right: 0.55rem;
  color: #e7edf1;
  font: 730 0.71rem/1.25 var(--mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.world-marker p span {
  display: block;
  margin-bottom: 0.18rem;
  color: #f2a04b;
}

.home-page .home-hero,
.home-page .chapter {
  isolation: isolate;
  image-rendering: pixelated;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.home-page .home-hero {
  background-image: url("/portfolio/art/now-desktop.svg");
}

.home-page #in-use { background-image: url("/portfolio/art/in-use-desktop.svg"); }
.home-page #graveyard { background-image: url("/portfolio/art/graveyard-desktop.svg"); }
.home-page #engineering { background-image: url("/portfolio/art/engineering-desktop.svg"); }
.home-page #experience { background-image: url("/portfolio/art/experience-desktop.svg"); }
.home-page #writing { background-image: url("/portfolio/art/writing-desktop.svg"); }
.home-page #next { background-image: url("/portfolio/art/next-desktop.svg"); }

.home-page .home-hero::before,
.home-page .chapter::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.home-page .home-hero::before {
  background: linear-gradient(180deg, rgba(7, 14, 24, 0.64), rgba(7, 14, 24, 0.91));
}

.home-page #in-use::after {
  background: linear-gradient(180deg, rgba(8, 27, 33, 0.55), rgba(7, 22, 28, 0.9));
}

.home-page #graveyard::after {
  background: linear-gradient(180deg, rgba(19, 13, 28, 0.54), rgba(14, 10, 22, 0.91));
}

.home-page #engineering::after {
  display: block;
  background: linear-gradient(180deg, rgba(6, 22, 31, 0.5), rgba(6, 20, 29, 0.9));
}

.home-page #experience::after {
  background: linear-gradient(180deg, rgba(8, 20, 32, 0.51), rgba(7, 17, 28, 0.91));
}

.home-page #writing::after {
  background: linear-gradient(180deg, rgba(28, 18, 20, 0.51), rgba(17, 12, 15, 0.92));
}

.home-page #next::after {
  display: block;
  background: linear-gradient(90deg, rgba(13, 18, 24, 0.91) 0 48%, rgba(13, 18, 24, 0.62) 72%, rgba(13, 18, 24, 0.36));
}

.home-page .hero-inner,
.home-page .chapter-inner {
  position: relative;
  z-index: 1;
}

.home-page .hero-intro {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgba(130, 151, 168, 0.55);
  background: rgba(5, 12, 20, 0.82);
  box-shadow: 16px 16px 0 rgba(3, 8, 13, 0.7);
}

.home-page .hero-product {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border: 1px solid rgba(111, 133, 151, 0.58);
  background: rgba(5, 12, 19, 0.84);
  box-shadow: 18px 18px 0 rgba(3, 8, 13, 0.72);
}

.home-page .capy-detail {
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border: 1px solid rgba(104, 157, 164, 0.58);
  background: rgba(5, 20, 25, 0.84);
  box-shadow: 18px 18px 0 rgba(3, 12, 15, 0.68);
}

.home-page .graveyard-grid {
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border: 1px solid rgba(128, 106, 143, 0.6);
  background: rgba(17, 12, 25, 0.84);
  box-shadow: 18px 18px 0 rgba(8, 5, 13, 0.66);
}

.home-page #engineering {
  color: var(--text);
}

.home-page #engineering .engineering-mast h2,
.home-page #engineering .engineering-mast .chapter-intro {
  color: var(--text);
}

.home-page #engineering .engineering-mast .chapter-intro {
  color: #d0d9df;
}

.home-page .technical-focus {
  padding: clamp(2rem, 4vw, 4rem);
  border: 1px solid #bcb3a5;
  background: #ede8dd;
  box-shadow: 20px 20px 0 rgba(4, 12, 17, 0.76);
}

.home-page .experience-grid,
.home-page #writing .writing-grid {
  padding-inline: clamp(1.5rem, 3.5vw, 3rem);
  border: 1px solid rgba(105, 126, 146, 0.58);
  background: rgba(6, 15, 25, 0.84);
  box-shadow: 18px 18px 0 rgba(3, 8, 14, 0.68);
}

.home-page #writing .writing-grid {
  padding-top: clamp(1.8rem, 3.5vw, 3rem);
  padding-bottom: clamp(1.8rem, 3.5vw, 3rem);
  border-color: rgba(147, 111, 106, 0.58);
  background: rgba(20, 13, 16, 0.86);
}

.home-page #next {
  color: var(--text);
}

.home-page .final-panel {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid rgba(239, 183, 119, 0.75);
  background: rgba(8, 15, 21, 0.87);
  box-shadow: 18px 18px 0 rgba(61, 45, 39, 0.65);
}

.home-page .final-panel h2,
.home-page .final-copy {
  color: var(--text);
}

.home-page #next .button-primary {
  border-color: #f0a14a;
  background: #f0a14a;
  color: #111920;
}

@media (max-width: 639px) {
  .world-marker {
    grid-template-columns: 72px auto;
  }

  .world-marker img {
    width: 72px;
    height: 41px;
  }

  .home-page .home-hero { background-image: url("/portfolio/art/now-mobile.svg"); }
  .home-page #in-use { background-image: url("/portfolio/art/in-use-mobile.svg"); }
  .home-page #graveyard { background-image: url("/portfolio/art/graveyard-mobile.svg"); }
  .home-page #engineering { background-image: url("/portfolio/art/engineering-mobile.svg"); }
  .home-page #experience { background-image: url("/portfolio/art/experience-mobile.svg"); }
  .home-page #writing { background-image: url("/portfolio/art/writing-mobile.svg"); }
  .home-page #next { background-image: url("/portfolio/art/next-mobile.svg"); }

  .home-page .hero-intro,
  .home-page .hero-product,
  .home-page .capy-detail,
  .home-page .graveyard-grid,
  .home-page .technical-focus,
  .home-page .experience-grid,
  .home-page #writing .writing-grid,
  .home-page .final-panel {
    box-shadow: 9px 9px 0 rgba(3, 8, 13, 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (forced-colors: active) {
  .status-dot,
  .map-bus,
  .light-row i,
  .signal-track i {
    forced-color-adjust: none;
  }
}

/* Homepage composition: product proof first, then a concise working record. */
.site-header {
  border-bottom-color: rgba(164, 177, 193, 0.22);
  background: rgba(7, 14, 24, 0.96);
}

.header-inner {
  width: min(100%, calc(1280px + 2 * var(--page-gutter)));
}

.wordmark {
  gap: 0.8rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.wordmark-mark {
  width: 32px;
  height: 32px;
  border: 0;
  background: #ef952f;
  color: #101821;
  font-weight: 900;
}

.desktop-nav {
  gap: 2.25rem;
}

.desktop-nav a,
.header-tools > a {
  color: #d1d8e0;
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.025em;
}

.header-tools > a {
  min-height: 36px;
  padding: 0.28rem 0.8rem;
  border: 1px solid #465466;
  align-content: center;
}

.home-page {
  background: #0b1521;
}

.home-page .home-hero,
.home-page .chapter {
  overflow: clip;
}

.home-page .home-hero {
  min-height: 0;
  background:
    radial-gradient(circle at 86% 8%, rgba(239, 149, 47, 0.1), transparent 27rem),
    #0a1420;
}

.home-page .hero-inner {
  display: block;
  width: min(100%, calc(1280px + 2 * var(--page-gutter)));
  min-height: 0;
  padding: clamp(4rem, 7vw, 6.5rem) var(--page-gutter) clamp(4.5rem, 8vw, 7.5rem);
}

.home-page .hero-intro {
  display: grid;
  max-width: 1180px;
  align-items: end;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page .hero-title-block .eyebrow {
  margin-bottom: 1.3rem;
  color: #ef952f;
  font-size: 0.78rem;
}

.home-page .home-hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(4.8rem, 7.8vw, 7rem);
  font-weight: 540;
  letter-spacing: -0.068em;
  line-height: 0.86;
}

.home-page .home-hero h1 em {
  display: inline;
  color: #f0a03d;
}

.home-page .hero-pitch {
  padding: 0 0 0.2rem;
}

.home-page .hero-support {
  margin-bottom: 1rem;
  color: #d3dae2;
  font-size: clamp(1.08rem, 1.35vw, 1.28rem);
  line-height: 1.55;
}

.home-page .hero-status {
  margin-bottom: 1.4rem;
  color: #97a5b4;
  font-size: 0.78rem;
}

.home-page .also-live {
  margin-top: 1.1rem;
  color: #8bd6d8;
  font-size: 0.9rem;
}

.home-page .hero-product {
  width: min(100%, 1080px);
  margin: clamp(3.5rem, 6vw, 5.5rem) 0 0 auto;
}

.home-page .cuco-product-view,
.home-page .capy-product-view {
  margin: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.cuco-product-stage,
.capy-product-stage {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

.product-lead {
  position: relative;
  min-width: 0;
}

.product-lead::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: #03080d;
}

.product-lead img {
  width: 100%;
  height: auto;
  border: 1px solid #56616c;
}

.product-details {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.product-detail {
  min-width: 0;
}

.product-detail p {
  display: flex;
  margin: 0 0 0.65rem;
  align-items: center;
  gap: 0.75rem;
  color: #c7d0da;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail p span {
  color: #ef952f;
}

.product-detail img {
  width: 100%;
  height: clamp(190px, 19vw, 255px);
  border: 1px solid #53606c;
  object-fit: cover;
}

.home-page .cuco-product-view figcaption,
.home-page .capy-product-view figcaption {
  display: grid;
  margin: 1.75rem 0 0;
  padding: 0;
  border: 0;
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  color: #cbd4dd;
  font-size: 0.94rem;
  line-height: 1.5;
}

.home-page .cuco-product-view figcaption span {
  color: #8f9dab;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.home-page .cuco-product-view figcaption strong,
.home-page .capy-product-view figcaption strong {
  color: #edf1f4;
  font-size: 1rem;
}

.home-page .chapter-inner {
  width: min(100%, calc(1240px + 2 * var(--page-gutter)));
  padding: clamp(5rem, 8vw, 7.5rem) var(--page-gutter);
}

.home-page .chapter h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.2rem, 5.2vw, 5.1rem);
  font-weight: 540;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.home-page .chapter-intro {
  max-width: 46ch;
  margin: 0;
  color: #cad3dc;
  font-size: 1.08rem;
  line-height: 1.62;
}

.home-page #in-use {
  border-color: #38525a;
  background:
    radial-gradient(circle at 94% 16%, rgba(90, 178, 178, 0.12), transparent 30rem),
    #10242b;
}

.home-page .capy-mast {
  display: block;
}

.home-page .capy-mast .chapter-heading {
  display: grid;
  margin: 0 0 clamp(3.5rem, 6vw, 5.5rem);
  align-items: end;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page .capy-mast h2 {
  max-width: 12ch;
}

.home-page .capy-detail {
  display: grid;
  margin: 0;
  padding: 0;
  border: 0;
  align-items: start;
  grid-template-columns: minmax(270px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(3rem, 7vw, 7rem);
}

.home-page .capy-detail .project-summary {
  padding: 0;
}

.home-page .capy-detail .project-heading {
  margin: 0 0 1.5rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid #456068;
}

.home-page .capy-detail .project-heading h3 {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 3.3vw, 3.35rem);
  font-weight: 760;
  letter-spacing: -0.045em;
}

.home-page .capy-detail .project-problem {
  color: #f1f4f6;
  font-size: 1.08rem;
}

.home-page .capy-detail .metric {
  color: #7dd3d5;
  font-size: 0.84rem;
}

.home-page .capy-detail .project-summary > p:last-of-type {
  color: #c3ced7;
  line-height: 1.62;
}

.home-page .capy-product-stage {
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.home-page .capy-product-view .product-detail img {
  height: clamp(165px, 15vw, 215px);
}

.home-page .capy-product-view figcaption {
  display: block;
  margin-top: 1.5rem;
  padding-left: calc(36% + clamp(1.25rem, 2.5vw, 2rem));
}

.home-page #graveyard,
.home-page #experience,
.home-page #writing {
  border-color: #293948;
  background: #0c1722;
}

.home-page #graveyard .chapter-inner {
  display: block;
}

.home-page .graveyard-mast {
  display: block;
}

.home-page .graveyard-mast .chapter-heading {
  display: grid;
  margin: 0 0 4rem;
  align-items: end;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page .graveyard-heading h2 {
  max-width: 9ch;
  font-size: clamp(3.2rem, 5.2vw, 5.1rem);
}

.home-page .graveyard-grid {
  display: grid;
  margin: 0;
  padding-top: 2.4rem;
  border-top: 1px solid #3a4857;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page .graveyard-grid .project-summary,
.home-page .graveyard-grid .project-summary + .project-summary {
  margin: 0;
  padding: 0;
  border: 0;
}

.home-page .graveyard-grid .project-heading {
  margin-bottom: 1.2rem;
  padding: 0;
  border: 0;
}

.home-page .graveyard-grid h3 {
  font-family: var(--sans);
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
  font-weight: 750;
}

.home-page .graveyard-grid .project-problem {
  color: #e7ebef;
}

.home-page .graveyard-grid .metric {
  min-height: 2.8rem;
  color: #e7ae6c;
  font-size: 0.82rem;
}

.home-page .graveyard-grid .project-summary > p:last-of-type {
  color: #bbc6d1;
}

.home-page #engineering {
  border-color: #c8c1b3;
  background: #ede8dd;
  color: #233035;
}

.home-page #engineering .engineering-mast {
  display: block;
  margin: 0 0 clamp(3.5rem, 6vw, 5.5rem);
}

.home-page #engineering .engineering-mast .chapter-heading {
  display: grid;
  margin: 0;
  align-items: end;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page #engineering .engineering-mast h2 {
  max-width: 12ch;
  color: #18262b;
}

.home-page #engineering .engineering-mast .chapter-intro {
  color: #516065;
}

.technical-focus {
  display: grid;
  padding-top: 2.5rem;
  border-top: 1px solid #b9b1a4;
  grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.48fr);
  gap: clamp(3rem, 7vw, 6.5rem);
}

.technical-main,
.technical-aside {
  min-width: 0;
}

.technical-main .exhibit-kicker,
.technical-aside .exhibit-kicker {
  margin-bottom: 1rem;
  color: #a35419;
  font-size: 0.78rem;
}

.technical-main h3,
.technical-aside h3 {
  color: #17262b;
  font-family: var(--sans);
  font-weight: 760;
}

.technical-main h3 {
  max-width: 17ch;
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  letter-spacing: -0.05em;
}

.technical-main > p:not(.exhibit-kicker),
.technical-aside > p:not(.exhibit-kicker) {
  color: #526166;
}

.retry-flow {
  display: grid;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 2rem;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
}

.retry-flow li {
  position: relative;
  min-width: 0;
  padding-top: 1.4rem;
  border-top: 3px solid #d97b24;
}

.retry-flow li + li::before {
  content: "→";
  position: absolute;
  top: 0.6rem;
  left: calc(clamp(1.5rem, 3vw, 2.5rem) * -0.75);
  color: #a35419;
  font-family: var(--mono);
}

.retry-flow span,
.retry-flow strong,
.retry-flow small {
  display: block;
}

.retry-flow span {
  margin-bottom: 2.2rem;
  color: #a35419;
  font: 700 0.78rem var(--mono);
}

.retry-flow strong {
  color: #18262b;
  font-size: 1.06rem;
}

.retry-flow small {
  margin-top: 0.6rem;
  color: #5a696d;
  font-size: 0.86rem;
  line-height: 1.5;
}

.technical-boundary {
  max-width: 54ch;
  margin: 0 0 1.2rem;
  padding-left: 1rem;
  border-left: 3px solid #21828a;
  font-size: 0.9rem;
}

.technical-main a,
.technical-aside a {
  color: #17676f;
  font-weight: 720;
}

.technical-aside {
  padding-left: clamp(2rem, 4vw, 4rem);
  border-left: 1px solid #b9b1a4;
}

.technical-aside h3 {
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
  letter-spacing: -0.04em;
}

.freshness-list {
  margin: 2rem 0;
}

.freshness-list div {
  display: grid;
  padding: 0.8rem 0;
  border-top: 1px solid #c9c1b5;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1rem;
}

.freshness-list dt {
  color: #203136;
  font: 750 0.8rem var(--mono);
  overflow-wrap: normal;
  word-break: normal;
}

.freshness-list dd {
  margin: 0;
  color: #5a696d;
  font-size: 0.86rem;
  line-height: 1.45;
}

.home-page #experience .experience-mast .chapter-heading,
.home-page #writing .writing-copy > .chapter-heading {
  display: grid;
  margin: 0 0 4rem;
  align-items: end;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page #experience h2,
.home-page #writing h2 {
  max-width: 13ch;
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(3.2rem, 5.2vw, 5.1rem);
  font-weight: 540;
  letter-spacing: -0.06em;
  line-height: 0.94;
  white-space: normal;
}

.home-page .experience-grid {
  display: block;
  margin: 0;
  border-bottom: 1px solid #344454;
}

.home-page .chapter .experience-card,
.home-page .chapter .experience-card:first-child,
.home-page .chapter .experience-card:not(:first-child) {
  display: grid;
  margin: 0;
  padding: 2rem 0;
  border-top: 1px solid #344454;
  align-items: start;
  grid-template-columns: minmax(240px, 0.72fr) minmax(180px, 0.48fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.home-page .experience-role {
  display: contents;
}

.home-page .experience-role h3,
.home-page .chapter .experience-card:first-child h3 {
  margin: 0;
  color: #f0f2f4;
  font-family: var(--sans);
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.home-page .experience-role .role {
  margin: 0;
  color: #e0a764;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
}

.home-page .experience-summary,
.home-page .chapter .experience-card:not(:first-child) .experience-summary {
  margin: 0;
  color: #bdc7d1;
  font-size: 1rem;
  line-height: 1.62;
}

.home-page #writing {
  background: #101b28;
}

.home-page .writing-layout {
  display: block;
}

.home-page #writing .writing-grid {
  display: grid;
  margin: 0;
  padding-top: 2.5rem;
  border-top: 1px solid #3b4959;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: 0;
}

.home-page #writing .writing-card,
.home-page #writing .writing-card:first-child,
.home-page #writing .writing-card:not(:first-child) {
  display: block;
  margin: 0;
  padding: 0 clamp(2rem, 4vw, 4rem);
  border: 0;
}

.home-page #writing .writing-card:first-child {
  padding-left: 0;
}

.home-page #writing .writing-card:last-child {
  padding-right: 0;
}

.home-page #writing .writing-card + .writing-card {
  border-left: 1px solid #3b4959;
}

.home-page #writing .writing-card h3,
.home-page #writing .writing-card:first-child h3 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: clamp(1.65rem, 2.35vw, 2.25rem);
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.home-page #writing .writing-card h3 a {
  color: #f1f3f5;
  text-decoration-color: #d58a42;
}

.home-page #writing .writing-card p,
.home-page #writing .writing-card:not(:first-child) p {
  margin: 0;
  color: #bec8d2;
  font-size: 0.98rem;
  line-height: 1.62;
}

.home-page #writing .writing-copy > p:last-child {
  margin: 3rem 0 0;
}

.home-page #next,
.home-page #next .final-inner {
  min-height: 0;
}

.home-page #next {
  display: block;
  border-color: #bd6d1f;
  background: #eb8c2d;
  color: #182127;
}

.home-page #next::after {
  display: none;
}

.home-page .final-inner {
  display: block;
  padding-block: clamp(4.5rem, 7vw, 6.5rem);
}

.home-page .final-mark {
  display: flex;
  margin: 0 0 clamp(3rem, 5vw, 4.5rem);
  align-items: center;
  gap: 0.8rem;
  color: #273137;
  font: 760 0.78rem var(--mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.home-page .final-mark img {
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: #f7f1e7;
}

.home-page .final-panel {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  align-items: end;
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.home-page .final-panel .chapter-heading {
  margin: 0;
}

.home-page .final-panel h2 {
  max-width: 11ch;
  color: #152027;
  font-size: clamp(3.7rem, 6.3vw, 6.4rem);
  line-height: 0.9;
}

.home-page .final-response {
  padding-bottom: 0.4rem;
}

.home-page .final-copy {
  margin-bottom: 1.6rem;
  color: #28343b;
  font-size: 1.08rem;
  line-height: 1.6;
}

.home-page #next .button-primary {
  border-color: #162128;
  background: #162128;
  color: #f5f1e8;
}

.home-page .site-footer nav {
  display: flex;
}

.home-page .footer-inner {
  min-height: 92px;
}

@media (max-width: 900px) {
  .home-page .hero-intro,
  .home-page .capy-mast .chapter-heading,
  .home-page .graveyard-mast .chapter-heading,
  .home-page #engineering .engineering-mast .chapter-heading,
  .home-page #experience .experience-mast .chapter-heading,
  .home-page #writing .writing-copy > .chapter-heading,
  .home-page .final-panel {
    display: block;
  }

  .home-page .hero-pitch,
  .home-page .chapter-intro,
  .home-page .final-response {
    margin-top: 1.6rem;
  }

  .home-page .capy-detail,
  .technical-focus {
    grid-template-columns: 1fr;
  }

  .home-page .capy-detail {
    gap: 3.5rem;
  }

  .home-page .capy-detail .project-summary {
    max-width: 680px;
  }

  .technical-aside {
    padding: 2.5rem 0 0;
    border-top: 1px solid #b9b1a4;
    border-left: 0;
  }

  .home-page .chapter .experience-card,
  .home-page .chapter .experience-card:first-child,
  .home-page .chapter .experience-card:not(:first-child) {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 0.6rem 2rem;
  }

  .home-page .experience-role {
    display: block;
  }

  .home-page .experience-summary,
  .home-page .chapter .experience-card:not(:first-child) .experience-summary {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 639px) {
  .header-inner {
    padding-inline: 1rem;
  }

  .wordmark span:last-child {
    display: inline;
  }

  .home-page .hero-inner {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
  }

  .home-page .home-hero h1 {
    font-size: clamp(3.7rem, 18vw, 4.7rem);
    line-height: 0.88;
  }

  .home-page .home-hero h1 > span {
    white-space: normal;
  }

  .home-page .hero-product {
    margin-top: 3.5rem;
  }

  .cuco-product-stage,
  .home-page .capy-product-stage {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-lead {
    width: min(76vw, 300px);
    margin-inline: auto;
  }

  .product-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .product-detail p {
    font-size: 0.68rem;
  }

  .product-detail img,
  .home-page .capy-product-view .product-detail img {
    height: 145px;
  }

  .home-page .cuco-product-view figcaption,
  .home-page .capy-product-view figcaption {
    display: block;
    padding: 0;
  }

  .home-page .cuco-product-view figcaption span,
  .home-page .cuco-product-view figcaption strong {
    display: block;
  }

  .home-page .cuco-product-view figcaption strong {
    margin-top: 0.35rem;
  }

  .home-page .chapter-inner {
    padding-block: 4.5rem;
  }

  .home-page .chapter h2,
  .home-page .graveyard-heading h2,
  .home-page #experience h2,
  .home-page #writing h2 {
    font-size: clamp(3rem, 14vw, 3.8rem);
  }

  .home-page .capy-mast .chapter-heading,
  .home-page .graveyard-mast .chapter-heading,
  .home-page #experience .experience-mast .chapter-heading,
  .home-page #writing .writing-copy > .chapter-heading {
    margin-bottom: 3rem;
  }

  .home-page .graveyard-grid,
  .home-page #writing .writing-grid {
    grid-template-columns: 1fr;
  }

  .home-page .graveyard-grid {
    gap: 3rem;
  }

  .home-page .graveyard-grid .metric {
    min-height: 0;
  }

  .home-page #writing .writing-card,
  .home-page #writing .writing-card:first-child,
  .home-page #writing .writing-card:not(:first-child) {
    padding: 0 0 2.5rem;
  }

  .home-page #writing .writing-card + .writing-card {
    padding-top: 2.5rem;
    border-top: 1px solid #3b4959;
    border-left: 0;
  }

  .retry-flow {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .retry-flow li + li::before {
    display: none;
  }

  .retry-flow span {
    margin-bottom: 1rem;
  }

  .freshness-list div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .home-page .chapter .experience-card,
  .home-page .chapter .experience-card:first-child,
  .home-page .chapter .experience-card:not(:first-child) {
    display: block;
  }

  .home-page .experience-role .role {
    margin-top: 0.4rem;
  }

  .home-page .experience-summary,
  .home-page .chapter .experience-card:not(:first-child) .experience-summary {
    margin-top: 1.2rem;
  }

  .home-page .final-panel h2 {
    font-size: clamp(3.65rem, 16vw, 4.6rem);
  }

  .home-page .final-response {
    margin-top: 2rem;
  }
}

/* Keep the game-world layer last in the cascade. */
.home-page .home-hero {
  background-color: #10172d;
  background-image: url("/portfolio/art/now-desktop.svg");
}

.home-page #in-use {
  background-color: #12323d;
  background-image: url("/portfolio/art/in-use-desktop.svg");
}

.home-page #graveyard {
  background-color: #2b233a;
  background-image: url("/portfolio/art/graveyard-desktop.svg");
}

.home-page #engineering {
  background-color: #112735;
  background-image: url("/portfolio/art/engineering-desktop.svg");
  color: var(--text);
}

.home-page #experience {
  background-color: #172536;
  background-image: url("/portfolio/art/experience-desktop.svg");
}

.home-page #writing {
  background-color: #352a2c;
  background-image: url("/portfolio/art/writing-desktop.svg");
}

.home-page #next {
  background-color: #d79fa0;
  background-image: url("/portfolio/art/next-desktop.svg");
  color: var(--text);
}

.home-page #engineering::after,
.home-page #next::after {
  display: block;
}

.home-page #engineering .engineering-mast h2,
.home-page #engineering .engineering-mast .chapter-intro,
.home-page .final-panel h2,
.home-page .final-copy {
  color: var(--text);
}

.home-page .capy-detail {
  padding: clamp(1.5rem, 3.5vw, 3rem);
  border: 1px solid rgba(104, 157, 164, 0.58);
  background: rgba(5, 20, 25, 0.84);
  box-shadow: 18px 18px 0 rgba(3, 12, 15, 0.68);
}

.home-page .final-panel {
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid rgba(239, 183, 119, 0.75);
  background: rgba(8, 15, 21, 0.87);
  box-shadow: 18px 18px 0 rgba(61, 45, 39, 0.65);
}

.home-page #next .button-primary {
  border-color: #f0a14a;
  background: #f0a14a;
  color: #111920;
}

@media (max-width: 639px) {
  .home-page .home-hero { background-image: url("/portfolio/art/now-mobile.svg"); }
  .home-page #in-use { background-image: url("/portfolio/art/in-use-mobile.svg"); }
  .home-page #graveyard { background-image: url("/portfolio/art/graveyard-mobile.svg"); }
  .home-page #engineering { background-image: url("/portfolio/art/engineering-mobile.svg"); }
  .home-page #experience { background-image: url("/portfolio/art/experience-mobile.svg"); }
  .home-page #writing { background-image: url("/portfolio/art/writing-mobile.svg"); }
  .home-page #next { background-image: url("/portfolio/art/next-mobile.svg"); }

  .home-page .capy-detail,
  .home-page .final-panel {
    box-shadow: 9px 9px 0 rgba(3, 8, 13, 0.7);
  }
}

@font-face {
  font-family: "Daquisu Display";
  src: url("/portfolio/fonts/fira-sans-condensed-extra-bold.otf") format("opentype");
  font-display: swap;
  font-style: normal;
  font-weight: 800;
}

@font-face {
  font-family: "Daquisu Mono";
  src: url("/portfolio/fonts/fira-mono-medium.otf") format("opentype");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

.home-page {
  --header-height: 54px;
  --quest-cream: #fff0c7;
  --quest-amber: #ffc45c;
  --quest-cyan: #70e4e3;
  --quest-ink: #080b1d;
  --quest-panel: rgba(9, 11, 35, 0.89);
  --quest-line: #8177b2;
  --quest-display: "Daquisu Display", "Arial Narrow", sans-serif;
  --quest-mono: "Daquisu Mono", ui-monospace, monospace;
  background: var(--quest-ink);
}

.home-page .site-header {
  z-index: 80;
  border-bottom: 0;
  background: rgba(5, 8, 24, 0.94);
  box-shadow: 0 1px 0 #332f64, 0 4px 0 rgba(3, 5, 17, 0.72);
  backdrop-filter: blur(10px);
}

.home-page .header-inner {
  width: 100%;
  max-width: none;
  padding-inline: clamp(0.8rem, 2vw, 1.6rem);
}

.home-page .header-brand {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 0.85rem);
  min-width: 0;
}

.home-page .header-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(255, 196, 92, 0.5);
  background: linear-gradient(90deg, rgba(255, 196, 92, 0.15), rgba(255, 196, 92, 0.05));
  color: var(--quest-amber);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 196, 92, 0.15);
  font: 700 clamp(0.64rem, 0.9vw, 0.76rem) var(--quest-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}
.home-page .header-greeting::before {
  content: "●";
  display: inline-block;
  font-size: 0.55rem;
  color: var(--quest-cyan);
  animation: quest-pulse-dot 2s infinite ease-in-out;
}
@keyframes quest-pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 480px) {
  .home-page .header-brand { gap: 0.4rem; }
  .home-page .header-greeting { font-size: 0.58rem; padding: 0.15rem 0.35rem; }
}
@media (max-width: 350px) {
  .home-page .header-brand { gap: 0.3rem; }
  .home-page .header-greeting { font-size: 0.52rem; padding: 0.1rem 0.25rem; }
}

.home-page .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--quest-cream);
  font: 800 0.82rem var(--quest-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.home-page .wordmark-mark {
  width: 14px;
  height: 14px;
  background: var(--quest-amber);
  box-shadow: 0 0 12px rgba(255, 196, 92, 0.4);
}

.home-page .desktop-nav {
  display: flex;
  gap: 0.45rem;
}

.home-page .desktop-nav a {
  position: relative;
  width: clamp(1.8rem, 3.1vw, 3.2rem);
  min-height: 10px;
  padding: 0;
  border: 1px solid #48436e;
  background: #252343;
  color: transparent;
  font-size: 0;
}

.home-page .desktop-nav a::after {
  content: attr(data-phase);
  position: absolute;
  top: 15px;
  left: 50%;
  color: #8d88ad;
  font: 500 0.54rem var(--quest-mono);
  transform: translateX(-50%);
}

.home-page .desktop-nav .chapter-tooltip {
  position: absolute;
  top: calc(100% + 0.95rem);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 0.35rem 0.65rem;
  background: #0d1028;
  border: 1px solid var(--quest-line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 2px 2px 0 rgba(112, 228, 227, 0.3);
  color: var(--quest-cream);
  font: 600 0.58rem/1.3 var(--quest-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 100;
  text-transform: none;
}

.home-page .desktop-nav .chapter-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--quest-line);
}

.home-page .desktop-nav a:hover .chapter-tooltip,
.home-page .desktop-nav a:focus-visible .chapter-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.home-page .desktop-nav a[aria-current] {
  border-color: var(--quest-amber);
  background: var(--quest-amber);
  box-shadow: 0 0 14px rgba(255, 196, 92, 0.35);
}

.home-page .desktop-nav a[aria-current]::after { color: var(--quest-cream); }

.home-page .header-progress {
  display: grid;
  color: #aaa6c3;
  font: 500 0.52rem var(--quest-mono);
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.home-page .header-progress strong { color: var(--quest-cream); }

.home-page .header-tools > a {
  display: grid;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border: 1px solid #f7d992;
  background: var(--quest-amber);
  color: #171128;
  font: 800 0.66rem var(--quest-mono);
  letter-spacing: 0.05em;
  place-items: center;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 #594066;
}

.home-page .header-tools > a:hover { color: #171128; transform: translate(-1px, -1px); }
.home-page .header-tools > a:active { box-shadow: none; transform: translate(3px, 3px); }

.quest-experience {
  position: relative;
  min-height: calc(100svh - var(--header-height));
  background: #070a1d;
  color: #e9e8ee;
  isolation: isolate;
}

.quest-scenes { position: relative; overflow: clip; }

.quest-scene {
  position: relative;
  display: grid;
  min-height: calc(100svh - var(--header-height));
  padding: clamp(2.5rem, 7vh, 5.5rem) clamp(1rem, 6vw, 6.5rem) clamp(7.5rem, 15vh, 10rem);
  align-items: center;
  overflow: hidden;
  background-color: #080c20;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  isolation: isolate;
}

.quest-scene::before,
.quest-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.quest-scene::before { background: linear-gradient(90deg, rgba(3, 6, 20, 0.58), transparent 58%); }
.quest-scene::after { background: linear-gradient(180deg, rgba(4, 6, 18, 0.1) 55%, rgba(3, 5, 17, 0.68) 100%); }

.quest-scene--cuco { background-image: url("/portfolio/art/world-now-authored.webp"); }
.quest-scene--capyusp { background-image: url("/portfolio/art/world-in-use-authored.webp"); }
.quest-scene--graveyard { background-image: url("/portfolio/art/world-papagaio-board.webp"); }
.quest-scene--writing { background-image: url("/portfolio/art/world-writing-save-room.webp"); }
.quest-scene--engineering { background-image: url("/portfolio/art/world-engineering-single-studio.webp"); }
.quest-scene--experience { background-image: url("/portfolio/art/world-career-infrastructure.webp"); }
.quest-scene--next { background-image: url("/portfolio/art/world-next-16bit.webp"); }

body.home-page #in-use.quest-scene,
body.home-page #graveyard.quest-scene,
body.home-page #writing.quest-scene,
body.home-page #engineering.quest-scene,
body.home-page #experience.quest-scene,
body.home-page #next.quest-scene {
  background-color: #080c20;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
body.home-page #in-use.quest-scene { background-image: url("/portfolio/art/world-in-use-authored.webp"); }
body.home-page #graveyard.quest-scene { background-image: url("/portfolio/art/world-papagaio-board.webp"); }
body.home-page #writing.quest-scene { background-image: url("/portfolio/art/world-writing-save-room.webp"); }
body.home-page #engineering.quest-scene { background-image: url("/portfolio/art/world-engineering-single-studio.webp"); color: #e9e8ee; }
body.home-page #experience.quest-scene { background-image: url("/portfolio/art/world-career-infrastructure.webp"); }
body.home-page #next.quest-scene { display: grid; min-height: calc(100svh - var(--header-height)); background-image: url("/portfolio/art/world-next-16bit.webp"); }
body.home-page #graveyard.quest-scene { background-position: 60% 50%; }
body.home-page #engineering.quest-scene .quest-panel h2,
body.home-page #engineering.quest-scene .quest-panel h3,
body.home-page #engineering.quest-scene .quest-panel strong,
body.home-page #experience.quest-scene .quest-panel h2,
body.home-page #writing.quest-scene .quest-panel h2 {
  color: var(--quest-cream);
}
body.home-page #experience.quest-scene .quest-panel h2,
body.home-page #writing.quest-scene .quest-panel h2 {
  font-family: var(--quest-display);
  font-size: clamp(2rem, 3.3vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.88;
  white-space: normal;
}

.quest-scene--capyusp::before,
.quest-scene--writing::before { background: linear-gradient(270deg, rgba(3, 6, 20, 0.7), rgba(3, 6, 20, 0.04) 64%); }
.quest-scene--capyusp::after { background: linear-gradient(180deg, rgba(0, 64, 111, 0.04) 45%, rgba(2, 16, 34, 0.74)); }

.quest-panel {
  position: relative;
  z-index: 5;
  width: min(100%, 31rem);
  padding: clamp(1.2rem, 2.6vw, 2rem);
  border: 2px solid var(--quest-line);
  background: var(--quest-panel);
  box-shadow: 10px 10px 0 rgba(3, 5, 18, 0.76), inset 0 0 0 1px rgba(255, 240, 199, 0.08);
}

.quest-panel::before,
.quest-panel::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--quest-amber);
}

.quest-panel::before { top: -2px; left: -2px; }
.quest-panel::after { right: -2px; bottom: -2px; }
.quest-panel--left { justify-self: start; }
.quest-panel--right { justify-self: end; }
.quest-panel--wide { width: min(100%, 38rem); }

.quest-scene--cuco .quest-panel {
  border-left: 6px solid var(--quest-amber);
  background: linear-gradient(90deg, rgba(7, 9, 30, 0.98), rgba(7, 9, 30, 0.9));
}

.quest-scene--writing .quest-panel {
  width: min(100%, 34rem);
  border: 0;
  background: rgba(255, 234, 181, 0.95);
  color: #202034;
  box-shadow: 9px 9px 0 rgba(40, 26, 22, 0.32);
  transform: rotate(0.2deg);
}

.quest-scene--writing .quest-panel::before,
.quest-scene--writing .quest-panel::after { background: #7b421c; }

.quest-scene--writing .quest-panel-meta { border-color: rgba(74, 52, 43, 0.35); color: #5c4a45; }
.quest-scene--writing .quest-panel-meta b,
.quest-scene--writing .quest-panel h2,
.quest-scene--writing .quest-lead,
.quest-scene--writing .quest-protocol li { color: #202034; }
.quest-scene--writing .quest-kicker,
.quest-scene--writing .quest-protocol span { color: #7c3618; }
.quest-scene--writing .quest-protocol li { border-color: rgba(74, 52, 43, 0.34); }

.quest-manuscript {
  position: absolute;
  z-index: 2;
  top: clamp(5.5rem, 26cqh, 18rem);
  left: calc(50cqw - 40.833cqh - min(7.5rem, 13cqh));
  width: min(20rem, 34cqh);
  color: #1e1008;
  font-family: var(--quest-mono);
  text-wrap: balance;
  transform: rotate(-0.7deg);
  pointer-events: none;
}
.quest-manuscript p { margin: 0 0 0.55rem; font: 800 clamp(0.95rem, 1.35vw, 1.35rem)/1.1 var(--quest-display); color: #150904; text-transform: uppercase; letter-spacing: 0.04em; }
.quest-manuscript blockquote { margin: 0; font-size: clamp(0.88rem, 1.15vw, 1.05rem); font-weight: 650; line-height: 1.48; color: #0b0402; }
.quest-manuscript span { display: block; margin-top: 0.75rem; color: #3e1c0a; font-size: clamp(0.62rem, 0.75vw, 0.72rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

.quest-scene--engineering .quest-panel {
  width: min(100%, 44rem);
  padding-left: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.quest-panel--career {
  width: min(100%, 66rem);
  height: min(62vh, 33rem);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-self: center;
  align-self: center;
}

.quest-panel--career .quest-panel-meta,
.quest-panel--career .quest-kicker,
.quest-panel--career h2,
.quest-panel--career .quest-cuco-lesson { width: min(100%, 26rem); }

.quest-scene--graveyard .quest-panel {
  width: min(100%, 34rem);
  padding-left: 1.4rem;
  border: 0;
  border-left: 4px solid var(--quest-amber);
  background: linear-gradient(90deg, rgba(8, 9, 29, 0.96), rgba(8, 9, 29, 0.52) 72%, transparent);
  box-shadow: none;
}

.quest-scene--capyusp .quest-panel {
  border-color: var(--quest-cyan);
  background: linear-gradient(135deg, rgba(4, 27, 42, 0.91), rgba(8, 10, 31, 0.88));
  box-shadow: 10px 10px 0 rgba(3, 21, 31, 0.7);
}

.quest-scene--graveyard .quest-panel::before,
.quest-scene--graveyard .quest-panel::after,
.quest-scene--engineering .quest-panel::before,
.quest-scene--engineering .quest-panel::after,
.quest-panel--career::before,
.quest-panel--career::after { display: none; }

.quest-panel-meta {
  display: flex;
  margin: 0 0 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #514b7d;
  justify-content: space-between;
  gap: 1rem;
  color: #bbb6d0;
  font: 500 0.65rem var(--quest-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quest-panel-meta b { display: none; color: var(--quest-cream); font-weight: 500; }
.quest-kicker,
.quest-role {
  margin: 0 0 0.45rem;
  color: var(--quest-cyan);
  font: 500 0.69rem/1.45 var(--quest-mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.quest-role { color: #d5d2e0; }

.quest-panel h1,
.quest-panel h2 {
  max-width: none;
  margin: 0 0 1rem;
  color: var(--quest-cream);
  font: 800 clamp(2.25rem, 4vw, 4.5rem)/0.88 var(--quest-display);
  letter-spacing: -0.025em;
  text-shadow: 4px 4px 0 #251b3d;
  text-transform: uppercase;
  text-wrap: balance;
}

.quest-panel h2 { font-size: clamp(2rem, 3.3vw, 3.7rem); }
.quest-panel h3 {
  margin: 0;
  color: var(--quest-cream);
  font: 800 1.25rem var(--quest-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.quest-panel p { max-width: none; }
.quest-lead { margin: 0 0 1rem; color: #f1eff3; font-size: clamp(0.88rem, 1.1vw, 1.02rem); line-height: 1.5; }

.hero-proof {
  display: grid;
  width: min(100%, 21rem);
  margin: 1.2rem 0;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: end;
  gap: 0.25rem 0.55rem;
}
.hero-proof strong,
.quest-stat strong { color: var(--quest-amber); font: 800 2rem/0.85 var(--quest-display); }
.hero-proof span,
.quest-stat span { color: #c9c5d6; font: 500 0.64rem var(--quest-mono); text-transform: uppercase; }
.quest-stat { display: flex; margin: 1rem 0; align-items: baseline; gap: 0.6rem; }
.quest-fact { margin: -0.45rem 0 0.8rem; color: #d7d3df; font-size: 0.78rem; }
.quest-cuco-lesson {
  margin: 0.75rem 0;
  padding-left: 0.7rem;
  border-left: 2px solid var(--quest-amber);
  color: #dedbe4;
  font-size: 0.76rem;
  line-height: 1.4;
}
.quest-cuco-lesson span { display: block; margin-bottom: 0.12rem; color: var(--quest-cyan); font: 500 0.58rem var(--quest-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.quest-scene--writing .quest-cuco-lesson { border-color: #7c3618; color: #443c3a; }
.quest-scene--writing .quest-cuco-lesson span { color: #7c3618; }
.quest-actions { display: flex; margin-top: 1.2rem; flex-wrap: wrap; gap: 0.65rem; }

.quest-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--quest-cyan);
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--quest-cream);
  font: 500 0.69rem var(--quest-mono);
  touch-action: manipulation;
  text-decoration: none;
  text-transform: uppercase;
}
.quest-button[type="button"] { cursor: pointer; }
.quest-button[type="button"]:not(.quest-button--primary):not(:hover) { background: transparent; }
.quest-button--primary { border-color: var(--quest-amber); background: var(--quest-amber); color: #181127; box-shadow: 4px 4px 0 #57405d; }
.quest-button:hover,
.quest-button[type="button"]:hover { background: var(--quest-cyan); color: #111225; }
.quest-button--primary:hover { background: #ffe09b; color: #181127; }
.quest-button--primary:active { box-shadow: none; transform: translate(4px, 4px); }
.quest-scene--writing .quest-button:not(.quest-button--primary) { border-color: #17647a; color: #202034; }
.quest-scene--writing .quest-button:not(.quest-button--primary):hover { background: #17647a; color: #fff0c7; }

.quest-record { padding: 0.9rem 0; border-top: 1px solid #514b7d; }
.quest-record p { margin: 0.35rem 0; color: #d8d4df; font-size: 0.82rem; line-height: 1.4; }
.quest-record .quest-button { margin-top: 0.45rem; color: #181127; }
.quest-record--compact { padding-bottom: 0; }

.quest-protocol { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(3, 1fr); list-style: none; }
.quest-protocol li { position: relative; padding: 0.65rem 0.35rem; border-block: 1px solid #514b7d; color: var(--quest-cream); font: 500 0.61rem var(--quest-mono); text-align: center; text-transform: uppercase; }
.quest-protocol li + li { border-left: 1px solid #514b7d; }
.quest-protocol span { display: block; color: var(--quest-amber); }

.quest-patches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.quest-patches > button { display: grid; min-width: 0; padding: 0.9rem; border: 1px solid var(--quest-cyan); background: rgba(6, 16, 29, 0.9); color: var(--quest-cream); gap: 0.35rem; font: inherit; text-align: left; cursor: pointer; }
.quest-patches > button:nth-child(2) { border-color: var(--quest-amber); }
.quest-patches span,
.quest-patches code { color: var(--quest-cyan); font: 500 0.59rem var(--quest-mono); text-transform: uppercase; }
.quest-patches > button:nth-child(2) span,
.quest-patches > button:nth-child(2) > code { color: var(--quest-amber); }
.quest-patches strong { font: 800 1.15rem var(--quest-display); text-transform: uppercase; }
.quest-patches small { color: #c9c5d4; font-size: 0.72rem; line-height: 1.4; }
.quest-patches small code { color: inherit; font-size: inherit; text-transform: none; }
.quest-patches button:hover { background: rgba(112, 228, 227, 0.11); }

.quest-open-source-award,
.quest-contribution-award { display: flex; margin: 0.8rem 0; border-left: 4px solid var(--quest-amber); background: rgba(255, 196, 92, 0.1); align-items: center; gap: 0.75rem; }
.quest-open-source-award { width: fit-content; padding: 0.5rem 0.7rem; }
.quest-open-source-award strong,
.quest-contribution-award strong { color: var(--quest-amber); font: 800 1.2rem var(--quest-display); white-space: nowrap; }
.quest-open-source-award span,
.quest-contribution-award span { color: #ddd8e4; font: 500 0.58rem/1.35 var(--quest-mono); text-transform: uppercase; }

.quest-career { position: absolute; inset: 0; margin: 0; }
.quest-career > button { position: absolute; display: grid; width: min(22vw, 15rem); padding: 0.9rem; border: 0; border-top: 3px solid var(--quest-amber); background: rgba(10, 11, 34, 0.9); color: inherit; align-items: center; gap: 0 0.8rem; font: inherit; text-align: left; cursor: pointer; }
.quest-career > button:hover { background: rgba(25, 28, 67, 0.96); }
.quest-career > button:nth-child(1) { bottom: 3%; left: 5%; }
.quest-career > button:nth-child(2) { top: 48%; left: 39%; }
.quest-career > button:nth-child(3) { top: 20%; right: 4%; }
.quest-career span { color: var(--quest-cyan); font: 500 0.62rem var(--quest-mono); }
.quest-career h3 { margin: 0.15rem 0 0; color: var(--quest-cream); font: 800 1.08rem var(--quest-display); text-transform: uppercase; }
.quest-career ul { margin: 0.35rem 0 0; padding-left: 1rem; color: #e8e5ed; font-size: clamp(0.75rem, 0.75vw, 0.8rem); line-height: 1.3; }
.quest-career li + li { margin-top: 0.22rem; }
.quest-career b { display: block; margin-top: 0.5rem; color: var(--quest-amber); font: 500 0.56rem var(--quest-mono); text-transform: uppercase; }
.quest-email { display: grid; margin: 1.2rem 0 0; color: #aaa5bc; font: 500 0.62rem var(--quest-mono); text-transform: uppercase; }
.quest-email-row { display: inline-flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.quest-email a { display: inline-flex; width: fit-content; min-height: 44px; color: var(--quest-cream); align-items: center; font-size: 0.75rem; text-transform: none; }
.quest-email-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  background: #191632;
  border: 1px solid #57517c;
  color: var(--quest-cyan);
  font: 600 0.58rem var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.quest-email-copy-btn:hover {
  background: #252044;
  border-color: var(--quest-cyan);
  color: var(--quest-cream);
}
.quest-email-copy-btn .copy-icon { font-size: 0.75rem; }

.quest-prop,
.quest-scoreboard { position: absolute; z-index: 1; pointer-events: none; }
.quest-prop--cuco {
  top: 24%;
  right: 13%;
  width: min(26vw, 24rem);
  height: 39%;
  margin: 0;
  border: 5px solid #141329;
  outline: 2px solid var(--quest-cyan);
  background: #263f3f;
  box-shadow: 12px 12px 0 rgba(1, 4, 15, 0.62), 0 0 40px rgba(112, 228, 227, 0.14);
  overflow: hidden;
  opacity: 1;
}
.quest-prop--cuco > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; opacity: 0; }
.quest-prop--cuco > img:first-child { opacity: 1; }
.quest-prop--cuco figcaption { position: absolute; z-index: 2; right: 0.45rem; bottom: 0.35rem; padding: 0.22rem 0.35rem; background: rgba(7, 11, 24, 0.86); color: var(--quest-cream); font: 500 0.53rem var(--quest-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.quest-prop--capyusp { top: 27%; left: 9.5%; width: min(31vw, 28rem); max-height: 49%; object-fit: contain; opacity: 0.96; image-rendering: pixelated; }
.quest-scoreboard { right: 8.5%; bottom: 17%; display: grid; width: min(34vw, 31rem); grid-template-columns: repeat(2, 1fr); color: #151328; font-family: var(--quest-mono); text-align: center; text-transform: uppercase; transform: rotate(-0.4deg); }
.quest-scoreboard > * { padding: 0.7rem; border: 4px solid #151328; background: var(--quest-cream); }
.quest-scoreboard strong { grid-column: 1 / -1; font: 800 clamp(1.6rem, 3vw, 3rem) var(--quest-display); }
.quest-scoreboard span { grid-column: 1 / -1; margin-top: -4px; padding-top: 0; font-size: 0.58rem; }
.quest-scoreboard b { font-size: 0.65rem; }

.quest-fx {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
}

.quest-traveler {
  position: absolute;
  z-index: 16;
  bottom: 3.75rem;
  left: var(--traveler-x, 50%);
  width: clamp(48px, 4.4vw, 68px);
  aspect-ratio: 136 / 300;
  filter: drop-shadow(6px 6px 0 rgba(2, 4, 13, 0.48));
  pointer-events: none;
  transform: translateX(-50%);
  transition: left 700ms steps(9, end);
}

.quest-traveler-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background: url("/portfolio/art/akira-walk-sprite.png") 0 0 / 800% 100% no-repeat;
  image-rendering: pixelated;
}

.quest-controls {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  min-height: 3.6rem;
  padding: 0.45rem clamp(0.7rem, 2vw, 1.5rem);
  border-top: 1px solid #383460;
  background: rgba(5, 7, 24, 0.96);
  grid-template-columns: auto minmax(7rem, 0.3fr) minmax(22rem, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.quest-control { display: none; min-height: 44px; padding: 0.45rem 0.8rem; border: 1px solid #57517c; background: #15142e; align-items: center; gap: 0.55rem; color: var(--quest-cream); font: 500 0.64rem var(--quest-mono); text-transform: uppercase; cursor: pointer; }
.quest-enhanced .quest-control { display: inline-flex; }
.quest-control:hover:not(:disabled) { border-color: var(--quest-amber); background: #282044; }
.quest-control:disabled { visibility: hidden; opacity: 0.35; cursor: default; }
.quest-location { display: grid; margin: 0; color: #aaa5bb; font: 500 0.58rem var(--quest-mono); line-height: 1.15; text-transform: uppercase; }
.quest-location > span { display: none; }
.quest-location strong { color: var(--quest-cream); font-size: 0.72rem; }
.quest-route { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.quest-route a { position: relative; min-width: 0; height: 10px; border: 1px solid #4d486f; background: #22203d; text-decoration: none; }
.quest-route a[aria-current] { border-color: var(--quest-cyan); background: var(--quest-cyan); box-shadow: 0 0 12px rgba(112, 228, 227, 0.38); }
.quest-route a span { position: absolute; right: 0; bottom: 14px; left: 0; overflow: hidden; color: #aaa5bb; font: 500 0.62rem var(--quest-mono); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.quest-route a[aria-current] span { color: var(--quest-cream); }
.quest-enhanced .quest-route { display: grid; }
.quest-control--previous { justify-self: start; }
.quest-control--next { justify-self: end; }
.quest-location { justify-self: center; text-align: center; }
.quest-hint { position: absolute; z-index: 31; right: 1rem; bottom: 4.05rem; display: none; margin: 0; color: #8d89a1; font: 500 0.52rem var(--quest-mono); letter-spacing: 0.025em; text-transform: uppercase; }
.quest-hint span { color: #d2cfda; }
.quest-hint i { color: #514c72; font-style: normal; }

.quest-hero-scroll-cue {
  position: absolute;
  bottom: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.quest-hero-scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}
.quest-hero-scroll-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(13, 16, 40, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--quest-line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(112, 228, 227, 0.15);
  color: var(--quest-cream);
  font: 600 0.62rem/1.2 var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 9999px;
  cursor: pointer;
}
html[data-motion="on"] .quest-hero-scroll-pill {
  animation: quest-scroll-bob 2.2s infinite ease-in-out;
}
.quest-hero-scroll-cue:hover .quest-hero-scroll-pill {
  border-color: var(--quest-amber);
  background: rgba(30, 25, 55, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 196, 92, 0.25);
}
.quest-scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--quest-cyan);
  box-shadow: 0 0 6px var(--quest-cyan);
}
.quest-scroll-arrow {
  color: var(--quest-amber);
  font-weight: 700;
  font-size: 0.72rem;
}
@keyframes quest-scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.quest-back-to-top {
  position: absolute;
  bottom: 4.6rem;
  right: 1.25rem;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(15, 17, 40, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid #57517c;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  color: var(--quest-cream);
  font: 600 0.62rem/1.2 var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.15s, background 0.15s;
}
.quest-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.quest-back-to-top:hover {
  border-color: var(--quest-amber);
  background: #282044;
  color: var(--quest-amber);
}
.quest-back-arrow {
  color: var(--quest-amber);
  font-weight: bold;
  font-size: 0.75rem;
}

.quest-final-signs { display: none; }

.quest-case-dialog {
  width: min(92vw, 74rem);
  max-width: none;
  height: min(88svh, 52rem);
  max-height: none;
  padding: 0;
  border: 2px solid var(--quest-amber);
  background: #080b20;
  color: #efedf2;
  box-shadow: 14px 14px 0 rgba(2, 3, 12, 0.78), inset 0 0 0 2px #292552;
  overflow: hidden;
}

html[data-motion="on"] .quest-case-dialog[open] {
  animation: quest-modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
}
html[data-motion="on"] .quest-case-dialog[open]::backdrop {
  animation: quest-backdrop-fade 0.2s ease forwards;
}
@keyframes quest-modal-pop {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes quest-backdrop-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.quest-case-dialog::backdrop {
  background: rgba(2, 3, 14, 0.82);
  backdrop-filter: blur(5px);
}

.quest-case-shell { position: relative; display: grid; height: 100%; overflow: hidden; grid-template-rows: auto minmax(0, 1fr); }
.quest-case-header {
  position: relative;
  display: grid;
  min-height: 5.2rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid #4b4773;
  background: linear-gradient(90deg, #151330, #0a0d24);
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}
.quest-case-header p {
  grid-column: 1;
  display: grid;
  margin: 0;
  color: #938eaa;
  font: 500 0.58rem var(--quest-mono);
  text-transform: uppercase;
  justify-self: start;
}
.quest-case-header p span { color: var(--quest-cyan); }
.quest-case-header h2 {
  grid-column: 2;
  margin: 0;
  color: var(--quest-cream);
  font: 800 clamp(1.8rem, 4vw, 3.5rem)/0.9 var(--quest-display);
  text-transform: uppercase;
  text-align: center;
  justify-self: center;
  white-space: nowrap;
}
.quest-contributions-dialog .quest-case-header h2 {
  font-size: clamp(1.4rem, 3.2vw, 3rem);
}
.quest-case-header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: row-reverse;
}
.quest-case-header-actions button,
.quest-case-header button {
  justify-self: end;
  min-height: 42px;
  padding-inline: 0.85rem;
  border: 1px solid #696286;
  background: #17152e;
  color: var(--quest-cream);
  font: 500 0.62rem var(--quest-mono);
  text-transform: uppercase;
  cursor: pointer;
}
.quest-case-header-actions button:hover,
.quest-case-header button:hover { border-color: var(--quest-amber); background: #2a203c; }
.quest-case-header-actions button span,
.quest-case-header button span { color: var(--quest-amber); font-size: 1rem; }

.quest-case-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding-inline: 0.85rem;
  border: 1px solid #696286;
  background: #17152e;
  color: var(--quest-cream);
  font: 500 0.62rem var(--quest-mono);
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.quest-case-close-btn:hover {
  border-color: var(--quest-amber);
  background: #2a203c;
  box-shadow: 2px 2px 0 #57405d;
}
.quest-case-close-btn:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}
.quest-case-close-btn .close-icon {
  color: var(--quest-amber);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.15s;
}
.quest-case-close-btn:hover .close-icon {
  transform: scale(1.15);
}
.quest-case-close-btn .close-kbd {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.32rem;
  border: 1px solid #4d4668;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.4);
  color: #9d96b8;
  font: 600 0.55rem var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  line-height: 1.2;
}
.quest-case-close-btn:hover .close-kbd {
  border-color: #7b5d84;
  color: #fce7b2;
}

.quest-case-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding-inline: 0.85rem;
  border: 1px solid #696286;
  background: #17152e;
  color: var(--quest-cream);
  font: 500 0.62rem var(--quest-mono);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.quest-case-share-btn:hover {
  border-color: var(--quest-cyan) !important;
  background: #162438 !important;
  color: var(--quest-cyan) !important;
}
.quest-case-share-btn .share-icon {
  font-size: 0.78rem !important;
  color: var(--quest-cyan) !important;
}

.quest-modal-progress {
  width: 100%;
  height: 3px;
  background: #141329;
  position: relative;
  overflow: hidden;
  z-index: 5;
  border-bottom: 1px solid rgba(112, 228, 227, 0.15);
}
.quest-modal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--quest-cyan), var(--quest-amber));
  box-shadow: 0 0 8px var(--quest-cyan);
  transition: width 0.08s ease-out;
}

.quest-case-body {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #70e4e3 #0d1028;
}
.quest-case-body::-webkit-scrollbar {
  width: 8px;
}
.quest-case-body::-webkit-scrollbar-track {
  background: #0d1028;
  border-left: 1px solid #2d2a4a;
}
.quest-case-body::-webkit-scrollbar-thumb {
  background: #3b3765;
  border: 1px solid #70e4e3;
}
.quest-case-body::-webkit-scrollbar-thumb:hover {
  background: #ffc45c;
  border-color: #ffc45c;
  box-shadow: 0 0 8px rgba(255, 196, 92, 0.6);
}

.quest-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  background: #0d1028;
  border: 1px solid var(--quest-cyan);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(112, 228, 227, 0.25), 3px 3px 0 rgba(0, 0, 0, 0.6);
  color: var(--quest-cream);
  font: 600 0.68rem/1.2 var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: min(90vw, 28rem);
  white-space: nowrap;
}
.quest-toast[hidden] {
  display: none;
}
.quest-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.quest-toast-indicator {
  color: var(--quest-cyan);
  font-size: 0.7rem;
  display: inline-block;
}
.quest-case-panel { min-height: 100%; padding: clamp(1.3rem, 3vw, 2.5rem); background-image: linear-gradient(rgba(112, 228, 227, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 228, 227, 0.025) 1px, transparent 1px); background-size: 24px 24px; }
.quest-case-panel[hidden] { display: none; }
.quest-case-intro { display: grid; padding-bottom: 1.5rem; border-bottom: 1px solid #4a466c; grid-template-columns: minmax(12rem, 0.7fr) minmax(16rem, 1fr); align-items: end; gap: 0.25rem 2rem; }
.quest-case-number { margin: 0; color: var(--quest-cyan); font: 500 0.65rem var(--quest-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.quest-case-intro h3 { grid-column: 1; margin: 0; color: var(--quest-cream); font: 800 clamp(3.2rem, 7vw, 6rem)/0.85 var(--quest-display); text-transform: uppercase; }
.quest-case-status { grid-column: 1; margin: 0.45rem 0 0; color: #aaa5b8; font: 500 0.62rem var(--quest-mono); text-transform: uppercase; }
.quest-case-problem { grid-column: 2; grid-row: 1 / 3; margin: 0; color: #f0edf2; font-size: clamp(1.2rem, 2vw, 1.7rem); line-height: 1.3; text-wrap: balance; }
.quest-case-intro > strong { grid-column: 2; margin-top: 0.8rem; color: var(--quest-amber); font: 800 1.15rem var(--quest-display); text-transform: uppercase; }
.quest-case-grid { display: grid; margin-top: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #484466; }
.quest-case-grid section { padding: 1.1rem; background: rgba(10, 12, 35, 0.97); }
.quest-case-grid span { color: var(--quest-cyan); font: 500 0.62rem var(--quest-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.quest-case-grid p { margin: 0.5rem 0 0; color: #cfcbd7; font-size: 0.83rem; line-height: 1.55; }
.quest-case-footer {
  display: flex;
  padding-top: 1.4rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}
.quest-case-footer button {
  background: #14132d;
  cursor: pointer;
}
.quest-case-footer button:hover {
  background: var(--quest-cyan);
  color: #111225;
}
.quest-case-footer button:hover span {
  color: inherit;
}
.quest-case-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.quest-writing-dialog {
  width: min(94vw, 68rem);
  height: min(88svh, 50rem);
}

.quest-writing-dialog .quest-case-body {
  background-image: linear-gradient(rgba(112, 228, 227, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 228, 227, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: #080b20;
}

.quest-writing-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.2rem, 3vw, 2.5rem);
  border-bottom: 1px solid #3c3763;
  background: linear-gradient(90deg, rgba(21, 19, 48, 0.95), rgba(10, 13, 36, 0.95));
}
.quest-writing-intro-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.quest-writing-intro-lead {
  margin: 0;
  color: #cfcbd8;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  line-height: 1.45;
  max-width: 44rem;
}
.quest-writing-intro-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  border: 1px solid #3c3866;
  background: rgba(10, 12, 35, 0.9);
  box-shadow: 4px 4px 0 rgba(2, 3, 14, 0.8);
  text-align: center;
  flex-shrink: 0;
}
.quest-writing-intro-badge strong {
  color: var(--quest-amber);
  font: 800 1.4rem/1 var(--quest-display);
  letter-spacing: 0.04em;
}
.quest-writing-intro-badge span {
  color: #9f9bb4;
  font: 500 0.58rem var(--quest-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.quest-writing-intro-badge small {
  color: var(--quest-cyan);
  font: 500 0.55rem var(--quest-mono);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.quest-writing-index {
  display: grid;
  margin: 0;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  list-style: none;
}

.quest-writing-index li {
  min-width: 0;
  background: rgba(12, 15, 41, 0.94);
  border: 1px solid #312d56;
  box-shadow: 4px 4px 0 rgba(2, 3, 14, 0.7);
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.quest-writing-index li:hover {
  border-color: var(--quest-amber);
  background: rgba(20, 24, 62, 0.98);
  box-shadow: 6px 6px 0 rgba(2, 3, 14, 0.85), inset 0 0 0 1px rgba(255, 179, 71, 0.2);
  transform: translate(-2px, -2px);
}
.quest-writing-index li.is-featured-essay {
  border-color: #8c6a23;
  background: linear-gradient(170deg, rgba(28, 25, 56, 0.95), rgba(12, 15, 41, 0.95));
}
.quest-writing-index li.is-featured-essay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--quest-amber), rgba(255, 179, 71, 0.2));
}
.quest-writing-index li.is-recommended-essay {
  border-color: #1a5660;
  background: linear-gradient(170deg, rgba(16, 32, 54, 0.95), rgba(10, 18, 41, 0.95));
}
.quest-writing-index li.is-recommended-essay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--quest-cyan), rgba(112, 228, 227, 0.2));
}

.quest-writing-index a {
  display: flex;
  flex-direction: column;
  min-height: 11.5rem;
  padding: 1.25rem 1.35rem 1.15rem;
  color: var(--quest-cream);
  text-decoration: none;
  gap: 0.6rem;
  box-sizing: border-box;
  height: 100%;
}
.quest-writing-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.quest-writing-num {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(112, 228, 227, 0.35);
  background: rgba(112, 228, 227, 0.08);
  color: var(--quest-cyan);
  font: 700 0.65rem var(--quest-mono);
  letter-spacing: 0.05em;
}
.quest-writing-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border: 1px solid #363259;
  background: rgba(255, 255, 255, 0.04);
  color: #a49fb8;
  font: 600 0.58rem var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.quest-writing-index li.is-featured-essay .quest-writing-tag {
  border-color: rgba(255, 179, 71, 0.45);
  background: rgba(255, 179, 71, 0.12);
  color: var(--quest-amber);
  font-weight: 700;
}
.quest-writing-index li.is-recommended-essay .quest-writing-tag {
  border-color: rgba(112, 228, 227, 0.5);
  background: rgba(112, 228, 227, 0.12);
  color: var(--quest-cyan);
  font-weight: 700;
}
.quest-writing-arrow {
  margin-left: auto;
  color: #635c84;
  font-size: 0.9rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.quest-writing-index li:hover .quest-writing-arrow {
  color: var(--quest-amber);
  transform: translate(2px, -2px);
}
.quest-writing-index li.is-recommended-essay:hover {
  border-color: var(--quest-cyan);
  box-shadow: 6px 6px 0 rgba(2, 3, 14, 0.85), inset 0 0 0 1px rgba(112, 228, 227, 0.25);
}
.quest-writing-index li.is-recommended-essay:hover .quest-writing-arrow {
  color: var(--quest-cyan);
}

.quest-writing-index strong {
  margin: 0;
  color: var(--quest-cream);
  font: 800 clamp(1.05rem, 1.35vw, 1.25rem)/1.15 var(--quest-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}
.quest-writing-index li:hover strong {
  color: var(--quest-amber);
}

.quest-writing-index p {
  margin: 0;
  color: #cfcbdb;
  font-size: 0.82rem;
  line-height: 1.5;
  flex-grow: 1;
}

.quest-writing-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.4rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(60, 55, 95, 0.4);
}
.quest-writing-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid #4a4574;
  background: #191838;
  color: #ddd9e8;
  font: 700 0.62rem var(--quest-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.quest-writing-index li:hover .quest-writing-cta {
  background: var(--quest-amber);
  color: #110b02;
  border-color: var(--quest-amber);
  box-shadow: 2px 2px 0 #000;
  transform: translate(-1px, -1px);
}
.quest-writing-index li.is-recommended-essay:hover .quest-writing-cta {
  background: var(--quest-cyan);
  color: #07171d;
  border-color: var(--quest-cyan);
}

.quest-contributions-dialog,
.quest-career-dialog { width: min(92vw, 68rem); height: min(88svh, 50rem); }

.quest-contribution-list {
  display: grid;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #484466;
  list-style: none;
}
.quest-contribution-award { margin: clamp(1rem, 2.5vw, 2rem) clamp(1rem, 2.5vw, 2rem) 0; padding: 0.75rem 0.9rem; }
.quest-contribution-list li {
  display: grid;
  min-height: 14rem;
  padding: 1.15rem;
  background: #0a0c23;
  align-content: start;
}
.quest-contribution-list li.is-selected { background: #121936; box-shadow: inset 4px 0 0 var(--quest-amber); }
.quest-contribution-list li > p { margin: 0 0 0.65rem; color: #aaa5bc; font: 500 0.6rem var(--quest-mono); text-transform: uppercase; }
.quest-contribution-list li > p > span { margin-right: 0.65rem; color: var(--quest-cyan); }
.quest-contribution-list h3 { margin: 0; color: var(--quest-cream); font: 800 1.35rem/1 var(--quest-display); text-transform: uppercase; }
.quest-contribution-list li > div { margin: 0.6rem 0 1rem; color: #c9c5d4; font-size: 0.78rem; line-height: 1.5; }
.quest-contribution-list .quest-button { margin-top: auto; justify-self: start; }
.quest-scroll-cue {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: 0.75rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  background: rgba(8, 11, 32, 0.94);
  color: var(--quest-amber);
  font: 500 0.58rem var(--quest-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateX(50%);
  pointer-events: none;
}
.quest-scroll-cue[hidden] { display: none; }

.quest-resume { padding: clamp(1rem, 2.5vw, 2rem); }
.quest-resume-intro {
  display: grid;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid #4a466c;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
}
.quest-resume-intro > p { max-width: 52ch; margin: 0; color: #e7e3eb; font-size: 1.05rem; line-height: 1.55; }
.quest-resume-intro .quest-actions { margin: 0; }
.quest-resume-section { padding-top: 1.5rem; }
.quest-resume-section > h3 { margin: 0 0 0.8rem; color: var(--quest-cyan); font: 500 0.65rem var(--quest-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.quest-resume-list,
.quest-education-list { display: grid; margin: 0; padding: 0; gap: 1px; background: #484466; list-style: none; }
.quest-resume-list > li {
  display: grid;
  max-width: none;
  padding: 1rem;
  background: #0a0c23;
  grid-template-columns: minmax(13rem, 0.62fr) minmax(0, 1.38fr);
  gap: 0.25rem 1.5rem;
}
.quest-resume-list > li.is-selected { background: #121936; box-shadow: inset 4px 0 0 var(--quest-amber); }
.quest-resume-list p { margin: 0; color: #aaa5bc; font: 500 0.6rem var(--quest-mono); text-transform: uppercase; }
.quest-resume-list p span { display: block; margin-bottom: 0.2rem; color: var(--quest-cyan); }
.quest-resume-list h4 { margin: 0; color: var(--quest-cream); font: 800 1.2rem var(--quest-display); text-transform: uppercase; }
.quest-resume-list > li > ul { grid-column: 2; grid-row: 1 / 3; margin: 0; padding-left: 1.1rem; color: #c9c5d4; font-size: 0.78rem; line-height: 1.5; }
.quest-resume-list > li > ul li + li { margin-top: 0.35rem; }
.quest-resume-list > li > a { grid-column: 2; color: var(--quest-cyan); font: 500 0.65rem var(--quest-mono); }
.quest-education-list { grid-template-columns: 1fr; }
.quest-education-list > li { display: grid; max-width: none; padding: 1rem; background: #0a0c23; grid-template-columns: minmax(8.5rem, 0.28fr) minmax(0, 1fr); gap: 0.25rem 1.5rem; }
.quest-education-list p { margin: 0 0 0.3rem; color: var(--quest-cyan); font: 500 0.6rem var(--quest-mono); text-transform: uppercase; }
.quest-education-list h4 { grid-column: 2; margin: 0; color: var(--quest-cream); font: 800 1rem/1.1 var(--quest-display); text-transform: uppercase; }
.quest-education-list > li > strong { grid-column: 2; color: var(--quest-amber); font: 500 0.68rem var(--quest-mono); text-transform: uppercase; }
.quest-education-list > li > span { display: block; grid-column: 2; color: #c9c5d4; font-size: 0.75rem; }
.quest-education-list > li > div { grid-column: 2; color: #aaa5bc; font-size: 0.7rem; line-height: 1.45; }

.quest-enhanced { height: 100svh; overflow: hidden; }
.quest-enhanced .home-page { height: 100svh; overflow: hidden; }
.quest-enhanced .home-page #main-content { height: calc(100svh - var(--header-height)); overflow: hidden; }
.quest-enhanced .home-page .site-footer { display: none; }
.quest-enhanced .quest-experience,
.quest-enhanced .quest-scenes,
.quest-enhanced .quest-scene { height: 100%; min-height: 0; }
.quest-enhanced .quest-scene { position: absolute; z-index: 0; inset: 0; container-type: size; opacity: 0; pointer-events: none; transform: translateX(10vw); }
.quest-enhanced .quest-experience[data-direction="backward"] .quest-scene { transform: translateX(-10vw); }
.quest-enhanced .quest-experience[data-direction] .quest-scene.is-active { z-index: 1; opacity: 1; pointer-events: auto; transform: translateX(0); }

@media (prefers-reduced-motion: no-preference) {
  .quest-button--primary,
  .home-page .header-tools > a { transition: box-shadow 80ms steps(1, end), transform 80ms steps(1, end); }
  .quest-enhanced .quest-ready .quest-scene { transition: opacity 260ms steps(4, end), transform 360ms steps(6, end); }
  html[data-motion="on"] .quest-traveler:not(.is-walking) .quest-traveler-sprite { animation: traveler-idle 1.15s steps(2, end) infinite; }
  html[data-motion="on"] .quest-traveler.is-walking .quest-traveler-sprite { animation: traveler-walk 620ms steps(7, end) infinite; }
  html[data-motion="on"] .quest-panel::before { animation: objective-pulse 1.8s steps(2, end) infinite; }
  html[data-motion="on"] .quest-scene.is-active .quest-prop--cuco { animation: device-wake 650ms steps(6, end) both; }
  html[data-motion="on"] .quest-scene.is-active .quest-prop--cuco > img { animation: cuco-view 9s steps(1, end) infinite; }
  html[data-motion="on"] .quest-scene.is-active .quest-prop--cuco > img:nth-child(2) { animation-delay: 3s; }
  html[data-motion="on"] .quest-scene.is-active .quest-prop--cuco > img:nth-child(3) { animation-delay: 6s; }
  html[data-motion="on"] .quest-scene.is-active .quest-prop--capyusp { animation: map-lock 700ms steps(7, end) both; }
  html[data-motion="on"] .quest-scene.is-active .quest-scoreboard { animation: score-drop 620ms steps(6, end) both; }
  html[data-motion="on"] .quest-scene.is-active .quest-patches > button,
  html[data-motion="on"] .quest-scene.is-active .quest-career > button { animation: checkpoint-in 540ms steps(5, end) both; }
  html[data-motion="on"] .quest-scene.is-active .quest-patches > button:nth-child(2),
  html[data-motion="on"] .quest-scene.is-active .quest-career > button:nth-child(2) { animation-delay: 90ms; }
  html[data-motion="on"] .quest-scene.is-active .quest-career > button:nth-child(3) { animation-delay: 180ms; }
}

@keyframes traveler-idle { 50% { transform: translateY(-3px); } }
@keyframes traveler-walk { to { background-position: 100% 0; } }
@keyframes objective-pulse { 50% { background: var(--quest-cyan); } }
@keyframes device-wake { from { opacity: 0.25; filter: brightness(0.4); } to { opacity: 1; filter: brightness(1); } }
@keyframes map-lock { from { clip-path: inset(0 100% 0 0); opacity: 0.35; } to { clip-path: inset(0); opacity: 0.96; } }
@keyframes score-drop { from { opacity: 0; transform: translateY(-14px) rotate(-0.4deg); } to { opacity: 1; transform: translateY(0) rotate(-0.4deg); } }
@keyframes checkpoint-in { from { opacity: 1; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cuco-view { 0%, 32% { opacity: 1; } 33%, 100% { opacity: 0; } }
@media (min-width: 901px) {
  .quest-enhanced .quest-scene { padding: 0; }

  .quest-enhanced .quest-panel:not(.quest-panel--career) { margin-bottom: clamp(4rem, 8vh, 6rem); }
  .quest-enhanced .quest-panel--left:not(.quest-panel--career) { margin-left: clamp(1rem, 6vw, 6.5rem); }
  .quest-enhanced .quest-panel--right { margin-right: clamp(1rem, 6vw, 6.5rem); }
  .quest-enhanced .quest-scene--writing .quest-panel { width: min(34rem, 56cqh); }
  .quest-enhanced .quest-scene--writing .quest-panel--right { margin-right: max(1.5rem, calc(50cqw - 40.833cqh - min(17rem, 28cqh))); }

  .quest-prop--cuco {
    top: calc(50cqh - max(28.125cqw, 50cqh) + max(18.889cqw, 33.58cqh));
    right: auto;
    left: calc(50cqw - max(50cqw, 88.889cqh) + max(60.764cqw, 108.025cqh));
    width: max(24.444cqw, 43.457cqh);
    height: max(19.236cqw, 34.198cqh);
  }

  .quest-prop--capyusp {
    top: calc(50cqh - max(28.125cqw, 50cqh) + max(14.583cqw, 25.926cqh));
    left: calc(50cqw - max(50cqw, 88.889cqh) + max(9.375cqw, 16.667cqh));
    width: max(30.556cqw, 54.321cqh);
    height: max(30.556cqw, 54.321cqh);
    max-height: none;
    object-fit: fill;
  }

  .quest-scoreboard {
    top: calc(50cqh - max(20.833cqw, 50cqh) + max(13.194cqw, 31.667cqh));
    right: auto;
    bottom: auto;
    left: min(
      calc(60cqw - max(60cqw, 144cqh) + max(73.611cqw, 176.667cqh)),
      calc(100cqw - max(15.278cqw, 36.667cqh) - 1rem)
    );
    width: max(15.278cqw, 36.667cqh);
  }

  body.home-page #experience.quest-scene { background-size: contain; }

  .quest-panel--career {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    align-self: stretch;
    justify-self: stretch;
  }

  .quest-career-intro {
    position: absolute;
    top: clamp(4.5rem, 13vh, 7.5rem);
    left: clamp(4rem, 13vw, 12rem);
    width: min(21rem, calc(100% - 8rem));
  }

  .quest-career > button:nth-child(1) {
    top: calc(50cqh - min(22.222cqw, 50cqh) + min(30.069cqw, 67.656cqh));
    bottom: auto;
    left: calc(50cqw - min(50cqw, 112.5cqh) + min(5.278cqw, 11.875cqh));
    width: min(18.056cqw, 40.625cqh);
  }

  .quest-career > button:nth-child(2) {
    top: calc(50cqh - min(22.222cqw, 50cqh) + min(20.347cqw, 45.781cqh));
    left: calc(50cqw - min(50cqw, 112.5cqh) + min(39.931cqw, 89.844cqh));
    width: min(20.833cqw, 46.875cqh);
  }

  .quest-career > button:nth-child(3) {
    top: calc(50cqh - min(22.222cqw, 50cqh) + min(8.472cqw, 19.063cqh));
    right: auto;
    left: calc(50cqw - min(50cqw, 112.5cqh) + min(74.097cqw, 166.719cqh));
    width: min(18.75cqw, 42.188cqh);
  }

  .quest-career > button { padding: 0.65rem 0.8rem; }
}

@media (max-width: 900px) {
  .home-page .desktop-nav,
  .home-page .header-progress { display: none; }
  .home-page .mobile-nav { display: block; }
  .home-page .mobile-nav summary { border-color: #f1d286; background: var(--quest-amber); color: #171128; text-transform: uppercase; }
  .home-page .mobile-nav nav { border-color: #6d6594; background: #0c0d28; }
  .home-page .mobile-nav nav a { color: var(--quest-cream); font-family: var(--quest-mono); font-size: 0.68rem; }
  .quest-scene { padding-inline: clamp(1rem, 5vw, 2.5rem); background-position: center; }
  .quest-panel { width: min(100%, 28rem); }
  .quest-panel--right { justify-self: end; }
  .quest-prop,
  .quest-scoreboard,
  .quest-final-signs { display: none; }
  .quest-scene--cuco .quest-prop--cuco { display: block; top: clamp(1rem, 4vh, 2rem); right: clamp(1rem, 5vw, 2.5rem); left: auto; width: min(38vw, 18rem); height: auto; aspect-ratio: 492 / 402; }
  body.home-page #writing.quest-scene {
    background-position: 32% center;
    background-size: cover;
  }
  .quest-scene--writing {
    align-items: end;
    padding-bottom: 9.5rem;
  }
  .quest-scene--writing .quest-manuscript {
    left: calc(32cqw - 13.467cqh + 2.2rem);
    top: 26cqh;
    width: calc(45cqh - 3.5rem);
  }
  .quest-scene--writing .quest-panel { width: min(34rem, 100%); margin: 0 auto; justify-self: center; }
  .quest-panel--career { width: min(100%, 50rem); }
  .quest-panel--career { height: auto; }
  .quest-career { position: static; display: grid; margin-top: 1.2rem; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
  .quest-career > button { position: static; width: auto; }
  .quest-controls { grid-template-columns: auto 1fr auto; }
  .quest-enhanced .quest-route { display: none; }
  .quest-control--previous { grid-column: 1; }
  .quest-location { grid-column: 2; justify-self: center; text-align: center; }
  .quest-control--next { grid-column: 3; }
  .quest-hint { display: none; }
  .quest-traveler { bottom: 3.8rem; }
  .quest-case-dialog { width: 94vw; height: 90svh; }
  .quest-writing-intro { flex-direction: column; align-items: flex-start; gap: 0.85rem; padding: 1rem 1.2rem; }
  .quest-writing-intro-badge { align-self: flex-start; flex-direction: row; gap: 0.6rem; padding: 0.4rem 0.75rem; }
  .quest-writing-intro-badge span, .quest-writing-intro-badge small { margin-top: 0; }
  .quest-writing-index { gap: 0.85rem; padding: 1rem 1.2rem; }
}

@media (max-width: 639px) {
  .header-tools > a,
  .header-progress { display: none; }
  .home-page .site-header,
  .home-page .header-inner { min-height: 58px; }
  .home-page { --header-height: 58px; }
  .home-page .header-tools > a { display: none; }
  .quest-scene { padding: 1.2rem 1rem 10rem; align-items: end; background-position: center top; }
  .quest-scene::before { background: linear-gradient(180deg, rgba(3, 6, 20, 0.06) 18%, rgba(3, 6, 20, 0.4) 45%, rgba(3, 6, 20, 0.92) 78%); }
  .quest-panel { width: 100%; padding: 1rem; border-width: 1px; box-shadow: 6px 6px 0 rgba(3, 5, 18, 0.7); }
  .quest-panel h1 { font-size: clamp(2.2rem, 12vw, 3.25rem); }
  .quest-panel h2 { font-size: clamp(1.85rem, 10vw, 2.75rem); }
  .quest-panel-meta { margin-bottom: 0.8rem; }
  .quest-lead { font-size: 0.82rem; line-height: 1.4; }
  .quest-actions { margin-top: 0.8rem; }
  .hero-proof { margin: 0.8rem 0; }
  .quest-patches { grid-template-columns: 1fr; }
  .quest-career {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    margin-top: 0.75rem;
  }
  .quest-career > button {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    gap: 0 0.6rem;
  }
  .quest-career span {
    grid-column: 1;
    grid-row: auto;
    color: var(--quest-cyan);
    font: 500 0.62rem var(--quest-mono);
    white-space: nowrap;
  }
  .quest-career h3 {
    grid-column: 2;
    margin: 0;
    font: 800 0.95rem var(--quest-display);
    text-transform: uppercase;
  }
  .quest-career ul {
    display: none;
  }
  .quest-career b {
    grid-column: 3;
    margin: 0;
    color: var(--quest-amber);
    font: 500 0.56rem var(--quest-mono);
    text-transform: uppercase;
    white-space: nowrap;
  }
  .quest-scene--engineering .quest-panel,
  .quest-panel--career { padding: 1rem; background: rgba(8, 10, 31, 0.88); }
  .quest-panel--career { margin-bottom: 0; }
  .quest-scene--graveyard .quest-panel { background: rgba(8, 9, 29, 0.9); }
  .quest-prop,
  .quest-scoreboard { display: none; }
  .quest-traveler { bottom: 3.8rem; width: 40px; }
  .quest-controls { min-height: 3.7rem; padding: 0.4rem 0.65rem; gap: 0.5rem; }
  .quest-control { padding-inline: 0.65rem; }
  .quest-control b { display: inline; font-size: 0.54rem; }
  .quest-location strong { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .quest-enhanced .quest-scene { overflow-y: auto; overscroll-behavior: contain; }
  .quest-scene--cuco { align-items: start; }
  .quest-scene--cuco .quest-prop--cuco { top: 1rem; right: 1rem; width: min(52vw, 15rem); }
  .quest-scene--cuco .quest-panel { margin-top: 10.5rem; }
  .quest-scene--writing .quest-panel { position: relative; z-index: 3; width: 100%; margin-bottom: 0; padding: 0.75rem; transform: none; }
  .quest-scene--writing .quest-panel h2 { margin-bottom: 0.55rem; font-size: clamp(1.7rem, 8.5vw, 2.3rem); }
  .quest-scene--writing .quest-lead { margin-bottom: 0.5rem; }
  .quest-scene--writing .quest-protocol li { padding-block: 0.38rem; }
  .quest-hero-scroll-cue { bottom: 4.1rem; }
  .quest-back-to-top {
    bottom: 4.1rem;
    right: 0.65rem;
    padding: 0.28rem 0.55rem;
  }
  .quest-toast {
    bottom: 4.3rem;
    font-size: 0.62rem;
    padding: 0.5rem 0.85rem;
  }
  .quest-case-dialog { width: calc(100vw - 1rem); height: calc(100svh - 1rem); box-shadow: 5px 5px 0 rgba(2, 3, 12, 0.78); }
  .quest-case-header {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 4.5rem;
    padding: 0.7rem 5.6rem 0.7rem 1.2rem;
  }
  .quest-case-header p { display: none; }
  .quest-case-header h2 {
    margin: 0;
    text-align: center;
    font-size: 1.6rem;
    white-space: normal;
  }
  .quest-contributions-dialog .quest-case-header h2,
  .quest-career-dialog .quest-case-header h2 { font-size: 1.25rem; }
  .quest-case-header-actions {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-direction: row-reverse;
    transform: translateY(-50%);
  }
  .quest-case-header-actions button,
  .quest-case-header button {
    position: static;
    transform: none;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .quest-case-header-actions button span,
  .quest-case-header button span { font-size: 1.2rem; }
  .quest-case-header-actions .share-label,
  .quest-case-header-actions .close-label,
  .quest-case-header-actions .close-kbd { display: none; }
  .quest-case-panel { padding: 1rem; }
  .quest-case-intro { display: block; }
  .quest-case-intro h3 { margin-top: 0.4rem; font-size: clamp(2.8rem, 16vw, 4.5rem); }
  .quest-case-problem { margin-top: 1rem; font-size: 1.1rem; }
  .quest-case-intro > strong { display: block; margin-top: 0.75rem; }
  .quest-case-grid { grid-template-columns: 1fr; }
  .quest-writing-index { grid-template-columns: 1fr; padding: 0.85rem; gap: 0.75rem; }
  .quest-writing-index a { min-height: 0; padding: 1rem; }
  .quest-contribution-list { grid-template-columns: 1fr; }
  .quest-contribution-list li { min-height: 0; }
  .quest-resume-intro { grid-template-columns: 1fr; gap: 1rem; }
  .quest-resume-list > li { display: block; }
  .quest-resume-list h4 { margin-top: 0.25rem; }
  .quest-resume-list > li > ul { margin-top: 0.65rem; }
  .quest-resume-list > li > a { display: inline-block; margin-top: 0.6rem; }
  .quest-education-list > li { display: block; }
  .quest-education-list > li > strong,
  .quest-education-list > li > span,
  .quest-education-list > li > div { display: block; margin-top: 0.35rem; }
}

@media (max-height: 620px) and (min-width: 640px) {
  .quest-scene { padding-block: 1rem 5rem; }
  .quest-enhanced .quest-scene { overflow-y: auto; overscroll-behavior: contain; }
  .quest-panel { padding: 1rem; }
  .quest-panel h1 { font-size: 2.7rem; }
  .quest-panel h2 { font-size: 2.2rem; }
  .quest-hint { display: none; }
  .quest-traveler { bottom: 3.8rem; width: 42px; }
}

@media (max-width: 639px) and (max-height: 700px) {
  .quest-traveler { display: none; }
  .quest-scene--writing {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    overflow-y: auto;
    padding-top: 4.8rem;
    padding-bottom: 6rem;
  }
  .quest-scene--writing .quest-manuscript {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0.85rem 0 0.75rem;
    padding: 0 0.75rem 0 1.25rem;
    background: none;
    border: none;
    box-shadow: none;
    transform: rotate(-0.7deg);
    transform-origin: top left;
  }
  .quest-scene--writing .quest-manuscript p { font-size: 0.95rem; }
  .quest-scene--writing .quest-manuscript blockquote { font-size: 0.84rem; font-weight: 650; line-height: 1.45; color: #0b0402; }
  .quest-scene--writing .quest-manuscript span { font-size: 0.64rem; font-weight: 800; color: #3e1c0a; }
  .quest-scene--writing .quest-panel { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .quest-scene,
  .quest-traveler,
  .quest-traveler-sprite,
  .quest-panel::before,
  .quest-hero-scroll-pill,
  .quest-case-dialog[open],
  .quest-case-dialog[open]::backdrop { animation: none !important; transition: none !important; }
  .quest-case-dialog[open] { transform: none !important; }
  .quest-writing-index li,
  .quest-writing-index li:hover,
  .quest-writing-arrow,
  .quest-writing-cta { transform: none !important; }
}

body.home-page #writing.quest-scene .quest-panel h2 { color: #202034; text-shadow: 3px 3px 0 rgba(124, 54, 24, 0.18); }

/* Blog logo replaces the "D" mark and links back to the blog. */
.wordmark .wordmark-logo,
.home-page .wordmark .wordmark-logo {
  display: block;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  object-fit: contain;
}

.quest-open-source-award + .quest-open-source-award,
.quest-contribution-award + .quest-contribution-award {
  margin-top: 0.5rem;
}
