:root {
  --bg: #f7f7f5;
  --text: #0f172a;
  --muted: #3f4a5a;
  --accent: #0b5cab;
  --accent-2: #8c3b14;
  --line: #c8cfd8;
  --surface: #ffffff;
  --focus: #ffb703;
  --success: #1f7a4b;
  --danger: #8b2f2f;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 0%, #fefefe 0%, var(--bg) 45%, #e9ece7 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: #08467f;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 12px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 64px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.topnav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
}

.hero {
  padding: 72px 0 46px;
}

.hero-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
}

.paper-badge {
  display: inline-block;
  margin: 0 0 14px;
  background: linear-gradient(120deg, #b45a15, #d68a34);
  color: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
}

.hero-subtitle {
  margin: 14px 0 12px;
  color: var(--muted);
  max-width: 65ch;
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.author-line,
.affiliation-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.author-line {
  font-weight: 600;
  color: #243142;
}

.author-line a {
  color: inherit;
}

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

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: #08467f;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-with-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(236, 238, 234, 0.65), rgba(236, 238, 234, 0.25));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.contrib-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contrib-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.contrib-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.contrib-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.mini-note {
  border-left: 4px solid var(--accent-2);
  padding: 8px 12px;
  background: #fffdf8;
  border-radius: 6px;
  color: #463531;
}

.figure-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.figure-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.figure-card figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.static-method-figure {
  margin-top: 4px;
}

.section-lead {
  margin-top: 0;
  color: var(--muted);
  max-width: 74ch;
}

.results-visuals {
  margin-top: 22px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid #d7dde5;
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #f4f6fb;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

tbody tr:nth-child(odd) {
  background: #fcfdff;
}

.noise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.noise-grid .figure-card {
  margin: 0;
}

.delta-pos {
  color: var(--success);
  font-weight: 700;
}

.delta-neg {
  color: var(--danger);
  font-weight: 700;
}

.citation-single {
  max-width: 900px;
}

.citation-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.copy-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: var(--muted);
}

pre {
  margin: 0;
  background: #101820;
  color: #f2f7fb;
  border-radius: 8px;
  overflow-x: auto;
  padding: 10px;
  font-size: 0.84rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 0 26px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .contrib-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(1120px, calc(100% - 1.2rem));
  }

  .hero {
    padding-top: 54px;
  }

  .topbar-inner {
    justify-content: flex-start;
    padding: 8px 0;
  }

  .topnav {
    gap: 10px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
