:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(10, 17, 24, 0.78);
  --panel-strong: rgba(8, 13, 19, 0.94);
  --line: rgba(169, 219, 229, 0.22);
  --text: #edf7f8;
  --muted: #9db4b9;
  --cyan: #53e6ff;
  --green: #36f3a5;
  --amber: #ffc857;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(83, 230, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 24%, rgba(255, 200, 87, 0.1), transparent 24rem),
    linear-gradient(135deg, #05070a 0%, #071016 48%, #100b16 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(83, 230, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 230, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100vw;
  height: 100vh;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(83, 230, 255, 0.09),
    transparent
  );
  height: 18vh;
  animation: scan 8s linear infinite;
  opacity: 0.7;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(16px);
}

.brand,
nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border: 1px solid var(--cyan);
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
  transform: rotate(45deg);
}

nav {
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

nav a:hover {
  color: var(--cyan);
}

main {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(56px, 7vw, 112px);
  padding: clamp(42px, 8vh, 86px) 0 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 560px;
  font-size: clamp(3.8rem, 6.8vw, 6.45rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    0 0 22px rgba(83, 230, 255, 0.45),
    0 0 58px rgba(54, 243, 165, 0.22);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.subtitle,
.section-heading p,
.project-strip p {
  color: var(--muted);
  line-height: 1.65;
}

.subtitle {
  max-width: 610px;
  margin: 28px 0 0;
  font-size: clamp(1.02rem, 2vw, 1.28rem);
}

.hero-actions,
.project-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 34px;
}

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

.button.primary {
  background: var(--cyan);
  color: #041015;
  box-shadow: 0 0 24px rgba(83, 230, 255, 0.3);
}

.button.secondary {
  color: var(--cyan);
  background: rgba(83, 230, 255, 0.08);
}

.signal-panel {
  position: relative;
  min-height: 430px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(83, 230, 255, 0.1), transparent 42%),
    var(--panel);
  box-shadow: inset 0 0 42px rgba(83, 230, 255, 0.08);
}

.signal-panel::before,
.signal-panel::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.signal-panel::before {
  inset: 16px;
  border: 1px solid rgba(83, 230, 255, 0.18);
}

.signal-panel::after {
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(54, 243, 165, 0.12), transparent);
}

.orbital {
  position: absolute;
  inset: 42px;
  border: 1px solid rgba(83, 230, 255, 0.24);
  border-radius: 50%;
  animation: rotate 18s linear infinite;
}

