:root {
  color-scheme: dark;
  --bg: #050607;
  --panel: rgba(12, 18, 20, 0.86);
  --panel-solid: #0b1113;
  --line: rgba(118, 255, 188, 0.22);
  --text: #e7fff3;
  --muted: #8aa99b;
  --green: #70ff9f;
  --red: #ff4664;
  --cyan: #54d8ff;
  --amber: #f4ce5e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(rgba(84, 216, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 255, 159, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(255, 70, 100, 0.16), transparent 28%),
    #050607;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: overlay;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

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: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(112, 255, 159, 0.18);
  background: rgba(5, 6, 7, 0.82);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--green);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  box-shadow: 0 0 18px rgba(112, 255, 159, 0.28);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.hero {
  position: relative;
  min-height: clamp(540px, 58vh, 660px);
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(560px, 1.16fr);
  grid-template-areas:
    "copy visual";
  gap: clamp(22px, 3vw, 38px);
  align-items: center;
  padding: 28px 0 6px;
}

.hero::before {
  position: absolute;
  inset: 18px -18px 0 -18px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(112, 255, 159, 0.08);
  background:
    linear-gradient(90deg, rgba(112, 255, 159, 0.15) 0 1px, transparent 1px) 0 14% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(84, 216, 255, 0.18), transparent) 0 55% / 100% 1px no-repeat;
  clip-path: polygon(0 0, 96% 0, 100% 12%, 100% 100%, 4% 100%, 0 88%);
}

.hero::after {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 18%;
  z-index: -1;
  height: 120px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(112, 255, 159, 0.12), rgba(255, 70, 100, 0.08), transparent);
  transform: skewY(-7deg);
  animation: hero-sweep 5.2s ease-in-out infinite;
}

@keyframes hero-sweep {
  0%, 100% { opacity: 0.24; transform: translateX(-18px) skewY(-7deg); }
  50% { opacity: 0.58; transform: translateX(18px) skewY(-7deg); }
}

@keyframes title-glitch {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0.36; }
  90% { transform: translate(5px, -1px); opacity: 0.62; }
  92% { transform: translate(-4px, 2px); opacity: 0.5; }
  94% { transform: translate(2px, 0); opacity: 0.56; }
}

.hero-copy {
  position: relative;
  z-index: 2;
  grid-area: copy;
  min-width: 0;
}

.hero-copy::after {
  position: absolute;
  left: -22px;
  right: -20px;
  bottom: -18px;
  z-index: -1;
  height: 120px;
  content: "";
  border: 1px solid rgba(112, 255, 159, 0.12);
  background:
    linear-gradient(90deg, rgba(112, 255, 159, 0.08), transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 36px, rgba(112, 255, 159, 0.06) 36px 37px);
  mask-image: linear-gradient(to bottom, transparent, black 35%, black);
}

.eyebrow,
.section-kicker {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  text-transform: uppercase;
}

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

h1 {
  position: relative;
  max-width: 920px;
  margin-bottom: 12px;
  font-size: clamp(76px, 9vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(112, 255, 159, 0.2);
}

h1::before,
h1::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: attr(data-text);
  opacity: 0.48;
  pointer-events: none;
}

h1::before {
  color: var(--cyan);
  transform: translate(3px, 0);
  clip-path: inset(0 0 58% 0);
  animation: title-glitch 4.8s steps(1, end) infinite;
}

h1::after {
  color: var(--red);
  transform: translate(-3px, 0);
  clip-path: inset(52% 0 0 0);
  animation: title-glitch 5.4s steps(1, end) infinite reverse;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-subtitle {
  max-width: 690px;
  color: #b9d8cb;
  font-size: clamp(18px, 1.8vw, 22px);
}

.hero-expansion {
  max-width: 760px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--green);
  background: linear-gradient(90deg, rgba(112, 255, 159, 0.08), transparent 72%);
  color: #dfffea;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.25;
}

