:root {
  --bg: #000000;
  --bg-elev: #000000;
  --ink: #ffffff;
  --muted: #d6deea;
  --line: #1f2a39;
  --line-strong: #2f3f56;
  --blue: #ffb36b;
  --blue-dark: #c95a0a;
  --panel: #0d131d;
  --panel-2: #0b111a;
  --note-bg: #19140b;
  --note-ink: #f3d88f;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans", sans-serif;
  background: #000000;
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.95em;
  background: #121a26;
  color: #ffd5ae;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.04rem 0.3rem;
}

.section {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2.4rem 0;
}

#videos.section {
  width: min(1380px, 95vw);
}

.hero {
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 1.8rem;
  position: relative;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.95rem, 5vw, 3.1rem);
  max-width: 26ch;
  margin: 0 auto;
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin-bottom: 0.9rem;
  text-align: center;
}

h3 {
  font-size: 1.2rem;
  margin: 1.4rem 0 0.85rem;
  text-align: center;
}

h3.tight {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  text-align: left;
}

h4.stage-title {
  margin: 1.1rem 0 0.5rem;
  color: #dce8ff;
  font-size: 1rem;
  text-align: left;
}

p {
  margin: 0;
  color: var(--muted);
}

.body {
  color: var(--muted);
  font-size: 0.99rem;
}

.venue {
  margin-top: 0.85rem;
  font-weight: 600;
}

.authors {
  margin: 1rem auto 0;
  max-width: 85ch;
  color: var(--ink);
  font-size: 1.02rem;
}

.authors a {
  color: var(--blue);
}

.affiliations {
  margin-top: 0.5rem;
  font-size: 0.96rem;
}

.hero-logos {
  position: absolute;
  right: 0;
  top: 6.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.85rem;
}

.hero-logos a {
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 160ms ease, transform 160ms ease;
}

.hero-logos a:hover {
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-logos img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  max-width: min(18vw, 170px);
}

.actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.54rem 0.9rem;
  font-size: 0.94rem;
  color: var(--ink);
  background: #0c121c;
  transition: transform 160ms ease, background-color 160ms ease,
    border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #8a4f2f;
  background: #121b29;
  text-decoration: none;
}

.btn-solid {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.btn-solid:hover {
  background: #e06b14;
  border-color: #e06b14;
}

.lead {
  margin: 1.2rem auto 0;
  max-width: 90ch;
  color: var(--muted);
}

.abstract {
  max-width: 92ch;
  margin: 0 auto;
  text-align: left;
}

.centered-note {
  margin-top: 0.8rem;
  text-align: center;
}

.subtle {
  color: #c6d1e2;
  font-size: 0.92rem;
}

.bullets {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.bullets li {
  margin: 0.4rem 0;
}

.two-col {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
  margin-top: 0.6rem;
}

#overview .two-col {
  grid-template-columns: 0.75fr 1.25fr;
  align-items: start;
  gap: 1.6rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.cards {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.cards.three {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.9rem;
}

.card-title {
  text-align: left;
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.figure {
  margin: 0.9rem 0 0;
}

.figure.compact {
  margin-top: 0;
}

.figure-media {
  aspect-ratio: 16 / 9;
}

#overview .figure {
  margin-top: 0;
}

#overview .figure-media {
  aspect-ratio: auto;
  min-height: 0;
  padding: 0.25rem;
}

.media {
  border: 1px dashed #506786;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #111a28 0%, #0c121c 100%);
  color: #a7bbd8;
  font-weight: 600;
  overflow: hidden;
}

.figure-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#overview .figure-media img {
  width: 100%;
  height: auto;
  max-height: 700px;
  object-fit: contain;
  object-position: center;
}

#method .figure {
  margin-top: 1rem;
}

#method .figure-media {
  aspect-ratio: auto;
  min-height: 0;
  padding: 0.25rem;
}

#method .figure-media img {
  width: 100%;
  height: auto;
  max-width: 88%;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
}

#results .results-paired {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.2rem;
  align-items: start;
  margin-top: 0.6rem;
}

#results .result-text .tight {
  margin-top: 0;
}

