:root {
  --bg: #0a1022;
  --bg-soft: #111b38;
  --card: rgba(17, 30, 60, 0.7);
  --line: rgba(191, 213, 255, 0.24);
  --text: #eef3ff;
  --muted: #b3c4e4;
  --accent: #6fd7ff;
  --accent-2: #ff84b5;
  --ours: #72e0ff;
  --shadow: 0 18px 42px rgba(4, 8, 18, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 14% 6%, rgba(255, 132, 181, 0.28), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(111, 215, 255, 0.3), transparent 34%),
    radial-gradient(circle at 55% 64%, rgba(133, 118, 255, 0.16), transparent 44%),
    linear-gradient(145deg, #0a1022 0%, #111c3a 42%, #0b1530 100%);
  color: var(--text);
  line-height: 1.65;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 24px 3.4vw 64px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: auto -10% -180px -10%;
  height: 320px;
  background: linear-gradient(90deg, rgba(255, 132, 181, 0.26), rgba(111, 215, 255, 0.25));
  filter: blur(56px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(214, 229, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 229, 250, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.36), transparent 78%);
  pointer-events: none;
}


.top-nav {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 24, 48, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-nav,
.card,
.btn,
.cell,
.copy-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.top-nav::before,
.card::before,
.btn::before,
.cell::before,
.copy-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(149, 205, 255, 0.26), rgba(255, 146, 204, 0.24));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.82;
}

.top-nav::after,
.card::after,
.btn::after,
.cell::after,
.copy-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 44%);
  pointer-events: none;
  opacity: 0.5;
}

.top-nav > *,
.card > *,
.btn > *,
.cell > * {
  position: relative;
  z-index: 1;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 9vh auto 0;
}

.tag {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(218, 232, 249, 0.32);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  margin: 14px 0 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.15;
  max-width: 1120px;
}

h1 span {
  display: block;
}

h1 .title-main {
  font-size: clamp(2.2rem, 5.35vw, 3.85rem);
  font-weight: 800;
  letter-spacing: 0.025em;
}

.word-short,
.word-long {
  position: relative;
  display: inline-block;
}

.word-short {
  color: transparent;
  background: linear-gradient(90deg, #6fd7ff 0%, #8b9bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 0.015em;
  animation: shortIn 0.5s ease-out both;
}

.word-long {
  color: transparent;
  background: linear-gradient(90deg, #ff6fb0 0%, #ff9f5f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 0.075em;
  animation: longIn 0.72s ease-out both;
}

.word-short::after,
.word-long::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.14em;
  height: 0.06em;
  border-radius: 999px;
  opacity: 0.85;
}

.word-short::after {
  width: 46%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #6fd7ff 0%, #8b9bff 100%);
}

.word-long::after {
  width: 100%;
  left: 0;
  transform: none;
  background: linear-gradient(90deg, #ff6fb0 0%, #ff9f5f 100%);
}

h1 .title-sub {
  margin-top: 18px;
  font-size: clamp(1.7rem, 3.3vw, 2.7rem);
  font-weight: 400;
  color: #cbdcf2;
  line-height: 1.22;
}

.authors {
  margin: 50px 0 0;
  font-size: clamp(0.95rem, 1.4vw, 1.35rem);
  color: #e0ecfb;
  line-height: 1.78;
  word-spacing: 0.14em;
  max-width: 980px;
}

.institutions {
  margin: 30px 0 0;
  font-size: clamp(0.88rem, 1.15vw, 1.1rem);
  color: #bfd1ea;
  line-height: 1.72;
  word-spacing: 0.22em;
}

.footnotes {
  margin: 28px 0 0;
  font-size: clamp(0.82rem, 1.02vw, 0.98rem);
  color: #a9c0dd;
  line-height: 1.55;
}

.cta-group {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(18, 37, 63, 0.52);
  padding: 10px 16px;
  border-radius: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 235, 255, 0.55);
}

.btn-primary {
  background: linear-gradient(120deg, rgba(255, 132, 181, 0.35), rgba(111, 215, 255, 0.32));
}


.section {
  width: min(1540px, 96.2vw);
  margin: 0 auto 78px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  text-align: center;
}

.section-index {
  margin: 0;
  color: #ffa4c8;
  font-family: "Space Grotesk", sans-serif;
}

h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2.2rem);
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.text-card,
.component-card,
.comparison-card,
.bibtex-wrap {
  padding: 22px;
}

.text-card p {
  margin: 0;
  font-size: clamp(1.03rem, 1.22vw, 1.16rem);
  line-height: 1.78;
}

