:root {
  --bg: #000000;
  --bg-soft: #000000;
  --surface: #060907;
  --surface-2: #0a0f0c;
  --text: #f5f8f5;
  --muted: #bcc8c2;
  --subtle: #82918b;
  --line: rgba(230, 255, 244, 0.16);
  --cyan: #58e1ff;
  --amber: #ffb64a;
  --magenta: #ff5b91;
  --green: #95f278;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background: #000000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

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

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: rgba(0, 0, 0, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand {
  color: var(--text);
  font-weight: 800;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--amber) 58%, var(--magenta));
  box-shadow: 0 0 22px rgba(88, 225, 255, 0.55);
}

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

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

.project-hero {
  position: relative;
  min-height: clamp(680px, 82vh, 900px);
  overflow: hidden;
  padding: 7.5rem 1.5rem 4.2rem;
  isolation: isolate;
}

.hero-background,
.hero-switch-video,
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-background {
  background:
    radial-gradient(circle at 78% 32%, rgba(88, 225, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #08110e, #000000 62%);
  filter: saturate(1.22) contrast(1.08);
  transform: scale(1.03);
  z-index: -4;
}

.hero-switch-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.28) contrast(1.08) brightness(0.92);
  transform: scale(1.02);
  z-index: -3;
  pointer-events: none;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 10, 8, 0.95) 0%, rgba(7, 10, 8, 0.82) 42%, rgba(7, 10, 8, 0.35) 100%),
    linear-gradient(180deg, rgba(7, 10, 8, 0.12) 0%, rgba(7, 10, 8, 0.82) 100%);
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.06) 7px
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 100%;
}

