/*
  Field Notes / MIT 16.S893
  Shared visual system and responsive layout.
  Replace page content in the HTML files, not here.
*/

:root {
  --paper: #f3f0e8;
  --paper-deep: #e7e2d7;
  --ink: #14233a;
  --muted: #657080;
  --line: rgba(20, 35, 58, 0.18);
  --line-strong: rgba(20, 35, 58, 0.42);
  --orange: #ff5b36;
  --cyan: #18b9c8;
  --acid: #d9f36a;
  --white: #fffdf7;
  --display: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: min(1180px, calc(100% - 64px));
  --shadow: 0 20px 60px rgba(20, 35, 58, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(20, 35, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 35, 58, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 72% 20%, rgba(24, 185, 200, 0.09), transparent 30%);
  content: "";
  pointer-events: none;
}

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

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

a {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  display: flex;
  z-index: 20;
  position: sticky;
  top: 0;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(32px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.92);
  backdrop-filter: blur(14px);
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.site-mark__symbol {
  color: var(--orange);
  font-size: 1.15rem;
  animation: pulse-mark 2.4s ease-in-out infinite;
}

.site-nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
}

.site-nav a {
  display: grid;
  position: relative;
  place-items: center;
  padding: 0 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 3px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.eyebrow {
  display: flex;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span + span::before {
  margin-right: 10px;
  color: var(--orange);
  content: "/";
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(400px, 0.97fr);
  align-items: center;
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - 76px);
  padding-block: 72px;
}

.hero__copy {
  z-index: 2;
  position: relative;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--display);
  line-height: 0.98;
}

.hero h1,
.page-intro h1 {
  margin-bottom: 36px;
  font-size: clamp(4rem, 7.5vw, 7.4rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

h1 em,
h2 em {
  color: var(--orange);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: none;
}

.intro-copy {
  border-left: 3px solid var(--cyan);
  color: var(--muted);
}

.intro-copy--hero {
  max-width: 610px;
  padding: 4px 0 4px 20px;
}

.intro-copy strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.intro-copy p {
  margin: 6px 0 0;
  font-size: 1.05rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button--primary {
  color: var(--white);
  background: var(--ink);
}

.button--primary:hover {
  color: var(--ink);
  background: var(--acid);
}

.button--quiet:hover {
  background: var(--white);
}

.orbit-stage {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.36);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.orbit-stage__grid {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  background:
    linear-gradient(transparent calc(50% - 0.5px), var(--line-strong) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--line-strong) 50%, transparent calc(50% + 0.5px)),
    repeating-radial-gradient(circle, transparent 0 38px, var(--line) 39px 40px);
}

.orbit-stage__grid::after {
  position: absolute;
  inset: 9%;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  content: "";
}

.scan-line {
  position: absolute;
  z-index: 1;
  right: 8%;
  left: 8%;
  height: 14%;
  background: linear-gradient(transparent, rgba(24, 185, 200, 0.2), rgba(24, 185, 200, 0.55), transparent);
  animation: scan 4.5s ease-in-out infinite;
}

.orbit {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(20, 35, 58, 0.36);
  border-radius: 50%;
}

.orbit--outer {
  width: 82%;
  height: 82%;
  margin: -41%;
  animation: spin 19s linear infinite;
}

.orbit--middle {
  width: 61%;
  height: 61%;
  margin: -30.5%;
  animation: spin 13s linear infinite reverse;
}

.orbit--inner {
  width: 41%;
  height: 41%;
  margin: -20.5%;
  animation: spin 8s linear infinite;
}

.orbit__node {
  display: grid;
  position: absolute;
  top: 50%;
  left: -15px;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.58rem;
  box-shadow: 0 0 0 5px rgba(243, 240, 232, 0.72);
}

.orbit--middle .orbit__node {
  color: var(--ink);
  background: var(--acid);
}

.orbit--inner .orbit__node {
  background: var(--orange);
}

.orbit-core {
  display: flex;
  z-index: 5;
  position: absolute;
  top: 50%;
  left: 50%;
  flex-direction: column;
  justify-content: center;
  width: 31%;
  aspect-ratio: 1;
  padding: 7%;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-50%, -50%);
}

.orbit-core__index,
.orbit-core__status {
  font-family: var(--mono);
  font-size: clamp(0.42rem, 0.7vw, 0.62rem);
  letter-spacing: 0.05em;
}

.orbit-core strong {
  margin-block: 8px;
  font-size: clamp(0.68rem, 1.5vw, 1.18rem);
  line-height: 1.05;
}

.orbit-core__status {
  white-space: nowrap;
}

.orbit-core__status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.axis-label {
  position: absolute;
  z-index: 4;
  padding: 2px 7px;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.axis-label--x {
  right: 8%;
  top: 49%;
}

.axis-label--y {
  top: 12%;
  left: 49%;
  transform: rotate(90deg);
}

.route-section {
  padding-block: 104px 120px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: end;
  margin-bottom: 40px;
}

.section-heading .eyebrow {
  margin: 0;
}

.section-heading h2 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.route-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  min-height: 280px;
  padding: 28px;
  border: 1px solid var(--ink);
  background: rgba(255, 253, 247, 0.55);
  text-decoration: none;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.route-card:hover {
  box-shadow: 9px 9px 0 var(--ink);
  transform: translate(-5px, -5px);
}

.route-card--accent {
  background: var(--acid);
}

.route-card--dark {
  color: var(--white);
  background: var(--ink);
}

.route-card--dark:hover {
  box-shadow: 9px 9px 0 var(--orange);
}

.route-card--dark .route-card__label,
.route-card--dark p:last-child {
  color: #bdc5cf;
}

.route-card--dark .route-card__number,
.route-card--dark .route-card__arrow {
  color: var(--acid);
}

.route-card__number,
.route-card__label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.route-card__label {
  margin: 2px 0 38px;
  color: var(--muted);
}

.route-card h3 {
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 4vw, 4rem);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.route-card p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.route-card__arrow {
  align-self: end;
  font-size: 1.8rem;
}

/* Interior pages */
.interior-page {
  padding-top: 90px;
}

.page-intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: end;
  gap: 60px;
  padding-bottom: 70px;
  border-bottom: 1px solid var(--line-strong);
}

.page-intro h1 {
  margin: 0;
}

.page-intro__note {
  max-width: 370px;
  margin: 0 0 10px auto;
  padding-left: 18px;
  border-left: 3px solid var(--cyan);
  color: var(--muted);
}

.page-intro--project .page-intro__note {
  border-color: var(--orange);
}

.page-intro--devlog .page-intro__note {
  border-color: var(--acid);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 120px);
  padding-block: 88px 120px;
}

.content-rail {
  align-self: start;
  position: sticky;
  top: 120px;
  padding-top: 13px;
  border-top: 2px solid var(--ink);
}

.content-rail > p {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.content-rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rail;
}

.content-rail li {
  counter-increment: rail;
  border-bottom: 1px solid var(--line);
}

.content-rail a {
  display: flex;
  gap: 10px;
  padding-block: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.content-rail a::before {
  color: var(--orange);
  font-family: var(--mono);
  content: attr(data-entry);
}

.content-rail a:hover {
  color: var(--ink);
}

.content-stack {
  min-width: 0;
}

.content-section {
  margin: 0;
  padding-block: 0 88px;
  scroll-margin-top: 110px;
}

.content-section + .content-section {
  padding-top: 80px;
  border-top: 1px solid var(--line-strong);
}

.section-index {
  margin: 0 0 24px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.content-section h2,
.project-title-card h2 {
  max-width: 800px;
  margin-bottom: 32px;
  font-size: clamp(2.5rem, 5vw, 5.3rem);
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.prose {
  max-width: 780px;
  color: #3f4b5c;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.prose p {
  margin: 0 0 1.35em;
}

.prose strong {
  color: var(--ink);
}

.prose h3 {
  margin: 42px 0 15px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.prose ul {
  margin: 26px 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.prose li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
}

.prose li::before {
  display: inline-block;
  width: 28px;
  margin-left: -28px;
  color: var(--orange);
  content: "↳";
}

.prose a {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose a:hover {
  color: var(--orange);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 38px;
}

.tag-list span {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.content-image {
  width: 100%;
  height: auto;
}

.project-title-card {
  display: grid;
  position: relative;
  grid-template-columns: 1fr auto;
  gap: 40px;
  margin-top: 48px;
  padding: 36px;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.project-title-card__status {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-title-card__status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--acid);
  animation: status-blink 1.8s steps(2, end) infinite;
}

.project-title-card .section-index {
  color: var(--cyan);
}

.project-title-card h2 {
  margin-bottom: 14px;
}

.project-title-card p:last-child {
  max-width: 700px;
  margin: 0;
  color: #bdc5cf;
}

.project-title-card__code {
  align-self: end;
  color: var(--acid);
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 5rem);
  letter-spacing: -0.08em;
}

/* Project narrative */
.project-talk {
  padding-top: 0;
}

.talk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  align-items: center;
  gap: clamp(44px, 6vw, 80px);
  padding-block: clamp(76px, 8vw, 104px);
  border-bottom: 1px solid var(--line-strong);
}

.talk-hero h1 {
  max-width: 820px;
  margin-bottom: 26px;
  font-size: clamp(3.2rem, 5.4vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.talk-kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.talk-deck {
  max-width: 700px;
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid var(--orange);
  color: #3f4b5c;
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  line-height: 1.55;
}

.talk-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.talk-thesis {
  position: relative;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.talk-thesis::before {
  content: none;
}

.talk-thesis > * {
  position: relative;
}

.talk-thesis .section-index {
  color: var(--orange);
}

.talk-thesis > p:nth-child(2) {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.talk-thesis strong {
  color: var(--orange);
}

.talk-thesis__signal {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 28px;
  margin-top: 24px;
  opacity: 0.4;
}

.talk-thesis__signal span {
  width: 9px;
  height: 24%;
  background: var(--cyan);
}

.talk-thesis__signal span:nth-child(2) { height: 68%; animation-delay: -0.4s; }
.talk-thesis__signal span:nth-child(3) { height: 40%; animation-delay: -0.8s; }
.talk-thesis__signal span:nth-child(4) { height: 90%; animation-delay: -1.2s; }
.talk-thesis__signal span:nth-child(5) { height: 55%; animation-delay: -0.2s; }

.talk-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(42px, 6vw, 76px);
}

.talk-rail {
  align-self: start;
  position: sticky;
  z-index: 5;
  top: 112px;
  margin-top: 72px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.talk-rail > p {
  margin: 0 0 15px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.talk-rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.talk-rail li {
  border-bottom: 1px solid var(--line);
}

.talk-rail a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding-block: 11px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, padding-left 160ms ease;
}

.talk-rail a span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.talk-rail a:hover,
.talk-rail a[aria-current="step"] {
  padding-left: 6px;
  color: var(--ink);
}

.talk-rail a[aria-current="step"] {
  font-weight: 800;
}

.talk-progress {
  width: 100%;
  height: 3px;
  margin-top: 18px;
  overflow: hidden;
  background: var(--line);
}

.talk-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 220ms ease;
}

.talk-sequence {
  min-width: 0;
}

.talk-section {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(68px, 8vw, 92px);
  border-bottom: 1px solid var(--line-strong);
  scroll-margin-top: 76px;
}

.talk-section__number {
  color: rgba(20, 35, 58, 0.24);
  font-family: var(--display);
  font-size: clamp(2.6rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.talk-section__content {
  min-width: 0;
}

.talk-section h2 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 4.3vw, 4.3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.talk-lead {
  max-width: 800px;
  margin: 0 0 32px;
  color: #3f4b5c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  line-height: 1.42;
}

.talk-support {
  max-width: 800px;
  margin: 34px 0 0;
  color: #3f4b5c;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.mechanism-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
  border: 1px solid var(--line-strong);
}

.mechanism-strip span {
  display: flex;
  align-items: end;
  min-height: 104px;
  padding: 16px;
  border-right: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mechanism-strip span:last-child {
  border-right: 0;
}

.mechanism-strip span:nth-child(2) { background: rgba(217, 243, 106, 0.28); }
.mechanism-strip span:nth-child(3) { background: rgba(24, 185, 200, 0.1); }
.mechanism-strip span:nth-child(4) { background: rgba(255, 91, 54, 0.08); }

.talk-takeaway {
  display: flex;
  gap: 18px;
  margin: 28px 0 0;
  padding: 16px 18px;
  border-left: 2px solid var(--orange);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 600;
}

.talk-takeaway span {
  flex: none;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.approach-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line-strong);
}

.approach-split article {
  min-height: 220px;
  padding: clamp(24px, 3vw, 34px);
}

.approach-split article + article {
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(24, 185, 200, 0.08);
}

.approach-split__label,
.lab-team > span,
.open-questions > article > span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.approach-split article + article .approach-split__label {
  color: var(--cyan);
}

.approach-split h3 {
  margin: 32px 0 16px;
  font-size: clamp(1.55rem, 2.3vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.approach-split p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.approach-split article + article p:last-child {
  color: var(--muted);
}

.talk-section--dark {
  position: relative;
  margin-block: 0;
  padding-inline: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(20, 35, 58, 0.035);
  box-shadow: none;
}

.talk-section--dark .talk-section__number {
  color: rgba(20, 35, 58, 0.24);
}

.talk-section--dark .section-index {
  color: var(--orange);
}

.talk-section--dark .talk-lead {
  color: #3f4b5c;
}

.representation-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 38px 0;
  padding: 0;
  list-style: none;
}

.representation-flow li {
  position: relative;
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--white);
}

.representation-flow li::after {
  position: absolute;
  top: 50%;
  right: -23px;
  color: var(--orange);
  font-size: 1.4rem;
  content: "→";
  transform: translateY(-50%);
}

.representation-flow li:last-child::after {
  content: none;
}

.representation-flow span {
  display: block;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.representation-flow strong {
  display: block;
  margin: 26px 0 10px;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.representation-flow small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.open-questions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-strong);
}

.open-questions article {
  padding: 24px 24px 0 0;
}

.open-questions article + article {
  padding-left: 24px;
  border-left: 1px solid var(--line-strong);
}

.open-questions h3 {
  margin: 20px 0 10px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
}

.open-questions p {
  margin: 0;
  color: var(--muted);
}

.lab-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 30px minmax(0, 1fr);
  grid-template-areas:
    "a ab b bc c"
    "feedback feedback feedback feedback feedback"
    "d d d e e";
  gap: 12px 0;
  margin-top: 38px;
}

.lab-team {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line-strong);
  background: var(--white);
}

.lab-team--a { grid-area: a; }
.lab-team--b { grid-area: b; background: rgba(217, 243, 106, 0.28); }
.lab-team--c { grid-area: c; background: rgba(20, 35, 58, 0.06); }
.lab-team--d { grid-area: d; margin-right: 8px; background: rgba(24, 185, 200, 0.12); }
.lab-team--e { grid-area: e; margin-left: 8px; background: rgba(255, 91, 54, 0.12); }

.lab-team--c > span {
  color: var(--orange);
}

.lab-team h3 {
  margin: 28px 0 10px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  letter-spacing: -0.04em;
}

.lab-team p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.lab-team--c p {
  color: var(--muted);
}

.lab-arrow {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 1.8rem;
}

.lab-arrow--ab { grid-area: ab; }
.lab-arrow--bc { grid-area: bc; }

.lab-feedback {
  display: flex;
  grid-area: feedback;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lab-feedback::before,
.lab-feedback::after {
  height: 1px;
  flex: 1;
  background: var(--orange);
  content: "";
}

.lab-feedback span::after {
  margin-left: 10px;
  color: var(--orange);
  content: "C → B → A";
}

.talk-section--close {
  border-bottom: 0;
}

@keyframes talk-signal {
  to { transform: scaleY(0.55); opacity: 0.45; }
}

/* Dev-log */
.log-entry h2 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.content-layout--log {
  padding-top: 84px;
}

.log-feed {
  min-width: 0;
}

.log-entry {
  padding-bottom: 96px;
  scroll-margin-top: 110px;
}

.log-entry + .log-entry {
  padding-top: 88px;
  border-top: 1px solid var(--line-strong);
}

.log-entry__header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 26px;
}

.log-entry__header time {
  display: block;
  position: static;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  aspect-ratio: auto;
  color: var(--orange);
  background: transparent;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.log-entry__paragraph {
  max-width: 860px;
  margin: 0;
  color: #3f4b5c;
  font-size: 1.02rem;
  line-height: 1.75;
}

.log-entry__paragraph + .log-entry__paragraph {
  margin-top: 18px;
}

.log-entry__paragraph code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.log-entry__figure {
  margin: 32px 0 0;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: var(--white);
}

.log-entry__figure img {
  display: block;
}

.next-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 100px;
  padding-block: 34px;
  border-block: 1px solid var(--ink);
}

.next-page > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.next-page a {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.next-page a:hover {
  color: var(--orange);
}

.site-footer {
  display: grid;
  position: relative;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 112px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.footer-orbit {
  position: absolute;
  right: -22px;
  bottom: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.footer-orbit > span {
  display: block;
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: var(--orange);
}

.footer-orbit > span::before {
  position: absolute;
  inset: -5px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
}

/* Easter egg */
.egg-announcer {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.easter-egg {
  position: fixed;
  z-index: 80;
  top: 38%;
  left: 0;
  width: 190px;
  pointer-events: none;
  animation: satellite-flight 5s cubic-bezier(0.36, 0.08, 0.5, 0.93) forwards;
}

.easter-egg p {
  width: max-content;
  margin: 12px 0 0;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--acid);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
}

.satellite {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 8px 8px rgba(20, 35, 58, 0.2));
  transform: rotate(8deg);
}

.satellite__panel {
  display: block;
  width: 62px;
  height: 30px;
  border: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--cyan) 0 13px, var(--ink) 13px 16px);
}

.satellite__body {
  display: block;
  position: relative;
  width: 45px;
  height: 45px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--orange);
}

.satellite__body i {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes scan {
  0%, 100% { top: 4%; opacity: 0.35; }
  50% { top: 82%; opacity: 0.9; }
}

@keyframes pulse-mark {
  0%, 100% { transform: scale(0.72); opacity: 0.65; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes status-blink {
  50% { opacity: 0.35; }
}

@keyframes satellite-flight {
  0% { transform: translateX(-220px) translateY(70px) rotate(-8deg); }
  28% { transform: translateX(28vw) translateY(-25px) rotate(2deg); }
  66% { transform: translateX(66vw) translateY(30px) rotate(-3deg); }
  100% { transform: translateX(calc(100vw + 240px)) translateY(-60px) rotate(6deg); }
}

@media (max-width: 900px) {
  :root {
    --shell: min(720px, calc(100% - 40px));
  }

  .site-header {
    padding-inline: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 70px;
  }

  .hero__copy {
    max-width: 680px;
  }

  .orbit-stage {
    width: min(100%, 580px);
    margin-inline: auto;
  }

  .section-heading,
  .page-intro {
    grid-template-columns: 1fr;
  }

  .route-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .route-card--dark {
    grid-column: 1 / -1;
  }

  .page-intro__note {
    max-width: 560px;
    margin-left: 0;
  }

  .talk-hero {
    grid-template-columns: 1fr;
  }

  .talk-hero__copy {
    max-width: 760px;
  }

  .talk-thesis {
    max-width: 620px;
  }

  .talk-layout {
    grid-template-columns: 1fr;
  }

  .talk-rail {
    top: 76px;
    margin-top: 0;
    padding: 10px 0 0;
    overflow: hidden;
    border-top: 0;
    border-bottom: 1px solid var(--line-strong);
    background: rgba(243, 240, 232, 0.96);
    backdrop-filter: blur(14px);
  }

  .talk-rail > p {
    display: none;
  }

  .talk-rail ol {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .talk-rail ol::-webkit-scrollbar {
    display: none;
  }

  .talk-rail li {
    flex: none;
    border-bottom: 0;
  }

  .talk-rail a {
    grid-template-columns: auto auto;
    padding: 8px 0 12px;
    white-space: nowrap;
  }

  .talk-rail a:hover,
  .talk-rail a[aria-current="step"] {
    padding-left: 0;
  }

  .talk-progress {
    margin-top: 0;
  }

  .mechanism-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .mechanism-strip span:nth-child(2) {
    border-right: 0;
  }

  .mechanism-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-strong);
  }

  .lab-map {
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  }

  .lab-team {
    padding: 18px;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .content-rail {
    position: static;
  }

  .content-rail ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
  }

  .content-rail li {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: calc(100% - 32px);
  }

  body {
    background-size: 24px 24px;
  }

  .site-header {
    position: relative;
    flex-wrap: wrap;
    min-height: auto;
    padding: 15px 16px 0;
  }

  .site-mark {
    margin-bottom: 14px;
  }

  .site-nav {
    flex-basis: calc(100% + 32px);
    order: 2;
    min-height: 47px;
    margin-inline: -16px;
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    flex: 1;
    padding: 9px 5px;
    font-size: 0.62rem;
    line-height: 1.2;
    text-align: center;
  }

  .site-nav a::after {
    right: 8px;
    left: 8px;
  }

  .hero {
    min-height: auto;
    padding-block: 60px 80px;
  }

  .hero h1,
  .page-intro h1 {
    font-size: clamp(3.35rem, 16vw, 5.2rem);
  }

  .eyebrow {
    flex-wrap: wrap;
  }

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

  .orbit-stage {
    width: 100%;
  }

  .route-section {
    padding-block: 76px;
  }

  .section-heading {
    gap: 24px;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .route-card--dark {
    grid-column: auto;
  }

  .route-card {
    grid-template-columns: auto 1fr;
    min-height: 260px;
  }

  .route-card__arrow {
    grid-column: 2;
    justify-self: end;
  }

  .interior-page {
    padding-top: 58px;
  }

  .page-intro {
    gap: 30px;
    padding-bottom: 50px;
  }

  .talk-hero {
    min-height: auto;
    padding-block: 58px 72px;
  }

  .talk-hero h1 {
    font-size: clamp(2.75rem, 12vw, 4rem);
  }

  .talk-thesis {
    margin-right: 0;
    padding: 22px;
    box-shadow: none;
  }

  .talk-hero__actions,
  .talk-hero__actions .button {
    width: 100%;
  }

  .talk-rail {
    top: 0;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .talk-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 58px;
    scroll-margin-top: 58px;
  }

  .talk-section__number {
    display: none;
  }

  .talk-section h2 {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .talk-lead {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }

  .mechanism-strip {
    grid-template-columns: 1fr;
  }

  .mechanism-strip span {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .mechanism-strip span:last-child {
    border-bottom: 0;
  }

  .talk-takeaway {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .approach-split,
  .open-questions {
    grid-template-columns: 1fr;
  }

  .approach-split article {
    min-height: auto;
  }

  .approach-split article + article {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .talk-section--dark {
    margin-block: 0;
    margin-right: 0;
    padding-inline: 20px;
    box-shadow: none;
  }

  .representation-flow {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .representation-flow li::after {
    top: auto;
    right: 50%;
    bottom: -35px;
    transform: translateX(50%) rotate(90deg);
  }

  .open-questions article,
  .open-questions article + article {
    padding: 28px 0;
    border-left: 0;
  }

  .open-questions article + article {
    border-top: 1px solid var(--line-strong);
  }

  .lab-map {
    grid-template-columns: 1fr;
    grid-template-areas:
      "a"
      "ab"
      "b"
      "bc"
      "c"
      "feedback"
      "d"
      "e";
    gap: 12px;
  }

  .lab-team--d,
  .lab-team--e {
    margin: 0;
  }

  .lab-team {
    min-height: auto;
  }

  .lab-arrow {
    min-height: 28px;
    transform: rotate(90deg);
  }

  .lab-feedback::before,
  .lab-feedback::after {
    display: none;
  }

  .lab-feedback {
    justify-content: center;
    border-block: 1px solid var(--orange);
  }

  .content-layout {
    padding-block: 58px 80px;
  }

  .content-section {
    padding-bottom: 60px;
  }

  .content-section + .content-section {
    padding-top: 58px;
  }

  .content-section h2,
  .project-title-card h2 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }

  .project-title-card {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .project-title-card__code {
    justify-self: end;
  }

  .content-layout--log {
    padding-top: 68px;
  }

  .log-entry,
  .log-entry + .log-entry {
    padding-bottom: 70px;
  }

  .log-entry + .log-entry {
    padding-top: 66px;
  }

  .next-page {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 70px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-block: 26px;
  }

  .site-footer p {
    margin: 0;
  }

  .footer-orbit {
    right: -10px;
  }
}

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

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

  .easter-egg {
    top: 40%;
    left: 50%;
    animation: none !important;
    transform: translateX(-50%);
  }
}
