:root {
  --ink: #111827;
  --muted: #586174;
  --blue: #2f5eea;
  --blue-dark: #173a96;
  --cyan: #0aa6c8;
  --green: #12ad76;
  --orange: #ff8c25;
  --paper: #f6f9fe;
  --paper-strong: #edf4ff;
  --line: #d9e2f1;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(31, 55, 100, 0.13);
  --md-shadow-1: 0 1px 2px rgba(31, 55, 100, 0.12), 0 1px 3px rgba(31, 55, 100, 0.08);
  --md-shadow-2: 0 6px 18px rgba(31, 55, 100, 0.12), 0 2px 6px rgba(31, 55, 100, 0.08);
  --md-shadow-3: 0 14px 36px rgba(31, 55, 100, 0.16);
  --hero-bg: #ffffff;
  --card-bg: #ffffff;
  --figure-bg: #f8fafc;
  --table-bg: #ffffff;
  --table-head: #f3f6fb;
  --table-row: #ffffff;
  --table-row-alt: #f8fafc;
  --table-text: #1f2937;
}

[data-theme="dark"] {
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --blue: #8b8cff;
  --blue-dark: #d4d4ff;
  --cyan: #38bdf8;
  --green: #43d796;
  --orange: #ffad5c;
  --paper: #111113;
  --paper-strong: #18181b;
  --line: #303038;
  --white: #09090b;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --md-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.32), 0 1px 3px rgba(0, 0, 0, 0.2);
  --md-shadow-2: 0 8px 22px rgba(0, 0, 0, 0.34);
  --md-shadow-3: 0 18px 48px rgba(0, 0, 0, 0.42);
  --hero-bg: #09090b;
  --card-bg: #18181b;
  --figure-bg: #202024;
  --table-bg: #111113;
  --table-head: #1f1f24;
  --table-row: #151518;
  --table-row-alt: #1b1b20;
  --table-text: #f4f4f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Source Sans 3", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  transition: background 180ms ease, color 180ms ease;
}

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

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

.material-symbols-rounded {
  display: inline-block;
  font-family: "Material Symbols Rounded";
  font-size: 1.12rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  vertical-align: middle;
}

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

h1,
h2,
h3 {
  font-family: Inter, "Source Sans 3", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 52px);
  min-height: clamp(60px, 5vw, 76px);
  padding: 0 clamp(18px, 4vw, 72px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--white) 86%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  transition: background 180ms ease, border-color 180ms ease;
}

[data-theme="dark"] .site-header {
  background: rgba(9, 9, 11, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-family: Inter, "Source Sans 3", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

[data-theme="dark"] .brand {
  color: #f8f8ff;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(31, 55, 100, 0.16);
}

.nav-links {
  display: flex;
  gap: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.nav-links a {
  border-radius: 999px;
  padding: 7px 12px;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--paper-strong);
}

.theme-toggle {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  background: var(--paper-strong);
  font: inherit;
  font-size: 0;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle::before {
  content: "dark_mode";
  font-family: "Material Symbols Rounded";
  font-size: 1.06rem;
  font-weight: normal;
  line-height: 1;
}

[data-theme="dark"] .theme-toggle::before {
  content: "light_mode";
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  transform: scale(1.05);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px) clamp(40px, 6vw, 78px);
  background: var(--hero-bg);
  text-align: center;
}

.hero > *:not(.hero-bg-animation) {
  position: relative;
  z-index: 2;
}

.hero-bg-animation {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.82;
  pointer-events: none;
}

.hero-bg-animation::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--blue) 15%, transparent), transparent 24%),
    radial-gradient(circle at 18% 72%, color-mix(in srgb, var(--green) 13%, transparent), transparent 18%),
    radial-gradient(circle at 84% 24%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 18%);
}

.hero-bg-animation svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
}

.hero-bg-animation path {
  stroke: color-mix(in srgb, var(--blue) 28%, transparent);
  stroke-width: 2;
  stroke-dasharray: 12 16;
  animation: path-flow 8s linear infinite;
}