.eyebrow,
.section-kicker,
.tagline,
.metric-label {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-hero h1 {
  max-width: 1000px;
  margin: 0.65rem 0 1.1rem;
  color: var(--text);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.hero-copy {
  max-width: 770px;
  color: #dce8e2;
  font-size: 1.14rem;
  font-weight: 500;
}

.project-hero .eyebrow {
  max-width: 880px;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  max-width: 880px;
  margin-top: 1.65rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.author-block {
  display: inline-block;
}

.affiliation,
.equal-note {
  max-width: 850px;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.acceptance-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 860px;
  margin: 0.85rem 0 0;
  padding: 0.42rem 0.78rem;
  color: #fff7dc;
  background: rgba(255, 182, 74, 0.1);
  border: 1px solid rgba(255, 182, 74, 0.26);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.acceptance-text {
  position: relative;
  z-index: 1;
}

.ribbon {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: var(--w, 0.46rem);
  height: 0.12rem;
  border-radius: 2px;
  background: var(--color);
  opacity: 0.74;
  transform-origin: center;
  animation: quietRibbon 4.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

.ribbon-1 {
  --left: 4%;
  --top: -0.3rem;
  --color: var(--cyan);
  --delay: -0.5s;
  --rot: -12deg;
  --burst-x: -3.8rem;
  --burst-y: -2.7rem;
  --burst-rot: -180deg;
}

.ribbon-2 {
  --left: 15%;
  --top: calc(100% + 0.18rem);
  --color: var(--green);
  --delay: -1.6s;
  --rot: 18deg;
  --burst-x: -3rem;
  --burst-y: 2.9rem;
  --burst-rot: 170deg;
}

.ribbon-3 {
  --left: 27%;
  --top: -0.24rem;
  --color: var(--amber);
  --delay: -2.3s;
  --rot: 9deg;
  --burst-x: -1.8rem;
  --burst-y: -3.4rem;
  --burst-rot: 150deg;
}

.ribbon-4 {
  --left: 38%;
  --top: calc(100% + 0.2rem);
  --color: var(--magenta);
  --delay: -3.1s;
  --rot: -22deg;
  --burst-x: -0.8rem;
  --burst-y: 3.3rem;
  --burst-rot: -200deg;
}

.ribbon-5 {
  --left: 50%;
  --top: -0.34rem;
  --w: 0.58rem;
  --color: #fff07a;
  --delay: -0.9s;
  --rot: 16deg;
  --burst-x: 0.2rem;
  --burst-y: -3.8rem;
  --burst-rot: 210deg;
}

.ribbon-6 {
  --left: 61%;
  --top: calc(100% + 0.16rem);
  --color: var(--cyan);
  --delay: -2.8s;
  --rot: -10deg;
  --burst-x: 1.5rem;
  --burst-y: 3rem;
  --burst-rot: -180deg;
}

.ribbon-7 {
  --left: 72%;
  --top: -0.28rem;
  --color: var(--green);
  --delay: -1.2s;
  --rot: 24deg;
  --burst-x: 2.5rem;
  --burst-y: -3rem;
  --burst-rot: 205deg;
}

.ribbon-8 {
  --left: 84%;
  --top: calc(100% + 0.18rem);
  --w: 0.5rem;
  --color: var(--amber);
  --delay: -3.6s;
  --rot: -16deg;
  --burst-x: 3rem;
  --burst-y: 2.7rem;
  --burst-rot: -170deg;
}

.ribbon-9 {
  --left: 96%;
  --top: -0.26rem;
  --color: var(--magenta);
  --delay: -2s;
  --rot: 12deg;
  --burst-x: 4.1rem;
  --burst-y: -2.7rem;
  --burst-rot: 190deg;
}

.ribbon-10 {
  --left: 8%;
  --top: 50%;
  --w: 0.36rem;
  --color: #fff07a;
  --delay: -4s;
  --rot: 32deg;
  --burst-x: -4.6rem;
  --burst-y: -0.1rem;
  --burst-rot: 250deg;
}

.ribbon-11 {
  --left: 92%;
  --top: 54%;
  --w: 0.36rem;
  --color: var(--cyan);
  --delay: -1.8s;
  --rot: -30deg;
  --burst-x: 4.6rem;
  --burst-y: 0.3rem;
  --burst-rot: -245deg;
}

.ribbon-12 {
  --left: 45%;
  --top: 50%;
  --w: 0.32rem;
  --color: var(--green);
  --delay: -2.6s;
  --rot: 4deg;
  --burst-x: 0.4rem;
  --burst-y: -4.1rem;
  --burst-rot: 290deg;
}

.ribbon-13 {
  --left: 2%;
  --top: 88%;
  --w: 0.38rem;
  --color: var(--green);
  --delay: -3.4s;
  --rot: -26deg;
  --burst-x: -4rem;
  --burst-y: 2.1rem;
  --burst-rot: -220deg;
}

.ribbon-14 {
  --left: 18%;
  --top: 18%;
  --w: 0.34rem;
  --color: var(--magenta);
  --delay: -0.2s;
  --rot: 42deg;
  --burst-x: -2.6rem;
  --burst-y: -2.3rem;
  --burst-rot: 230deg;
}

.ribbon-15 {
  --left: 33%;
  --top: 84%;
  --w: 0.42rem;
  --color: var(--cyan);
  --delay: -1.1s;
  --rot: -38deg;
  --burst-x: -1.2rem;
  --burst-y: 3.6rem;
  --burst-rot: -260deg;
}

.ribbon-16 {
  --left: 67%;
  --top: 16%;
  --w: 0.38rem;
  --color: #fff07a;
  --delay: -4.2s;
  --rot: 28deg;
  --burst-x: 1.8rem;
  --burst-y: -3.3rem;
  --burst-rot: 240deg;
}

.ribbon-17 {
  --left: 80%;
  --top: 86%;
  --w: 0.34rem;
  --color: var(--green);
  --delay: -2.2s;
  --rot: 36deg;
  --burst-x: 3.2rem;
  --burst-y: 3rem;
  --burst-rot: 260deg;
}

.ribbon-18 {
  --left: 98%;
  --top: 72%;
  --w: 0.42rem;
  --color: var(--amber);
  --delay: -3.8s;
  --rot: -44deg;
  --burst-x: 4.4rem;
  --burst-y: 1.6rem;
  --burst-rot: -250deg;
}

.acceptance-line:hover .ribbon,
.acceptance-line:focus-within .ribbon {
  animation: ribbonBurst 2.15s cubic-bezier(0.18, 0.82, 0.2, 1) forwards;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.65rem;
}

.button.project-button {
  height: 2.75rem;
  padding: 0 1rem;
  color: #04100d;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button.project-button:hover {
  color: #04100d;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.72);
}

.section {
  padding: 5rem 1.5rem;
  background: #000000;
  color: var(--text);
}

.abstract-section {
  background: #000000;
}

.abstract-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}

.abstract-copy .section-heading {
  max-width: none;
  margin: 0 0 1.75rem;
  text-align: left;
}

.abstract-copy .research-copy {
  margin-bottom: 0;
}

.abstract-layout .concept-figure {
  width: 100%;
  max-width: none;
  margin: 0;
}

.dark-band {
  background: var(--bg-soft);
  color: var(--text);
}

.results-section {
  background: #000000;
  color: var(--text);
}

.demo-section {
  background: #000000;
}

.bibtex-section {
  background: #000000;
  color: var(--text);
}

.license-section {
  background: #000000;
  color: var(--text);
}

.section-heading {
  max-width: 850px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-heading h2,
.bibtex-header h2 {
  margin: 0.25rem 0 0;
  color: inherit;
  font-size: 2.25rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.research-copy {
  color: var(--muted);
  font-size: 1.08rem;
}

.research-copy p + p {
  margin-top: 1rem;
}

.pipeline-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}

.pipeline-step,
.metric-card,
.scenario-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000000;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.pipeline-step {
  min-height: 14rem;
  padding: 1.25rem;
}

.step-index {
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 900;
}

.pipeline-step h3,
.scenario-card h3 {
  margin: 0.6rem 0 0.45rem;
  color: inherit;
  font-size: 1.16rem;
  line-height: 1.22;
  font-weight: 900;
}

.pipeline-step p,
.scenario-copy p,
.metric-card p {
  color: var(--muted);
  margin: 0;
}

.wide-figure {
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
}

.section:not(.dark-band):not(.results-section):not(.bibtex-section) .wide-figure {
  border-color: var(--line);
  background: #000000;
  box-shadow: var(--shadow);
}

.wide-figure img {
  width: 100%;
  height: auto;
}

.wide-figure figcaption {
  padding: 0.9rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.section:not(.dark-band):not(.results-section):not(.bibtex-section) .wide-figure figcaption {
  color: var(--muted);
}

.wide-figure.compact {
  max-width: 970px;
  margin-bottom: 2rem;
}

.wide-figure.compact.concept-figure {
  max-width: 720px;
}

.demo-video-frame {
  max-width: 1040px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
}

.demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  object-fit: contain;
}

.demo-video-frame figcaption {
  padding: 0.9rem 1rem 1rem;
  color: var(--muted);
  background: #000000;
  font-size: 0.95rem;
  text-align: center;
}

#method .container.is-max-widescreen {
  display: flex;
  flex-direction: column;
}

#method .section-heading {
  order: 0;
}

#method .framework-panel {
  order: 1;
  margin-bottom: 2rem;
}

#method .pipeline-grid {
  order: 2;
}

#method .wide-figure {
  order: 3;
}