.orbital::before,
.orbital::after,
.orbital span {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.orbital::before {
  inset: 22%;
  border: 1px solid rgba(255, 200, 87, 0.25);
}

.orbital::after {
  inset: 39%;
  background: radial-gradient(circle, rgba(83, 230, 255, 0.48), rgba(83, 230, 255, 0.04));
  box-shadow: 0 0 52px rgba(83, 230, 255, 0.3);
}

.orbital span {
  width: 10px;
  height: 10px;
  background: var(--amber);
  box-shadow: 0 0 18px var(--amber);
}

.orbital span:nth-child(1) {
  top: 9%;
  left: 49%;
}

.orbital span:nth-child(2) {
  right: 11%;
  top: 58%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.orbital span:nth-child(3) {
  left: 16%;
  bottom: 18%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  height: 100%;
  align-content: end;
}

.metric-grid div {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(5, 7, 10, 0.64);
}

.metric-grid dt {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(1.55rem, 2.1vw, 2.2rem);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.section {
  padding: 76px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading p:last-child {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.34);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

caption {
  padding: 16px 18px;
  color: var(--muted);
  text-align: left;
  caption-side: top;
}

th,
td {
  padding: 18px;
  border-top: 1px solid rgba(169, 219, 229, 0.14);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

thead th {
  border-top: 0;
  color: #bde9ee;
  font-size: 0.76rem;
  text-transform: uppercase;
}

tbody tr {
  position: relative;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

tbody tr:hover {
  background: rgba(83, 230, 255, 0.08);
}

tbody th {
  border-left: 3px solid var(--accent);
}

.agent,
.model {
  display: block;
}

.agent {
  color: var(--text);
  font-weight: 900;
}

.model {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.bar-value {
  display: inline-block;
  min-width: 62px;
  font-weight: 900;
}

.bar {
  position: relative;
  display: inline-block;
  width: 140px;
  height: 8px;
  margin-left: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--cover) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 18px var(--accent);
}

.metric-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-notes div {
  padding: 16px;
  border: 1px solid rgba(169, 219, 229, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(83, 230, 255, 0.06), transparent),
    rgba(5, 7, 10, 0.72);
}

.metric-notes h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.15;
}

.metric-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.viz-card {
  position: relative;
  min-height: 520px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(83, 230, 255, 0.08), transparent 34%),
    rgba(5, 7, 10, 0.78);
}

.viz-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(83, 230, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 230, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.viz-card.wide {
  grid-column: 1 / -1;
  min-height: 560px;
}

.viz-heading,
.chart-legend,
.bucket-legend,
.bucket-chart,
.outcome-chart {
  position: relative;
  z-index: 1;
}

.viz-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.viz-heading h3 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  line-height: 1.08;
}

.viz-heading span {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-legend,
.bucket-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.chart-legend span,
.bucket-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i,
.bucket-legend span::before {
  display: block;
  width: 16px;
  height: 8px;
  border-radius: 999px;
  content: "";
}

.legend-filled {
  background: var(--cyan);
}

.legend-open {
  border: 1px solid var(--cyan);
}

.bucket-legend span::before {
  background: var(--bucket);
}

.chart-label {
  min-width: 0;
}

.chart-label strong,
.chart-label span {
  display: block;
}

.chart-label strong {
  color: var(--text);
  font-size: 0.9rem;
}

.chart-label span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.outcome-lane {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(169, 219, 229, 0.08);
}

.chart-value {
  color: var(--text);
  font-weight: 900;
  text-align: right;
}

.bucket-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.36fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 9px 0;
  border-top: 1px solid rgba(169, 219, 229, 0.12);
}

.bucket-stack {
  display: flex;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.bucket-segment {
  display: grid;
  place-items: center;
  min-width: 16px;
  color: #071016;
  font-size: 0.68rem;
  font-weight: 900;
  background: var(--bucket);
}

.outcome-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.36fr) minmax(220px, 1fr) 66px;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 9px 0;
  border-top: 1px solid rgba(169, 219, 229, 0.12);
}

.outcome-link {
  position: absolute;
  top: 4px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 64%, var(--cyan));
  box-shadow: 0 0 12px var(--accent);
}

.outcome-dot {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #05070a;
}

.outcome-dot.successful {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.project-strip {
  justify-content: space-between;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(54, 243, 165, 0.11), transparent 46%),
    rgba(5, 7, 10, 0.78);
}

.project-strip div {
  max-width: 740px;
}

.authors {
  margin: 12px 0 0;
  color: var(--green);
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

@keyframes scan {
  from {
    transform: translateY(-22vh);
  }
  to {
    transform: translateY(104vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-wrap: wrap;
  }

  .hero,
  .section-heading,
  .metric-notes,
  .viz-grid {
    grid-template-columns: 1fr;
  }

  .viz-card.wide {
    grid-column: auto;
  }

  .hero {
    min-height: auto;
  }

  .signal-panel {
    min-height: 430px;
  }

  .project-strip {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    padding: 14px 12px;
  }

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

  .signal-panel {
    min-height: 520px;
    padding: 18px;
  }

  .orbital {
    inset: 38px;
  }

  .bucket-row,
  .outcome-row {
    grid-template-columns: 1fr;
  }

  .chart-value {
    text-align: left;
  }

  .viz-card,
  .viz-card.wide {
    min-height: auto;
  }

  .hero-actions,
  .project-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