.authors {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.author-line,
.affiliation-line,
.note-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.author-line {
  flex-wrap: nowrap;
  color: #dfffea;
  font-size: 12.5px;
  font-weight: 700;
}

.author-line span,
.affiliation-line span,
.note-line span {
  white-space: nowrap;
}

.authors sup {
  color: var(--green);
  font-size: 0.68em;
  line-height: 0;
}

.note-line {
  color: #9ebdaf;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 14px;
}

.threat-rail {
  position: absolute;
  left: 47.5%;
  top: 24%;
  bottom: 20%;
  z-index: 0;
  width: 88px;
  pointer-events: none;
}

.threat-rail::before,
.threat-rail::after {
  position: absolute;
  top: 0;
  bottom: 0;
  content: "";
}

.threat-rail::before {
  left: 42px;
  width: 1px;
  background: linear-gradient(transparent, rgba(112, 255, 159, 0.75), transparent);
  box-shadow: 0 0 22px rgba(112, 255, 159, 0.35);
}

.threat-rail::after {
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle, rgba(255, 70, 100, 0.9) 0 3px, transparent 4px) 42px 10% / 88px 33% repeat-y,
    radial-gradient(circle, rgba(84, 216, 255, 0.85) 0 2px, transparent 4px) 42px 24% / 88px 36% repeat-y;
  animation: rail-pulse 2.8s linear infinite;
}

.threat-rail span {
  position: absolute;
  left: 8px;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(112, 255, 159, 0.8), transparent);
}

.threat-rail span:nth-child(1) { top: 20%; }
.threat-rail span:nth-child(2) { top: 50%; }
.threat-rail span:nth-child(3) { top: 80%; }

@keyframes rail-pulse {
  from { transform: translateY(-26px); opacity: 0.45; }
  50% { opacity: 1; }
  to { transform: translateY(26px); opacity: 0.45; }
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.hero-badges span {
  padding: 7px 10px;
  border: 1px solid rgba(84, 216, 255, 0.26);
  background: rgba(84, 216, 255, 0.06);
  color: #bfeeff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  box-shadow: inset 0 0 16px rgba(84, 216, 255, 0.05);
}

.button {
  position: relative;
  min-width: 110px;
  padding: 11px 18px;
  border: 1px solid rgba(112, 255, 159, 0.42);
  background: rgba(7, 16, 13, 0.74);
  color: #d9ffea;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
}

.button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 0 30%, rgba(255, 255, 255, 0.2) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}

.button:hover {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(112, 255, 159, 0.16);
}

.button:hover::before {
  transform: translateX(120%);
}

.button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.button.primary {
  background: var(--green);
  color: #041008;
}

.button.disabled {
  cursor: default;
}

.threat-console,
.terminal-card,
.pipeline-node,
.library-grid article,
.news-list article,
.leaderboard-wrap,
.result-grid div {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(84, 216, 255, 0.05), 0 22px 80px rgba(0, 0, 0, 0.32);
}

.threat-console {
  position: relative;
  z-index: 1;
  width: min(64%, 470px);
  overflow: hidden;
  border-radius: 8px;
}

.hero-visual {
  position: relative;
  grid-area: visual;
  justify-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-rows: 330px minmax(230px, 1fr);
  grid-template-areas:
    "poster poster"
    "console signals";
  gap: 12px;
  width: min(100%, 760px);
  min-height: 620px;
  padding: 18px;
  border: 1px solid rgba(112, 255, 159, 0.13);
  background:
    linear-gradient(135deg, rgba(112, 255, 159, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 70, 100, 0.12), transparent 42%);
  box-shadow: inset 0 0 0 1px rgba(84, 216, 255, 0.06), 0 34px 120px rgba(0, 0, 0, 0.36);
  clip-path: polygon(0 0, 96% 0, 100% 10%, 100% 100%, 5% 100%, 0 88%);
}

.hero-visual::before {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 360px;
  z-index: 2;
  height: 1px;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(112, 255, 159, 0.9), rgba(84, 216, 255, 0.65), transparent),
    repeating-linear-gradient(90deg, transparent 0 24px, rgba(112, 255, 159, 0.45) 24px 25px);
  box-shadow: 0 0 26px rgba(112, 255, 159, 0.4);
  opacity: 0.9;
}