#results .result-figure {
  margin: 0;
}

#results .result-figure .figure-media img {
  width: 95%;
  height: auto;
  margin: 0 auto;
}

.placeholder {
  padding: 1rem;
  text-align: center;
}

.placeholder .subtle {
  margin-top: 0.35rem;
}

figcaption {
  margin-top: 0.45rem;
  color: #d0daea;
  font-size: 0.92rem;
  text-align: center;
}

.video-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.video-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-grid.four {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-grid.five {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.6rem;
}

.video-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #223248;
  background: var(--panel-2);
}

video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0b1119;
}

.video-wrap .placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.video-card p {
  margin-top: 0.5rem;
  font-size: 0.89rem;
}

.video-status-dummy {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.36rem;
  border: 1px dashed #8a4f2f;
  border-radius: 6px;
  color: #ffd5ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.cube-flow,
.scissors-flow {
  max-width: 900px;
  margin: 0.9rem auto 0;
}

.cube-step,
.scissors-step {
  max-width: 760px;
  margin: 0 auto;
}

.flow-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  margin: 0.6rem auto;
  border: 1px solid #8a4f2f;
  background: #1a130b;
  color: #ffb36b;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.video-spoiler {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a1019;
  padding: 0.55rem 0.7rem 0.8rem;
}

.video-spoiler[open] {
  background: #0b121d;
}

.spoiler-summary {
  cursor: pointer;
  color: #ffd5ae;
  font-weight: 600;
  list-style: none;
  user-select: none;
  padding: 0.2rem 0.15rem 0.25rem;
}

.spoiler-summary::-webkit-details-marker {
  display: none;
}

.spoiler-summary::before {
  content: "▸ ";
  color: #ffb36b;
}

.video-spoiler[open] .spoiler-summary::before {
  content: "▾ ";
}

.stage-switcher {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 0.7rem;
}

.stage-btn {
  border: 1px solid #8a4f2f;
  background: #130e08;
  color: #ffd5ae;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease,
    transform 160ms ease;
}

.stage-btn:hover {
  transform: translateY(-1px);
  border-color: #bf6f3e;
  background: #1a120b;
}

.stage-btn.is-active {
  border-color: #e06b14;
  background: #c95a0a;
  color: #fff;
}

.stage-panel {
  display: none;
}

.stage-panel.is-active {
  display: block;
}

.note {
  margin-top: 0.85rem;
  border: 1px solid #4f3f20;
  background: var(--note-bg);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  color: var(--note-ink);
}

.table-wrap {
  margin-top: 1rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0a1019;
}

.results-table th,
.results-table td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}

.results-table th {
  background: #111926;
  color: var(--ink);
  font-weight: 700;
}

.results-table tr:last-child td {
  border-bottom: 0;
}

pre {
  margin: 0 auto;
  max-width: 900px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b111a;
  padding: 0.95rem;
  overflow-x: auto;
  color: #c4d7f4;
  line-height: 1.45;
}

#copyBibtex {
  display: block;
  margin: 0.75rem auto 0;
  cursor: pointer;
}

.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding-top: 1.4rem;
  padding-bottom: 2.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .video-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  #results .results-paired {
    grid-template-columns: 1fr;
  }

  #results .result-figure .figure-media img {
    width: 100%;
  }

  #overview .figure-media {
    max-height: none;
  }

  #method .figure-media img {
    max-width: 100%;
    max-height: 440px;
  }
}

@media (max-width: 960px) {
  .video-grid.three,
  .video-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  .section {
    padding: 1.8rem 0;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero-logos {
    position: static;
    margin-top: 0.9rem;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-logos img {
    height: 30px;
    max-width: min(38vw, 150px);
  }

  .video-grid.three,
  .video-grid.four,
  .video-grid.five {
    grid-template-columns: 1fr;
  }

  .stage-switcher {
    gap: 0.45rem;
  }

  .stage-btn {
    font-size: 0.86rem;
    padding: 0.42rem 0.78rem;
  }

  h3.tight,
  h4.stage-title {
    text-align: center;
  }
}

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