.hero-bg-animation path:nth-child(2) {
  stroke: color-mix(in srgb, var(--green) 32%, transparent);
  animation-duration: 10s;
}

.hero-bg-animation path:nth-child(3) {
  stroke: color-mix(in srgb, var(--cyan) 32%, transparent);
  animation-duration: 11s;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px dashed color-mix(in srgb, var(--blue) 24%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: slow-spin 28s linear infinite;
}

.orbit-one {
  width: min(760px, 72vw);
  aspect-ratio: 1;
}

.orbit-two {
  width: min(520px, 52vw);
  aspect-ratio: 1;
  animation-direction: reverse;
  animation-duration: 22s;
}

.bg-token,
.bg-node {
  position: absolute;
  border: 1px solid var(--line);
  box-shadow: var(--md-shadow-1);
}

.bg-token {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--card-bg) 72%, transparent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  animation: float-token 6s ease-in-out infinite;
}

.cad-bg {
  left: 9%;
  top: 36%;
}

.text-bg {
  right: 12%;
  top: 24%;
  animation-delay: 1.1s;
}

.image-bg {
  right: 16%;
  bottom: 27%;
  animation-delay: 2s;
}

.bg-node {
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse-node 3.8s ease-in-out infinite;
}

.node-one {
  left: 28%;
  top: 58%;
  background: var(--green);
}

.node-two {
  left: 47%;
  top: 42%;
  animation-delay: 0.6s;
}

.node-three {
  right: 29%;
  top: 32%;
  background: var(--cyan);
  animation-delay: 1.2s;
}

.node-four {
  right: 24%;
  bottom: 31%;
  background: var(--orange);
  animation-delay: 1.8s;
}

@keyframes path-flow {
  to {
    stroke-dashoffset: -140;
  }
}

@keyframes slow-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes float-token {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes pulse-node {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

.conference,
.section-kicker {
  margin-bottom: 13px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.92;
}

.subtitle {
  max-width: 980px;
  margin: 0 auto 16px;
  color: var(--ink);
  font-family: Inter, "Source Sans 3", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.35vw, 2.15rem);
  font-weight: 700;
  line-height: 1.22;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 920px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.55;
}

.authors a {
  color: var(--blue-dark);
  font-weight: 800;
}

.authors a:hover {
  color: var(--blue);
}

.affiliations,
.author-note {
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.55;
}

.author-note {
  margin-bottom: 22px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  margin-bottom: clamp(34px, 6vw, 68px);
}

.resource-links a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--blue-dark);
  background: var(--card-bg);
  box-shadow: var(--md-shadow-1);
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.resource-links a:hover,
.resource-links a:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue) 8%, var(--card-bg));
  box-shadow: var(--md-shadow-2);
  transform: translateY(-2px);
}

.resource-links a::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  content: attr(data-tooltip);
  min-width: max-content;
  padding: 8px 11px;
  border-radius: 8px;
  color: #ffffff;
  background: #202124;
  box-shadow: var(--md-shadow-2);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.resource-links a::before {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  z-index: 20;
  content: "";
  border: 6px solid transparent;
  border-top-color: #202124;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 140ms ease;
}

.resource-links a:hover::after,
.resource-links a:hover::before,
.resource-links a:focus-visible::after,
.resource-links a:focus-visible::before {
  opacity: 1;
}

.resource-links a:hover::after,
.resource-links a:focus-visible::after {
  transform: translate(-50%, 0);
}

.contrastive-banner {
  position: relative;
  width: min(1120px, 100%);
  min-height: 260px;
  margin: 0 auto clamp(34px, 6vw, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 34%),
    var(--card-bg);
  box-shadow: var(--md-shadow-3);
}

.banner-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
}

.align-path {
  stroke: color-mix(in srgb, var(--blue) 38%, transparent);
  stroke-width: 3;
  stroke-dasharray: 9 12;
}