.hero-visual::after {
  position: absolute;
  right: -8%;
  top: 10%;
  z-index: 0;
  width: 56%;
  height: 72%;
  content: "";
  border: 1px solid rgba(255, 70, 100, 0.2);
  background: radial-gradient(circle at 48% 45%, rgba(255, 70, 100, 0.18), transparent 60%);
  filter: blur(0.2px);
  transform: skewX(-10deg);
  animation: red-lock 4.6s ease-in-out infinite;
}

@keyframes red-lock {
  0%, 100% { opacity: 0.28; transform: translateX(0) skewX(-10deg); }
  50% { opacity: 0.55; transform: translateX(-10px) skewX(-10deg); }
}

.character-panel {
  position: relative;
  grid-area: poster;
  height: auto;
  width: auto;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(84, 216, 255, 0.24);
  background: #081011;
  box-shadow: 0 0 42px rgba(84, 216, 255, 0.12), 0 28px 90px rgba(0, 0, 0, 0.46);
  clip-path: polygon(0 0, 98% 0, 100% 7%, 100% 100%, 6% 100%, 0 90%);
}

.character-panel::before,
.character-panel::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.character-panel::before {
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.2), transparent 30%, rgba(5, 6, 7, 0.04) 70%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.02), transparent 58%, rgba(5, 6, 7, 0.62));
}

.character-panel::after {
  background:
    linear-gradient(rgba(112, 255, 159, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 216, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mix-blend-mode: screen;
  animation: image-grid 6s linear infinite;
}

.character-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: saturate(1.14) contrast(1.06) brightness(0.92);
  transform: scale(1);
  animation: image-pulse 7s ease-in-out infinite;
}

@keyframes image-grid {
  from { background-position: 0 0, 0 0; }
  to { background-position: 34px 34px, 34px 34px; }
}

@keyframes image-pulse {
  0%, 100% { filter: saturate(1.12) contrast(1.06) brightness(0.86); transform: scale(1); }
  50% { filter: saturate(1.2) contrast(1.09) brightness(0.93); transform: scale(1.012); }
}

.hero-visual .threat-console {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  grid-area: console;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: auto;
  background: rgba(7, 13, 14, 0.78);
  backdrop-filter: blur(14px);
}

.hero-visual .console-body {
  flex: 1;
  min-height: 0;
}

.hero-visual .threat-console::after {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 46px;
  z-index: 2;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 18px rgba(112, 255, 159, 0.52);
  animation: console-beam 2.7s ease-in-out infinite;
}

@keyframes console-beam {
  0%, 100% { opacity: 0.34; transform: scaleX(0.82); }
  50% { opacity: 0.95; transform: scaleX(1); }
}

.signal-deck {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  grid-area: signals;
  z-index: 3;
  display: grid;
  width: auto;
  grid-template-columns: 1fr;
  align-content: stretch;
  gap: 7px;
}

.signal-deck span {
  padding: 7px 9px;
  border: 1px solid rgba(112, 255, 159, 0.24);
  background: rgba(6, 16, 13, 0.78);
  color: #c9fce0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  box-shadow: inset 0 0 18px rgba(112, 255, 159, 0.06);
}

.signal-deck span::after {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 6px;
  content: "";
  background: linear-gradient(90deg, var(--green), rgba(84, 216, 255, 0.45), transparent);
  transform-origin: left;
  animation: status-charge 3.2s ease-in-out infinite;
}

.signal-deck span:nth-child(2)::after {
  animation-delay: 0.35s;
}

.signal-deck span:nth-child(3)::after {
  animation-delay: 0.7s;
}

@keyframes status-charge {
  0%, 100% { opacity: 0.36; transform: scaleX(0.32); }
  50% { opacity: 1; transform: scaleX(1); }
}

.signal-deck strong {
  display: block;
  margin-bottom: 1px;
  color: var(--red);
  font-size: 10px;
  text-transform: uppercase;
}

.threat-console::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(112, 255, 159, 0.12), transparent),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(112, 255, 159, 0.06) 31px 32px);
  opacity: 0.7;
}

.threat-halo {
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 1px solid rgba(84, 216, 255, 0.14);
  pointer-events: none;
}

.console-top,
.console-body {
  position: relative;
  z-index: 1;
}

