:root {
  --ink: #102033;
  --ink-soft: #4d5f73;
  --muted: #728197;
  --blue: #0f6fff;
  --blue-dark: #0648aa;
  --aqua: #18b7c8;
  --coral: #f43f5e;
  --gold: #ffb703;
  --green: #0e8f68;
  --sand: #f7efe0;
  --paper: #ffffff;
  --mist: #f2f7fb;
  --line: #dbe6f1;
  --shadow: 0 22px 70px rgba(16, 32, 51, 0.12);
  --radius: 22px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(24, 183, 200, 0.22), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(15, 111, 255, 0.16), transparent 30rem),
    linear-gradient(180deg, #f9fcff 0%, #f5f9f6 48%, #ffffff 100%);
  font-family: "Sora", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  isolation: isolate;
}

.ambient-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(15, 111, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 111, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 18%, black, transparent 70%);
  opacity: 0.55;
  animation: fieldDrift 18s linear infinite;
}

.nav,
main,
.footer {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-bottom: 1px solid rgba(219, 230, 241, 0.85);
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-logo {
  color: var(--blue-dark);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.nav-links a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

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

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

section {
  padding: 82px 24px;
}

.alt {
  background:
    linear-gradient(135deg, rgba(15, 111, 255, 0.045), rgba(24, 183, 200, 0.055)),
    var(--mist);
}

.section-inner {
  width: min(880px, 100%);
  margin: 0 auto;
}

.section-inner.wide {
  width: min(var(--max), 100%);
}

.section-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 24px 84px;
  border-bottom: 1px solid var(--line);

  background-image: url('./samples/mosaic.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .9);
  content: "";
  opacity: 1;
} 

.hero::after {
  position: absolute;
  right: -8rem;
  bottom: -12rem;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 183, 200, 0.26), transparent 64%);
  content: "";
}

.hero-orbit {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.78;
  animation: floatOrb 7s ease-in-out infinite;
}

.orb-a {
  top: 18%;
  left: 8%;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(15, 111, 255, 0.22);
  background: radial-gradient(circle, rgba(15, 111, 255, 0.2), transparent 64%);
}

.orb-b {
  right: 14%;
  top: 22%;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(24, 183, 200, 0.26);
  background: radial-gradient(circle, rgba(24, 183, 200, 0.22), transparent 62%);
  animation-delay: -2.4s;
}

.orb-c {
  right: 30%;
  bottom: 13%;
  width: 44px;
  height: 44px;
  background: var(--gold);
  box-shadow: 0 0 46px rgba(255, 183, 3, 0.45);
  opacity: 0.35;
  animation-delay: -4s;
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  max-width: 1040px;
  margin: 0 auto;
  font-size: clamp(2.75rem, 6.5vw, 6rem);
}

.hero-subtitle {
  max-width: 820px;
  margin: 26px auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  font-weight: 500;
}

.signal-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.signal-badges a {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 111, 255, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(15, 111, 255, 0.11);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-badges a:first-child {
  color: #3f2a00;
  border-color: rgba(255, 183, 3, 0.34);
  background: linear-gradient(135deg, rgba(255, 225, 128, 0.92), rgba(255, 255, 255, 0.74));
}

.hero-radar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid rgba(15, 111, 255, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 50px rgba(15, 111, 255, 0.11);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-radar i {
  position: relative;
  width: 52px;
  height: 2px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 111, 255, 0.18);
}

.hero-radar i::after {
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--aqua), var(--blue));
  content: "";
  animation: signalRun 1.8s ease-in-out infinite;
}

.authors {
  max-width: 860px;
  margin: 24px auto 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.authors span {
  display: inline-flex;
  margin: 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 34px 0 0;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.06);
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button.primary {
  border-color: var(--blue);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--aqua));
}

.button:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(15, 111, 255, 0.14);
  text-decoration: none;
  transform: translateY(-2px);
}

.resource-button {
  padding: 0 18px 0 10px;
}

.resource-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.resource-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.arxiv-icon {
  width: 44px;
  flex-basis: 44px;
  color: #fff;
  background: #b31b1b;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
}

.github-icon {
  color: #fff;
  background: #111827;
}

.hf-icon {
  color: #4a2d00;
  background: linear-gradient(135deg, #ffd86b, #ffad33);
}

.challenge-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--aqua));
}

.workshop-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), #193b8c);
}

.pdf-icon {
  color: #123047;
  background: #d9edf8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 960px;
  margin: 44px auto 0;
}

.hero-stats div,
.tldr-card,
.paper-figure,
.method-steps article,
.explorer-card,
.map-card,
.result-table-card,
.stat-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.hero-stats div {
  padding: 22px 18px;
}