.path-cad {
  stroke: color-mix(in srgb, var(--green) 58%, transparent);
}

.path-image {
  stroke: color-mix(in srgb, var(--cyan) 48%, transparent);
}

.banner-node,
.banner-core,
.banner-loss {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  box-shadow: 0 12px 36px rgba(31, 55, 100, 0.08);
}

.banner-node {
  width: 210px;
  padding: 16px;
  text-align: left;
}

.cad-node {
  top: 82px;
  left: 38px;
}

.text-node {
  top: 34px;
  right: 38px;
}

.image-node {
  right: 38px;
  bottom: 34px;
}

.banner-node span,
.banner-loss span {
  display: block;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.banner-node strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.banner-core {
  top: 50%;
  left: 50%;
  display: grid;
  width: 230px;
  min-height: 88px;
  place-items: center;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  transform: translate(-50%, -50%);
}

.banner-core span {
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.flow-dot {
  position: absolute;
  z-index: 3;
  width: 14px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--green) 18%, transparent);
}

.dot-cad {
  offset-path: path("M180 130 C300 58 390 58 500 130");
  animation: follow-path 3.2s linear infinite;
}

.dot-text {
  background: var(--blue);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--blue) 18%, transparent);
  offset-path: path("M820 62 C690 62 610 78 500 130");
  animation: follow-path 3.2s linear infinite 0.7s;
}

.dot-image {
  background: var(--cyan);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--cyan) 18%, transparent);
  offset-path: path("M820 198 C690 198 610 182 500 130");
  animation: follow-path 3.2s linear infinite 1.35s;
}

.banner-loss {
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 10px;
  padding: 10px;
  transform: translateX(-50%);
}

.banner-loss span {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--blue) 10%, var(--card-bg));
  white-space: nowrap;
}

@keyframes follow-path {
  from {
    offset-distance: 0%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  to {
    offset-distance: 100%;
    opacity: 0;
  }
}

.section {
  padding: clamp(66px, 8vw, 110px) clamp(18px, 5vw, 72px);
}

.section-soft {
  background: var(--paper);
}

.section > h2,
.section > .section-kicker,
.section > .section-copy {
  width: min(1080px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 3.15vw, 3rem);
  font-weight: 700;
  line-height: 1.16;
  text-wrap: balance;
}

.section-copy {
  max-width: 860px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

.text-highlight {
  color: var(--blue-dark);
  font-weight: 700;
}

.text-highlight-alt {
  color: var(--cyan);
  font-weight: 700;
}

.metric-highlight {
  color: var(--green);
  font-weight: 800;
}

.eval-highlight {
  color: var(--orange);
  font-weight: 700;
}

.stats-grid,
.hero-stats {
  display: grid;
  width: min(1120px, 100%);
  margin: 34px auto 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats-grid article,
.hero-stats article,
.table-wrap,
.score-grid figure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 36px rgba(31, 55, 100, 0.08);
}

.hero-stats article {
  min-height: 132px;
  padding: 24px;
  text-align: center;
}

.hero-stats strong {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  line-height: 1;
}

.hero-stats span {
  color: var(--muted);
  line-height: 1.45;
}

.contributions-section {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(47, 94, 234, 0.09), transparent 34%),
    var(--paper);
}

[data-theme="dark"] .contributions-section {
  color: #f7f7fb;
  background:
    radial-gradient(circle at 50% 0%, rgba(47, 94, 234, 0.18), transparent 32%),
    #0d0f16;
}

.contributions-section .section-kicker,
.contributions-section .section-copy,
.contributions-section h2 {
  text-align: left;
}

.contributions-section .section-kicker,
.contributions-section h2,
.contributions-section .section-copy,
.dreamcad-contrib-grid {
  width: min(1320px, 100%);
}

.contributions-section .section-kicker {
  color: var(--blue);
}

[data-theme="dark"] .contributions-section .section-kicker {
  color: #7fc8ff;
}

.contributions-section h2 {
  margin-bottom: 22px;
  color: var(--ink);
}

[data-theme="dark"] .contributions-section h2 {
  color: #f8f8ff;
}

.contributions-section .section-copy {
  max-width: 1100px;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.45;
}

[data-theme="dark"] .contributions-section .section-copy {
  color: rgba(230, 232, 245, 0.66);
}

.dreamcad-contrib-grid {
  display: grid;
  margin: clamp(38px, 6vw, 68px) auto 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}

.dreamcad-contrib-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--md-shadow-2);
}

