:root {
  --bg: #f8fbff;
  --paper: #ffffff;
  --ink: #071631;
  --muted: #53627a;
  --line: #d5dfef;
  --line-strong: #b7c7df;
  --blue: #1267ff;
  --blue-soft: #eaf3ff;
  --cyan: #11a9d8;
  --pink: #f52e83;
  --pink-soft: #fff0f6;
  --violet: #6b3ff2;
  --shadow: 0 18px 48px rgba(28, 57, 102, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(18, 103, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 103, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(20px, 5vw, 42px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 23px;
}

.brand-mark {
  width: 22px;
  height: 22px;
  background:
    radial-gradient(circle at 30% 30%, var(--pink) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 68%, var(--blue) 0 4px, transparent 5px),
    linear-gradient(135deg, rgba(18, 103, 255, 0.2), rgba(245, 46, 131, 0.2));
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--blue);
}

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 10px 22px rgba(7, 22, 49, 0.18);
}

.button.secondary {
  color: var(--blue);
  background: #fff;
  border-color: rgba(18, 103, 255, 0.55);
}

.button.large {
  min-height: 48px;
  padding: 0 21px;
}

.button:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--ink);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.74fr) minmax(620px, 1.26fr);
  gap: clamp(34px, 4.5vw, 62px);
  align-items: center;
  min-height: calc(100vh - 59px);
  padding: clamp(44px, 6vw, 72px) clamp(24px, 4.8vw, 44px) 42px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.94));
  border-bottom: 1px solid var(--line);
}

