/* ==========================================================================
   GenMentor project page — index.css
   Layered on Bulma 0.9.1. Design tokens first; the light palette is the
   default and the dark theme only redefines tokens (plus a handful of
   Bulma hardcodes that ignore inheritance).
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  --font-display: 'Manrope', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --bg: #ffffff;
  --bg-tint: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --line: #e5e8ef;
  --line-strong: #d2d7e1;
  --text-1: #1d2230;
  --text-2: #4a5164;
  --text-3: #5b6375;

  /* Brand: the logo's violet → blue gradient; blue is the working accent. */
  --brand-violet: #9333ea;
  --brand-blue: #3b82f6;
  --accent: #2563eb;            /* text, borders, icons on light surfaces */
  --accent-strong: #1d4ed8;
  --accent-fill: #2563eb;       /* filled controls, white label on top (5.2:1) */
  --on-accent: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-line: rgba(37, 99, 235, 0.30);

  --warn: #b45309;  --warn-soft: rgba(245, 158, 11, 0.16);
  --info: #2563eb;  --info-soft: rgba(59, 130, 246, 0.13);
  --ok: #047857;    --ok-soft: rgba(16, 185, 129, 0.16);
  --violet: #7e22ce; --violet-soft: rgba(147, 51, 234, 0.12);
  --warm: #c2410c;  --warm-soft: rgba(202, 89, 46, 0.14);   /* SocialCoach card chip */

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 28px rgba(16, 24, 40, 0.09);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --nav-h: 3.75rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

html[data-theme='dark'] {
  --bg: #15161a;
  --bg-tint: #1b1d23;
  --surface: #1f2127;
  --surface-2: #25272f;
  --line: #2c2f39;
  --line-strong: #3b3f4b;
  --text-1: #eceef3;
  --text-2: #c4c8d2;
  --text-3: #8f95a4;

  --brand-violet: #b57cff;
  --brand-blue: #6fa6ff;
  --accent: #8ab8fb;
  --accent-strong: #a9cbff;
  --accent-fill: #2563eb;
  --on-accent: #ffffff;
  --accent-soft: rgba(138, 184, 251, 0.13);
  --accent-line: rgba(138, 184, 251, 0.36);

  --warn: #f5c95c;  --warn-soft: rgba(245, 158, 11, 0.18);
  --info: #8ab8fb;  --info-soft: rgba(59, 130, 246, 0.18);
  --ok: #6fd6a3;    --ok-soft: rgba(16, 185, 129, 0.18);
  --violet: #c79bff; --violet-soft: rgba(147, 51, 234, 0.2);
  --warm: #f0a37f;  --warm-soft: rgba(202, 89, 46, 0.22);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-navbar-fixed-top {
  padding-top: var(--nav-h);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}

strong {
  color: var(--text-1);
}

img {
  max-width: 100%;
  height: auto;
}

.title {
  font-family: var(--font-display);
  color: var(--text-1);
  letter-spacing: 0;
}

.subtitle,
.content,
.content p,
.content li {
  color: var(--text-2);
}

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
  font-family: var(--font-display);
  color: var(--text-1);
}

section {
  scroll-margin-top: calc(var(--nav-h) + 0.5rem);
}

::selection {
  background: var(--accent-fill);
  color: #ffffff;
}