.console-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.console-top span:nth-child(2) {
  background: var(--amber);
}

.console-top span:nth-child(3) {
  background: var(--green);
}

.console-top strong {
  margin-left: auto;
  font-size: 12px;
}

.console-body {
  min-height: 220px;
  padding: 18px 20px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #d8ffe8;
  font-size: 13px;
}

.console-body::after {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 46px;
  content: "";
  border-top: 1px solid rgba(112, 255, 159, 0.38);
  background:
    linear-gradient(90deg, rgba(112, 255, 159, 0.7), transparent 20%, rgba(84, 216, 255, 0.55), transparent 65%),
    repeating-linear-gradient(90deg, rgba(112, 255, 159, 0.18) 0 1px, transparent 1px 24px);
  opacity: 0.58;
  animation: waveform 3.4s ease-in-out infinite;
}

@keyframes waveform {
  0%, 100% { transform: scaleX(0.96); opacity: 0.42; }
  50% { transform: scaleX(1); opacity: 0.78; }
}

.risk-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 70, 100, 0.3);
  background: linear-gradient(90deg, rgba(255, 70, 100, 0.13), rgba(112, 255, 159, 0.06));
  color: #ff9aaa;
  text-transform: uppercase;
}

.risk-strip strong {
  color: var(--green);
  font-size: 18px;
}

.console-body p {
  margin-bottom: 10px;
}

.prompt,
.ok {
  color: var(--green);
}

.warn {
  color: var(--amber);
}

.danger {
  color: var(--red);
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  animation: scan 3.6s linear infinite;
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(220px); }
}

.ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -2px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: var(--line);
}

.ticker div {
  position: relative;
  padding: 22px;
  background: rgba(7, 13, 14, 0.92);
  overflow: hidden;
}

.ticker div::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 0 35%, rgba(112, 255, 159, 0.09) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: metric-sweep 6s ease-in-out infinite;
}

.ticker div:nth-child(2)::before { animation-delay: 0.45s; }
.ticker div:nth-child(3)::before { animation-delay: 0.9s; }
.ticker div:nth-child(4)::before { animation-delay: 1.35s; }

@keyframes metric-sweep {
  0%, 42%, 100% { transform: translateX(-120%); }
  58%, 70% { transform: translateX(120%); }
}

