:root {
  /* Palette inspired by the supplied Pacific Graphics 2026 artwork. */
  --pg-navy: #081824;
  --pg-mint: #00edb5;
  --pg-cyan: #00e4ef;
  --pg-yellow: #fff500;
  --pg-pink: #ff5099;
  --pg-violet: #6c64ff;
  --paper: #f3f8fa;
  --ink: #102937;
  --muted: #506875;
  --line: #cddfe5;
  --accent: #006b76;
  --accent-dark: #00515b;
  --card: #ffffff;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

::selection {
  color: var(--pg-navy);
  background: var(--pg-mint);
}

.shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 8px 12px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.hero {
  min-height: 620px;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 85% 12%, rgba(0, 228, 239, 0.17), transparent 48%),
    radial-gradient(ellipse at 9% 4%, rgba(108, 100, 255, 0.17), transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(0, 237, 181, 0.1), transparent 45%),
    var(--pg-navy);
}

.hero-content {
  display: flex;
  min-height: 620px;
  padding-block: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  color: var(--pg-yellow);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  width: 100%;
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 2.6vw, 2.45rem);
  line-height: 1.05;
  text-align: center;
}

.dek {
  width: 100%;
  max-width: 710px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.authors {
  display: flex;
  width: 100%;
  margin-bottom: 4px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.authors a:hover {
  color: var(--pg-mint);
}

.affiliation {
  width: 100%;
  margin-bottom: 30px;
  color: #a5bfcb;
}

.actions {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.button {
  min-width: 92px;
  padding: 10px 18px;
  border: 1px solid rgba(0, 228, 239, 0.5);
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover {
  background: rgba(0, 228, 239, 0.12);
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--pg-mint);
  color: var(--pg-navy);
  background: linear-gradient(110deg, var(--pg-mint), var(--pg-cyan));
  font-weight: 650;
}

.button-primary:hover {
  border-color: var(--pg-yellow);
  background: var(--pg-yellow);
}

.button:focus-visible,
.code-block button:focus-visible {
  outline: 2px solid var(--pg-yellow);
  outline-offset: 4px;
}

.media-panel {
  position: relative;
  padding: clamp(10px, 1.6vw, 20px);
  border: 1px solid rgba(8, 24, 36, 0.12);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(8, 24, 36, 0.08);
}

.visual {
  width: min(1184px, calc(100% - 32px));
  margin-top: -48px;
  isolation: isolate;
}

.media-panel::after {
  position: absolute;
  top: -1px;
  right: 14%;
  left: 14%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    transparent,
    var(--pg-pink) 18%,
    var(--pg-cyan) 42%,
    var(--pg-mint) 65%,
    var(--pg-yellow) 82%,
    transparent
  );
  content: "";
}

.teaser-image {
  display: block;
  width: 100%;
  height: auto;
  transform: translateZ(0);
}

.caption {
  max-width: 920px;
  margin: 14px auto 2px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.math-inline,
var {
  white-space: nowrap;
}

.section {
  position: relative;
  display: grid;
  padding-block: 64px;
  row-gap: 0;
  grid-template-columns: minmax(0, 1fr);
}

.section::after {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: min(86%, 960px);
  height: 5px;
  background:
    radial-gradient(circle, var(--accent) 0 2px, transparent 2.5px),
    linear-gradient(
      to right,
      transparent,
      rgba(108, 100, 255, 0.28) 22%,
      rgba(0, 107, 118, 0.4) 50%,
      rgba(0, 237, 181, 0.4) 78%,
      transparent
    );
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 100% 1px;
  content: "";
  transform: translateX(-50%);
}

.section > div {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

.prose p,
.section-intro {
  max-width: 920px;
  margin-inline: auto;
  color: #304b5a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  hyphens: auto;
  text-align: justify;
  text-justify: inter-word;
}

.process {
  margin-top: 28px;
}

.process-preparation {
  position: relative;
  display: grid;
  width: min(680px, 100%);
  margin-inline: auto;
  padding: 22px 26px;
  border: 1px solid rgba(0, 107, 118, 0.24);
  border-radius: 14px;
  background: linear-gradient(120deg, #dffaf2, #edfafd 55%, var(--card));
  box-shadow: 0 10px 28px rgba(8, 24, 36, 0.06);
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.process-preparation::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 22px;
  background: linear-gradient(rgba(0, 107, 118, 0.55), rgba(0, 107, 118, 0.12));
  content: "";
}

.preparation-meta {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 7px;
}

.preparation-meta strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preparation-meta span {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(0, 107, 118, 0.38);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-preparation > div:last-child {
  padding-left: 24px;
  border-left: 1px solid rgba(0, 107, 118, 0.2);
}

.process-preparation h3 {
  margin-bottom: 3px;
  font-size: 1.12rem;
}

.workflow-label {
  display: flex;
  margin: 36px 0 0;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  gap: 14px;
}

.workflow-label::before,
.workflow-label::after {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 107, 118, 0.34));
  content: "";
  flex: 1;
}

.workflow-label::after {
  background: linear-gradient(to left, transparent, rgba(0, 107, 118, 0.34));
}

.process-steps {
  display: grid;
  width: min(1020px, 100%);
  margin: 32px auto 0;
  gap: 26px;
  grid-template-columns: repeat(3, 1fr);
}

.process-steps article {
  position: relative;
  padding: 20px 22px;
  border: 1px solid rgba(8, 24, 36, 0.12);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(8, 24, 36, 0.045);
}

.process-steps span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 0;
  place-items: center;
  border: 1px solid rgba(0, 107, 118, 0.4);
  border-radius: 50%;
  color: var(--accent);
  background: #e2faf3;
  font-size: 0.8rem;
  font-weight: 750;
}

.process h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.process-steps header {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 12px;
}

.process-steps header h3 {
  margin: 0;
}

.process p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.paper-figure {
  margin: 36px 0 0;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: white;
}

.pipeline-figure img {
  border: 0;
  background: transparent;
}

.paper-figure figcaption {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.pipeline-figure figcaption {
  max-width: 1280px;
  margin: 20px auto 4px;
  padding-inline: 8px;
  font-size: clamp(1rem, 1.15vw, 1.0625rem);
  line-height: 1.75;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.pipeline-figure figcaption .math-inline,
.pipeline-figure figcaption var {
  font-family: "Cambria Math", Cambria, "Times New Roman", serif;
}

.pipeline-figure figcaption sub,
.pipeline-figure figcaption sup {
  font-size: 0.75em;
  line-height: 0;
}

.pipeline-figure {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(1480px, calc(100vw - 32px));
  margin-top: 36px;
  margin-left: 0;
  transform: none;
}

#results {
  width: min(1280px, calc(100% - 40px));
}

.results-hint {
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.result-example {
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
}

.result-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.4;
}

.result-credit {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
}

.result-heading h3 {
  margin: 0;
  font-size: inherit;
  font-weight: 650;
}

.result-number {
  color: var(--accent);
  flex-shrink: 0;
  font-size: inherit;
  font-weight: 750;
  font-variant-numeric: lining-nums tabular-nums;
}

.result-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.result-layout figure {
  min-width: 0;
  margin: 0;
}

.result-layout figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-bottom: 9px;
  font-size: 1rem;
  font-weight: 700;
}

.result-playback {
  min-width: 0;
  grid-column: span 2;
}

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

.result-example--landscape .result-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.result-example--landscape .result-start {
  width: min(620px, 100%);
  justify-self: center;
}

.result-example--landscape .result-playback {
  grid-column: auto;
}

.result-image-stack,
.result-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--result-ratio);
  border: 1px solid rgba(8, 24, 36, 0.14);
  border-radius: 10px;
  background: #172c38;
}

.result-image-stack img,
.result-frame img,
.result-frame canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-frame canvas {
  visibility: hidden;
}

.frames-ready .result-frame canvas {
  visibility: visible;
}

.frames-ready .result-poster {
  visibility: hidden;
}

.result-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.result-legend span::before {
  display: inline-block;
  width: 20px;
  height: 3px;
  margin-right: 7px;
  background: #388e4e;
  content: '';
  vertical-align: middle;
}

.result-legend .legend-target::before {
  background: #d34539;
}

.result-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(8, 24, 36, 0.12);
  border-radius: 10px;
  background: var(--card);
}