.framework-panel {
  margin: 1.25rem auto 0;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.framework-toolbar h3 {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.framework-controls {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000000;
  flex-shrink: 0;
}

.framework-mode {
  min-width: 6.8rem;
  min-height: 2rem;
  padding: 0 0.7rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.framework-mode:hover {
  color: var(--text);
}

.framework-mode.is-active {
  color: #04100d;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  transform: translateY(-1px);
}

.framework-canvas {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: #000000;
}

.framework-svg {
  display: block;
  width: 100%;
  min-width: 920px;
  height: auto;
}

.framework-line {
  fill: none;
  stroke: url("#lineGrad");
  stroke-width: 3.25;
  stroke-linecap: round;
  marker-end: url("#arrowHead");
  opacity: 0.94;
  filter: url("#frameworkGlow");
  stroke-dasharray: 12 11;
  animation: signalFlow 1.3s linear infinite;
}

.infer-line {
  stroke: var(--cyan);
  filter: none;
  stroke-dasharray: none;
  animation: none;
}

.through-frozen,
.trainable-line {
  stroke: var(--green);
}

.runtime-line {
  stroke: var(--amber);
}

.backprop-line,
.train-forward {
  stroke: var(--amber);
  marker-end: url("#gradHead");
  opacity: 0;
  animation-duration: 0.95s;
}

.backprop-line {
  stroke-width: 4.25;
  stroke-dasharray: 6 10;
}

.blocked-gradient {
  stroke: rgba(255, 182, 74, 0.72);
  filter: none;
}

.loss-to-dit-line {
  stroke-width: 5;
  stroke-dasharray: 5 9;
}

.architecture-frame {
  fill: rgba(255, 255, 255, 0.045);
  stroke: rgba(88, 225, 255, 0.42);
  stroke-width: 2;
  filter: url("#frameworkGlow");
}

.input-frame {
  fill: rgba(88, 225, 255, 0.11);
}

.language-frame {
  fill: rgba(149, 242, 120, 0.09);
  stroke: rgba(149, 242, 120, 0.42);
}

.frozen-frame {
  fill: rgba(88, 225, 255, 0.075);
  stroke: rgba(255, 182, 74, 0.5);
}

.state-frame {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.24);
}

.safety-frame {
  fill: rgba(149, 242, 120, 0.11);
  stroke: rgba(149, 242, 120, 0.58);
}

.module-label,
.cell-text,
.prompt-text,
.sensor-label,
.vlm-text,
.dit-title,
.safety-text {
  font-family: "Inter", sans-serif;
  letter-spacing: 0;
  pointer-events: none;
}

.module-label {
  fill: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.trainable-label {
  fill: #fff4dc;
}

.sensor-label {
  font-size: 11px;
  font-weight: 900;
}

.thermal-label {
  fill: #ffef7a;
}

.rgb-label {
  fill: #dfe9e6;
}

.depth-label {
  fill: #9aa9ff;
}

.input-cell {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.3;
}

.task-cell {
  fill: rgba(255, 182, 74, 0.82);
}

.input-cell.thermal {
  fill: url("#signalGrad");
}

.input-cell.rgb {
  fill: rgba(235, 243, 240, 0.86);
}

.input-cell.depth {
  fill: rgba(64, 92, 233, 0.78);
}

.cell-text,
.prompt-text {
  fill: #06100d;
  font-size: 10px;
  font-weight: 900;
}

.prompt-bar.cold {
  fill: #4aa8ff;
}

.prompt-bar.hot {
  fill: #e63b28;
}

.prompt-bar.buried {
  fill: #9aa69e;
}

.token-stack,
.state-token {
  fill: rgba(88, 225, 255, 0.72);
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
}

.vlm-tokens {
  fill: rgba(74, 134, 220, 0.8);
}

.vlm-block {
  fill: rgba(68, 171, 236, 0.84);
  stroke: rgba(4, 16, 13, 0.88);
  stroke-width: 3;
  filter: url("#frameworkGlow");
}

.vlm-text,
.dit-title,
.safety-text {
  fill: var(--text);
  font-weight: 900;
}

.vlm-text {
  font-size: 32px;
}

.robot-state-icon {
  fill: rgba(220, 226, 223, 0.58);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
}

.dit-shell {
  fill: rgba(255, 182, 74, 0.88);
  stroke: rgba(255, 182, 74, 0.98);
  stroke-width: 2;
  filter: url("#frameworkGlow");
}

.dit-title {
  font-size: 42px;
}

.safety-block {
  fill: rgba(126, 211, 80, 0.92);
  stroke: rgba(149, 242, 120, 0.72);
  stroke-width: 2;
}

.safety-text {
  font-size: 24px;
}

.node-shell {
  fill: url("#nodeCool");
  stroke: rgba(88, 225, 255, 0.55);
  stroke-width: 2;
  filter: url("#frameworkGlow");
}

.trainable-node .node-shell {
  fill: url("#nodeHot");
  stroke: rgba(149, 242, 120, 0.72);
}

.runtime-node .node-shell {
  stroke: rgba(255, 182, 74, 0.78);
}

.loss-node {
  opacity: 0;
}

.loss-node .node-shell {
  fill: rgba(33, 27, 18, 0.96);
  stroke: rgba(255, 182, 74, 0.86);
}

.stop-gradient-mark {
  opacity: 0;
  pointer-events: none;
}

.stop-gradient-mark rect {
  fill: var(--amber);
  filter: url("#frameworkGlow");
}

.node-hatch {
  fill: url("#lockedHatch");
  opacity: 0;
  pointer-events: none;
}

.node-title,
.node-note,
.inner-text,
.status-text {
  font-family: "Inter", sans-serif;
  letter-spacing: 0;
  pointer-events: none;
}

.node-title {
  fill: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.node-note {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inner-block {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.5;
}

.inner-text {
  fill: #d9e8e1;
  font-size: 12px;
  font-weight: 800;
}

.status-text {
  font-size: 11px;
  font-weight: 900;
}

.status-text.locked {
  fill: var(--amber);
}

.status-text.trainable {
  fill: var(--green);
}

.mini-sensor.rgb {
  fill: #dfe9e6;
}

.mini-sensor.thermal {
  fill: url("#signalGrad");
}

.mini-sensor.depth {
  fill: #405ce9;
}

.dit-wave {
  fill: none;
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.9;
}

.framework-panel[data-mode="train"] .frozen-node {
  opacity: 0.62;
}

.framework-panel[data-mode="train"] .frozen-node .node-shell {
  filter: none;
  stroke: rgba(255, 182, 74, 0.52);
}

.framework-panel[data-mode="train"] .frozen-node .architecture-frame {
  filter: none;
  stroke: rgba(255, 182, 74, 0.52);
}

.framework-panel[data-mode="train"] .frozen-node .node-hatch {
  opacity: 0.8;
}

.framework-panel[data-mode="train"] .runtime-node {
  opacity: 0.24;
}

.framework-panel[data-mode="train"] .output-node {
  opacity: 0.16;
}

.framework-panel[data-mode="train"] .infer-line {
  opacity: 0.26;
  filter: none;
  animation: none;
  stroke-dasharray: 5 11;
}

.framework-panel[data-mode="train"] .runtime-line {
  opacity: 0.04;
}

.framework-panel[data-mode="train"] .trainable-node .node-shell {
  stroke-width: 3;
}

.framework-panel[data-mode="train"] .trainable-node .dit-shell {
  stroke-width: 4;
}

.framework-panel[data-mode="train"] .backprop-line,
.framework-panel[data-mode="train"] .train-forward {
  opacity: 0.96;
  filter: url("#frameworkGlow");
  animation: gradientBackflow 0.85s linear infinite;
}

.framework-panel[data-mode="train"] .train-forward {
  opacity: 0.38;
  stroke-width: 3.5;
}

.framework-panel[data-mode="train"] .loss-to-dit-line {
  opacity: 1;
}

.framework-panel[data-mode="train"] .loss-node,
.framework-panel[data-mode="train"] .stop-gradient-mark {
  opacity: 1;
}

@keyframes signalFlow {
  to {
    stroke-dashoffset: -46;
  }
}

@keyframes gradientBackflow {
  to {
    stroke-dashoffset: -56;
  }
}

@keyframes quietRibbon {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  35% {
    transform: translate3d(0.16rem, -0.14rem, 0) rotate(calc(var(--rot, 0deg) + 14deg));
  }
  70% {
    transform: translate3d(-0.1rem, 0.11rem, 0) rotate(calc(var(--rot, 0deg) - 10deg));
  }
}

@keyframes ribbonBurst {
  0% {
    opacity: 0.76;
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)) scale(1);
  }
  68% {
    opacity: 0.42;
  }
  100% {
    opacity: 0.16;
    transform: translate3d(var(--burst-x), var(--burst-y), 0) rotate(var(--burst-rot)) scale(0.74);
  }
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  background: #000000;
}

.scenario-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  object-fit: contain;
}

.scenario-copy {
  flex: 1;
  padding: 1.15rem 1.25rem 1.3rem;
}

.scenario-copy p:last-child {
  color: #c7d4ce;
}

.metric-grid {
  margin-bottom: 2rem;
}

.metric-card {
  padding: 1.2rem;
  background: #000000;
}

.metric-value {
  margin: 0.2rem 0 0.4rem;
  color: var(--cyan);
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 900;
}

.metric-card:nth-child(2) .metric-value {
  color: var(--green);
}

.metric-card:nth-child(3) .metric-value {
  color: var(--amber);
}

.metric-card:nth-child(4) .metric-value {
  color: var(--magenta);
}

.results-table-shell {
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #030504;
  box-shadow: var(--shadow);
}

.results-table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--cyan) #111713;
}