.ticker div::after {
  position: absolute;
  right: 14px;
  bottom: 10px;
  color: rgba(112, 255, 159, 0.18);
  content: "////";
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ticker strong {
  display: block;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 34px;
}

.ticker span {
  color: var(--muted);
}

.content-section {
  padding: 56px 0;
  border-top: 1px solid rgba(112, 255, 159, 0.12);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: 40px;
  align-items: start;
}

.content-section p {
  color: #bdd7cb;
  font-size: 17px;
}

.section-lead {
  max-width: 820px;
}

.terminal-card {
  border-radius: 8px;
  overflow: hidden;
}

.terminal-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.terminal-card pre,
.bibtex {
  padding: 18px;
  color: #dfffea;
}

.figure-card {
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(84, 216, 255, 0.05), 0 22px 80px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(112, 255, 159, 0.12);
  background: rgba(5, 6, 7, 0.58);
}

.figure-card figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.wide-figure {
  margin-top: 18px;
}

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

.emerging-figures {
  grid-template-columns: 1fr;
  gap: 16px;
}

.emerging-figures .figure-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.emerging-figures .figure-card img {
  height: 300px;
  padding: 12px;
  object-fit: contain;
  background:
    linear-gradient(rgba(5, 6, 7, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 6, 7, 0.02) 1px, transparent 1px),
    #f7faf8;
  background-size: 28px 28px;
}

.emerging-figures .figure-card figcaption {
  margin-top: 12px;
}

.emerging-figures .figure-card:nth-child(2) img {
  height: 420px;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-list article {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 8px;
}

time {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.news-list p {
  margin: 0;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pipeline-node {
  position: relative;
  min-height: 220px;
  padding: 22px;
  border-radius: 8px;
  overflow: hidden;
}

.pipeline-node::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(112, 255, 159, 0.08), transparent 46%);
}

.pipeline-node span {
  position: relative;
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.pipeline-node h3,
.pipeline-node p {
  position: relative;
}

.pipeline-node::after {
  position: absolute;
  top: 34px;
  right: -18px;
  z-index: 1;
  content: ">";
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 24px;
}

.pipeline-node:last-child::after {
  display: none;
}

.leaderboard-wrap {
  overflow-x: auto;
  border-radius: 8px;
}

.leaderboard {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
}

.leaderboard th,
.leaderboard td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(112, 255, 159, 0.13);
  text-align: left;
}

.leaderboard th {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.highlight-row {
  background: rgba(112, 255, 159, 0.08);
  color: var(--green);
}

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

.result-grid div {
  padding: 20px;
  border-radius: 8px;
}

.result-grid strong {
  display: block;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 30px;
}

.result-grid span {
  color: var(--muted);
}

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

.library-grid article {
  min-height: 230px;
  padding: 22px;
  border-radius: 8px;
}

.library-grid code {
  display: block;
  margin-top: 22px;
  color: var(--green);
}

.bibtex {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 54px;
  border-top: 1px solid rgba(112, 255, 159, 0.12);
  color: var(--muted);
}

footer a {
  color: var(--green);
}

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

  nav {
    justify-content: flex-start;
  }

  .hero,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "copy"
      "visual";
    min-height: auto;
  }

  .hero-visual {
    justify-self: stretch;
    display: grid;
    grid-template-rows: 260px auto auto;
    gap: 12px;
    width: 100%;
    padding: 14px;
    min-height: 0;
  }

  .hero-visual::before {
    left: 14px;
    right: 14px;
    top: 274px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(112, 255, 159, 0.8), transparent);
  }

  .hero-visual::after {
    display: none;
  }

  .character-panel {
    position: relative;
    inset: auto;
    height: auto;
    width: 100%;
    min-height: 230px;
  }

  .hero-visual .threat-console {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
  }

  .threat-rail {
    display: none;
  }

  .signal-deck {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .ticker,
  .pipeline,
  .library-grid,
  .result-grid,
  .figure-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline-node::after {
    display: none;
  }
}

@media (max-width: 560px) {
  html,
  body {
    max-width: 100%;
  }

  main,
  footer {
    width: calc(100vw - 78px) !important;
    max-width: calc(100vw - 78px) !important;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    gap: 10px 12px;
  }

  nav a {
    min-width: 0;
    font-size: 13px;
  }

  .hero,
  .content-section,
  .ticker {
    max-width: 100%;
    overflow: hidden;
  }

  .hero {
    display: block;
  }

  .hero-copy::after {
    left: 0;
    right: 0;
  }

  .ticker,
  .pipeline,
  .library-grid,
  .result-grid,
  .figure-grid,
  .news-list article {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 54px;
  }

  .hero-copy,
  .hero-actions,
  .hero-badges,
  .hero-visual,
  .hero-expansion,
  .hero-subtitle,
  .authors {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .button {
    min-width: 0;
  }

  .hero-actions,
  .hero-badges {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-badges span {
    min-width: 0;
  }

  .hero-expansion {
    font-size: 15px;
  }

  .author-line {
    flex-wrap: wrap;
  }

  .console-body {
    min-height: 280px;
    padding: 18px;
    font-size: 13px;
  }

  .hero-visual {
    grid-template-rows: 210px auto auto;
    margin-top: 28px;
    overflow: hidden;
    clip-path: none;
    border-radius: 8px;
  }

  .hero-visual::before {
    top: 224px;
  }

  .character-panel {
    max-width: 100%;
    min-height: 210px;
  }

  .hero-visual .threat-console,
  .signal-deck {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .console-body p,
  .risk-strip,
  .hero-badges span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  pre,
  code {
    white-space: pre-wrap;
  }

  .risk-strip {
    flex-wrap: wrap;
  }

  .signal-deck {
    grid-template-columns: 1fr;
    margin-top: 8px;
  }

  .scan-line {
    animation-name: scan-small;
  }

  footer {
    flex-direction: column;
  }
}

@keyframes scan-small {
  from { transform: translateY(0); }
  to { transform: translateY(280px); }
}