/* Focus: one visible ring everywhere, and no Bulma glow on buttons. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button:focus:not(:active),
.button.is-focused:not(:active) {
  box-shadow: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.skip-link:focus {
  top: calc(var(--nav-h) + 0.5rem);
}

/* Brand wordmark */
.gradient-text {
  background: linear-gradient(90deg, var(--brand-violet), var(--brand-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@supports not (background-clip: text) {
  .gradient-text {
    color: var(--brand-blue);
    -webkit-text-fill-color: currentColor;
  }
}

/* ---------- Navbar ---------- */

.site-nav {
  min-height: var(--nav-h);
  background-color: var(--bg);
  background-color: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.site-nav > .container {
  min-height: var(--nav-h);
}

.site-nav .navbar-brand,
.site-nav .navbar-menu {
  min-height: var(--nav-h);
}

.site-nav .navbar-brand > .navbar-item {
  gap: 0.55rem;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  max-height: none !important;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}

.site-nav .navbar-item,
.site-nav .navbar-link {
  color: var(--text-2);
  font-weight: 500;
}

.site-nav .navbar-start > .navbar-item {
  position: relative;
  margin: 0 0.1rem;
  transition: color 0.2s var(--ease);
}

.site-nav .navbar-start > .navbar-item::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.7rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}

.site-nav .navbar-start > .navbar-item:hover,
.site-nav .navbar-start > .navbar-item:focus,
.site-nav .navbar-start > .navbar-item.is-active {
  color: var(--accent);
  background-color: transparent;
}

.site-nav .navbar-start > .navbar-item.is-active::after {
  transform: scaleX(1);
}

.site-nav .navbar-start .icon {
  color: var(--text-3);
  margin-right: 0.35rem;
  transition: color 0.2s var(--ease);
}

.site-nav .navbar-start > .navbar-item:hover .icon,
.site-nav .navbar-start > .navbar-item.is-active .icon {
  color: var(--accent);
}

.site-nav .navbar-burger {
  color: var(--text-1);
  height: var(--nav-h);
  width: var(--nav-h);
}

.site-nav .navbar-burger:hover {
  background-color: var(--accent-soft);
}

.site-nav .navbar-end .buttons {
  gap: 0.5rem;
  margin-bottom: 0;
}

.site-nav .navbar-end .buttons .button {
  margin-bottom: 0;
}

.site-nav .button {
  font-weight: 600;
  border-radius: 999px;
}

.site-nav .button .icon {
  color: inherit;
}

@media screen and (max-width: 1023px) {
  .site-nav .navbar-menu {
    background-color: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0.75rem 0.75rem;
  }

  .site-nav .navbar-start > .navbar-item {
    border-radius: var(--radius-sm);
    margin: 0.1rem 0;
  }

  .site-nav .navbar-start > .navbar-item::after {
    display: none;
  }

  .site-nav .navbar-start > .navbar-item:hover,
  .site-nav .navbar-start > .navbar-item.is-active {
    background-color: var(--accent-soft);
  }

  .site-nav .navbar-end .navbar-item {
    padding-top: 0.75rem;
  }
}

/* 1024–1215px: the bar is too narrow for five iconed items plus three
   buttons. Use the full width, drop the menu icons and collapse the two
   secondary buttons to icon-only (their aria-labels carry the name). */
@media screen and (min-width: 1024px) and (max-width: 1215px) {
  .site-nav > .container {
    max-width: none;
    padding: 0 0.5rem;
  }

  .site-nav .navbar-start .icon {
    display: none;
  }

  .site-nav .navbar-start > .navbar-item {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .site-nav .navbar-end .button.is-icon-compact {
    width: 2.4rem;
    padding-left: 0;
    padding-right: 0;
  }

  .site-nav .navbar-end .button.is-icon-compact .icon {
    margin: 0 !important;
  }

  .site-nav .navbar-end .button.is-icon-compact > span:not(.icon) {
    display: none;
  }
}

/* Theme toggle: round ghost control, shows the icon of the theme you would
   switch TO (moon on light, sun on dark). */
.theme-toggle {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-soft);
}

.theme-toggle .icon {
  margin: 0 !important;
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
}

.theme-toggle .theme-icon-sun {
  display: none;
}

html[data-theme='dark'] .theme-toggle .theme-icon-sun {
  display: inline-flex;
}

html[data-theme='dark'] .theme-toggle .theme-icon-moon {
  display: none;
}

.navbar-theme-toggle {
  margin-left: auto;
  margin-right: 0.5rem;
  align-self: center;
  width: 2.25rem;
  height: 2.25rem;
}

/* ---------- Buttons ---------- */

.button.is-primary,
.button.is-primary:hover,
.button.is-primary:focus {
  background-color: var(--accent-fill);
  border-color: transparent;
  color: var(--on-accent);
}

.button.is-primary:hover {
  filter: brightness(0.94);
}

.button.is-ghost-pill {
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-1);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.button.is-ghost-pill:hover,
.button.is-ghost-pill:focus {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* ---------- Hero ---------- */

.hero-intro .hero-body {
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 1rem;
}

.publication-title {
  margin: 0;
  text-align: center;
}

.title-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.title-logo {
  width: clamp(3rem, 6vw, 4.25rem);
  height: auto;
}

.title-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.05;
}

.title-subtitle {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  line-height: 1.25;
  color: var(--text-2);
}

.hero-lede {
  max-width: 44rem;
  margin: 1.4rem auto 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-2);
}

.publication-authors {
  margin-top: 1.75rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-1);
}

.author-block {
  display: inline-block;
  margin: 0 0.15rem;
}

.publication-authors a {
  color: var(--accent);
  font-weight: 500;
}

.publication-authors a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.publication-authors sup {
  font-size: 0.66em;
  color: var(--text-3);
  margin-left: 0.08em;
}

.publication-affiliations {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-3);
}

