/* =========================================================================
   OmniBrainBench — Medea-style dark theme
   Loaded AFTER bulma.min.css so it overrides the light defaults.
   ========================================================================= */

:root {
  /* Backgrounds (slate) */
  --bg-0: #020617;   /* page base */
  --bg-1: #0f172a;   /* primary surface */
  --bg-2: #1e293b;   /* raised card */
  --bg-3: #334155;   /* hover / border-strong */

  /* Text */
  --text-0: #f1f5f9; /* headings */
  --text-1: #cbd5e1; /* body */
  --text-2: #94a3b8; /* muted */

  /* Accents */
  --accent-blue: #3b82f6;
  --accent-blue-soft: #60a5fa;
  --accent-purple: #a855f7;
  --accent-teal: #14b8a6;
  --accent-amber: #fbbf24;

  /* Borders & lines */
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.30);

  /* Effects */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --grad: linear-gradient(120deg, #60a5fa 0%, #a855f7 50%, #14b8a6 100%);

  --font-sans: 'Outfit', 'Noto Sans', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --nav-h: 64px;
}

/* ---------- base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background-color: var(--bg-0);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-0);
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

/* Subtle radial glow behind the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    radial-gradient(55rem 38rem at 95% 0%, rgba(168, 85, 247, 0.14), transparent 55%),
    radial-gradient(50rem 40rem at 50% 110%, rgba(20, 184, 166, 0.10), transparent 60%);
  pointer-events: none;
}

a { color: var(--accent-blue-soft); transition: color .15s ease; }
a:hover { color: #93c5fd; }

/* Headings */
.title, h1, h2, h3, h4, h5 { color: var(--text-0) !important; }
.subtitle { color: var(--text-1) !important; }
.title { font-family: var(--font-sans); letter-spacing: -0.01em; }

/* Body copy uses serif for an editorial feel */
.content p, .content li { font-family: var(--font-serif); color: var(--text-1); font-size: 1.05rem; }
.content b, .content strong { color: var(--text-0); }

/* Section rhythm + reveal */
.section { padding: 4.5rem 1.5rem; }
.container { max-width: 1080px; }

/* Override Bulma light surfaces */
.hero, .hero-body, .section { background-color: transparent !important; }
.hero.is-light { background: transparent !important; }
.footer { background-color: transparent !important; }

/* =========================================================================
   NAVBAR
   ========================================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: 1.05rem; color: var(--text-0);
  letter-spacing: -0.01em;
}
.nav__brand img { width: 26px; height: 26px; }
.nav__brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a {
  color: var(--text-2); font-size: .92rem; font-weight: 500;
  text-decoration: none; position: relative;
}
.nav__links a:hover { color: var(--text-0); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad); transition: width .2s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__toggle {
  display: none; background: none; border: 0; color: var(--text-0);
  font-size: 1.4rem; cursor: pointer;
}
@media (max-width: 820px) {
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: rgba(2, 6, 23, 0.97); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__links.open { max-height: 60vh; }
  .nav__links a { padding: .9rem 1.5rem; border-top: 1px solid var(--border); }
  .nav__toggle { display: block; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding-top: calc(var(--nav-h) + 2.5rem); }
.publication-title {
  font-family: var(--font-sans) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
.hero .mmmu {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.publication-subtitle {
  color: var(--text-1) !important;
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  font-size: 1.35rem !important;
  max-width: 760px; margin: 1rem auto 0 !important;
}
.publication-authors { font-family: var(--font-sans) !important; color: var(--text-2) !important; }
.publication-authors .author-block { color: var(--text-1); }
.publication-authors a { color: var(--accent-blue-soft) !important; }

/* Link buttons */
.publication-links { margin-top: 1.6rem; display: inline-flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.external-link.button,
.publication-links .button {
  background: var(--bg-2) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-0) !important;
  border-radius: 999px !important;
  font-weight: 600;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.external-link.button:hover,
.publication-links .button:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue) !important;
  background: var(--bg-3) !important;
}

/* Hero stat chips */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
  margin: 2.2rem auto 0; max-width: 820px;
}
.stat-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1.2rem;
  min-width: 120px;
  backdrop-filter: blur(4px);
}
.stat-chip .num {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-chip .label { font-size: .78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }


/* =========================================================================
   SECTION TITLES
   ========================================================================= */
.section .title.is-3 {
  font-size: 2rem; font-weight: 700; margin-bottom: 1.6rem;
  position: relative; display: inline-block;
}
.section .title.is-3::after {
  content: ""; display: block; height: 3px; width: 56px; margin: .6rem auto 0;
  background: var(--grad); border-radius: 2px;
}
.section .title.is-4 { color: var(--text-1) !important; font-weight: 600; }

/* Eyebrow hero band for "Experiment Results" */
.hero.is-light.is-small .title { color: var(--text-0) !important; }
.hero.is-light.is-small {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5) !important;
}

/* =========================================================================
   CARDS / BOXES / IMAGES
   ========================================================================= */
.box {
  background: var(--bg-1) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  color: var(--text-1);
}

/* Wrap content images in a soft card */
.content img,
figure.image img {
  border-radius: var(--radius-sm);
  background: #ffffff;            /* white matte so white-bg charts blend */
  padding: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.content p, figcaption {
  color: var(--text-2);
}
figcaption { font-family: var(--font-sans); font-size: .9rem; margin-top: .5rem; }
.center { display: block; margin-left: auto; margin-right: auto; }

/* Highlight list as numbered cards */
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; text-align: left; }
.highlight-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; position: relative; overflow: hidden;
}
.highlight-card::before {
  content: attr(data-n);
  position: absolute; top: -10px; right: 6px;
  font-family: var(--font-mono); font-size: 4rem; font-weight: 700;
  color: rgba(96, 165, 250, 0.10);
}
.highlight-card p { font-family: var(--font-serif); color: var(--text-1); font-size: 1rem; }

/* =========================================================================
   CAROUSEL dots
   ========================================================================= */
.slider-pagination .slider-page { background: var(--text-2) !important; }
.slider-pagination .slider-page.is-active { background: var(--accent-blue) !important; }

/* =========================================================================
   CITATION
   ========================================================================= */
.citation-block { position: relative; max-width: 900px; margin: 0 auto; text-align: left; }
.citation-block pre {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.4rem;
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 1.6;
  overflow-x: auto;
}
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-3); color: var(--text-0);
  border: 1px solid var(--border-strong); border-radius: 8px;
  padding: .4rem .8rem; font-size: .8rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  transition: background .15s ease, border-color .15s ease;
}
.copy-btn:hover { background: var(--accent-blue); border-color: var(--accent-blue); }
.copy-btn.copied { background: var(--accent-teal); border-color: var(--accent-teal); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 3rem;
}
.footer .content p { font-family: var(--font-sans); color: var(--text-2); font-size: .9rem; }
.footer a { color: var(--accent-blue-soft); }

/* =========================================================================
   BACK TO TOP
   ========================================================================= */
.to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  color: var(--text-0); font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .15s ease;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--accent-blue); }

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