.results-table-scroll:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.results-data-table {
  width: 100%;
  min-width: 1540px;
  color: var(--text);
  background: #030504;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
}

.results-data-table caption {
  padding: 0.9rem 1rem 1rem;
  color: var(--muted);
  background: #000000;
  caption-side: bottom;
  font-size: 0.95rem;
  text-align: center;
  white-space: normal;
}

.results-data-table th,
.results-data-table td {
  padding: 0.72rem 0.55rem;
  border: 1px solid rgba(230, 255, 244, 0.12);
  text-align: center;
  vertical-align: middle;
}

.results-data-table thead th {
  color: var(--text);
  background: #101713;
  font-weight: 800;
}

.results-data-table thead tr:first-child th:not(:first-child) {
  color: var(--amber);
  background: #152019;
  font-size: 0.84rem;
}

.results-data-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 205px;
  color: var(--text);
  background: #0b100d;
  text-align: left;
}

.results-data-table thead th:first-child {
  z-index: 3;
}

.results-data-table tbody tr:not(.metric-group-row):hover th,
.results-data-table tbody tr:not(.metric-group-row):hover td {
  background: #111914;
}

.results-data-table td strong {
  color: var(--cyan);
  font-weight: 900;
}

.results-data-table .metric-group-row th {
  position: static;
  padding: 0.65rem 0.75rem;
  color: var(--green);
  background: #0d1511;
  font-style: italic;
  text-align: left;
}