.affil-block {
  display: inline-block;
  margin: 0 0.45rem;
}

.affil-block sup {
  color: var(--text-3);
  margin-right: 0.15em;
}

.eql-cntrb {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

.venue-line {
  margin-top: 1.25rem;
}

.venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-1);
  font-weight: 600;
  font-size: 0.98rem;
}

.venue-badge .icon {
  color: var(--accent);
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.publication-links .button {
  border-radius: 999px;
  font-weight: 600;
  height: 2.75em;
  padding-left: 1.35em;
  padding-right: 1.35em;
}

/* Tagline and stats strip */
.teaser .hero-body {
  padding: 1.25rem 1.5rem 2.5rem;
}

.teaser-tagline {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text-1);
}

.hero-stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2.5rem;
  max-width: 56rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  max-width: 15rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-3);
}

.stat-label {
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-3);
}

.stat-divider {
  width: 1px;
  background: var(--line);
}

@media screen and (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  .stat-divider {
    display: none;
  }
}

/* ---------- Screenshot carousel ---------- */

.showcase .hero-body {
  padding: 0 1.5rem 3rem;
}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  padding: 0.75rem 1rem 0;
}

.results-carousel figure {
  margin: 0;
  text-align: center;
}

.results-carousel img {
  width: min(100%, 880px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.results-carousel figcaption {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-2);
}

.slider-navigation-previous,
.slider-navigation-next {
  background: var(--surface) !important;
  border: 1px solid var(--line-strong) !important;
  box-shadow: var(--shadow-sm);
  color: var(--text-1);
  width: 2.5rem !important;
  height: 2.5rem !important;
  border-radius: 999px !important;
}

.slider-navigation-previous:hover,
.slider-navigation-next:hover {
  border-color: var(--accent) !important;
  color: var(--accent);
}

.slider-pagination .slider-page {
  background: var(--line-strong);
}

.slider-pagination .slider-page.is-active {
  background: var(--accent-fill);
}

/* ---------- Section rhythm ---------- */

.site-section {
  padding: clamp(3.25rem, 7vw, 5.5rem) 1.5rem;
  background-color: var(--bg);
}

.site-section.is-tinted {
  background-color: var(--bg-tint);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem !important;
}

.section-head .title {
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.section-intro {
  max-width: 40rem;
  margin: 0.5rem auto 0;
  color: var(--text-3);
  line-height: 1.6;
}

/* Abstract */
.abstract-body {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--text-2);
}

.abstract-body p + p {
  margin-top: 1rem;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  max-width: 62rem;
  margin: 0 auto;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}

.info-card p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  font-size: 0.95rem;
}

.chip-warning { background: var(--warn-soft);   color: var(--warn); }
.chip-info    { background: var(--info-soft);   color: var(--info); }
.chip-success { background: var(--ok-soft);     color: var(--ok); }
.chip-violet  { background: var(--violet-soft); color: var(--violet); }
.chip-warm    { background: var(--warm-soft);   color: var(--warm); }

