:root {
  color-scheme: light;
  --ink: #1d2528;
  --muted: #59666b;
  --line: #d9e0df;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #8a4cf6;
  --accent-dark: #6430bf;
  --blue: #5f4aa2;
  --green: #587d50;
  --shadow: 0 18px 48px rgba(34, 45, 50, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 750;
  text-decoration: none;
}

nav {
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.94rem;
}

nav a {
  text-decoration: none;
}

nav a:hover,
.authors a:hover,
.brand:hover,
footer a:hover {
  color: var(--accent-dark);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  min-height: auto;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 72px) clamp(34px, 5vw, 64px);
}

.hero-text {
  max-width: 780px;
}

.venue,
.kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.1rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.65rem, 2.6vw, 3rem);
}

h1 span {
  color: var(--accent);
}

.venue-line {
  margin: 18px 0 0;
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.text-accent {
  color: var(--accent);
  font-weight: 800;
}

.authors {
  margin: 24px 0 4px;
  color: #334247;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.authors a {
  text-decoration-color: rgba(138, 76, 246, 0.45);
  text-underline-offset: 0.18em;
}

.affiliation {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.equal {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.tldr-section {
  padding: clamp(22px, 4vw, 44px) clamp(18px, 5vw, 72px);
}

.tldr {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(138, 76, 246, 0.07);
  color: #354347;
}

.tldr h2 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.2;
  text-align: center;
}

.tldr p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.04rem, 1.45vw, 1.25rem);
  font-style: italic;
  line-height: 1.65;
  text-align: center;
}

.tldr .text-accent {
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--button-color, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--button-color, var(--panel)) 8%, #fff);
  color: var(--button-color, var(--ink));
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--button-color, #000) 12%, transparent);
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.78;
}

.button:nth-child(1) {
  --button-color: var(--accent);
}

.button:nth-child(2) {
  --button-color: var(--blue);
}

.hero-video,
.teaser-figure,
.visual figure {
  margin: 0;
}

.visual figure {
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.teaser-figure img,
.visual img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.teaser-figure img {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.visual img {
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  text-align: center;
}

.teaser-figure figcaption {
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.abstract-section {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
}

.abstract-copy {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px) clamp(22px, 5vw, 74px);
}

.abstract-copy::before {
  content: "";
  position: absolute;
  top: clamp(22px, 4vw, 42px);
  bottom: clamp(22px, 4vw, 42px);
  left: 0;
  width: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.abstract-copy h2 {
  color: var(--accent);
  text-align: center;
}

.abstract-copy p {
  margin: 0;
  margin-top: clamp(24px, 4vw, 44px);
  color: #354347;
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  text-align: center;
}

.results p {
  color: #39484c;
  font-size: 1.02rem;
}

.visual {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
}

.method-notes {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(34, 45, 50, 0.08);
}

.method-notes-compact {
  padding-top: clamp(16px, 2.5vw, 24px);
  padding-bottom: clamp(16px, 2.5vw, 24px);
  background: rgba(255, 255, 255, 0.74);
}

.method-notes h3 {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  text-align: center;
}

.method-notes ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-notes li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #354347;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.method-notes li > span:last-child {
  min-width: 0;
}

.section-heading {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.section-heading .kicker {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.section-heading h2 {
  max-width: 820px;
  margin: 0 auto;
  color: #334247;
  font-size: clamp(1.15rem, 1.8vw, 1.65rem);
  font-weight: 650;
  line-height: 1.3;
}

.method-subheading {
  margin-top: clamp(8px, 2vw, 18px);
}

.method-subheading .kicker {
  margin-bottom: 0;
}

.video-frame {
  margin: 0;
}

.video-crop {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  margin: -2.8% 0;
}

.results {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
  background: var(--paper);
}

.section-copy {
  max-width: 900px;
  margin: 0 auto;
  color: #354347;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.75;
  text-align: center;
}

.result-set {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.result-set + .result-set {
  margin-top: clamp(18px, 3vw, 36px);
}

.result-carousel {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(138, 76, 246, 0.35);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(95, 74, 162, 0.1);
}

.carousel-button:hover {
  border-color: var(--accent);
}

.carousel-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-counter {
  min-width: 58px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
  text-align: center;
}

.carousel-viewport {
  display: grid;
}

.carousel-viewport .result-gallery {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.carousel-viewport .result-gallery.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(138, 76, 246, 0.45);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.subsection-heading {
  display: grid;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.subsection-heading h3 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  font-weight: 800;
  text-align: center;
}

.subsection-heading p {
  margin: 0;
  color: #354347;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.65;
  text-align: center;
}

.result-gallery {
  margin: 0;
  padding: clamp(12px, 1.8vw, 20px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.prompt {
  margin: 0 0 14px;
  color: #334247;
  font-size: clamp(0.94rem, 1.15vw, 1.08rem);
  font-weight: 750;
}

.result-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

.citation {
  background: #f7f3ff;
  color: var(--ink);
}

.citation .kicker {
  color: var(--accent);
}

pre {
  margin: 26px 0 0;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid rgba(138, 76, 246, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #2e3440;
  font-size: 0.92rem;
  line-height: 1.55;
  box-shadow: 0 12px 34px rgba(95, 74, 162, 0.1);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

footer a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .abstract-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

}

@media (max-width: 560px) {
  nav {
    width: 100%;
    justify-content: space-between;
  }

  .abstract-copy {
    padding-left: 24px;
    padding-right: 0;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  footer {
    flex-direction: column;
  }
}