.hero-stats div,
.tldr-card,
.paper-figure,
.method-steps article,
.explorer-card,
.map-card,
.result-table-card,
.result-takeaways li,
.stat-grid div {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-stats div:hover,
.tldr-card:hover,
.paper-figure:hover,
.method-steps article:hover,
.explorer-card:hover,
.map-card:hover,
.result-table-card:hover,
.result-takeaways li:hover,
.stat-grid div:hover {
  border-color: rgba(15, 111, 255, 0.28);
  box-shadow: 0 30px 90px rgba(16, 32, 51, 0.16);
  transform: translateY(-4px);
}

.hero-stats strong,
.stat-grid strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.72rem;
  line-height: 1;
}

.hero-stats span,
.stat-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tldr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tldr-card {
  display: flex;
  gap: 14px;
  padding: 22px;
}

.tldr-card span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.tldr-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.prose {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 18px;
}

/* ── Model & Demo two-column layout ─────────────────────────────────────── */
/* Desktop: figure left, explorer right                                      */
.model-demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: stretch; /* ← change from start */
}

/* The method-layout wrapper inside the grid cell */
.model-demo-layout .method-layout {
  grid-column: 1;
  grid-row: 1;
}  

.model-demo-layout .method-layout,
.model-demo-layout .paper-figure {
  height: 100%;
}

/* Explorer card always fills its column height */
.model-demo-layout .explorer-card {
  grid-column: 2;
  grid-row: 1;
  height: 100%;
  min-height: 560px;
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
}

/* ── end Model & Demo layout ─────────────────────────────────────────────── */

.method-layout,
.dataset-grid,
.demo-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.method-layout {
  grid-template-columns: 1fr;
}

.paper-figure {
  overflow: hidden;
  margin: 0;
}

.paper-figure img {
  width: 100%;
  background: #fff;
}

.framework-figure {
  max-width: 1180px;
  width: 100%;        /* ← this is what was added */
  justify-self: center;
}

.framework-figure img {
  max-height: 600px;
  width: 100%;
  max-width: 600px;
  object-fit: contain;
  padding: clamp(24px, 4vw, 56px);
  display: block;
  margin-inline: auto;  /* centers the element horizontally */
}
.paper-figure figcaption {
  border-top: 1px solid var(--line);
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.method-steps article {
  padding: 20px;
}

.method-steps span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.method-steps h3 {
  margin-top: 12px;
  font-size: 1rem;
}

.method-steps p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dataset-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
}

.dataset-grid .paper-figure img {
  max-height: 600px;
  width: 100%;
  max-width: 600px;
  object-fit: contain;
  padding: clamp(12px, 4vw, 24px);
  display: block;
  margin-inline: auto;  /* centers the element horizontally */
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-grid div {
  padding: 20px;
}

.demo-intro,
.results-lead {
  max-width: 900px;
  margin: -8px 0 24px;
  color: var(--ink-soft);
}

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.demo-metrics div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 111, 255, 0.16);
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(16, 32, 51, 0.08);
}

.demo-metrics div::after {
  position: absolute;
  inset: auto -20% -72% 24%;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(24, 183, 200, 0.28), transparent 62%);
  content: "";
}

.demo-metrics strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.52rem;
  line-height: 1;
}

.demo-metrics span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.demo-shell {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.demo-shell > * {
  min-width: 0;
}

.map-card {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  height: 100%;
  background: #e9f5fb;
}

#zf-map {
  position: absolute;
  inset: 0;
}

.map-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.map-style {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink-soft);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.map-style.active {
  color: #fff;
  background: var(--blue);
}

.map-reset {
  color: var(--blue-dark);
  background: rgba(15, 111, 255, 0.09);
}

.map-marker {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  padding: 0;
  background: #f43f5e;
  box-shadow: 0 0 0 5px rgba(244, 63, 94, 0.24), 0 8px 18px rgba(16, 32, 51, 0.24);
  appearance: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.map-marker::after {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(244, 63, 94, 0.34);
  border-radius: inherit;
  content: "";
  opacity: 0;
  animation: markerPulse 2.6s ease-out infinite;
}

.map-marker:hover,
.map-marker.active {
  transform: scale(1.45);
  box-shadow: 0 0 0 8px rgba(244, 63, 94, 0.26), 0 12px 26px rgba(16, 32, 51, 0.32);
}

.map-fallback {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 6;
  border: 1px solid rgba(15, 111, 255, 0.24);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  font-weight: 700;
}

.explorer-card {
  display: flex;
  min-height: 670px;
  height: 100%;
  flex-direction: column;
  padding: 20px;
}

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

.selector-grid .selector-full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-transform: none;
}

