:root {
  --ink: #17231f;
  --muted: #5e6964;
  --paper: #f7f8f4;
  --white: #ffffff;
  --green: #4d9b58;
  --green-dark: #173c31;
  --green-soft: #dcebd8;
  --orange: #e56542;
  --yellow: #e1bd52;
  --blue: #3779a6;
  --line: #d7ddd8;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 35, 31, 0.12);
  background: rgba(247, 248, 244, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 4px solid var(--green-dark);
  border-right-color: var(--orange);
  transform: rotate(45deg);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header nav a {
  color: #314039;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--green);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.menu-button > span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 40px 44px;
}

.hero-copy {
  max-width: 1060px;
  margin: 0 auto 48px;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 7vw, 6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.subtitle {
  max-width: 980px;
  margin: 22px auto 28px;
  color: #34423c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.3vw, 1.85rem);
  line-height: 1.32;
}

.authors,
.affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.authors {
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 650;
}

.authors a {
  text-decoration-color: var(--green);
  text-underline-offset: 4px;
}

.authors sup,
.affiliations sup {
  color: var(--green-dark);
  font-size: 0.7em;
  font-weight: 800;
}

.affiliations {
  max-width: 1050px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 19px;
  border: 1px solid #b8c2bc;
  border-radius: 6px;
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: var(--white);
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--white);
}

figcaption {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hero-figure figcaption,
.wide-result figcaption,
.generalization-hero figcaption {
  max-width: 840px;
  margin: 12px auto 0;
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  color: var(--white);
  background: var(--green-dark);
}

.metrics > div {
  min-height: 145px;
  padding: 32px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.metrics > div:nth-child(2) strong {
  color: #ff9b75;
}

.metrics > div:nth-child(3) strong {
  color: #f1d679;
}

.metrics > div:nth-child(4) strong {
  color: #8dc8e8;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: 2.25rem;
  line-height: 1.1;
}

.metrics span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.section {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 42px;
}

.section-heading h2,
.post-inner h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading.light h2,
.section-heading.light .eyebrow {
  color: var(--white);
}

.section-intro {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
}

.overview-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
}

.overview-lead p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.45;
}

.overview-copy {
  columns: 2;
  column-gap: 34px;
}

.overview-copy p {
  margin: 0 0 18px;
  break-inside: avoid;
}

.video-band,
.results-band {
  color: var(--white);
  background: #10241d;
}

.feature-video {
  margin: 0 0 44px;
}

.feature-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050807;
}

.feature-video figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.video-grid figure {
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #173029;
}

.video-grid figure:nth-child(4) {
  grid-column: 2 / span 2;
}

.video-grid figure:nth-child(5) {
  grid-column: 4 / span 2;
}

.video-grid video {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #050807;
}

.video-grid figcaption {
  min-height: 78px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.7);
}

.video-grid figcaption strong,
.video-grid figcaption span {
  display: block;
}

.video-grid figcaption strong {
  color: var(--white);
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 54px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-steps article {
  min-height: 230px;
  padding: 26px 24px;
  border-right: 1px solid var(--line);
}

.method-steps article:last-child {
  border-right: 0;
}

.method-steps article > span {
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 900;
}

.method-steps h3 {
  margin: 26px 0 10px;
  font-size: 1.28rem;
}

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

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 26px;
  align-items: start;
}

.paper-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.paper-figure img {
  width: 100%;
  height: 330px;
  padding: 18px;
  object-fit: contain;
  background: var(--white);
}

