:root {
  --ink: #162235;
  --ink-soft: #455268;
  --muted: #68758a;
  --paper: #fbfcfd;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --line: #dce3e8;
  --orange: #d96f3d;
  --green: #577a62;
  --green-soft: #e1ebe3;
  --gold-soft: #f7efd0;
  --blue: #597da5;
  --blue-soft: #e0e8f1;
  --shadow: 0 18px 45px rgba(31, 46, 65, 0.10);
  --max-width: 1180px;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 9999;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(220, 227, 232, 0.88);
  background: rgba(251, 252, 253, 0.94);
  backdrop-filter: blur(14px);
}
.nav-wrap {
  width: min(var(--max-width), calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 780;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-links > a:not(.button) {
  color: var(--ink-soft);
  font-size: 0.91rem;
  font-weight: 680;
  text-decoration: none;
}
.nav-links > a:not(.button):hover,
.nav-links > a:not(.button):focus-visible { color: var(--orange); }
.menu-button {
  display: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 750;
  color: var(--ink);
}

.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 760;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 18px rgba(22, 34, 53, 0.18);
}
.button-secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}
.nav-button { min-height: 42px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 5.6rem 0 4.8rem;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}
.hero::before {
  width: 520px;
  height: 520px;
  right: -190px;
  top: -150px;
  background: radial-gradient(circle, rgba(217, 111, 61, 0.12), rgba(217, 111, 61, 0));
}
.hero::after {
  width: 460px;
  height: 460px;
  left: -230px;
  bottom: -250px;
  background: radial-gradient(circle, rgba(89, 125, 165, 0.12), rgba(89, 125, 165, 0));
}
.hero-grid {
  position: relative;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  display: block;
}
.hero-copy {
  min-width: 0;
  max-width: 1120px;
}
.eyebrow,
.kicker {
  margin: 0 0 0.7rem;
  color: var(--orange);
  font-size: 0.77rem;
  font-weight: 860;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 1060px;
  margin-bottom: 1.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 6vw, 6.15rem);
  line-height: 0.99;
  letter-spacing: -0.05em;
  font-weight: 700;
}
.hero-deck {
  max-width: 930px;
  margin-bottom: 1.8rem;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.65vw, 1.23rem);
  line-height: 1.62;
}
.hero-footer {
  max-width: 1080px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.authors {
  flex: 1 1 320px;
  margin-bottom: 0;
  color: var(--ink-soft);
}
.authors strong { color: var(--ink); }
.hero-footer .button-row {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.stat-strip {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-card {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(31, 46, 65, 0.07);
}
.stat-number {
  display: block;
  margin-bottom: 0.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  line-height: 1;
  color: var(--green);
}
.stat-label { color: var(--ink-soft); font-weight: 700; }
.stat-note {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.section { padding: 6rem 0; }
.section-alt { background: var(--surface-soft); }
.section-inner {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}
.section-heading {
  max-width: 900px;
  margin-bottom: 2.55rem;
}
.section-heading h2 {
  margin-bottom: 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3.55rem);
  line-height: 1.1;
  letter-spacing: -0.038em;
}
.section-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.figure-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}
.figure-card img {
  width: 100%;
  height: auto;
  padding: 1rem;
  background: white;
}
.figure-card figcaption {
  padding: 1rem 1.25rem 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.physical-figure { max-width: 1000px; margin-inline: auto; }
.zoom-button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.method-card,
.validation-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.method-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  font-weight: 850;
}
.method-card h3,
.validation-card h3 { margin-bottom: 0.42rem; font-size: 1.03rem; }
.method-card p,
.validation-card p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.92rem; }

.validation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}
.part-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


.video-section {
  background: var(--surface);
}
.video-card {
  overflow: hidden;
  position: relative;
  width: min(100%, 1000px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0f1724;
  box-shadow: var(--shadow);
}
.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.citation-section { min-height: 610px; }
.citation-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
}
.citation-card pre {
  max-width: 100%;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow-x: auto;
  border-radius: 15px;
  background: #1b273a;
  color: #f3f6fb;
  font: 600 0.93rem/1.52 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}
.copy-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-height: 74px;
  padding-top: 1rem;
}
.copy-status {
  margin: 0 auto 0 0;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 700;
}

.image-dialog {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 3rem 1rem 1rem;
  border: 0;
  border-radius: 18px;
  background: white;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.28);
}
.image-dialog::backdrop { background: rgba(12, 20, 31, 0.78); }
.image-dialog img {
  width: 100%;
  height: auto;
  max-height: calc(94vh - 4rem);
  object-fit: contain;
}
.dialog-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
  }
  .hero-footer .button-row { justify-content: flex-start; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 0.8rem; }
  .nav-links > a:not(.button) { display: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .nav-wrap { min-height: 64px; }
  .brand { font-size: 0.92rem; }
  .menu-button { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow);
    align-items: stretch;
    flex-direction: column;
  }
  .nav-links.open { display: flex; }
  .nav-links > a:not(.button) { display: block; padding: 0.45rem 0.3rem; }
  .nav-button { width: 100%; }

  .hero { padding-top: 4.2rem; }
  .stat-strip,
  .method-grid,
  .validation-grid { grid-template-columns: 1fr; }
  .stat-note { text-align: left; }
  .section { padding: 4.5rem 0; }
  .figure-card img { padding: 0.55rem; }
  .citation-card pre { font-size: 0.78rem; }
  .copy-row { align-items: flex-start; flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
