:root {
  --ink: #17202a;
  --muted: #5e6b78;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --line: #d9dfdf;
  --blue: #2364aa;
  --blue-dark: #153e6f;
  --mint: #2ba874;
  --coral: #d64b42;
  --amber: #f2b84b;
  --shadow: 0 22px 60px rgba(20, 34, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(247,248,244,0.96)),
    var(--paper);
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 32, 42, 0.1);
  background: rgba(247, 248, 244, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--blue-dark);
  background: rgba(35, 100, 170, 0.1);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: 34px;
  align-items: center;
  min-height: min(760px, calc(82vh - 64px));
  padding-top: 42px;
  padding-bottom: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: clamp(50px, 5.8vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
  white-space: nowrap;
}

h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.subtitle {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.1;
}

.authors,
.affiliations {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.authors {
  max-width: 560px;
  margin-bottom: 6px;
}

.affiliations {
  margin-bottom: 26px;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(23, 32, 42, 0.18);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.06);
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.disabled {
  color: #7d8790;
  background: #edf0ef;
  box-shadow: none;
}

.hero-visual,
.figure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual {
  padding: 10px;
}

.hero-visual img {
  border-radius: 6px;
}

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

.metric {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.metric span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.highlight-grid,
.results-grid,
.process,
.task-layout,
.scoreboard {
  display: grid;
  gap: 16px;
}

.highlight-grid {
  grid-template-columns: repeat(3, 1fr);
}

.highlight,
.task-panel,
.process-step,
.result,
.scoreboard > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.highlight,
.process-step,
.result {
  padding: 24px;
}

.highlight span,
.process-step span,
.scoreboard span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.highlight p,
.task-panel li,
.process-step p,
.result p,
.scoreboard p,
figcaption {
  color: var(--muted);
  line-height: 1.65;
}

.highlight p,
.process-step p,
.result p,
.scoreboard p {
  margin-bottom: 0;
}

.task-layout {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 22px;
}

.task-panel {
  padding: 26px;
  border-top: 5px solid var(--blue);
}

.task-panel.accent {
  border-top-color: var(--mint);
}

.task-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-panel li {
  position: relative;
  padding-left: 18px;
}

.task-panel li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.figure {
  margin: 22px 0 0;
}

.figure img {
  width: 100%;
}

figcaption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
  font-size: 14px;
}

.process {
  grid-template-columns: repeat(3, 1fr);
}

.results-grid {
  grid-template-columns: repeat(3, 1fr);
}

.scoreboard {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
}

.scoreboard > div {
  padding: 20px;
}

.scoreboard strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--blue-dark);
  font-size: 42px;
  line-height: 1;
}

.bibtex-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  box-shadow: var(--shadow);
  overflow: hidden;
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #edf7f4;
  font-size: 14px;
  line-height: 1.7;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 36px;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.1);
  color: #fff;
  box-shadow: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin-bottom: 0;
}

.footer a {
  color: var(--blue-dark);
  font-weight: 800;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 54px;
  }

  .metrics,
  .highlight-grid,
  .process,
  .results-grid,
  .scoreboard {
    grid-template-columns: 1fr 1fr;
  }

  .task-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(100% - 28px, 1180px);
    padding: 52px 0;
  }

  .hero {
    padding-top: 42px;
  }

  .metrics,
  .highlight-grid,
  .process,
  .results-grid,
  .scoreboard {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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

  pre {
    padding: 18px;
    font-size: 12px;
  }

  .footer {
    flex-direction: column;
  }
}