.dreamcad-contrib-card.featured {
  border-color: rgba(47, 94, 234, 0.56);
  box-shadow:
    0 0 0 1px rgba(10, 166, 200, 0.2),
    var(--md-shadow-3);
}

[data-theme="dark"] .dreamcad-contrib-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 20, 30, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .dreamcad-contrib-card.featured {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow:
    0 0 0 1px rgba(139, 140, 255, 0.38),
    0 24px 70px rgba(47, 94, 234, 0.22);
}

.dreamcad-contrib-card h3 {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
}

[data-theme="dark"] .dreamcad-contrib-card h3 {
  color: #f8f8ff;
}

.dreamcad-contrib-card p {
  margin-bottom: 70px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.72;
}

[data-theme="dark"] .dreamcad-contrib-card p {
  color: rgba(230, 232, 245, 0.64);
}

.dreamcad-contrib-card a {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  width: 56px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #6475ff, #10bfd3);
  box-shadow: 0 12px 30px rgba(16, 191, 211, 0.28);
}

.dreamcad-contrib-card a .material-symbols-rounded {
  transition: transform 180ms ease;
}

.dreamcad-contrib-card a:hover,
.dreamcad-contrib-card a:focus-visible {
  transform: translateY(6px);
}

.dreamcad-contrib-card a:hover .material-symbols-rounded,
.dreamcad-contrib-card a:focus-visible .material-symbols-rounded {
  transform: rotate(90deg);
}

figure {
  margin: 0;
}

.architecture-section {
  background: var(--white);
}

.architecture-stages {
  display: grid;
  width: min(1180px, 100%);
  margin: 42px auto 0;
  gap: clamp(34px, 5vw, 60px);
}

.architecture-stage {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: start;
  padding-top: clamp(8px, 1.8vw, 18px);
  border-top: 1px solid var(--line);
}

.architecture-stage-copy {
  position: sticky;
  top: 92px;
}

.architecture-stage-copy span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.architecture-stage-copy h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
}

.architecture-stage-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.architecture-figure img {
  width: 100%;
  height: clamp(360px, 42vw, 520px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(10px, 1.6vw, 18px);
  background: var(--white);
  box-shadow: var(--md-shadow-1);
  object-fit: contain;
}

.stats-grid {
  margin-bottom: 28px;
}

.stats-grid article {
  min-height: 154px;
  padding: 24px;
  text-align: center;
}

.stats-grid strong {
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.results-section {
  color: var(--ink);
  background: var(--paper);
}

.results-section .section-kicker {
  color: var(--blue);
}

.results-section .section-kicker::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 2px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--blue);
}

.results-section .section-copy {
  color: var(--muted);
}

.result-tabs,
.qualitative-tabs {
  display: flex;
  width: fit-content;
  margin: 38px auto 34px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: 0 10px 30px rgba(31, 55, 100, 0.08);
}

.tab-button,
.qualitative-button {
  min-width: 132px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active,
.qualitative-button.active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--blue) 34%, transparent);
}

.tab-panel[hidden],
.qualitative-panel[hidden] {
  display: none;
}

.dataset-tabs {
  display: flex;
  width: fit-content;
  margin: 24px auto 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: var(--md-shadow-1);
}

.dataset-button {
  min-width: 118px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.dataset-button.active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: var(--md-shadow-1);
}

.retrieval-panel[hidden] {
  display: none;
}

.table-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  border-radius: 8px;
}

.result-block {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.result-block h3 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.25;
}

