:root {
  --ink: #131a1e;
  --ink-2: #263238;
  --muted: #617078;
  --line: #d4dcdf;
  --paper: #ffffff;
  --tint: #f3f6f5;
  --orange: #d9782d;
  --content: 1080px;
  --text: 790px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.page-width,
.content-width,
.text-width {
  width: min(calc(100% - 48px), var(--content));
  margin-inline: auto;
}

.text-width { max-width: var(--text); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.paper-nav {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  color: #fff;
  background: rgba(12, 18, 21, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.paper-nav__title {
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.paper-nav nav { display: flex; gap: 22px; }
.paper-nav nav a { color: #d7dfe2; font-size: 13px; font-weight: 650; text-decoration: none; }
.paper-nav nav a:hover,
.paper-nav nav a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 5px; }

.paper-hero {
  position: relative;
  display: grid;
  min-height: min(790px, 80svh);
  align-items: center;
  padding-top: 58px;
  overflow: hidden;
  color: #fff;
  background: #10171b;
}

.paper-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 82% center;
  background: #10171b;
}

.paper-hero__shade {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 18, 0.58);
}

.paper-hero__content {
  position: relative;
  z-index: 2;
  padding-block: 78px 68px;
}

.paper-hero__content::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 30%;
  bottom: 0;
  left: -100vw;
  background: rgba(10, 15, 18, 0.87);
}

.kicker,
.section-label {
  margin: 0 0 12px;
  color: #627a84;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.kicker { color: #a8bac1; }

.paper-hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 57px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.paper-hero__subtitle {
  max-width: 760px;
  margin: 20px 0 0;
  color: #e0e6e8;
  font-size: 22px;
  line-height: 1.42;
}

.authors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-size: 18px; font-weight: 700; }
.authors a { color: #fff; text-underline-offset: 4px; }
.affiliation { margin: 3px 0 0; color: #b6c3c8; }

.paper-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.paper-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 15px;
  color: #fff;
  background: rgba(15, 23, 27, 0.72);
  border: 1px solid #8b999f;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}

.paper-links a:first-child { color: var(--ink); background: #fff; border-color: #fff; }
.paper-links a:hover { filter: brightness(0.9); }
.paper-links a:focus-visible { outline: 3px solid #f0aa70; outline-offset: 3px; }

.paper-hero__caption {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 14px;
  margin: 0;
  color: #c4ced2;
  font-size: 11px;
}

.paper-section { padding-block: 90px; }
.paper-section--tint { background: var(--tint); border-block: 1px solid var(--line); }

.paper-section h2,
.takeaway-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 39px;
  line-height: 1.2;
  letter-spacing: 0;
}

.teaser { text-align: center; }
.teaser h2 { max-width: 820px; margin-inline: auto; }
.teaser video {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-top: 32px;
  object-fit: contain;
  background: #0e1519;
  border: 1px solid #2f3c43;
}

.figure-caption,
figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

#abstract p:not(.section-label) { color: #36464e; font-size: 18px; line-height: 1.8; }

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 38px;
}

.section-intro > p { margin: 0; color: var(--muted); }
figure { margin: 0; }

.figure-button {
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: zoom-in;
}

.figure-button img { width: 100%; height: auto; background: #fff; }
.figure-button:hover { border-color: #7b8b92; }
.figure-button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.method-questions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 42px;
  border-block: 1px solid var(--line);
}

.method-questions > div { padding: 24px; border-right: 1px solid var(--line); }
.method-questions > div:last-child { border-right: 0; }
.method-questions span { color: var(--orange); font-size: 13px; font-weight: 800; }
.method-questions h3 { margin: 8px 0 6px; font-size: 17px; }
.method-questions p { margin: 0; color: var(--muted); font-size: 13px; }

.results-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(390px, 0.9fr);
  gap: 52px;
  align-items: start;
}

.result-tables { display: grid; gap: 34px; }
.result-tables h3 { margin: 0 0 10px; font-size: 18px; }

table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
th { color: #4e626b; background: #e9eeed; font-weight: 750; }
.table-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.evidence-row {
  display: grid;
  grid-template-columns: repeat(3, 0.55fr) 1.35fr;
  margin-top: 26px;
  border: 1px solid var(--line);
}

.evidence-row > div,
.evidence-row > p { margin: 0; padding: 23px; border-right: 1px solid var(--line); }
.evidence-row > p { border-right: 0; color: var(--muted); font-size: 13px; }
.evidence-row small { display: block; color: var(--muted); font-weight: 700; }
.evidence-row strong { display: block; margin-top: 8px; font-size: 31px; line-height: 1; }
.evidence-row span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }

.control-section { color: #fff; background: var(--ink); }
.control-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(430px, 1.15fr);
  gap: 76px;
  align-items: center;
}

.section-label--light { color: #9db2bb; }
.control-layout > div > p:not(.section-label):not(.control-conclusion) { color: #c7d0d4; }
.control-conclusion { margin-top: 26px; padding-top: 20px; color: #fff; border-top: 1px solid #526068; font-weight: 700; }
.figure-button--control { background: #fff; border-color: #526068; }
.control-section figcaption { color: #aebbc1; }

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video-grid figure { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.video-grid video { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #10171b; }
.video-grid figcaption { min-height: 58px; margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }

.takeaway-section { padding-block: 92px; text-align: center; border-block: 1px solid var(--line); }
.takeaway-section h2 { font-size: 41px; }
.takeaway-section p:last-child { margin: 24px 0 0; color: var(--muted); font-size: 17px; }

.publication-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 62px;
  align-items: start;
}

.resource-links { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.resource-links li { border-bottom: 1px solid var(--line); }
.resource-links a,
.resource-pending { display: flex; justify-content: space-between; gap: 18px; padding: 13px 2px; text-decoration: none; }
.resource-links a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.resource-links span { color: var(--muted); font-size: 12px; text-align: right; }

.bibtex { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.bibtex__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.bibtex h3 { margin: 0; font-size: 17px; }
.bibtex button {
  min-width: 64px;
  min-height: 34px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.bibtex pre { max-width: 100%; margin: 0; overflow-x: auto; color: #34454d; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }

footer { padding-block: 28px; color: #c7d0d4; background: #10171b; }
footer .page-width { display: flex; justify-content: space-between; gap: 24px; }
footer p { margin: 0; font-size: 12px; }
footer a { color: #fff; }

.lightbox {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 42px 20px 20px;
  overflow: auto;
  background: #fff;
  border: 1px solid #4f5d64;
  border-radius: 6px;
}
.lightbox::backdrop { background: rgba(5, 9, 12, 0.86); }
.lightbox img { width: 100%; height: auto; }
.lightbox__close {
  position: absolute;
  top: 7px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 940px) {
  .paper-hero h1 { font-size: 48px; }
  .paper-hero__content::before { right: 14%; }
  .results-layout,
  .control-layout,
  .publication-layout { grid-template-columns: 1fr; gap: 42px; }
  .method-questions { grid-template-columns: repeat(2, 1fr); }
  .method-questions > div:nth-child(2) { border-right: 0; }
  .method-questions > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evidence-row { grid-template-columns: repeat(3, 1fr); }
  .evidence-row > p { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .page-width,
  .content-width,
  .text-width { width: min(calc(100% - 28px), var(--content)); }
  .paper-nav { min-height: 54px; padding-inline: 14px; }
  .paper-nav__title { display: none; }
  .paper-nav nav { width: 100%; justify-content: space-between; gap: 12px; overflow-x: auto; }
  .paper-nav nav a { font-size: 11px; }
  .paper-hero { min-height: 78svh; padding-top: 54px; }
  .paper-hero__media { object-position: center; opacity: 0.64; }
  .paper-hero__shade { background: rgba(10, 15, 18, 0.64); }
  .paper-hero__content { padding-block: 58px 48px; }
  .paper-hero__content::before { display: none; }
  .paper-hero h1 { font-size: 35px; }
  .paper-hero__subtitle { font-size: 18px; }
  .authors { font-size: 16px; }
  .paper-hero__caption { right: 14px; }
  .paper-section { padding-block: 66px; }
  .paper-section h2,
  .takeaway-section h2 { font-size: 31px; }
  .section-intro { grid-template-columns: 1fr; gap: 14px; margin-bottom: 28px; }
  #abstract p:not(.section-label) { font-size: 16px; }
  .method-questions { grid-template-columns: 1fr; }
  .method-questions > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .method-questions > div:last-child { border-bottom: 0; }
  .evidence-row { grid-template-columns: 1fr; }
  .evidence-row > div,
  .evidence-row > p { border-right: 0; border-bottom: 1px solid var(--line); }
  .evidence-row > p { grid-column: auto; border-bottom: 0; }
  .video-grid { grid-template-columns: 1fr; }
  .takeaway-section { padding-block: 68px; }
  footer .page-width { flex-direction: column; gap: 6px; }
}

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