.sample-meta {
  margin: 18px 0 14px;
  border-left: 4px solid var(--aqua);
  padding-left: 14px;
}

.meta-label {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sample-meta h3 {
  font-size: 1.24rem;
}

.sample-meta p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.comparison {
  --reveal: 58%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(45deg, #dbe6f1 25%, transparent 25% 75%, #dbe6f1 75%),
    linear-gradient(45deg, #dbe6f1 25%, #eff5fb 25% 75%, #dbe6f1 75%);
  background-position: 0 0, 8px 8px;
  background-size: 16px 16px;
}

.comparison::before {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(16, 32, 51, 0.46);
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.18);
  content: "Slide to compare";
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.base-image,
.overlay-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.overlay-image {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}

.comparison::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal);
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 32, 51, 0.15), 0 0 18px rgba(15, 111, 255, 0.45);
  content: "";
  transform: translateX(-1px);
}

.slider-row {
  border: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 14px;
  background: #fff;
}

.slider-row input[type="range"] {
  width: 100%;
  display: block;
}

.legend-row {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 10px 14px 14px;
  background: #fff;
}
 
.legend-row img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

input[type="range"] {
  accent-color: var(--blue);
}

.results-grid {
  display: grid;
  gap: 18px;
}

.result-takeaways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.result-takeaways li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.07);
}

.result-takeaways strong {
  color: var(--blue-dark);
}

.result-table-card {
  overflow-x: auto;
  padding: 0;
  /* max-width: 680px;
  margin-inline: auto;
  width: 100%; */
}

.result-table-card h3 {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
}

th:first-child,
/* td:first-child {
  text-align: left;
} */

th {
  color: var(--muted);
  background: var(--mist);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr.best td {
  color: var(--blue-dark);
  background: rgba(15, 111, 255, 0.065);
  font-weight: 800;
}

tbody tr {
  transition: background 160ms ease, transform 160ms ease;
}

tbody tr:hover td {
  background: rgba(24, 183, 200, 0.09);
}

.js-ready .reveal-target {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.js-ready .reveal-target.in-view {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .reveal-target.in-view:is(
  .hero-stats div,
  .tldr-card,
  .paper-figure,
  .method-steps article,
  .explorer-card,
  .map-card,
  .result-table-card,
  .result-takeaways li,
  .stat-grid div
):hover {
  transform: translateY(-4px);
}

.bibtex {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  padding: 22px;
  color: #24364d;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.7;
}

.copy-button {
  margin-top: 14px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 940px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  /* Mobile: stack vertically — explorer on top, figure below */
  .model-demo-layout {
    grid-template-columns: 1fr;
  }

  .model-demo-layout .explorer-card {
    grid-column: 1;
    grid-row: 1;   /* explorer comes first (top) */
    min-height: auto;
  }

  .model-demo-layout .method-layout {
    grid-column: 1;
    grid-row: 2;   /* figure comes second (bottom) */
  }

  .method-layout,
  .dataset-grid,
  .demo-shell {
    grid-template-columns: 1fr;
  }

  .map-card {
    min-height: 560px;
  }

  .explorer-card {
    min-height: auto;
  }

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

  .hero-stats,
  .tldr-grid,
  .demo-metrics,
  .result-takeaways,
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .framework-figure img {
    max-height: none;
    padding: clamp(12px, 3vw, 32px);
  }
  .dataset-grid .paper-figure img {
    max-height: none;
  }
}

@media (max-width: 620px) {
  section {
    padding: 58px 14px;
  }

  .hero {
    padding: 72px 14px 58px;
  }

  .selector-grid {
    grid-template-columns: 1fr;
  }

  .map-toolbar {
    right: 12px;
    left: 12px;
    justify-content: center;
  }

  .hero-radar {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }

  .hero-radar i {
    width: 100%;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.78rem;
  }
  .framework-figure img {
    max-height: none;
    padding: 10px;
  }

  .dataset-grid .paper-figure img {
    max-height: none;
  }
}

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

  .js-ready .reveal-target {
    opacity: 1;
    transform: none;
  }
}

@keyframes fieldDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 72px 72px, 72px 72px;
  }
}

@keyframes heroSweep {
  0%,
  100% {
    transform: translateX(-34%);
    opacity: 0.25;
  }
  48% {
    transform: translateX(22%);
    opacity: 0.78;
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(16px, -18px, 0) scale(1.06);
  }
}

@keyframes signalRun {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(240%);
  }
}

@keyframes markerPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.55);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.result-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.result-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 20px;
  color: var(--muted);
  background: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.result-tab.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.result-tab:hover:not(.active) {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.table-caption {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.6;
}

.cell-highlight {
  font-weight: 800;
  text-decoration: underline;
  color: var(--blue-dark);
}