.bibtex-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0 0.95rem;
  color: #04100d;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
}

.copy-bibtex-btn.copied {
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

pre {
  margin: 0;
  padding: 1.2rem;
  overflow-x: auto;
  color: #eaf4ee;
  background: #000000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  color: inherit;
  background: transparent;
}

.license-card {
  padding: 1.2rem 1.35rem;
  color: #dce8e2;
  background: #000000;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.license-card p {
  margin: 0;
}

.license-card p + p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.footer {
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  background: #000000;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 0.45rem;
}

.footer-meta {
  color: #dce8e2;
  font-weight: 700;
}

.scroll-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: #04100d;
  background: var(--cyan);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media screen and (max-width: 1024px) {
  .project-hero h1 {
    font-size: 2.65rem;
  }

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

@media screen and (max-width: 768px) {
  .site-nav {
    position: absolute;
    align-items: flex-start;
    padding: 0.8rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .project-hero {
    min-height: 0;
    padding: 5.2rem 1rem 1.4rem;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(7, 10, 8, 0.9) 0%, rgba(7, 10, 8, 0.82) 62%, rgba(7, 10, 8, 0.92) 100%);
  }

  .project-hero h1 {
    max-width: 100%;
    font-size: 2rem;
    line-height: 1.12;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .project-hero .eyebrow {
    font-size: 0.96rem;
  }

  .publication-authors {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .affiliation,
  .equal-note,
  .hero-copy {
    max-width: 100%;
  }

  .acceptance-line {
    max-width: 100%;
    font-size: 0.84rem;
  }

  .publication-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    max-width: 24rem;
  }

  .button.project-button {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 3.4rem 1rem;
  }

  .section-heading {
    margin-bottom: 1.8rem;
  }

  .section-heading h2,
  .bibtex-header h2 {
    font-size: 1.75rem;
  }

  .abstract-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .abstract-copy .section-heading {
    margin-bottom: 1.4rem;
  }

  .pipeline-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .pipeline-step {
    min-height: 0;
  }

  .framework-panel {
    padding: 0.9rem;
  }

  .framework-toolbar {
    flex-direction: column;
  }

  .framework-controls {
    width: 100%;
  }

  .framework-mode {
    flex: 1;
    min-width: 0;
  }

  .framework-svg {
    min-width: 860px;
  }

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

@media screen and (max-width: 560px) {
  .container {
    width: 100%;
    max-width: 21.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .project-hero .container {
    width: 100%;
    max-width: 22.25rem !important;
    margin-left: 0;
    margin-right: 0;
  }

  .project-hero .eyebrow {
    font-size: 0.82rem;
  }

  .project-hero h1 {
    font-size: 1.72rem;
  }

  .publication-links {
    max-width: 22.25rem;
  }
}

@media screen and (max-width: 480px) {
  .project-hero h1 {
    font-size: 1.72rem;
  }

  .button.project-button {
    width: 100%;
    min-width: 0;
  }

  .wide-figure figcaption {
    font-size: 0.9rem;
  }

  .ribbon {
    opacity: 0.55;
  }

}

@media screen and (max-width: 360px) {
  .publication-links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon {
    animation: none;
  }

  .acceptance-line:hover .ribbon,
  .acceptance-line:focus-within .ribbon {
    animation: none;
    opacity: 0.55;
  }
}
