:root {
  --ink-1: #102132;
  --ink-2: #304457;
  --ink-3: #657789;
  --paper: #f6f3ed;
  --mist: #dfe9f3;
  --teal: #0f8b8d;
  --amber: #dd8a2f;
  --navy: #0d223a;
  --sand: #efe4d2;
  --line: rgba(16, 33, 50, 0.12);
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 20px 60px rgba(14, 34, 56, 0.12);
  --radius: 8px;
  --container-width: 1240px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-1);
  background:
    radial-gradient(circle at top left, rgba(15, 139, 141, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(221, 138, 47, 0.14), transparent 24%),
    linear-gradient(180deg, #f8fbfd 0%, #f4efe8 42%, #fbfcfd 100%);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

a {
  color: inherit;
}

.container.is-max-widescreen {
  max-width: var(--container-width) !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(248, 251, 253, 0.8);
  border-bottom: 1px solid rgba(16, 33, 50, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1.5rem;
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--navy);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.2rem;
}

.topnav a {
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-2);
}

.topnav a:hover {
  color: var(--teal);
}

.hero-shell {
  position: relative;
  overflow: hidden;
  padding: 4.25rem 0 3rem;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(13, 34, 58, 0.92) 0%, rgba(12, 56, 77, 0.9) 52%, rgba(18, 96, 97, 0.82) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.hero-content {
  position: relative;
  color: #f9fbfc;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: #d5ebe8;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-title {
  max-width: 980px;
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  line-height: 1.02;
  color: #fffaf5;
  text-wrap: balance;
}

.hero-summary {
  max-width: 860px;
  margin: 1.6rem 0 1.5rem;
  font-size: 1.1rem;
  color: rgba(248, 250, 251, 0.88);
}

.author-line,
.affiliation-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.author-line {
  margin-bottom: 0.7rem;
  font-weight: 700;
}

.author-line a {
  text-decoration: none;
  color: #f9e7c7;
}

.author-line sup {
  margin-left: 0.12rem;
  font-size: 0.72em;
  color: #ffe8bd;
}

.author-line a:hover {
  color: #ffffff;
}

.affiliation-line {
  color: rgba(249, 250, 251, 0.82);
  font-size: 0.95rem;
}

.dot-sep {
  color: rgba(249, 250, 251, 0.52);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.6rem 0 2rem;
}

.action-btn {
  min-height: 48px;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.action-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18) !important;
}

.primary-btn {
  background: #f8e2bb !important;
  border-color: #f8e2bb !important;
  color: var(--navy) !important;
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 2.2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.12);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 112px;
  padding: 1.15rem 1.1rem;
  background: rgba(255, 255, 255, 0.08);
}

.metric-value {
  color: #ffe8bd;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1;
}

.metric-label {
  color: rgba(248, 250, 251, 0.86);
  font-size: 0.92rem;
}

.hero-figure {
  margin: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  background: #ffffff;
}

.section {
  padding: 4.5rem 1.5rem;
}

.alt-section {
  background:
    linear-gradient(180deg, rgba(223, 233, 243, 0.35) 0%, rgba(255, 255, 255, 0.55) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-kicker {
  color: var(--teal);
}

.section-heading h2 {
  margin: 0;
  max-width: 760px;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.06;
  color: var(--navy);
}

.lead {
  font-size: 1.12rem;
  color: var(--ink-1);
}

.overview-grid p {
  color: var(--ink-2);
}

.insight-stack {
  display: grid;
  gap: 0.9rem;
}

.insight-card,
.paper-panel,
.resource-panel,
.citation-box {
  background: var(--card);
  border: 1px solid rgba(16, 33, 50, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.insight-card {
  padding: 1.1rem 1rem 1rem;
}

.insight-card h3,
.results-summary h3,
.media-copy h3,
.method-notes h3,
.contribution-strip h3 {
  margin: 0 0 0.45rem;
  font-family: "Fraunces", serif;
  font-size: 1.24rem;
  color: var(--navy);
}

.insight-card p,
.results-summary p,
.media-copy p,
.method-notes p,
.contribution-strip p,
.paper-panel p,
.resource-link small {
  color: var(--ink-2);
}

.contribution-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.1rem;
  background: var(--line);
}

.contribution-strip article {
  min-height: 220px;
  padding: 1.4rem 1.25rem 1.3rem;
  background: #fcfbf7;
}

.usecase-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 2rem;
}

.usecase-copy {
  padding: 1.35rem 1.25rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 33, 50, 0.08);
  box-shadow: var(--shadow);
}

.usecase-copy h3 {
  margin: 0 0 0.8rem;
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  line-height: 1.12;
  color: var(--navy);
}

.usecase-copy p:last-child {
  margin-bottom: 0;
  color: var(--ink-2);
}

.usecase-figure {
  margin: 0;
}

.usecase-figure img {
  width: 100%;
  border: 1px solid rgba(16, 33, 50, 0.08);
  box-shadow: var(--shadow);
  background: #ffffff;
}

.usecase-figure figcaption {
  padding-top: 0.75rem;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.contribution-index {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.media-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.plain-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink-2);
}

.plain-list li + li {
  margin-top: 0.45rem;
}

.media-figure,
.result-figure {
  margin: 0;
}

.media-figure img,
.result-figure img {
  width: 100%;
  border: 1px solid rgba(16, 33, 50, 0.08);
  box-shadow: var(--shadow);
  background: #ffffff;
}

.pipeline-row {
  align-items: stretch;
}

.method-notes {
  display: grid;
  gap: 0.9rem;
  height: 100%;
}

.method-notes article {
  min-height: 0;
  padding: 1rem 1rem 0.95rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(16, 33, 50, 0.08);
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.results-summary article {
  min-height: 0;
  padding: 1.1rem 1.05rem;
  background: #fffdf8;
  border-top: 4px solid var(--amber);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}

.quality-figure {
  grid-column: span 2;
}

.result-figure figcaption {
  padding-top: 0.75rem;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.paper-grid {
  align-items: stretch;
}

.paper-panel {
  height: 100%;
  padding: 1.5rem;
}

.resource-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
}

.resource-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
}

.resource-link:hover {
  background: #ffffff;
}

.resource-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--navy);
  color: #fff7ea;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.resource-link strong {
  display: block;
  color: var(--navy);
}

.citation-box {
  position: relative;
  padding: 1.25rem;
}

.citation-box pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: #fffdf8;
  color: var(--ink-1);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.copy-bibtex-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: var(--navy);
  color: #ffffff;
  min-height: 38px;
  padding: 0.6rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-bibtex-btn.is-copied {
  background: var(--teal);
}

.scroll-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--navy);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media screen and (max-width: 1023px) {
  .metrics-band,
  .contribution-strip,
  .results-summary,
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }

  .media-panel {
    grid-template-columns: 1fr;
  }

  .usecase-panel {
    grid-template-columns: 1fr;
  }

  .quality-figure {
    grid-column: auto;
  }
}

@media screen and (max-width: 768px) {
  .topbar-inner,
  .topnav {
    justify-content: center;
  }

  .topbar-inner {
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .hero-shell {
    padding-top: 3rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .metrics-band,
  .contribution-strip,
  .results-summary,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .metric-item,
  .contribution-strip article {
    min-height: 0;
  }

  .section {
    padding: 3.25rem 1.25rem;
  }

  .hero-figure {
    padding: 0.6rem;
  }

  .copy-bibtex-btn {
    position: static;
    margin-bottom: 1rem;
  }
}