/* Figure plates */
.figure-box {
  max-width: 62rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.figure-box.is-narrow {
  max-width: 48rem;
}

.figure-box figure {
  margin: 0;
}

.figure-box img {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.figure-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  margin: 0 0 1rem;
}

/* Academic figures are white-background PNGs that cannot be recolored:
   in dark mode present them as deliberate white plates. */
html[data-theme='dark'] img.plate {
  background: #ffffff;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.paradigm-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.paradigm-step {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.92rem;
}

.paradigm-step.is-current {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.paradigm-arrow {
  color: var(--text-3);
  font-size: 0.8rem;
}

/* ---------- Tabs (ARIA tablist) ---------- */

.pill-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 1.5rem;
}

.pill-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.pill-tab .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.pill-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.pill-tab[aria-selected='true'] {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
}

.tab-pane[hidden] {
  display: none;
}

.tab-pane.is-active {
  animation: fade-up 0.28s var(--ease) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Framework component panels */
.component-box {
  max-width: 62rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.component-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.component-header .icon-chip {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  font-size: 1.2rem;
}

.component-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.feature-header .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
}

.feature-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}

.feature-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-2);
}

.feature-card li {
  margin: 0.3rem 0;
  line-height: 1.5;
}

.feature-card li::marker {
  color: var(--accent);
}

/* Results panels */
.results-panel {
  max-width: 62rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.results-panel img {
  display: block;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-sm);
}

.results-panel h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.highlight h4 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.highlight ul {
  margin: 0;
  padding-left: 1.1rem;
}

.highlight li {
  margin: 0.25rem 0;
  color: var(--text-2);
}

/* ---------- Demo ---------- */

.demo-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 44rem;
  margin: 0 auto 1.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  background: var(--info-soft);
  border: 1px solid var(--accent-line);
  color: var(--text-2);
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
}

.demo-note .icon {
  color: var(--accent);
  margin-top: 0.1rem;
  flex: none;
}

.demo-note a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publication-video {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: #000;
}

.publication-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- FAQ ---------- */

.faq-item a,
.doi-line a,
.hero-lede a,
.abstract-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-list {
  max-width: 52rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1.5rem;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
}

.faq-item p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.65;
}

.faq-item p + p {
  margin-top: 0.5rem;
}

/* ---------- Citation ---------- */

.figure-box:focus-visible,
.results-panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.citation-wrap {
  max-width: 56rem;
  margin: 0 auto;
}

.doi-line {
  text-align: center;
  color: var(--text-3);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.doi-line a {
  color: var(--accent);
}

.bibtex-box {
  position: relative;
}

.bibtex-box pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-1);
  text-align: left;
}

.bibtex-box pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.bibtex-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-weight: 600;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.bibtex-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bibtex-copy.is-copied {
  border-color: var(--ok);
  color: var(--ok);
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--bg);
  border-top: 1px solid var(--line);
  padding: 3.5rem 1.5rem 2.5rem;
  color: var(--text-3);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-logo {
  width: 2.5rem;
  height: 2.5rem;
}

.footer-tagline {
  color: var(--text-2);
  font-size: 1rem;
}

.footer-tagline .brand-name {
  font-size: 1.05rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.1rem;
  margin-top: 1rem;
  font-weight: 500;
}

.footer-nav a {
  color: var(--text-2);
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-projects {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: left;
}

.related-projects .section-kicker {
  text-align: center;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.related-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.related-card .icon-chip {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  font-size: 1.15rem;
}

.related-body {
  flex: 1;
  min-width: 0;
}

.related-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-1);
}

.related-tag {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.related-desc {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.5;
}

.related-arrow {
  color: var(--text-3);
  flex: none;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.related-card:hover .related-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.footer-meta {
  margin-top: 2rem;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-3);
}

.footer-meta a {
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-meta a:hover {
  color: var(--accent);
}

/* ---------- Mobile: wide figures pan instead of shrinking to illegible ---------- */

@media screen and (max-width: 768px) {
  .figure-box,
  .results-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .figure-box img.is-wide {
    min-width: 680px;
  }

  .results-panel img {
    min-width: 620px;
  }

  .component-header {
    align-items: flex-start;
  }

  .related-card {
    align-items: flex-start;
  }

  .related-arrow {
    display: none;
  }
}

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
  background-clip: content-box;
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