.result-block > p {
  max-width: 820px;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.narrow-table {
  width: min(760px, 100%);
  margin-left: 0;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  color: var(--table-text);
  background: var(--table-bg);
}

caption {
  padding: 18px 18px 6px;
  color: var(--ink);
  font-family: Inter, "Source Sans 3", system-ui, sans-serif;
  font-size: clamp(1.2rem, 1.65vw, 1.65rem);
  font-weight: 700;
  line-height: 1.28;
  text-align: center;
}

.narrow-table table {
  min-width: 520px;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

th {
  color: var(--ink);
  background: var(--table-head);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--table-text);
  font-size: 0.96rem;
  font-weight: 650;
}

td {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  text-align: center;
}

td:first-child,
th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 150px;
  background: inherit;
  text-align: center;
}

tbody td:first-child {
  font-size: 0.98rem;
  font-weight: 800;
}

th:first-child {
  z-index: 2;
}

tbody tr {
  background: var(--table-row);
}

tbody tr:nth-child(even) {
  background: var(--table-row-alt);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:not(.ours) td:nth-child(3),
tbody tr:not(.ours) td:nth-child(4),
tbody tr:not(.ours) td:nth-child(5) {
  color: var(--blue);
}

tbody tr.ours {
  background: color-mix(in srgb, var(--blue) 13%, var(--table-bg));
}

tbody tr.ours td {
  color: var(--blue-dark);
  font-family: Inter, "Source Sans 3", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
}

tbody tr.ours td:first-child {
  color: var(--blue);
  font-size: 1.03rem;
}

tbody tr.ours td:last-child {
  color: var(--ink);
  font-weight: 800;
}

.results-section .table-wrap {
  border-color: var(--line);
  background: var(--table-bg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
}

.qualitative-section {
  color: var(--ink);
  background: var(--white);
}

.qualitative-section .section-copy {
  color: var(--muted);
}

.qualitative-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.qualitative-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--md-shadow-2);
}

.qualitative-figure img {
  width: 100%;
  height: auto;
  padding: clamp(10px, 2vw, 18px);
}

.qualitative-figure figcaption {
  border-top: 1px solid var(--line);
  padding: 14px clamp(16px, 2.4vw, 24px);
  color: var(--muted);
  background: var(--paper);
  font-size: 0.95rem;
  font-weight: 700;
}

.score-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 34px auto 0;
  gap: 24px;
}

.score-grid figure {
  overflow: hidden;
  background: var(--figure-bg);
}

.score-method-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 36px auto 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.score-method-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 12px 36px rgba(31, 55, 100, 0.08);
}

.score-method-grid span {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-method-grid h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.score-method-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
}

.score-benchmark {
  margin-top: 34px;
}

.contact-section {
  background: var(--white);
}

.citation-section {
  background: var(--paper);
}

.bibtex-card {
  position: relative;
  width: min(980px, 100%);
  margin: 34px auto 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 14px 38px rgba(31, 55, 100, 0.08);
}

.bibtex-card pre {
  margin: 0;
  padding-right: 94px;
}

.bibtex-card code {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre;
}

.copy-bibtex {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--figure-bg);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.copy-bibtex .material-symbols-rounded {
  font-size: 0.98rem;
}

.copy-bibtex:hover,
.copy-bibtex:focus-visible {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
}

.copy-bibtex.copied {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 58%, var(--line));
}

.related-work {
  width: min(980px, 100%);
  margin: 30px auto 0;
  text-align: center;
}

.related-work h3 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.related-links a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: var(--blue-dark);
  background: var(--card-bg);
  box-shadow: var(--md-shadow-1);
  font-size: 0.92rem;
  font-weight: 700;
}

.related-links a:hover {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue) 8%, var(--card-bg));
}

.contact-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 36px auto 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.contact-grid article {
  display: grid;
  grid-template-rows: auto minmax(68px, 1fr) auto;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--md-shadow-2);
}

.contact-grid h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.contact-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
}

