:root {
  --accent: #2e6686;
  --accent-dark: #183d59;
  --accent-soft: #e9f0f3;
  --navy: #172d43;
  --gold: #a37b42;
  --ink: #26323b;
  --muted: #69747d;
  --line: #d9dfe2;
  --surface: #f3f5f5;
  --warm-white: #fbfaf7;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 12px 34px rgba(28, 45, 58, 0.09);
  --display-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body-font: Inter, "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--warm-white);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.container {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid #d8d6cf;
  background: var(--warm-white);
  text-align: center;
}

.hero__inner {
  width: min(1500px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto 16px;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: clamp(1.55rem, 3.2vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.venue {
  margin: 0 0 22px;
  color: #687783;
  font-family: var(--display-font);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.3;
}

.title-accent {
  color: inherit;
}

.authors {
  display: flex;
  max-width: 940px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 0;
  color: #315b76;
  font-size: 1.02rem;
}

.authors span:not(:last-child)::after {
  content: "·";
  margin: 0 0.48rem;
  color: #b8aa91;
}

.authors a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.authors a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.authors a:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgba(46, 102, 134, 0.22);
  outline-offset: 3px;
}

.authors sup,
.author-notes sup {
  position: relative;
  top: -0.15em;
  margin-left: 0.12em;
  font-size: 0.7em;
  font-weight: 700;
}

.authors sup {
  margin-left: 0.24em;
}

.author-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 6px;
  column-gap: 34px;
  margin: 10px 0 0;
  color: #7a848b;
  font-size: 0.82rem;
  line-height: 1.4;
}

.author-notes span + span {
  margin-left: 8px;
}

.affiliation {
  margin: 8px 0 0;
  color: #68727a;
  font-size: 0.96rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 27px;
}

.paper-link {
  display: inline-flex;
  min-width: 108px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-size: 0.91rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.paper-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}

.paper-link:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(46, 102, 134, 0.27);
  outline-offset: 3px;
}

.paper-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.paper-link.is-placeholder {
  cursor: default;
}

.section {
  padding: 82px 0;
  background: var(--warm-white);
}

.section--first {
  padding-top: 72px;
}

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

.section-heading h2 {
  position: relative;
  margin: 2px 0 0;
  padding-bottom: 12px;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.section-heading h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #cfd5d9;
  content: "";
}

.media-frame,
.paper-figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid #d4dbdf;
  border-radius: var(--radius);
  background: #eef1f2;
}

.video-frame {
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  max-height: 680px;
  background: #111820;
}

.paper-figure img {
  width: 100%;
  height: auto;
}

.paper-figure--method {
  padding: 10px;
  background: var(--white);
}

.body-copy {
  width: 100%;
  max-width: none;
  margin: 27px auto 0;
  color: #46535c;
  font-size: 1.02rem;
  line-height: 1.8;
  text-align: justify;
}

.demo {
  overflow: hidden;
  border: 1px solid #d5dcdf;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.scene-picker {
  padding: 30px 30px 27px;
  border-bottom: 1px solid #dce1e3;
  background: var(--warm-white);
  text-align: center;
}

.control-label {
  margin: 0 0 4px;
  color: #75808a;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scene-name {
  margin: 0 0 18px;
  font-size: 1.3rem;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.3;
}

.map-carousel {
  display: grid;
  grid-template-columns: 48px minmax(0, 360px) 48px;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.carousel-button {
  display: inline-grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.carousel-button:hover {
  border-color: #9ab7c7;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.carousel-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.map-stage {
  display: flex;
  min-height: 310px;
  max-height: 390px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid #dfe4e5;
  border-radius: var(--radius);
  background-color: #f8f9f8;
  background-image: linear-gradient(#e9edef 1px, transparent 1px), linear-gradient(90deg, #e9edef 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
}

.scene-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.scene-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c8ced0;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

.scene-dot:hover {
  background: #8298a5;
}

.scene-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.mode-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 26px;
  background: #f0f3f3;
}

.mode-control .control-label {
  margin-bottom: 10px;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e4e9ea;
}

.mode-button {
  min-width: 235px;
  padding: 10px 20px;
  border: 0;
  border-radius: 7px;
  color: #59666f;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
}

.mode-button.is-active {
  color: var(--accent-dark);
  background: var(--white);
  box-shadow: 0 2px 7px rgba(31, 50, 60, 0.14);
}

.demo-content {
  padding: 36px;
}

.result-heading {
  margin: 0 0 15px;
  font-size: 1.03rem;
  color: var(--navy);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.observation-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.observation-button {
  position: relative;
  overflow: hidden;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #e9edef;
  cursor: pointer;
}

.observation-button::after {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #324353;
  background: rgba(255, 255, 255, 0.9);
  content: attr(data-number);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 22px;
  text-align: center;
}

.observation-button:hover {
  border-color: #9abfdf;
}

.observation-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(46, 102, 134, 0.11);
}

.observation-button img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  object-fit: contain;
  background: #e9edf0;
}

.selected-result {
  margin-top: 36px;
}

.result-stage {
  display: flex;
  max-width: 760px;
  min-height: 380px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f6f6;
}

.result-stage img {
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
}

.sequential-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.sequential-panel[hidden] {
  display: none;
}

.sequence-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sequence-card figcaption {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  background: var(--white);
  font-size: 0.91rem;
  font-weight: 680;
  text-align: center;
}

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

.sequence-card .sequence-labels {
  padding-inline: 0;
}

.sequence-labels span {
  padding-inline: 12px;
}

.sequence-labels span + span {
  border-left: 1px solid var(--line);
}

.sequence-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  background: white;
}

.sequence-note {
  grid-column: 1 / -1;
  margin: -6px 2px 0;
  color: #7a858c;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.bibtex-card {
  position: relative;
  overflow: auto;
  border: 1px solid #d3dadd;
  border-radius: var(--radius);
  background: #e9edef;
}

.bibtex-card pre {
  min-width: 760px;
  margin: 0;
  padding: 28px 92px 28px 28px;
  color: #23384a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 67px;
  padding: 7px 11px;
  border: 1px solid #cad4dd;
  border-radius: 7px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  border-color: #a6c5df;
  color: var(--accent-dark);
}

.site-footer {
  padding: 27px 0;
  color: #757d82;
  background: var(--warm-white);
  font-size: 0.83rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 28px, 1080px);
  }

  .hero {
    padding: 52px 0 45px;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
  }

  .venue {
    margin-bottom: 18px;
    font-size: 1.3rem;
  }

  .authors {
    font-size: 0.94rem;
  }

  .paper-link {
    min-width: 0;
    padding-inline: 14px;
  }

  .section,
  .section--first {
    padding: 58px 0;
  }

  .body-copy {
    text-align: left;
  }

  .scene-picker {
    padding: 25px 14px 23px;
  }

  .map-carousel {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
  }

  .carousel-button {
    width: 38px;
    height: 38px;
  }

  .map-stage {
    min-height: 250px;
    max-height: 330px;
    padding: 10px;
  }

  .map-stage img {
    max-height: 308px;
  }

  .mode-control {
    padding-inline: 12px;
  }

  .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-button {
    min-width: 0;
    padding: 10px 8px;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .demo-content {
    padding: 28px 16px;
  }

  .observation-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .result-stage {
    min-height: 220px;
    padding: 6px;
  }

  .sequential-panel {
    grid-template-columns: 1fr;
  }

  .bibtex-card pre {
    min-width: 0;
    padding: 58px 18px 22px;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 761px) {
  .hero h1 {
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .paper-links {
    max-width: 320px;
  }

  .paper-link {
    width: calc(50% - 5px);
  }

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