.paper-figure figcaption {
  min-height: 70px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 30px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

caption {
  padding-bottom: 16px;
  text-align: left;
  font-size: 1.03rem;
  font-weight: 800;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.76rem;
  text-transform: uppercase;
}

tbody th {
  font-weight: 700;
}

tr.ours {
  color: #cdebc4;
  font-weight: 900;
}

.table-note {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
}

.dark-figure {
  border-color: rgba(255, 255, 255, 0.14);
}

.dark-figure figcaption {
  color: rgba(255, 255, 255, 0.68);
  border-top-color: rgba(255, 255, 255, 0.14);
  background: #173029;
}

.radar-card img {
  height: 280px;
  padding: 12px;
}

.wide-result {
  max-width: 1000px;
  margin: 54px auto 0;
}

.wide-result img {
  width: 100%;
  padding: 20px;
  background: var(--white);
}

.wide-result figcaption {
  color: rgba(255, 255, 255, 0.68);
}

.generalization-hero {
  max-width: 1000px;
  margin: 0 auto 34px;
}

.generalization-hero img {
  width: 100%;
  padding: 22px;
  background: var(--white);
}

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

.generalization-grid .paper-figure img {
  height: 250px;
}

.post-band {
  color: var(--white);
  background: var(--orange);
}

.post-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
  align-items: center;
  padding-top: 70px;
  padding-bottom: 70px;
}

.post-inner .eyebrow {
  color: #2a2922;
}

.post-inner dl {
  margin: 0;
}

.post-inner dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.post-inner dt,
.post-inner dd {
  margin: 0;
}

.post-inner dd {
  font-weight: 900;
}

.post-inner dd span {
  margin-left: 6px;
  color: #2a2922;
  font-size: 0.76rem;
}

.citation {
  display: grid;
  grid-template-columns: 0.34fr 0.66fr;
  gap: 44px;
}

.citation-box {
  position: relative;
  min-width: 0;
}

.citation pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #d7ece4;
  border-radius: 6px;
  background: var(--ink);
  font-size: 0.82rem;
  line-height: 1.55;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  background: #32473f;
  font-weight: 800;
  cursor: pointer;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px max(24px, calc((100% - var(--max-width)) / 2));
  color: rgba(255, 255, 255, 0.65);
  background: #0b1511;
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--white);
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 18px;
  }

  .menu-button {
    display: block;
  }

  .site-header nav {
    position: absolute;
    top: 62px;
    right: 14px;
    display: none;
    width: 210px;
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 14px 40px rgba(23, 35, 31, 0.15);
  }

  .site-header nav.open {
    display: flex;
  }

  .site-header nav a {
    padding: 10px;
  }

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

  .metrics > div:nth-child(2) {
    border-right: 0;
  }

  .metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .overview-grid,
  .result-layout,
  .post-inner,
  .citation {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .overview-copy {
    columns: 1;
  }

  .video-grid,
  .generalization-grid {
    grid-template-columns: 1fr 1fr;
  }

  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-steps article:nth-child(2) {
    border-right: 0;
  }

  .method-steps article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 52px 18px 30px;
  }

  .hero h1 {
    font-size: 3.35rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .authors {
    gap: 3px 13px;
    font-size: 0.9rem;
  }

  .affiliations {
    display: block;
  }

  .affiliations span {
    display: block;
    margin-bottom: 5px;
  }

  .section {
    width: min(100% - 30px, var(--max-width));
    padding: 68px 0;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .metrics > div {
    min-height: 125px;
    padding: 26px 12px;
  }

  .metrics strong {
    font-size: 1.8rem;
  }

  .metrics span {
    font-size: 0.68rem;
  }

  .overview-lead p {
    font-size: 1.28rem;
  }

  .video-grid,
  .generalization-grid,
  .figure-pair,
  .method-steps {
    grid-template-columns: 1fr;
  }

  .video-grid figure,
  .video-grid figure:nth-child(4),
  .video-grid figure:nth-child(5) {
    grid-column: 1;
  }

  .video-grid video {
    height: min(92vw, 380px);
  }

  .method-steps article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-steps article:last-child {
    border-bottom: 0;
  }

  .paper-figure img,
  .generalization-grid .paper-figure img {
    height: auto;
    max-height: 340px;
  }

  th,
  td {
    padding: 13px 9px;
    font-size: 0.8rem;
  }

  .citation pre {
    padding: 58px 18px 20px;
    font-size: 0.72rem;
  }

  footer {
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
