:root {
  --navy-950: #07111d;
  --navy-900: #0b2038;
  --navy-800: #123352;
  --navy-700: #204b72;
  --sky-300: #9fc7dd;
  --sky-100: #e8f4fb;
  --mint-500: #2ca89f;
  --gold-500: #d89634;
  --sand-100: #f7f2e8;
  --paper: #fffdf8;
  --text-900: #162a3d;
  --text-700: #54677c;
  --line: rgba(12, 32, 56, 0.1);
  --shadow-lg: 0 24px 64px rgba(7, 17, 29, 0.14);
  --shadow-md: 0 14px 30px rgba(7, 17, 29, 0.1);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --width: min(1180px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-900);
  background:
    radial-gradient(circle at top left, rgba(44, 168, 159, 0.08), transparent 20%),
    linear-gradient(180deg, #fcfbf7 0%, #f8f4eb 42%, #ffffff 100%);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

figure,
p,
h1,
h2,
h3,
pre {
  margin: 0;
}

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

.container {
  width: var(--width);
  margin: 0 auto;
}

.narrow {
  max-width: 900px;
}

.section-copy {
  max-width: 900px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 72px;
  color: #fff;
  background:
    linear-gradient(145deg, var(--navy-950) 0%, var(--navy-900) 52%, #1b4770 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.6;
}

.orb-a {
  width: 380px;
  height: 380px;
  right: -120px;
  top: -90px;
  background: radial-gradient(circle, rgba(216, 150, 52, 0.45) 0%, rgba(216, 150, 52, 0.03) 70%);
}

.orb-b {
  width: 320px;
  height: 320px;
  left: -100px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(44, 168, 159, 0.4) 0%, rgba(44, 168, 159, 0.03) 70%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 18px;
}

.brand,
.toplinks a,
.button,
.section-tag,
.metric-value,
.card-number,
.scroll-top {
  font-family: 'Space Grotesk', sans-serif;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.toplinks {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.8);
}

.toplinks a:hover {
  color: #fff;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 980px;
  padding: 44px 0 34px;
}

.eyebrow,
.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.hero h1 {
  margin-top: 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.45rem, 5.4vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 860px;
  margin-top: 20px;
  font-size: 1.23rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 28px;
  font-size: 1.06rem;
}

.authors a {
  color: #b8eef0;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  min-width: 120px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.button.primary {
  color: #1c1c1c;
  border-color: transparent;
  background: linear-gradient(135deg, #d89634 0%, #f2bc63 100%);
}

.button.ghost {
  background: transparent;
}

.hero-figure {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-lg);
}

.hero-figure figcaption {
  padding: 16px 18px 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.6;
}

.section {
  padding: 84px 0;
}

.section-light {
  background: linear-gradient(180deg, rgba(231, 243, 251, 0.45), rgba(255, 255, 255, 0.7));
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.section-tag {
  align-self: flex-start;
  color: var(--navy-700);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(12, 32, 56, 0.08);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead {
  color: var(--text-700);
  font-size: 1.12rem;
  line-height: 1.78;
}

.lead + .lead {
  margin-top: 16px;
}

.abstract-title {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
}

.abstract-lead {
  font-size: 1.18rem;
  line-height: 1.82;
}

.method-grid,
.domain-grid,
.metrics-grid,
.figure-grid {
  display: grid;
  gap: 22px;
}

.method-grid,
.domain-grid,
.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.text-card,
.domain-card,
.metric-card,
.figure-card,
.bibtex {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
}

.text-card,
.domain-card,
.metric-card {
  padding: 26px;
}

.card-number {
  color: var(--mint-500);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.text-card h3,
.domain-card h3 {
  margin-top: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
}

.text-card p,
.domain-card p,
.figure-card figcaption,
.footer p {
  color: var(--text-700);
  font-size: 1.03rem;
  line-height: 1.72;
}

.text-card p,
.domain-card p {
  margin-top: 10px;
}

.figure-grid {
  margin-top: 24px;
}

.figure-grid.two-col {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  align-items: start;
}

.figure-grid.two-col.even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.figure-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-grid.stacked {
  grid-template-columns: 1fr;
}

.figure-card {
  overflow: hidden;
}

.figure-card img {
  background: #fff;
}

.figure-card figcaption {
  padding: 16px 18px 20px;
}

.figure-card strong {
  color: var(--text-900);
}

.span-two {
  grid-column: span 1;
}

.compact {
  align-self: stretch;
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 250, 0.84));
}

.metric-value {
  font-size: 2.25rem;
  color: var(--navy-900);
  line-height: 1;
}

.metric-name {
  margin-top: 10px;
  font-weight: 700;
}

.metric-delta {
  margin-top: 8px;
  color: var(--mint-500);
  font-weight: 700;
}

.citation-card {
  position: relative;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 250, 0.9));
  box-shadow: var(--shadow-md);
}

.copy-button {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 10px 16px;
  border: 1px solid rgba(12, 32, 56, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-900);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.copy-button:hover {
  transform: translateY(-1px);
  background: var(--navy-900);
  color: #fff;
}

.copy-button.copied {
  background: var(--mint-500);
  border-color: transparent;
  color: #fff;
}

.bibtex {
  margin-top: 0;
  padding: 24px;
  padding-right: 110px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-900);
}

.copy-status {
  min-height: 1.2em;
  margin-top: 12px;
  color: var(--mint-500);
  font-size: 0.95rem;
  font-weight: 700;
}

.bibtex code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0 34px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--navy-700);
  font-weight: 700;
}

.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .method-grid,
  .domain-grid,
  .metrics-grid,
  .figure-grid.three-col,
  .figure-grid.two-col,
  .figure-grid.two-col.even {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .topbar,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .toplinks {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .hero-copy {
    padding-top: 26px;
  }

  .hero-text,
  .lead,
  .abstract-lead,
  .text-card p,
  .domain-card p,
  .figure-card figcaption,
  .footer p {
    font-size: 1rem;
  }

  .copy-button {
    position: static;
    margin-bottom: 14px;
  }

  .bibtex {
    padding-right: 24px;
  }

  .method-grid,
  .domain-grid,
  .metrics-grid,
  .figure-grid.three-col,
  .figure-grid.two-col,
  .figure-grid.two-col.even {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }
}