.conference {
  margin: 34px 0 0;
  color: var(--blue);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(76px, 8.8vw, 132px);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero h2 {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: clamp(24px, 2.15vw, 31px);
  line-height: 1.12;
  letter-spacing: 0;
}

.authors {
  max-width: 720px;
  margin: 30px 0 0;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 650;
}

.claim {
  max-width: 640px;
  margin: 34px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  font-weight: 850;
}

.abstract {
  position: relative;
  max-width: 620px;
  margin: 28px 0 0;
  padding-left: 20px;
  color: #314057;
  font-size: 18px;
  line-height: 1.85;
}

.abstract::before {
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  background: var(--blue);
  content: "";
}

.hero-actions {
  margin-top: 30px;
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.paper-figure {
  margin: 0;
  padding: 18px 18px 14px;
  background: #fff;
  border: 1px solid #cad8ef;
  border-radius: 8px;
  box-shadow: 0 22px 46px rgba(31, 71, 130, 0.14);
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.paper-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.pipeline-svg {
  display: none;
  width: 100%;
  filter: drop-shadow(0 22px 46px rgba(31, 71, 130, 0.14));
}

.svg-title {
  fill: var(--ink);
  font-size: 19px;
  font-weight: 750;
}

.svg-label,
.svg-muted {
  fill: #56667d;
  font-size: 15px;
  font-weight: 620;
}

.svg-blue {
  fill: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.svg-pink {
  fill: var(--pink);
  font-size: 16px;
  font-weight: 800;
}

.flow-blue,
.flow-pink,
.flow-dark {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.flow-blue {
  stroke: url(#blueLine);
}

.flow-pink {
  stroke: url(#pinkLine);
}

.flow-dark {
  stroke: #66738a;
}

.mini-spikes rect {
  fill: #fff;
  stroke: #91b8f6;
}

.mini-spikes path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
}

.mini-spikes.pink rect {
  stroke: #f6a6c6;
}

.mini-spikes.pink path {
  stroke: var(--pink);
}

.legend text {
  fill: #55657c;
  font-size: 12px;
  font-weight: 650;
}

section:not(.hero) {
  padding: clamp(34px, 4.5vw, 64px) clamp(24px, 4.8vw, 44px);
}

.section-heading {
  display: block;
  max-width: 1320px;
  margin: 0 auto 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.method {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 1320px;
  margin: 0 auto;
}

.method-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(210px, 0.62fr);
  gap: 24px;
  min-height: 330px;
  padding: clamp(24px, 3vw, 34px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.blue-panel {
  border-color: rgba(18, 103, 255, 0.45);
}

.pink-panel {
  border-color: rgba(245, 46, 131, 0.42);
}

.method-panel h3 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

.method-panel p {
  margin: 16px 0 0;
  color: #34445b;
  font-size: 16px;
  line-height: 1.7;
}

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

.method-panel li {
  position: relative;
  padding-left: 28px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.method-panel li::before {
  position: absolute;
  top: 2px;
  left: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 11px;
  content: "";
}

.pink-panel li::before {
  background: var(--pink);
}

.method-panel li::after {
  position: absolute;
  top: 7px;
  left: 5px;
  width: 8px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
  content: "";
}

.formula {
  align-self: stretch;
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pink-panel .formula {
  background: linear-gradient(180deg, #fff7fb, #fff);
}

.formula span {
  display: block;
  padding: 15px 14px;
  color: #24334a;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.results {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.score-table {
  max-width: 1320px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.score-row span {
  display: grid;
  min-height: 78px;
  place-items: center;
  padding: 14px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.score-row span:last-child {
  border-right: 0;
}

.score-row.labels span {
  color: var(--blue);
  background: linear-gradient(180deg, #f9fcff, #f2f7ff);
  font-size: 14px;
  font-weight: 850;
}

.score-row.values span {
  color: var(--blue);
  border-top: 1px solid var(--line);
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 850;
  letter-spacing: 0;
}

.score-table p {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 16px;
  font-weight: 650;
}

.encoding {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.encoding-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1320px;
  margin: 0 auto;
}

.encoding-grid article {
  min-height: 226px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(38, 68, 115, 0.08);
}

.encoding-grid svg {
  display: block;
  width: 100%;
  height: 92px;
  margin-bottom: 14px;
}

.encoding-grid svg path,
.encoding-grid svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.encoding-grid svg circle {
  fill: currentColor;
}

.encoding-grid article:nth-child(1) {
  color: var(--blue);
}

.encoding-grid article:nth-child(2) {
  color: var(--pink);
}

.encoding-grid article:nth-child(3) {
  color: #009b9a;
}

.encoding-grid article:nth-child(4) {
  color: var(--violet);
}

.encoding-grid h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 850;
}

.encoding-grid strong {
  display: block;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 0 !important;
  background: var(--line);
}

.detail-item {
  padding: clamp(26px, 4vw, 42px);
  background: #f8fbff;
}

.detail-item span {
  color: var(--pink);
  font-size: 14px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-item p {
  margin: 16px 0 0;
  color: #314057;
  font-size: 17px;
  line-height: 1.7;
}

.citation {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.bibtex {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.copy-button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

pre {
  margin: 0;
  padding: 34px 76px 34px 34px;
  overflow: auto;
  color: #1d2c44;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 56px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer div {
  display: flex;
  gap: 22px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

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

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .nav-links {
    position: fixed;
    top: 75px;
    right: 18px;
    display: none;
    width: min(320px, calc(100vw - 36px));
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
    gap: 14px;
  }

  .header-actions {
    justify-self: end;
  }

  .menu-button {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    max-width: 840px;
  }

  .method-grid,
  .encoding-grid,
  .details {
    grid-template-columns: 1fr;
  }

  .score-table {
    overflow-x: auto;
  }

  .score-row {
    min-width: 920px;
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .header-actions {
    display: none;
  }

  .hero {
    padding: 42px 16px 26px;
  }

  .hero h1 {
    font-size: clamp(58px, 18vw, 78px);
  }

  .hero h2 {
    font-size: 26px;
  }

  .authors,
  .claim,
  .abstract {
    font-size: 15px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button.large {
    width: 100%;
  }

  section:not(.hero) {
    padding: 46px 16px;
  }

  .section-heading,
  .method-panel {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 10px;
  }

  .method-panel {
    padding: 22px;
  }

  pre {
    padding: 72px 18px 24px;
    font-size: 12px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
