:root {
  --bg: #02040a;
  --surface: #090d16;
  --surface-strong: #111725;
  --ink: #f6f7fb;
  --muted: #9aa6bd;
  --soft: #050812;
  --line: #1b2435;
  --accent: #67e8f9;
  --accent-dark: #22d3ee;
  --accent-warm: #a78bfa;
  --success: #86efac;
  --danger: #fca5a5;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}

body::before {
  animation: grid-drift 22s linear infinite;
  background:
    linear-gradient(rgba(103, 232, 249, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  content: "";
  inset: 0;
  mask-image:
    radial-gradient(circle at 50% 18%, rgba(0, 0, 0, 0.95), transparent 62%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 72%);
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

body::after {
  background:
    radial-gradient(circle at 18% 14%, rgba(103, 232, 249, 0.18), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(167, 139, 250, 0.14), transparent 30%),
    radial-gradient(circle at 50% 82%, rgba(34, 211, 238, 0.08), transparent 42%),
    linear-gradient(135deg, transparent 0 36%, rgba(103, 232, 249, 0.055) 36% 36.25%, transparent 36.25% 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -3;
}

.ambient-field {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.ambient-field span {
  animation: float-line 12s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.62), transparent);
  box-shadow:
    0 0 18px rgba(103, 232, 249, 0.32),
    120px 62px 0 -0.5px rgba(167, 139, 250, 0.2),
    -90px 180px 0 -0.5px rgba(103, 232, 249, 0.22);
  height: 1px;
  left: 8%;
  position: absolute;
  top: 24%;
  width: 240px;
}

.ambient-field span:nth-child(2) {
  animation-delay: -4s;
  left: auto;
  right: 7%;
  top: 48%;
  width: 180px;
}

.ambient-field span:nth-child(3) {
  animation-delay: -8s;
  left: 36%;
  top: 76%;
  width: 300px;
}

@keyframes grid-drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 80px 80px;
  }
}

@keyframes float-line {
  0%,
  100% {
    opacity: 0.12;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: 0.44;
    transform: translate3d(34px, -22px, 0);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  background: var(--ink);
  color: #fff;
  left: 16px;
  padding: 10px 12px;
  position: fixed;
  top: -60px;
  z-index: 20;
}

.skip-link:focus {
  top: 16px;
}

.site-header,
.hero,
.section-heading,
.project-grid,
.benchmark-section,
.stack-section,
.archive-section,
.contact-section,
.site-footer {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header::before {
  backdrop-filter: blur(18px);
  background: rgba(7, 9, 15, 0.82);
  border-bottom: 1px solid var(--line);
  content: "";
  inset: 0 calc((100vw - 1120px) / -2);
  position: absolute;
  z-index: -1;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.72rem;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 34px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 30px);
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent);
}

.hero {
  display: grid;
  gap: clamp(28px, 7vw, 72px);
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  padding-bottom: clamp(54px, 8vw, 94px);
  padding-top: clamp(72px, 10vw, 132px);
  position: relative;
}

.hero::after {
  animation: orbit-mark 9s ease-in-out infinite;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 50%;
  content: "";
  height: clamp(170px, 24vw, 320px);
  position: absolute;
  right: clamp(24px, 8vw, 120px);
  top: clamp(42px, 8vw, 96px);
  width: clamp(170px, 24vw, 320px);
  z-index: -1;
}

@keyframes orbit-mark {
  0%,
  100% {
    opacity: 0.24;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  50% {
    opacity: 0.58;
    transform: translate3d(-18px, 14px, 0) rotate(18deg);
  }
}

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

.eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-copy p,
.section-heading p,
.contact-section p,
.stack-grid p,
.project-card p {
  color: var(--muted);
}

.hero-copy > p {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 650px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
}

.button:hover,
.button:focus {
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #061019;
}

.button.primary:hover,
.button.primary:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.status-panel {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status-panel div {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.status-panel div:last-child {
  border-bottom: 0;
}

.status-panel span {
  color: var(--muted);
  display: block;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.status-panel strong,
.status-panel a {
  display: block;
  font-size: 0.98rem;
}

.status-panel a {
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.section-heading {
  padding-top: clamp(54px, 8vw, 96px);
}

.section-heading.compact {
  padding: 0;
}

.section-heading p {
  max-width: 640px;
}

.project-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.project-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 100%;
}

.project-card:hover,
.project-card:focus-within {
  border-color: rgba(103, 232, 249, 0.55);
  transform: translateY(-2px);
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.project-visual {
  background:
    linear-gradient(rgba(125, 211, 252, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.12) 1px, transparent 1px),
    var(--soft);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
  min-height: 118px;
  padding: 18px;
  position: relative;
}

.project-visual span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
}

.project-visual div {
  animation: pulse-line 2.8s ease-in-out infinite;
  background: var(--accent);
  bottom: 18px;
  height: 2px;
  left: 18px;
  position: absolute;
  width: 44%;
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.45;
    width: 36%;
  }
  50% {
    opacity: 1;
    width: 58%;
  }
}

.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.project-meta {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.tag-list span {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 9px;
}

.project-status {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 18px;
  padding-top: 14px;
}

.project-link-text {
  color: var(--accent);
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 900;
  margin-top: 12px;
}

.case-hero,
.case-section,
.metric-strip {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.case-hero {
  padding-bottom: clamp(40px, 7vw, 78px);
  padding-top: clamp(72px, 10vw, 128px);
}

.case-hero h1 {
  max-width: 980px;
}

.case-hero > p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  max-width: 760px;
}

.metric-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-strip article {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.metric-strip span {
  color: var(--accent);
  display: block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.metric-strip strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1;
  margin-bottom: 10px;
}

.metric-strip p {
  color: var(--muted);
  margin-bottom: 0;
}

.case-section {
  padding-top: clamp(64px, 9vw, 108px);
}

.case-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(220px, 0.46fr) minmax(0, 1fr);
}

.case-copy {
  color: var(--muted);
  font-size: 1.02rem;
}

.case-copy p:last-child {
  margin-bottom: 0;
}

.case-list {
  display: grid;
  gap: 13px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.case-list li {
  background: rgba(9, 13, 22, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 15px;
}

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

.robotics-hero h1 {
  max-width: 1060px;
}

.robot-showcase {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.robot-main-figure,
.media-split figure {
  margin: 0;
}

.robot-main-figure {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 44%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.robot-main-figure img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.robot-main-figure figcaption,
.media-split figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  padding: 12px 14px;
}

.robot-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.robot-summary-grid article,
.overview-card-grid article,
.software-flow article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.robot-summary-grid span,
.software-flow span {
  color: var(--accent);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.robot-summary-grid strong,
.software-flow strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.robot-summary-grid p,
.overview-card-grid p,
.software-summary p,
.software-flow p,
.media-split p {
  color: var(--muted);
}

.robot-summary-grid p,
.overview-card-grid p,
.software-flow p {
  margin-bottom: 0;
}

.overview-card-grid,
.software-flow {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.software-summary > p {
  font-size: 1.02rem;
  max-width: 760px;
}

.software-flow {
  margin-top: 18px;
}

.media-split {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  margin: 0 auto;
  max-width: 1120px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
  padding-top: clamp(64px, 9vw, 108px);
}

.media-split.reverse {
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
}

.media-split figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-split img,
.robot-video {
  display: block;
  width: 100%;
}

.media-split img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.robot-video {
  aspect-ratio: 9 / 16;
  background: #000;
  max-height: 620px;
  object-fit: contain;
}

.media-split h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.robot-inspection,
.pathing-lab {
  margin: 0 auto;
  max-width: 1120px;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
  padding-top: clamp(68px, 10vw, 112px);
}

.inspection-shell,
.pathing-shell {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(167, 139, 250, 0.08), transparent 40%),
    rgba(9, 13, 22, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-top: 24px;
  overflow: hidden;
}

.robot-stage {
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.robot-stage::before {
  animation: grid-drift 24s linear infinite;
  background:
    linear-gradient(rgba(103, 232, 249, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1), transparent 72%);
  position: absolute;
}

.robot-stage::after {
  animation: shell-scan 6.5s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.46), transparent);
  content: "";
  height: 1px;
  left: -35%;
  position: absolute;
  top: 22%;
  width: 52%;
}

.robot-proxy {
  height: 360px;
  left: 50%;
  position: absolute;
  top: 52%;
  transform:
    translate(-50%, -50%)
    perspective(900px)
    rotateX(58deg)
    rotateZ(-35deg);
  transform-style: preserve-3d;
  width: 360px;
}

.robot-proxy > div {
  position: absolute;
}

.bot-base {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.18), rgba(167, 139, 250, 0.08)),
    rgba(2, 4, 10, 0.86);
  border: 1px solid rgba(103, 232, 249, 0.48);
  box-shadow:
    inset 0 0 32px rgba(103, 232, 249, 0.08),
    0 0 42px rgba(103, 232, 249, 0.14);
  height: 230px;
  left: 55px;
  top: 70px;
  width: 250px;
}

.bot-rail {
  background: rgba(103, 232, 249, 0.34);
  height: 20px;
  left: 30px;
  top: 92px;
  width: 300px;
}

.bot-rail.right {
  top: 258px;
}

.bot-intake {
  background: rgba(134, 239, 172, 0.68);
  height: 54px;
  left: 118px;
  top: 18px;
  width: 124px;
}

.bot-outtake {
  background: rgba(167, 139, 250, 0.58);
  height: 74px;
  left: 118px;
  top: 288px;
  width: 124px;
}

.bot-lift {
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(103, 232, 249, 0.72) 28% 35%, transparent 35% 65%, rgba(103, 232, 249, 0.72) 65% 72%, transparent 72%),
    rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.38);
  height: 260px;
  left: 155px;
  top: 50px;
  transform: translateZ(70px);
  width: 50px;
}

.bot-electronics {
  background: rgba(252, 211, 77, 0.5);
  height: 52px;
  left: 80px;
  top: 154px;
  width: 70px;
}

.bot-odo {
  background: var(--accent);
  border-radius: 50%;
  height: 20px;
  width: 20px;
}

.bot-odo.one {
  left: 72px;
  top: 96px;
}

.bot-odo.two {
  right: 72px;
  top: 96px;
}

.bot-odo.three {
  left: 170px;
  top: 252px;
}

.hotspot {
  background: rgba(2, 4, 10, 0.86);
  border: 1px solid rgba(103, 232, 249, 0.36);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 34px;
  padding: 7px 11px;
  position: absolute;
}

.hotspot:hover,
.hotspot:focus,
.hotspot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #061019;
}

.hotspot[data-robot-part="chassis"] {
  left: 17%;
  top: 55%;
}

.hotspot[data-robot-part="intake"] {
  left: 40%;
  top: 18%;
}

.hotspot[data-robot-part="outtake"] {
  left: 51%;
  top: 78%;
}

.hotspot[data-robot-part="slides"] {
  left: 57%;
  top: 36%;
}

.hotspot[data-robot-part="software"] {
  right: 10%;
  top: 20%;
}

.hotspot[data-robot-part="sensors"] {
  right: 17%;
  top: 62%;
}

.part-panel,
.pathing-controls {
  background:
    linear-gradient(rgba(103, 232, 249, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.05) 1px, transparent 1px),
    var(--soft);
  background-size: 24px 24px;
  border-left: 1px solid var(--line);
  padding: 22px;
}

.part-panel h3,
.pathing-readout h3 {
  font-size: 1.4rem;
}

.part-panel p,
.pathing-readout p {
  color: var(--muted);
}

.part-points {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.part-points li {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 10px;
}

.pathing-shell {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.field-sim {
  min-height: 470px;
  padding: 22px;
}

.field-sim svg {
  display: block;
  height: 100%;
  min-height: 426px;
  width: 100%;
}

.field-bg {
  fill: rgba(2, 4, 10, 0.72);
  stroke: var(--line);
}

.field-grid path {
  fill: none;
  opacity: 0.34;
  stroke: rgba(103, 232, 249, 0.16);
  stroke-width: 1;
}

.route-base,
.route-reroute,
.route-active {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-base {
  stroke: rgba(154, 166, 189, 0.28);
  stroke-width: 8;
}

.route-reroute {
  opacity: 0;
  stroke: rgba(252, 165, 165, 0.7);
  stroke-dasharray: 12 14;
  stroke-width: 4;
}

.route-active {
  animation: route-draw 3.6s ease-in-out infinite;
  stroke: var(--accent);
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  stroke-width: 4;
}

.pathing-shell.is-reroute .route-reroute {
  opacity: 1;
}

.pathing-shell.is-reroute .obstacle {
  opacity: 1;
}

.obstacle {
  fill: rgba(252, 165, 165, 0.16);
  opacity: 0.34;
  stroke: rgba(252, 165, 165, 0.56);
  stroke-width: 2;
}

.waypoints circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 3;
}

.robot-marker {
  fill: var(--accent);
}

.robot-marker path {
  fill: #061019;
}

@keyframes route-draw {
  0% {
    stroke-dashoffset: 520;
  }
  70%,
  100% {
    stroke-dashoffset: 0;
  }
}

.mode-buttons {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.mode-button {
  background: rgba(2, 4, 10, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 42px;
  padding: 9px;
}

.mode-button:hover,
.mode-button:focus,
.mode-button.is-active {
  background: rgba(103, 232, 249, 0.12);
  border-color: rgba(103, 232, 249, 0.44);
  color: var(--ink);
}

.compact-list {
  margin-top: 18px;
}

.doc-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
  padding: 18px;
}

.doc-card:hover,
.doc-card:focus {
  border-color: rgba(103, 232, 249, 0.52);
}

.doc-card span {
  color: var(--accent);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.doc-card strong {
  display: block;
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.doc-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.benchmark-section {
  padding-top: clamp(68px, 10vw, 112px);
}

.benchmark-shell {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(167, 139, 250, 0.08), transparent 34%),
    rgba(9, 13, 22, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  margin-top: 24px;
  overflow: hidden;
  position: relative;
}

.game-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 22px;
}

.game-header h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  margin-bottom: 0;
}

.score-pill {
  align-items: center;
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  white-space: nowrap;
}

.score-pill.is-correct {
  background: rgba(134, 239, 172, 0.1);
  border-color: rgba(134, 239, 172, 0.42);
  color: var(--success);
}

.score-pill.is-wrong {
  background: rgba(252, 165, 165, 0.1);
  border-color: rgba(252, 165, 165, 0.42);
  color: var(--danger);
}

.benchmark-shell::before {
  animation: shell-scan 5.5s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.42), transparent);
  content: "";
  height: 1px;
  left: -30%;
  position: absolute;
  top: 0;
  width: 48%;
}

@keyframes shell-scan {
  0% {
    transform: translateX(0);
  }
  55%,
  100% {
    transform: translateX(275%);
  }
}

.benchmark-tabs {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benchmark-tab {
  background: var(--surface);
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  min-height: 48px;
  padding: 12px;
  text-align: left;
}

.benchmark-tab:last-child {
  border-right: 0;
}

.benchmark-tab:hover,
.benchmark-tab:focus {
  color: var(--ink);
}

.benchmark-tab.is-active {
  background: var(--accent);
  color: #061019;
}

.benchmark-workspace {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.benchmark-canvas {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(170px, 0.72fr) 30px minmax(320px, 1.38fr) 30px minmax(210px, 0.8fr);
  padding: 22px;
}

.benchmark-image-card,
.response-card,
.judge-card {
  background: rgba(2, 4, 10, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card-label {
  color: var(--accent);
  display: block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.benchmark-image-card p,
.response-card p,
.response-card li,
.judge-card p {
  color: var(--muted);
}

.response-card p,
.response-card ol {
  margin-bottom: 10px;
}

.response-card p:last-child,
.judge-card p {
  margin-bottom: 0;
}

.response-card ol {
  padding-left: 20px;
}

.response-card li {
  margin-bottom: 8px;
}

.triplet-image {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  margin-bottom: 14px;
  object-fit: cover;
  width: 100%;
}

.benchmark-arrow {
  align-self: center;
  background: linear-gradient(90deg, transparent, var(--accent));
  height: 1px;
  position: relative;
}

.benchmark-arrow::after {
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--accent);
  border-top: 5px solid transparent;
  content: "";
  position: absolute;
  right: -1px;
  top: -5px;
}

.response-stack {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.response-card {
  cursor: pointer;
  font: inherit;
  max-height: 430px;
  overflow: auto;
  position: relative;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
  text-align: left;
}

.response-card::-webkit-scrollbar {
  width: 8px;
}

.response-card::-webkit-scrollbar-thumb {
  background: rgba(103, 232, 249, 0.28);
  border-radius: 999px;
}

.response-card:hover,
.response-card:focus {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.response-card::after {
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  color: var(--muted);
  content: "Pick this";
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 8px;
  position: absolute;
  right: 12px;
  top: 12px;
}

.response-card strong,
.judge-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.response-card.is-selected {
  border-color: var(--accent);
  background: rgba(125, 211, 252, 0.08);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.5);
}

.response-card.is-selected::after {
  color: var(--accent);
  content: "Selected";
}

.response-card.is-correct {
  border-color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.55);
}

.response-card.is-correct::after {
  border-color: rgba(134, 239, 172, 0.42);
  color: var(--success);
  content: "Human pick";
}

.response-card.is-wrong {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.38);
}

.response-card.is-wrong::after {
  border-color: rgba(252, 165, 165, 0.42);
  color: var(--danger);
  content: "Not preferred";
}

.response-card.is-muted,
.judge-card.is-muted,
.benchmark-image-card.is-muted {
  opacity: 0.42;
}

.judge-card.is-revealed {
  background:
    linear-gradient(135deg, rgba(134, 239, 172, 0.08), transparent 42%),
    rgba(167, 139, 250, 0.08);
  border-color: rgba(134, 239, 172, 0.48);
}

.benchmark-notes {
  background:
    linear-gradient(rgba(125, 211, 252, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.06) 1px, transparent 1px),
    var(--soft);
  background-size: 24px 24px;
  border-left: 1px solid var(--line);
  padding: 22px;
}

.step-count {
  color: var(--accent);
  display: block;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.benchmark-notes p {
  color: var(--muted);
}

.benchmark-notes dl,
.benchmark-notes dd {
  margin: 0;
}

.benchmark-notes dl {
  border-top: 1px solid var(--line);
  margin-top: 22px;
}

.benchmark-notes div {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.benchmark-notes dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.benchmark-notes dd {
  font-weight: 800;
}

.stack-section,
.archive-section,
.contact-section {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  padding-top: clamp(68px, 10vw, 112px);
}

.stack-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.stack-grid p {
  margin-bottom: 0;
}

.archive-table-wrap {
  overflow-x: auto;
}

.archive-table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
}

.archive-table th,
.archive-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  text-align: left;
}

.archive-table th {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.archive-table td {
  font-weight: 700;
}

.archive-table a {
  color: var(--ink);
}

.archive-table a:hover,
.archive-table a:focus {
  color: var(--accent);
}

.archive-table td:first-child {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.contact-section {
  align-items: start;
  border-top: 1px solid var(--line);
  margin-top: clamp(68px, 10vw, 112px);
  padding-bottom: clamp(48px, 8vw, 84px);
}

.contact-section h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.contact-actions {
  justify-content: flex-start;
  margin-top: 0;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding-bottom: 26px;
  padding-top: 26px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
}

body.research-page {
  --bg: #050505;
  --surface: #0d0d0d;
  --surface-strong: #141414;
  --ink: #f4f4f4;
  --muted: #a4a4a4;
  --soft: #080808;
  --line: #2a2a2a;
  --accent: #f4f4f4;
  --accent-dark: #ffffff;
  --accent-warm: #d7d7d7;
  background: #050505;
}

body.research-page::before {
  animation: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
}

body.research-page::after,
body.research-page .ambient-field {
  display: none;
}

.research-page .site-header::before {
  background: rgba(5, 5, 5, 0.86);
}

.research-page .case-hero {
  padding-bottom: 38px;
  padding-top: clamp(54px, 8vw, 86px);
}

.research-page .case-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.04;
  max-width: 900px;
}

.research-page .case-hero > p:not(.eyebrow) {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  max-width: 700px;
}

.research-page h2 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.research-page h3 {
  font-size: 1rem;
}

.research-page .eyebrow,
.research-page .card-label,
.research-page .step-count,
.research-page .metric-strip span,
.research-page .project-meta {
  color: var(--muted);
}

.research-page .button {
  background: #0b0b0b;
  border-color: var(--line);
  color: var(--ink);
  min-height: 40px;
  padding: 9px 13px;
}

.research-page .button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #050505;
}

.research-page .button:hover,
.research-page .button:focus {
  border-color: var(--ink);
}

.research-page .metric-strip {
  gap: 10px;
}

.research-page .metric-strip article,
.research-page .case-list li,
.research-page .benchmark-shell,
.research-page .benchmark-image-card,
.research-page .response-card,
.research-page .judge-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

.research-page .metric-strip article {
  padding: 14px;
}

.research-page .metric-strip strong {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.research-page .metric-strip p,
.research-page .case-copy,
.research-page .response-card p,
.research-page .response-card li,
.research-page .judge-card p,
.research-page .benchmark-notes p,
.research-page .benchmark-notes dd {
  font-size: 0.95rem;
}

.research-page .case-section,
.research-page .benchmark-section {
  padding-top: clamp(44px, 7vw, 72px);
}

.research-page .case-grid {
  gap: 26px;
}

.research-page .benchmark-shell {
  background: #080808;
}

.research-page .benchmark-shell::before {
  display: none;
}

.research-page .game-header {
  padding: 14px 18px;
}

.research-page .game-header h3 {
  font-size: 1.05rem;
}

.research-page .score-pill {
  background: #101010;
  border-color: var(--line);
  color: var(--muted);
}

.research-page .score-pill.is-correct,
.research-page .score-pill.is-wrong {
  background: var(--ink);
  border-color: var(--ink);
  color: #050505;
}

.research-page .benchmark-tab {
  background: #0b0b0b;
  color: var(--muted);
  min-height: 42px;
}

.research-page .benchmark-tab.is-active {
  background: var(--ink);
  color: #050505;
}

.research-page .benchmark-canvas {
  align-items: start;
}

.research-page .benchmark-section.is-step-0 .benchmark-canvas {
  grid-template-columns: minmax(260px, 460px);
  justify-content: start;
}

.research-page .benchmark-section.is-step-1 .benchmark-canvas {
  grid-template-columns: minmax(180px, 0.48fr) 28px minmax(360px, 1fr);
}

.research-page .benchmark-section.is-step-2 .benchmark-canvas,
.research-page .benchmark-section.is-step-3 .benchmark-canvas {
  grid-template-columns: minmax(170px, 0.72fr) 30px minmax(320px, 1.38fr) 30px minmax(210px, 0.8fr);
}

.research-page .benchmark-section.is-step-0 .flow-arrow,
.research-page .benchmark-section.is-step-0 .judge-arrow,
.research-page .benchmark-section.is-step-0 .response-stack,
.research-page .benchmark-section.is-step-0 .judge-card,
.research-page .benchmark-section.is-step-1 .judge-arrow,
.research-page .benchmark-section.is-step-1 .judge-card {
  display: none;
}

.research-page .response-card::after {
  border-color: var(--line);
  color: var(--muted);
  content: "Select";
}

.research-page .response-card:hover,
.research-page .response-card:focus,
.research-page .response-card.is-selected {
  background: #111111;
  border-color: var(--ink);
  box-shadow: none;
}

.research-page .response-card.is-correct,
.research-page .response-card.is-wrong,
.research-page .judge-card.is-revealed {
  background: #111111;
  border-color: var(--ink);
  box-shadow: none;
}

.research-page .response-card.is-correct::after,
.research-page .response-card.is-wrong::after,
.research-page .response-card.is-selected::after {
  border-color: var(--ink);
  color: var(--ink);
}

.research-page .benchmark-notes {
  background: #0a0a0a;
  background-image: none;
}

.research-page .benchmark-arrow {
  background: linear-gradient(90deg, transparent, var(--muted));
}

.research-page .benchmark-arrow::after {
  border-left-color: var(--muted);
}

@media (max-width: 880px) {
  .hero,
  .benchmark-workspace,
  .inspection-shell,
  .pathing-shell,
  .media-split,
  .media-split.reverse,
  .stack-section,
  .archive-section,
  .contact-section,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .doc-grid,
  .robot-summary-grid,
  .overview-card-grid,
  .software-flow,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benchmark-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benchmark-canvas {
    grid-template-columns: 1fr;
  }

  .response-stack {
    grid-template-columns: 1fr;
  }

  .benchmark-arrow {
    height: 28px;
    justify-self: center;
    width: 1px;
  }

  .benchmark-arrow::after {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--accent);
    bottom: -1px;
    left: -5px;
    right: auto;
    top: auto;
  }

  .benchmark-notes {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .part-panel,
  .pathing-controls {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .project-grid,
  .stack-grid,
  .doc-grid,
  .robot-summary-grid,
  .overview-card-grid,
  .software-flow,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .robot-stage {
    min-height: 460px;
  }

  .robot-proxy {
    height: 300px;
    width: 300px;
  }

  .bot-base {
    height: 190px;
    left: 46px;
    top: 58px;
    width: 208px;
  }

  .bot-rail {
    left: 25px;
    top: 78px;
    width: 250px;
  }

  .bot-rail.right {
    top: 215px;
  }

  .bot-intake,
  .bot-outtake {
    left: 98px;
    width: 104px;
  }

  .bot-outtake {
    top: 240px;
  }

  .bot-lift {
    height: 216px;
    left: 129px;
    top: 42px;
  }

  .bot-electronics {
    left: 66px;
    top: 128px;
  }

  .hotspot {
    font-size: 0.72rem;
  }

  .mode-buttons {
    grid-template-columns: 1fr;
  }

  .benchmark-tabs {
    grid-template-columns: 1fr;
  }

  .benchmark-tab {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .game-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-pill {
    white-space: normal;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Geometric editorial theme */
:root {
  --bg: #202020;
  --surface: #000000;
  --surface-strong: #050505;
  --ink: #f2f2ed;
  --muted: #a4a49d;
  --soft: #080808;
  --line: rgba(242, 242, 237, 0.22);
  --accent: #f2f2ed;
  --accent-dark: #ffffff;
  --accent-warm: #d8d8d0;
  --success: #f2f2ed;
  --danger: #f2f2ed;
  --radius: 0;
}

body,
body.research-page {
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}

body::before,
body::after,
body.research-page::before,
body.research-page::after,
.ambient-field {
  display: none;
}

main {
  background:
    linear-gradient(90deg, transparent 0 15%, var(--line) 15% calc(15% + 1px), transparent calc(15% + 1px) 50%, var(--line) 50% calc(50% + 1px), transparent calc(50% + 1px) 85%, var(--line) 85% calc(85% + 1px), transparent calc(85% + 1px)),
    var(--surface);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  margin: 0 auto 72px;
  max-width: 1180px;
  min-height: 70vh;
  position: relative;
}

.site-header {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  margin-top: clamp(22px, 6vw, 72px);
  max-width: 1180px;
  min-height: 58px;
  padding-left: clamp(18px, 3vw, 36px);
  padding-right: clamp(18px, 3vw, 36px);
}

.site-header::before {
  display: none;
}

.brand-mark {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  height: 30px;
  width: 30px;
}

.nav-links {
  gap: clamp(16px, 3vw, 34px);
}

.nav-links a,
.brand,
.button,
.archive-table a,
.site-footer a {
  color: var(--ink);
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a:focus,
.archive-table a:hover,
.archive-table a:focus,
.site-footer a:hover,
.site-footer a:focus {
  color: var(--muted);
}

.hero,
.case-hero {
  min-height: auto;
  padding-bottom: clamp(72px, 10vw, 126px);
  padding-top: clamp(72px, 10vw, 126px);
  position: relative;
}

.hero::before,
.case-hero::before {
  background:
    repeating-radial-gradient(circle at center, transparent 0 8px, rgba(242, 242, 237, 0.76) 9px 10px, transparent 11px 13px);
  content: "";
  height: clamp(150px, 24vw, 310px);
  opacity: 0.8;
  position: absolute;
  right: clamp(24px, 8vw, 110px);
  top: clamp(72px, 11vw, 150px);
  width: clamp(150px, 24vw, 310px);
  z-index: 0;
}

.hero::after,
.case-hero::after {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 50%;
  content: "";
  height: clamp(70px, 11vw, 138px);
  opacity: 1;
  position: absolute;
  right: clamp(70px, 14vw, 198px);
  top: clamp(112px, 17vw, 224px);
  width: clamp(70px, 11vw, 138px);
  z-index: 0;
}

.hero-copy,
.case-hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy,
.case-hero {
  max-width: none;
}

.hero-copy {
  max-width: 650px;
}

h1,
body.research-page .case-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.7rem);
  line-height: 1.02;
  max-width: 760px;
}

h2,
body.research-page h2,
.media-split h2 {
  font-size: clamp(1.45rem, 3.4vw, 2.75rem);
  line-height: 1.08;
}

h3 {
  font-size: 1rem;
}

.hero-copy > p,
.case-hero > p:not(.eyebrow),
body.research-page .case-hero > p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.35vw, 1.08rem);
  max-width: 620px;
}

.eyebrow,
.card-label,
.step-count,
.project-meta,
.metric-strip span,
.robot-summary-grid span,
.software-flow span,
.doc-card span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.11em;
}

.button,
body.research-page .button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 38px;
  padding: 8px 13px;
}

.button.primary,
body.research-page .button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.button:hover,
.button:focus,
body.research-page .button:hover,
body.research-page .button:focus {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.status-panel,
.project-card,
.metric-strip article,
.case-list li,
.stack-grid article,
.robot-main-figure,
.media-split figure,
.robot-summary-grid article,
.overview-card-grid article,
.software-flow article,
.doc-card,
.benchmark-shell,
.benchmark-image-card,
.response-card,
.judge-card,
body.research-page .metric-strip article,
body.research-page .case-list li,
body.research-page .benchmark-shell,
body.research-page .benchmark-image-card,
body.research-page .response-card,
body.research-page .judge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

.project-card:hover,
.project-card:focus-within,
.doc-card:hover,
.doc-card:focus {
  border-color: var(--ink);
  transform: none;
}

.project-visual {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px;
}

.project-visual div {
  animation: none;
  background: var(--ink);
}

.tag-list span {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.project-link-text {
  color: var(--ink);
}

.section-heading,
.case-section,
.benchmark-section,
.stack-section,
.archive-section,
.contact-section,
.robot-inspection,
.pathing-lab,
.media-split {
  padding-top: clamp(58px, 8vw, 96px);
}

.case-grid {
  gap: clamp(26px, 5vw, 64px);
}

.case-copy,
.case-copy p,
.section-heading p,
.project-card p,
.stack-grid p,
.contact-section p,
.robot-summary-grid p,
.overview-card-grid p,
.software-summary p,
.software-flow p,
.media-split p,
.metric-strip p,
.benchmark-notes p,
.benchmark-notes dd,
.response-card p,
.response-card li,
.judge-card p {
  color: var(--muted);
}

.metric-strip strong {
  font-size: 1rem;
}

.metric-strip,
.project-grid,
.robot-summary-grid,
.overview-card-grid,
.software-flow {
  gap: 1px;
}

.benchmark-shell {
  background: var(--surface);
}

.benchmark-shell::before,
body.research-page .benchmark-shell::before {
  display: none;
}

.game-header,
.benchmark-tabs,
.benchmark-notes dl,
.benchmark-notes div,
.project-status,
.archive-table th,
.archive-table td,
.robot-main-figure figcaption,
.media-split figcaption {
  border-color: var(--line);
}

.benchmark-tab,
body.research-page .benchmark-tab {
  background: var(--surface);
  color: var(--muted);
}

.benchmark-tab.is-active,
body.research-page .benchmark-tab.is-active,
.score-pill.is-correct,
.score-pill.is-wrong,
body.research-page .score-pill.is-correct,
body.research-page .score-pill.is-wrong {
  background: var(--ink);
  color: var(--surface);
}

.score-pill,
body.research-page .score-pill {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.response-card:hover,
.response-card:focus,
.response-card.is-selected,
.response-card.is-correct,
.response-card.is-wrong,
.judge-card.is-revealed,
body.research-page .response-card:hover,
body.research-page .response-card:focus,
body.research-page .response-card.is-selected,
body.research-page .response-card.is-correct,
body.research-page .response-card.is-wrong,
body.research-page .judge-card.is-revealed {
  background: var(--surface-strong);
  border-color: var(--ink);
  box-shadow: none;
}

.benchmark-notes,
body.research-page .benchmark-notes {
  background: var(--surface);
  background-image: none;
}

.benchmark-arrow,
body.research-page .benchmark-arrow {
  background: linear-gradient(90deg, transparent, var(--muted));
}

.benchmark-arrow::after,
body.research-page .benchmark-arrow::after {
  border-left-color: var(--muted);
}

.contact-section {
  border-top: 1px solid var(--line);
  margin-top: clamp(58px, 8vw, 96px);
}

.site-footer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  max-width: 1180px;
}

@media (max-width: 880px) {
  main,
  .site-header,
  .site-footer {
    margin-left: 14px;
    margin-right: 14px;
  }

  .hero::before,
  .case-hero::before {
    opacity: 0.36;
    right: 20px;
    top: 52px;
  }

  .hero::after,
  .case-hero::after {
    opacity: 0.8;
    right: 64px;
    top: 92px;
  }
}

@media (max-width: 640px) {
  main {
    background: var(--surface);
  }

  .site-header {
    margin-top: 14px;
  }

  .hero,
  .case-hero {
    padding-top: 54px;
  }

  .hero::before,
  .hero::after,
  .case-hero::before,
  .case-hero::after {
    display: none;
  }
}

/* Research benchmark walkthrough: keep context visible without revealing the label early. */
body.research-page .benchmark-workspace {
  grid-template-columns: 1fr;
}

body.research-page .benchmark-canvas,
body.research-page .benchmark-section.is-step-0 .benchmark-canvas,
body.research-page .benchmark-section.is-step-1 .benchmark-canvas,
body.research-page .benchmark-section.is-step-2 .benchmark-canvas,
body.research-page .benchmark-section.is-step-3 .benchmark-canvas {
  grid-template-columns: minmax(210px, 0.7fr) 24px minmax(340px, 1fr) 24px minmax(230px, 0.75fr);
}

body.research-page .benchmark-section.is-step-0 .flow-arrow,
body.research-page .benchmark-section.is-step-0 .judge-arrow,
body.research-page .benchmark-section.is-step-1 .judge-arrow {
  display: block;
}

body.research-page .benchmark-section.is-step-0 .response-stack {
  display: grid;
}

body.research-page .benchmark-section.is-step-0 .judge-card,
body.research-page .benchmark-section.is-step-1 .judge-card {
  display: block;
}

body.research-page .response-stack {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.research-page .response-card {
  max-height: none;
  overflow: visible;
}

body.research-page .benchmark-image-card.is-muted,
body.research-page .response-card.is-muted,
body.research-page .judge-card.is-muted {
  opacity: 0.6;
}

body.research-page .benchmark-image-card.is-active-stage,
body.research-page .response-card.is-active-stage,
body.research-page .judge-card.is-active-stage {
  background: #080808;
  border-color: rgba(242, 242, 237, 0.82);
}

body.research-page .judge-card:not(.is-revealed) {
  border-style: dashed;
}

body.research-page .judge-card:not(.is-revealed) strong,
body.research-page .judge-card:not(.is-revealed) p {
  color: var(--muted);
}

body.research-page .benchmark-notes {
  border-left: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 0.65fr) minmax(260px, 1fr) minmax(190px, 0.6fr);
}

body.research-page .benchmark-notes .step-count,
body.research-page .benchmark-notes h3 {
  grid-column: 1;
}

body.research-page .benchmark-notes p {
  grid-column: 2;
  grid-row: 1 / span 2;
}

body.research-page .benchmark-step-controls {
  align-items: start;
  display: flex;
  gap: 10px;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-content: flex-end;
}

body.research-page .benchmark-step-controls .button {
  min-height: 34px;
}

body.research-page .benchmark-step-controls .button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

body.research-page .benchmark-notes dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.research-page .benchmark-notes div {
  border-bottom: 0;
  border-right: 1px solid var(--line);
  padding: 0 16px 0 0;
}

body.research-page .benchmark-notes div:last-child {
  border-right: 0;
}

@media (max-width: 1040px) {
  body.research-page .benchmark-canvas,
  body.research-page .benchmark-section.is-step-0 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-1 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-2 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-3 .benchmark-canvas {
    grid-template-columns: 1fr;
  }

  body.research-page .benchmark-arrow {
    height: 28px;
    justify-self: center;
    width: 1px;
  }

  body.research-page .benchmark-arrow::after {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--muted);
    bottom: -1px;
    left: -5px;
    right: auto;
    top: auto;
  }

  body.research-page .benchmark-notes {
    grid-template-columns: 1fr;
  }

  body.research-page .benchmark-notes .step-count,
  body.research-page .benchmark-notes h3,
  body.research-page .benchmark-notes p,
  body.research-page .benchmark-step-controls,
  body.research-page .benchmark-notes dl {
    grid-column: 1;
    grid-row: auto;
  }

  body.research-page .benchmark-step-controls {
    justify-content: flex-start;
  }

  body.research-page .benchmark-notes dl {
    grid-template-columns: 1fr;
  }

  body.research-page .benchmark-notes div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    padding: 12px 0;
  }
}

/* Research benchmark carousel: one focused stage at a time. */
body.research-page .benchmark-canvas,
body.research-page .benchmark-section.is-step-0 .benchmark-canvas,
body.research-page .benchmark-section.is-step-1 .benchmark-canvas,
body.research-page .benchmark-section.is-step-2 .benchmark-canvas,
body.research-page .benchmark-section.is-step-3 .benchmark-canvas {
  display: block;
  min-height: 520px;
  padding: clamp(18px, 3vw, 34px);
}

body.research-page .benchmark-arrow,
body.research-page .benchmark-section.is-step-0 .flow-arrow,
body.research-page .benchmark-section.is-step-0 .judge-arrow,
body.research-page .benchmark-section.is-step-1 .judge-arrow {
  display: none;
}

body.research-page .benchmark-image-card,
body.research-page .response-stack,
body.research-page .judge-card,
body.research-page .evaluation-card {
  display: none;
  margin: 0 auto;
  max-width: 820px;
  width: 100%;
}

body.research-page .benchmark-section.is-step-0 .response-stack,
body.research-page .benchmark-section.is-step-0 .judge-card,
body.research-page .benchmark-section.is-step-1 .benchmark-image-card,
body.research-page .benchmark-section.is-step-1 .judge-card,
body.research-page .benchmark-section.is-step-2 .benchmark-image-card,
body.research-page .benchmark-section.is-step-2 .response-stack,
body.research-page .benchmark-section.is-step-3 .benchmark-image-card,
body.research-page .benchmark-section.is-step-3 .response-stack,
body.research-page .benchmark-section.is-step-3 .judge-card {
  display: none;
}

body.research-page .benchmark-section.is-step-0 .benchmark-image-card,
body.research-page .benchmark-section.is-step-2 .judge-card,
body.research-page .benchmark-section.is-step-3 .evaluation-card {
  display: block;
}

body.research-page .benchmark-section.is-step-1 .response-stack {
  display: grid;
}

body.research-page .benchmark-image-card,
body.research-page .judge-card,
body.research-page .evaluation-card {
  padding: clamp(18px, 3vw, 28px);
}

body.research-page .benchmark-section.is-step-0 .benchmark-image-card {
  max-width: 620px;
}

body.research-page .benchmark-section.is-step-2 .judge-card,
body.research-page .benchmark-section.is-step-3 .evaluation-card {
  max-width: 680px;
}

body.research-page .triplet-image {
  margin-left: auto;
  margin-right: auto;
  max-width: 360px;
}

body.research-page .evaluation-card {
  background: var(--surface);
  border: 1px solid var(--line);
}

body.research-page .evaluation-card strong {
  display: block;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

body.research-page .evaluation-card p {
  color: var(--muted);
  max-width: 580px;
}

body.research-page .evaluation-flow {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
}

body.research-page .evaluation-flow span {
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 14px 12px;
}

body.research-page .evaluation-flow span:last-child {
  border-right: 0;
}

@media (max-width: 760px) {
  body.research-page .benchmark-canvas,
  body.research-page .benchmark-section.is-step-0 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-1 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-2 .benchmark-canvas,
  body.research-page .benchmark-section.is-step-3 .benchmark-canvas {
    min-height: auto;
  }

  body.research-page .benchmark-section.is-step-1 .response-stack {
    grid-template-columns: 1fr;
  }

  body.research-page .evaluation-flow {
    grid-template-columns: 1fr;
  }

  body.research-page .evaluation-flow span {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  body.research-page .evaluation-flow span:last-child {
    border-bottom: 0;
  }
}

/* Portfolio-wide black cleanup */
:root {
  --bg: #050505;
  --surface: #000000;
  --surface-strong: #080808;
  --ink: #f4f4f4;
  --muted: #a4a4a4;
  --soft: #050505;
  --line: #2a2a2a;
  --accent: #f4f4f4;
  --accent-dark: #ffffff;
  --accent-warm: #d8d8d0;
  --success: #f4f4f4;
  --danger: #f4f4f4;
  --radius: 0;
}

body,
body.home-page,
body.robotics-page,
body.aerospace-page,
body.research-page {
  background: #050505;
}

body:not(.research-page) .hero::before,
body:not(.research-page) .hero::after,
body:not(.research-page) .case-hero::before,
body:not(.research-page) .case-hero::after {
  display: none;
}

body.home-page .hero {
  grid-template-columns: 1fr;
  gap: clamp(26px, 5vw, 54px);
  padding-bottom: clamp(26px, 5vw, 48px);
  padding-top: clamp(64px, 9vw, 104px);
}

body.home-page .hero-copy {
  max-width: 720px;
}

body.home-page .status-panel {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
}

body.home-page .status-panel div {
  border-bottom: 0;
  border-right: 1px solid var(--line);
  min-width: 0;
}

body.home-page .status-panel div:last-child {
  border-right: 0;
}

body.home-page .section-heading {
  padding-top: clamp(28px, 5vw, 48px);
}

body.home-page .contact-section {
  margin-top: clamp(46px, 7vw, 76px);
}

body:not(.research-page) .case-hero {
  padding-bottom: clamp(46px, 7vw, 78px);
  padding-top: clamp(64px, 9vw, 104px);
}

body:not(.research-page) .case-hero h1 {
  max-width: 820px;
}

body:not(.research-page) .robot-showcase,
body:not(.research-page) .case-section,
body:not(.research-page) .media-split,
body:not(.research-page) .metric-strip {
  position: relative;
  z-index: 1;
}

body.robotics-page .case-section,
body.robotics-page .media-split,
body.aerospace-page .case-section {
  padding-top: clamp(46px, 7vw, 78px);
}

body.robotics-page .software-summary > p {
  max-width: 560px;
}

.omni-title {
  color: var(--ink);
  display: grid;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.82;
  margin: 0;
  text-transform: uppercase;
}

.omni-title span {
  display: block;
}

.omnipursuit-overview {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  margin-top: 18px;
}

.omni-visual {
  background: #000;
  border-right: 1px solid var(--line);
  min-height: 360px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.omni-visual svg {
  display: block;
  height: 100%;
  min-height: 340px;
  width: 100%;
}

.omni-field {
  fill: #020202;
  stroke: var(--line);
  stroke-width: 1;
}

.omni-grid {
  fill: none;
  stroke: rgba(244, 244, 244, 0.12);
  stroke-width: 1;
}

.omni-route-muted,
.omni-route-main,
.omni-reroute,
.omni-vector {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.omni-route-muted {
  stroke: rgba(244, 244, 244, 0.14);
  stroke-width: 16;
}

.omni-route-main {
  stroke: var(--ink);
  stroke-width: 4;
}

.omni-reroute {
  stroke: rgba(244, 244, 244, 0.62);
  stroke-dasharray: 8 10;
  stroke-width: 2;
}

.omni-node,
.omni-lookahead,
.omni-chord {
  fill: none;
}

.omni-node {
  fill: var(--ink);
}

.omni-node.muted {
  fill: #050505;
  stroke: var(--ink);
  stroke-width: 2;
}

.omni-block {
  fill: transparent;
  stroke: rgba(244, 244, 244, 0.48);
  stroke-dasharray: 4 7;
  stroke-width: 2;
}

.omni-lookahead {
  stroke: rgba(244, 244, 244, 0.28);
  stroke-dasharray: 7 9;
  stroke-width: 2;
}

.omni-chord {
  stroke: rgba(244, 244, 244, 0.72);
  stroke-width: 2;
}

.omni-robot {
  fill: #050505;
  stroke: var(--ink);
  stroke-width: 2;
}

.omni-heading {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 2;
}

.algorithm-steps {
  display: grid;
  grid-template-columns: 1fr;
}

.algorithm-steps article {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.algorithm-steps article:last-child {
  border-bottom: 0;
}

.algorithm-steps span {
  color: var(--muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.algorithm-steps strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 7px;
}

.algorithm-steps p {
  color: var(--muted);
  margin-bottom: 0;
}

.loop-figure {
  background: #000;
}

.loop-figure svg {
  display: block;
  width: 100%;
}

.loop-frame {
  fill: #020202;
  stroke: var(--line);
  stroke-width: 1;
}

.loop-grid {
  fill: none;
  stroke: rgba(244, 244, 244, 0.1);
  stroke-width: 1;
}

.loop-node rect {
  fill: #050505;
  stroke: rgba(244, 244, 244, 0.56);
  stroke-width: 1;
}

.loop-node text {
  fill: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
}

.loop-line {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 900px) {
  body.home-page .status-panel,
  .omnipursuit-overview {
    grid-template-columns: 1fr;
  }

  body.home-page .status-panel div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  body.home-page .status-panel div:last-child {
    border-bottom: 0;
  }

  .omni-visual {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .omni-visual {
    min-height: auto;
  }

  .omni-visual svg {
    min-height: 260px;
  }
}