.result-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  color: var(--pg-navy);
  background: linear-gradient(110deg, var(--pg-mint), var(--pg-cyan));
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.result-toggle:hover {
  background: var(--pg-yellow);
}

.result-toggle:focus-visible,
.result-controls input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.result-controls input {
  flex: 1;
  min-width: 0;
  height: 6px;
  margin: 14px 0;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(to right, var(--accent) var(--progress, 0%), var(--line) var(--progress, 0%));
  cursor: pointer;
}

.result-controls input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--card);
  border-radius: 50%;
  appearance: none;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 107, 118, 0.4);
}

.result-controls input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--accent);
}

.result-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-status {
  min-height: 1.4em;
  margin: 4px 0 0;
  color: var(--accent-dark);
  font-size: 0.75rem;
}

.code-block {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border-radius: 3px;
  color: #d6f8f1;
  background: var(--pg-navy);
}

.code-block pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
}

.code-block button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 237, 181, 0.4);
  border-radius: 4px;
  color: var(--pg-mint);
  background: rgba(0, 237, 181, 0.08);
  cursor: pointer;
}

footer {
  color: #a5bfcb;
  background: var(--pg-navy);
}

.footer-content {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-content p {
  margin: 0;
}

.footer-content a:hover {
  color: var(--pg-mint);
}

.footer-content div {
  display: flex;
  gap: 22px;
}

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

@media (max-width: 720px) {
  .hero,
  .hero-content {
    min-height: 600px;
  }

  .hero-content {
    padding-block: 42px;
  }

  h1 {
    max-width: 330px;
    overflow-wrap: anywhere;
    font-size: clamp(2.25rem, 10.5vw, 3.1rem);
  }

  .dek {
    max-width: 330px;
  }

  .authors {
    display: block;
  }

  .authors .author-name,
  .authors a {
    display: block;
    width: fit-content;
    margin: 5px auto;
  }

  .authors .separator {
    display: none;
  }

  .affiliation {
    max-width: 300px;
  }

  .actions {
    display: grid;
    max-width: 280px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual {
    width: calc(100% - 20px);
    margin-top: -22px;
    padding: 7px;
    border-radius: 9px;
  }

  .pipeline-figure {
    width: calc(100vw - 20px);
    padding: 7px;
    border-radius: 9px;
  }

  .caption {
    padding-inline: 8px;
  }

  .button {
    min-width: 0;
  }

  .section {
    padding-block: 52px;
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-preparation {
    padding: 18px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .process-preparation > div:last-child {
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid rgba(0, 107, 118, 0.2);
    border-left: 0;
  }

  .process-steps {
    margin-top: 28px;
    gap: 22px;
  }

  .process-steps article {
    min-height: 0;
  }

  .result-layout,
  .result-example--landscape .result-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .result-start {
    width: min(280px, 100%);
    justify-self: center;
  }

  .result-playback {
    grid-column: auto;
  }

  .result-views {
    gap: 10px;
  }

  .result-views figcaption {
    min-height: 2.8em;
    align-items: flex-end;
  }

  .result-controls {
    gap: 10px;
  }

  .result-toggle {
    min-width: 70px;
    min-height: 40px;
  }

  .footer-content {
    padding-block: 28px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}

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

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