.contact-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--blue) 7%, var(--card-bg));
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-links a:hover {
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  background: color-mix(in srgb, var(--blue) 13%, var(--card-bg));
}

.site-credit {
  padding: 24px 18px 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
  font-size: 0.94rem;
  text-align: center;
}

.score-visuals {
  display: grid;
  width: min(1120px, 100%);
  margin: 28px auto 0;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 18px;
  align-items: center;
}

.score-visuals figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--figure-bg);
  box-shadow: 0 12px 36px rgba(31, 55, 100, 0.08);
}

.score-visuals img {
  width: 100%;
}

.explained-figure figcaption {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--card-bg);
  font-size: 0.98rem;
  line-height: 1.65;
}

.explained-figure figcaption strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1rem;
}

.applications-section {
  background:
    linear-gradient(180deg, var(--white), var(--paper-strong));
}

.application-slides {
  display: grid;
  width: min(1120px, 100%);
  margin: 36px auto 0;
  gap: 20px;
}

.application-slide {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(260px, 0.46fr);
  gap: clamp(18px, 4vw, 38px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 16px 48px rgba(31, 55, 100, 0.09);
}

.slide-index {
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.application-slide h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.5vw, 2.35rem);
}

.application-slide p {
  max-width: 680px;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.application-slide ul {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.experiment-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--figure-bg);
}

.experiment-panel > span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.experiment-panel p {
  margin-bottom: 14px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.experiment-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experiment-metrics strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--blue) 12%, var(--card-bg));
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.generation-benchmark-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--figure-bg);
}

.generation-benchmark-card > span {
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.generation-benchmark-card h4 {
  margin: -6px 0 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.25;
}

.benchmark-list {
  display: grid;
  gap: 8px;
}

.benchmark-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.benchmark-list div:last-child {
  border-bottom: 0;
}

.benchmark-list strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.benchmark-list span {
  color: var(--blue-dark);
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
}

.generation-benchmark-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.mini-flow,
.class-pills {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--figure-bg);
}

.mini-flow span,
.class-pills span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--blue) 12%, var(--card-bg));
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.mini-flow i {
  width: 2px;
  height: 28px;
  margin: 0 auto;
  background: var(--green);
}

.class-pills {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1050px) {
  .site-header {
    justify-content: space-between;
  }

  .stats-grid,
  .hero-stats,
  .score-method-grid,
  .score-visuals,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dreamcad-contrib-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dreamcad-contrib-card {
    min-height: 300px;
  }

  .contrastive-banner {
    min-height: 430px;
  }

  .cad-node,
  .text-node,
  .image-node,
  .banner-core,
  .banner-loss {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    margin: 14px auto;
  }

  .banner-lines,
  .flow-dot {
    display: none;
  }

  .banner-loss {
    width: fit-content;
  }

  .application-slide {
    grid-template-columns: 58px 1fr;
  }

  .architecture-stage {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .architecture-stage-copy {
    position: static;
    max-width: 760px;
  }

  .architecture-figure img {
    height: clamp(260px, 58vw, 420px);
  }

  .mini-flow,
  .class-pills,
  .generation-benchmark-card {
    grid-column: 2;
  }
}

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

  .hero {
    padding-top: 46px;
  }

  .stats-grid,
  .hero-stats,
  .dreamcad-contrib-grid,
  .score-method-grid,
  .score-visuals,
  .contact-grid,
  .application-slide {
    grid-template-columns: 1fr;
  }

  .mini-flow,
  .class-pills,
  .generation-benchmark-card {
    grid-column: auto;
  }

  .banner-loss {
    flex-direction: column;
    width: calc(100% - 32px);
  }

  .result-tabs,
  .qualitative-tabs {
    width: 100%;
    border-radius: 8px;
  }

  .dataset-tabs {
    width: 100%;
    border-radius: 8px;
  }

  .tab-button,
  .qualitative-button,
  .dataset-button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
    font-size: 0.86rem;
  }
}