.term-short {
  color: transparent;
  background: linear-gradient(90deg, #6fd7ff 0%, #8b9bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.term-long {
  color: transparent;
  background: linear-gradient(90deg, #ff6fb0 0%, #ff9f5f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.term-minutes {
  color: transparent;
  background: linear-gradient(90deg, #7bd8ff 0%, #ff8fc1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flex-grad {
  display: inline-block;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
}

.flex-f {
  background-image: linear-gradient(120deg, #ff6a7a 0%, #ff3f58 100%);
}

.flex-l {
  background-image: linear-gradient(120deg, #ffd061 0%, #ff7a4e 100%);
}

.flex-e {
  background-image: linear-gradient(120deg, #ff7bc7 0%, #b980ff 100%);
}

.flex-x {
  background-image: linear-gradient(120deg, #79d2ff 0%, #3f89ff 100%);
}

.component-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.component-card {
  transition:
    transform 0.26s ease,
    box-shadow 0.26s ease,
    border-color 0.26s ease,
    background 0.26s ease;
}

.component-card h3 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.26s ease, text-shadow 0.26s ease;
}

.feature-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55em;
  height: 1.55em;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(10, 18, 34, 0.24);
  font-size: 0.9em;
  font-weight: 700;
  color: #1f2c43;
  line-height: 1;
}

.component-card p {
  margin: 0;
  color: var(--muted);
  transition: color 0.26s ease;
}

.component-card:hover,
.component-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(196, 226, 255, 0.9);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 150, 203, 0.2), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(124, 214, 255, 0.22), transparent 46%),
    rgba(33, 56, 92, 0.95);
  box-shadow:
    0 26px 52px rgba(8, 14, 28, 0.52),
    0 0 0 1px rgba(189, 221, 255, 0.25) inset;
}

.component-card:hover::before,
.component-card:focus-within::before {
  opacity: 1;
}

.component-card:hover::after,
.component-card:focus-within::after {
  opacity: 0.78;
}

.component-card:hover h3,
.component-card:focus-within h3 {
  color: #ffffff;
  text-shadow: 0 0 16px rgba(152, 220, 255, 0.3);
}

.component-card:hover p,
.component-card:focus-within p {
  color: #eef5ff;
}

.results-block {
  margin-top: 26px;
}

.results-tagline {
  margin: -2px auto 18px;
  width: fit-content;
  position: relative;
  z-index: 2;
  isolation: isolate;
  text-align: center;
  padding: 4px 14px 6px;
  font-family: "Caveat", cursive;
  font-size: clamp(1.65rem, 3.1vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(
    106deg,
    #a892ff 0%,
    #e8a7ff 22%,
    #ff8bc7 46%,
    #ffb27f 72%,
    #fff08a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.4px rgba(248, 252, 255, 0.62);
  text-shadow: none;
  filter: saturate(1.18) brightness(1.08);
}

.hero-tagline {
  position: absolute;
  right: -4.2vw;
  top: 43vh;
  display: block;
  width: fit-content;
  margin: 0;
  font-size: clamp(1.95rem, 3.55vw, 2.7rem);
  transform: rotate(-15deg);
  transform-origin: 100% 50%;
  z-index: 1;
}

.results-tagline::before {
  content: "";
  position: absolute;
  left: -16px;
  right: -26px;
  top: 86%;
  height: 0.5em;
  z-index: -1;
  border-radius: 28px 46px 30px 52px;
  transform: translateY(-50%) rotate(-2.2deg);
  background:
    radial-gradient(120% 120% at 10% 46%, rgba(255, 174, 222, 0.58) 0 27%, transparent 29%),
    radial-gradient(120% 150% at 78% 48%, rgba(156, 221, 255, 0.58) 0 26%, transparent 28%),
    linear-gradient(90deg, rgba(255, 173, 217, 0.36), rgba(171, 226, 255, 0.36));
  clip-path: polygon(1% 58%, 5% 36%, 12% 29%, 20% 26%, 29% 24%, 41% 24%, 56% 25%, 70% 27%, 82% 30%, 91% 35%, 96% 42%, 99% 51%, 100% 59%, 98% 68%, 93% 76%, 84% 81%, 71% 84%, 56% 85%, 40% 84%, 27% 82%, 16% 78%, 8% 72%, 3% 64%);
  box-shadow:
    0 2px 12px rgba(151, 210, 255, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  filter: saturate(1.08);
  opacity: 0.7;
}

.results-tagline::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 88%;
  width: 120px;
  height: 0.28em;
  z-index: -1;
  transform: translateY(-50%) rotate(-4deg);
  background:
    repeating-linear-gradient(
      -8deg,
      rgba(188, 230, 255, 0.6) 0 3px,
      rgba(176, 223, 255, 0) 3px 7px
    );
  clip-path: polygon(0 56%, 18% 36%, 41% 28%, 62% 24%, 80% 23%, 94% 26%, 100% 35%, 97% 47%, 86% 56%, 68% 63%, 47% 69%, 24% 75%, 0 82%);
  opacity: 0.62;
}

.results-subtitle {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.results-note {
  margin: 6px 0 12px;
  color: var(--muted);
}

.matrix-card {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.matrix-card::before,
.matrix-card::after {
  content: none;
}

.matrix-shell {
  position: relative;
  overflow-x: auto;
  padding-top: 2px;
  padding-bottom: 2px;
}

.matrix-header,
.matrix-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 8px;
  min-width: 1100px;
}

.matrix-shell-60s .matrix-header,
.matrix-shell-60s .matrix-row {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  min-width: 900px;
}

.matrix-header {
  margin: 12px 0 8px;
  position: static;
}

.matrix-method {
  justify-self: center;
  border: none;
  border-radius: 0;
  padding: 0;
  font-weight: 600;
  font-size: 15px;
  color: #dbe8fb;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: center;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.matrix-method-ours {
  color: #a8e8ff;
  text-shadow:
    0 0 8px rgba(111, 215, 255, 0.34),
    0 0 18px rgba(111, 215, 255, 0.24);
  font-weight: 700;
}

.matrix-row {
  margin-top: 6px;
}

.matrix-row:first-of-type {
  margin-top: 0;
}

.matrix-category {
  margin: 24px auto 12px;
  width: fit-content;
  padding: 7px 20px;
  border: 2px solid rgba(224, 237, 255, 0.62);
  border-radius: 999px;
  background: rgba(31, 54, 88, 0.68);
  color: #f4f8ff;
  font-size: 17px;
  letter-spacing: 0.035em;
  font-weight: 800;
  text-transform: none;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(124, 188, 255, 0.2) inset,
    0 6px 16px rgba(10, 21, 38, 0.28);
}

.matrix-shell .matrix-category:first-child {
  margin-top: 8px;
}

.matrix-video {
  border: none;
  border-radius: 10px;
  padding: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.prompt-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 16px 14px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 77, 199, 0.56), rgba(124, 89, 255, 0.52) 46%, rgba(60, 180, 255, 0.5));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.26s ease, transform 0.26s ease;
  transition-delay: 0s;
  pointer-events: none;
}

.matrix-video-ours video {
  border-color: rgba(114, 224, 255, 0.78);
  box-shadow:
    0 0 0 1px rgba(114, 224, 255, 0.34) inset,
    0 0 16px rgba(114, 224, 255, 0.28);
}

.matrix-video-ours:hover video,
.matrix-video-ours:focus-within video {
  box-shadow:
    0 0 0 1px rgba(114, 224, 255, 0.48) inset,
    0 0 26px rgba(114, 224, 255, 0.4);
}

.matrix-video.show-prompt .prompt-overlay {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0s;
}

.comparison-card {
  margin-top: 12px;
}

.comparison-title {
  margin: 0 0 12px;
  color: #d6e8ff;
  font-weight: 600;
}

.comparison-grid {
  display: grid;
  gap: 10px;
}

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

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

.ultra-layout {
  margin-top: 10px;
}

.ultra-tag-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.ultra-tag {
  margin: 0;
  justify-self: center;
  padding: 5px 14px;
  border: 1px solid rgba(200, 226, 255, 0.45);
  border-radius: 999px;
  background: rgba(35, 66, 106, 0.45);
  color: #e7f1ff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ultra-method-row,
.ultra-video-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ultra-method-row {
  margin-bottom: 6px;
}

.ultra-method-row p {
  margin: 0;
  color: #d3e1f8;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.ultra-method-row .ours {
  color: #95e7ff;
  text-shadow: 0 0 10px rgba(111, 215, 255, 0.24);
}

.cell {
  border: 1px solid rgba(194, 216, 242, 0.2);
  border-radius: 12px;
  padding: 8px;
  background: rgba(13, 28, 48, 0.5);
}

.cell p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.cell.ours {
  border-color: rgba(114, 224, 255, 0.56);
  background: rgba(111, 215, 255, 0.15);
}

.cell.ours p {
  color: var(--ours);
  font-weight: 700;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #081426;
  border: 1px solid rgba(191, 214, 242, 0.24);
}

.bibtex-wrap {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(12, 28, 50, 0.74);
  color: var(--text);
  padding: 7px 10px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

pre {
  margin: 0;
  overflow-x: auto;
  background: rgba(10, 23, 41, 0.76);
  border-radius: 10px;
  padding: 18px;
}

.footer {
  text-align: center;
  color: #a8c0dd;
  padding: 20px 0 34px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@keyframes shortIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes longIn {
  0% {
    opacity: 0;
    transform: translateX(10px) scaleX(0.97);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .word-short,
  .word-long {
    animation: none;
  }
}

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

@media (max-width: 1024px) {
  .component-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    max-width: 1080px;
  }

  .hero-tagline {
    right: -0.2vw;
    top: 44vh;
    transform: rotate(-12deg);
  }

  .matrix-header,
  .matrix-row {
    grid-template-columns: repeat(5, minmax(185px, 1fr));
    min-width: 980px;
  }

  .matrix-shell-60s .matrix-header,
  .matrix-shell-60s .matrix-row {
    grid-template-columns: repeat(4, minmax(185px, 1fr));
    min-width: 790px;
  }

  .matrix-header {
    min-width: 980px;
  }

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

  .ultra-tag-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

@media (max-width: 720px) {
  .top-nav {
    border-radius: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero {
    min-height: auto;
    padding-bottom: 24px;
  }

  .hero-content {
    margin-top: 10vh;
  }

  .hero-tagline {
    position: static;
    margin: 0 auto 26px;
    transform: none;
  }

  .authors {
    margin-top: 22px;
  }

  .grid-5,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
