/* =====================================================================
   Topo-Omni — project page
   Palette derived from the NeuroAI Lab logo (green → blue gradient)
   ===================================================================== */

:root {
  --green: #1FA855;
  --green-dark: #178a45;
  --blue: #1C9FD0;
  --blue-dark: #157da8;
  --teal: #21A599;

  --ink: #16212b;
  --ink-soft: #4a5a64;
  --ink-faint: #8295a0;

  --bg: #f6faf9;
  --card: #ffffff;
  --border: #e1ebe9;

  --gradient: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --max-width: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(22, 33, 43, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 760px; }

/* ---------------------------------------------------------------------
   Navbar
   --------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 250, 249, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.navbar__brand:hover { text-decoration: none; }

.navbar__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.navbar__links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}
.navbar__links a:hover { color: var(--blue-dark); text-decoration: none; }

.navbar__pill {
  background: var(--gradient);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.navbar__pill:hover { opacity: 0.9; }

.navbar__icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.navbar__icon .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.navbar__icon .icon img { width: 18px; height: 18px; display: block; }
.navbar__icon .icon i { font-size: 18px; line-height: 1; }
.navbar__icon svg { width: 18px; height: 18px; }
.navbar__icon:hover { color: var(--blue-dark); background: rgba(28, 159, 208, 0.1); }

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.navbar__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 4.5rem 1.5rem 4rem;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--gradient);
  z-index: -2;
}

.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.16) 0, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 82% 78%, rgba(255,255,255,0.14) 0, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10) 0, rgba(255,255,255,0) 55%);
  z-index: -1;
}

.hero__content {
  max-width: 880px;
  margin: 0 auto;
}

.hero__tag {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.85;
  margin: 0 0 1.1rem;
}

.hero__title {
  font-size: clamp(1.6rem, 4.2vw, 2.65rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1.4rem;
  text-shadow: 0 1px 24px rgba(0,0,0,0.08);
}

.hero__authors {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.35rem;
  opacity: 0.97;
}
.hero__authors sup { font-size: 0.7em; }

.hero__affil {
  font-size: 0.92rem;
  opacity: 0.85;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover {
  background: rgba(255, 255, 255, 0.24);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--solid {
  background: #fff;
  color: var(--green-dark);
  border-color: #fff;
}
.btn--solid:hover {
  background: #fff;
  color: var(--blue-dark);
}

/* ---------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------- */
.section {
  padding: 4rem 0;
}
.section--alt {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__heading {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}

.section__intro {
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 100%;
  margin: 0 0 2.4rem;
}

.abstract__text {
  font-size: 1.06rem;
  color: var(--ink-soft);
}
.abstract__text strong { color: var(--ink); }

/* ---------------------------------------------------------------------
   Stats strip
   --------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1.4rem 1rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}

.stat__value {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
}

.stat__label {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------------------------------------------------------------------
   Findings
   --------------------------------------------------------------------- */
.finding {
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--border);
}
.finding:last-child { border-bottom: none; }

.finding__media {
  margin: 0 0 1.6rem;
  text-align: center;
}

.finding__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--card);
  margin: 0 auto;
}

.finding__media--portrait img {
  width: 100%;
  max-width: 420px;
}

.finding__text {
  max-width: 100%;
}

.finding__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue-dark);
  background: rgba(28, 159, 208, 0.1);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  margin-bottom: 0.8rem;
}

.finding__text h3 {
  font-size: 1.32rem;
  font-weight: 800;
  margin: 0 0 0.7rem;
  letter-spacing: -0.01em;
}

.finding__text p {
  color: var(--ink-soft);
  font-size: 0.99rem;
}
.finding__text strong { color: var(--ink); }

.finding__text--full { max-width: 760px; }

.table-wrap {
  margin-top: 1.6rem;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: rgba(28, 159, 208, 0.06); }

.comparison-table .muted {
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 400;
}

.table-caption {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------------
   Citation / BibTeX
   --------------------------------------------------------------------- */
.bibtex {
  position: relative;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.bibtex pre {
  margin: 0;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
}

.bibtex code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #d7e6e2;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.bibtex__copy {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease;
}
.bibtex__copy:hover { background: rgba(255, 255, 255, 0.2); }
.bibtex__copy.copied { background: var(--green); border-color: var(--green); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer {
  padding: 3rem 0 2.5rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.footer__title {
  margin: 0;
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
}

.footer__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer__links a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 0.92rem;
}
.footer__links a:hover { color: #fff; }

.footer__ack {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 760px;
  margin: 0;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0.4rem 0 0;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .navbar__toggle { display: flex; }

  .navbar__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.4rem;
    gap: 0.9rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .navbar__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar__pill { order: 99; }

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

  .hero { padding: 3.2rem 1.25rem 3rem; }
}

@media (max-width: 480px) {
  .hero__actions { gap: 0.5rem; }
  .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }
}
