/*
 * SBM Project Page — site styles on @higharc/web-ds tokens.
 * Every color, size, radius, and shadow resolves to a --ds-* primitive
 * (see static/css/webds/). Type: CircularXX body, Knockout display,
 * Geist Mono for data and code.
 */

/* ============================================
   Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
  font-feature-settings: var(--font-feature-circular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand-light);
  color: var(--ds-color-black);
}

/* No typographic orphans anywhere: a paragraph's last line never
   carries a single word. (Class-level `text-wrap: balance` rules
   still win where set — balance also prevents orphans.) */
p,
li,
figcaption,
h1,
h2,
h3,
h4 {
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ds-color-green-50);
  outline-offset: 2px;
}

/* Vendored verbatim from web-ds utilities/typography.css — the CSS
   behind the <Underline> component. brand-underline-thick is the
   Knockout-context variant (no weight change); brand-underline is
   the body-copy variant (adds weight 600). */
.brand-underline {
  text-decoration: underline;
  text-decoration-color: var(--ds-color-brand, hsl(146 63% 57%));
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0;
  text-decoration-skip-ink: none;
  font-weight: 600;
}

.brand-underline-thick {
  text-decoration: underline;
  text-decoration-color: var(--ds-color-brand, hsl(146 63% 57%));
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0;
  text-decoration-skip-ink: none;
}

/* ============================================
   Layout primitives
   ============================================ */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--ds-spacing-6);
}

.container-text {
  max-width: 52rem;
}

.section {
  padding-block: var(--ds-spacing-16);
}

.section-flush {
  padding-top: 0;
}

/* ============================================
   Navigation
   ============================================ */
.site-nav {
  background: var(--background);
  border-bottom: var(--ds-border-width) solid var(--border);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--ds-spacing-6);
  height: var(--ds-spacing-14);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-spacing-1);
  padding: var(--ds-spacing-2) var(--ds-spacing-3);
  border: none;
  background: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  color: var(--muted-foreground);
  text-decoration: none;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.nav-item:hover {
  color: var(--foreground);
  background: var(--ds-opacity-dark-4);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--ds-spacing-1));
  right: 0;
  min-width: 12rem;
  padding: var(--ds-spacing-1);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius-md);
  opacity: 0;
  visibility: hidden;
  translate: 0 -4px;
  transition: opacity 140ms ease, translate 140ms ease, visibility 140ms;
  z-index: 50;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.nav-dropdown-item {
  display: block;
  padding: var(--ds-spacing-2) var(--ds-spacing-3);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: var(--ds-opacity-dark-4);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-block: var(--ds-spacing-20) var(--ds-spacing-12);
  text-align: center;
}

/* BrandHeader `Heading attract fluid` treatment: Knockout uppercase,
   tracking-wide, text-headline line-height, Perfect Fourth clamp tier.
   The `.title-underline` span mirrors <Underline> inside an attract
   heading (brand-underline-thick). */
.hero-title {
  margin: 0 auto var(--ds-spacing-6);
  max-width: 22ch;
  font-family: var(--font-attract);
  font-feature-settings: var(--font-feature-knockout);
  font-weight: var(--ds-font-weight-normal);
  font-size: clamp(var(--font-size-2xl), 4.5vw, var(--font-size-4xl));
  line-height: var(--line-height-none);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-wrap: balance;
  animation: hero-rise 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Award badge inline with the muted conference detail; the
   line balances across two even lines. */
.hero-venue {
  max-width: 34rem;
  margin: 0 auto var(--ds-spacing-8);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  text-wrap: balance;
  animation: hero-rise 640ms cubic-bezier(0.22, 1, 0.36, 1) 90ms both;
}

/* Acceptance badge — web-ds Badge `outline` variant (border only,
   foreground text, font-medium, compact padding). Sized so its box
   stays inside the venue line's line box, keeping the line-height
   consistent. */
/* vertical-align: baseline on an inline-flex box aligns the badge
   text's baseline with the surrounding line's baseline */
.venue-accept {
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  margin-right: var(--ds-spacing-1);
  padding: calc(var(--ds-spacing-1) / 2) var(--ds-spacing-2);
  border: var(--ds-border-width) solid var(--border-strong);
  color: var(--foreground);
  font-size: var(--font-size-base);
  font-weight: var(--ds-font-weight-medium);
  line-height: var(--line-height-tight);
  white-space: nowrap;
}

/* Award variant: brand fill so the award reads first. The trophy
   centers on the text instead of sitting on the baseline. */
.venue-award {
  gap: var(--ds-spacing-1);
  background: var(--brand-light);
  border-color: var(--brand);
}

.venue-award .icon {
  align-self: center;
}

.venue-detail {
  font-weight: var(--ds-font-weight-normal);
  color: var(--muted-foreground);
}

.hero-authors {
  margin-bottom: var(--ds-spacing-2);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-normal);
  animation: hero-rise 640ms cubic-bezier(0.22, 1, 0.36, 1) 160ms both;
}

/* Names wrap in the normal inline flow, but only between pairs —
   a line never ends up with a single name. On narrow screens the
   pairs unbind (see media query), but a single name never breaks
   across lines. */
.author-pair {
  white-space: nowrap;
}

.author-block {
  white-space: nowrap;
}

.hero-authors a {
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 140ms ease, color 140ms ease;
}

.hero-authors a:hover {
  color: var(--ds-color-green-75);
  border-color: var(--ds-color-green-50);
}

.hero-affiliations {
  font-size: var(--font-size-base);
  color: var(--muted-foreground);
  animation: hero-rise 640ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}

sup {
  font-feature-settings: var(--font-feature-circular-superscript);
  line-height: 0;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--ds-spacing-2);
  margin-top: var(--ds-spacing-8);
  animation: hero-rise 640ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Buttons — web-ds Button recipe: h-9, text-sm font-medium
   leading-none, 16px icons, transition-all, disabled:opacity-50.
   .btn = `outline` variant; .btn-primary = `default` variant
   (bg-primary, hover:bg-primary/80).
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--ds-spacing-3) / 2);
  height: var(--ds-spacing-9);
  padding-inline: var(--ds-spacing-3);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  line-height: var(--line-height-none);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease,
    border-color 140ms ease;
}

.btn:hover {
  background: var(--muted);
}

.btn-primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--primary) 80%, transparent);
}

.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   Section headings
   ============================================ */
/* Large headers (section h2s) use Knockout, small headers (h3/h4)
   use Circular — both left-aligned. */
.section-title {
  margin: 0 0 var(--ds-spacing-8);
  font-family: var(--font-attract);
  font-feature-settings: var(--font-feature-knockout);
  font-weight: var(--ds-font-weight-normal);
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-none);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-align: left;
}

.section-subtitle {
  margin: calc(-1 * var(--ds-spacing-4)) 0 var(--ds-spacing-8);
  text-align: left;
  color: var(--muted-foreground);
}

.subsection-title {
  margin: var(--ds-spacing-12) 0 var(--ds-spacing-4);
  font-size: var(--font-size-xl);
  font-weight: var(--ds-font-weight-medium);
  line-height: var(--line-height-tight);
}

/* ============================================
   Prose
   ============================================ */
.prose {
  font-size: var(--font-size-base);
  line-height: var(--line-height-loose);
}

.prose p {
  margin: 0 0 var(--ds-spacing-4);
}

.prose ul {
  margin: 0 0 var(--ds-spacing-4);
  padding-left: var(--ds-spacing-5);
}

.prose li {
  margin-bottom: var(--ds-spacing-2);
}

.prose li::marker {
  color: var(--ds-color-green-50);
}

.prose strong {
  font-weight: var(--ds-font-weight-bold);
}

/* ============================================
   Panels: figures, video
   ============================================ */
.figure-panel {
  margin: 0 0 var(--ds-spacing-8);
  padding: var(--ds-spacing-4);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius-lg);
}

.figure-panel img,
.figure-panel video {
  display: block;
  width: 100%;
  border-radius: var(--radius-md);
}

.figure-caption {
  margin: var(--ds-spacing-4) 0 0;
  padding: 0 var(--ds-spacing-2) var(--ds-spacing-1);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--muted-foreground);
  text-align: left;
}

.figure-caption strong {
  color: var(--card-foreground);
}

/* The demo video sits bare — no panel chrome */
.video-panel video {
  width: 100%;
}

/* ============================================
   Data tables
   ============================================ */
.table-panel {
  margin-bottom: var(--ds-spacing-8);
  padding: var(--ds-spacing-2);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius-lg);
}

.table-panel .figure-caption {
  padding-inline: var(--ds-spacing-3);
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.data-table th {
  padding: var(--ds-spacing-3) var(--ds-spacing-3);
  border-bottom: var(--ds-border-width) solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.data-table th:first-child {
  text-align: left;
}

.data-table td {
  padding: var(--ds-spacing-2) var(--ds-spacing-3);
  border-bottom: var(--ds-border-width) solid var(--border);
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  text-align: right;
  white-space: nowrap;
}

.data-table td:first-child {
  font-family: var(--font-sans);
  text-align: left;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background-color 120ms ease;
}

.data-table tbody tr:hover {
  background: var(--ds-opacity-dark-2);
}

.data-table .row-group {
  text-align: center;
  background: var(--muted);
  font-family: var(--font-sans);
  color: var(--muted-foreground);
}

.data-table .td-indent {
  padding-left: var(--ds-spacing-8);
}

.data-table .is-ours,
.data-table tbody tr.is-ours:hover {
  background: color-mix(in srgb, var(--brand-light) 45%, var(--card));
}

.data-table .is-ours td {
  border-top: var(--ds-border-width) solid var(--ds-color-green-50);
  border-bottom: var(--ds-border-width) solid var(--ds-color-green-50);
  color: var(--ds-color-brand-dark);
}

/* ============================================
   Stats
   ============================================ */
.stat-grid {
  display: grid;
  gap: var(--ds-spacing-4);
  margin-block: var(--ds-spacing-10);
}

.stat-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Always a 2x2 block, at every viewport */
.stat-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

/* Metric styling mirrors web-ds BrandMetric (Metric.Value with the
   `attract` Knockout face and brand-underline-thick; Metric.Label
   below in muted semibold). Values count up / letter-reveal in view. */
.stat {
  min-width: 0;
  padding: var(--ds-spacing-6) var(--ds-spacing-4);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  text-align: center;
}

.stat-label {
  margin: 0 0 var(--ds-spacing-3);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle-foreground);
}

.stat-value {
  margin: 0;
  font-family: var(--font-attract);
  font-feature-settings: var(--font-feature-knockout);
  font-weight: var(--ds-font-weight-normal);
  font-size: clamp(var(--font-size-3xl), 6vw, var(--font-size-4xl));
  line-height: var(--line-height-none);
  letter-spacing: -0.01em;
}

/* Phrase metrics: one font throughout; only the <Underline> span
   (brand-underline-thick) carries the rule, always on its own line. */
.stat-value-sm {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.stat-value-sm .brand-underline-thick {
  display: block;
}

.stat-sub {
  margin: var(--ds-spacing-3) 0 0;
  font-size: var(--font-size-lg);
  font-weight: var(--ds-font-weight-semibold);
  color: var(--muted-foreground);
  text-wrap: balance;
}

/* ============================================
   Method cards
   ============================================ */
.card-grid {
  display: grid;
  gap: var(--ds-spacing-4);
  margin-block: var(--ds-spacing-10);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.method-card {
  padding: var(--ds-spacing-6);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 160ms ease;
}

.method-card:hover {
  transform: translateY(-2px);
}

.method-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-spacing-12);
  height: var(--ds-spacing-12);
  margin-bottom: var(--ds-spacing-4);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand-light) 55%, var(--card));
  color: var(--ds-color-green-75);
}

.method-card-title {
  margin: 0 0 var(--ds-spacing-2);
  font-size: var(--font-size-base);
  font-weight: var(--ds-font-weight-semibold);
}

.method-card p {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--muted-foreground);
}

/* ============================================
   GIF grid
   ============================================ */
.gif-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ds-spacing-4);
}

.gif-item {
  overflow: hidden;
  background: var(--card);
  border: var(--ds-border-width) solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 160ms ease;
}

.gif-item:hover {
  transform: translateY(-2px);
}

.gif-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ============================================
   Gallery (scroll-snap)
   ============================================ */
.gallery-track {
  display: flex;
  gap: var(--ds-spacing-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--ds-spacing-2);
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  scroll-snap-align: center;
  padding: var(--ds-spacing-6) 0;
}

/* Images scale and center within the item. The min-width keeps tall
   images from rendering narrow — the gallery is allowed to grow
   taller instead; the sticky side buttons and dots stay in view. */
.gallery-item img {
  width: auto;
  height: auto;
  max-width: 100%;
  min-width: min(100%, 52rem);
  max-height: 120vh;
  object-fit: contain;
  margin-inline: auto;
  border-radius: var(--radius-md);
}

/* Full-width gallery: a full-bleed white band, edge to edge */
.gallery {
  position: relative;
  background: var(--card);
}

/* Full-height rails on each side; the button inside starts centered
   in the gallery and sticks to the viewport's vertical center while
   the gallery scrolls through view. */
.gallery-rail {
  position: absolute;
  top: var(--ds-spacing-3);
  bottom: var(--ds-spacing-3);
  z-index: 10;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* Sticky nav (buttons + dots) keeps the page's container padding
   from the band's edges */
.gallery-rail-left {
  left: var(--ds-spacing-3);
}

.gallery-rail-right {
  right: var(--ds-spacing-3);
}

/* Dots overlay the gallery, sticky at the viewport bottom while the
   gallery is in view — same pattern as the side buttons. */
.gallery-controls-rail {
  position: absolute;
  top: var(--ds-spacing-3);
  bottom: var(--ds-spacing-3);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.gallery-dots {
  position: sticky;
  bottom: var(--ds-spacing-3);
  display: flex;
  gap: var(--ds-spacing-2);
  padding: var(--ds-spacing-2) var(--ds-spacing-3);
  background: var(--card);
  border: var(--ds-border-width) solid var(--border-strong);
  pointer-events: auto;
}

.gallery-btn {
  position: sticky;
  top: calc(50vh - var(--ds-spacing-5));
  bottom: calc(50vh - var(--ds-spacing-5));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-spacing-10);
  height: var(--ds-spacing-10);
  border: var(--ds-border-width) solid var(--border-strong);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.gallery-btn:hover {
  background: var(--brand-light);
  border-color: var(--ds-color-green-50);
}

.gallery-dot {
  width: var(--ds-spacing-2);
  height: var(--ds-spacing-2);
  padding: 0;
  border: none;
  background: var(--ds-color-neutral-gray-30);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.gallery-dot.is-active {
  background: var(--ds-color-green-50);
  transform: scale(1.25);
}

/* ============================================
   Contributions
   ============================================ */
.contribution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ds-spacing-6);
}

.contribution-item {
  display: flex;
  gap: var(--ds-spacing-4);
  padding-top: var(--ds-spacing-5);
  border-top: var(--ds-border-width) solid var(--border-strong);
}

.contribution-number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-spacing-10);
  height: var(--ds-spacing-10);
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--ds-color-black);
  font-family: var(--font-attract);
  font-feature-settings: var(--font-feature-knockout);
  font-size: var(--font-size-lg);
}

.contribution-content h4 {
  margin: 0 0 var(--ds-spacing-1);
  font-size: var(--font-size-base);
  font-weight: var(--ds-font-weight-semibold);
  line-height: var(--line-height-tight);
}

.contribution-content p {
  margin: 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--muted-foreground);
}

/* ============================================
   BibTeX
   ============================================ */
.bibtex-panel {
  position: relative;
  background: var(--brand-dark);
  border-radius: var(--radius-lg);
}

.bibtex-panel pre {
  margin: 0;
  padding: var(--ds-spacing-6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--brand-light);
}

.bibtex-copy {
  position: absolute;
  top: var(--ds-spacing-3);
  right: var(--ds-spacing-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ds-spacing-9);
  height: var(--ds-spacing-9);
  border: var(--ds-border-width) solid var(--ds-opacity-light-16);
  border-radius: var(--radius);
  background: var(--ds-opacity-light-4);
  color: var(--brand-light);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease,
    border-color 140ms ease;
}

.bibtex-copy:hover {
  background: var(--ds-opacity-light-8);
  color: var(--brand-bright);
}

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

/* Copy icon flips to a check while copied */
.bibtex-copy .icon-check,
.bibtex-copy.is-copied .icon-copy {
  display: none;
}

.bibtex-copy.is-copied .icon-check {
  display: block;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  margin-top: var(--ds-spacing-8);
  padding-block: var(--ds-spacing-12);
  background: var(--ds-color-neutral-gray-95);
  color: var(--ds-color-neutral-gray-40);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--ds-spacing-6);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  color: var(--ds-color-neutral-gray-40);
  transition: color 140ms ease;
}

.icon-link:hover {
  color: var(--ds-color-white);
}

/* One height for every footer logo, icon or image */
.icon-link svg,
.icon-link img {
  height: var(--ds-spacing-5);
  width: auto;
}

.icon-link img {
  opacity: 0.72;
  transition: opacity 140ms ease;
}

.icon-link:hover img {
  opacity: 1;
}

/* ============================================
   Scroll reveal
   ============================================ */
/* Hidden-then-revealed only when JS is running (html.js is set inline
   in the document head), so no-JS visitors see everything. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-title,
  .hero-venue,
  .hero-authors,
  .hero-affiliations,
  .hero-links {
    animation: none;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 64rem) {
  .gif-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48rem) {
  .section {
    padding-block: var(--ds-spacing-10);
  }
  .hero {
    padding-top: var(--ds-spacing-12);
  }
  .card-grid-3,
  .stat-grid-3,
  .contribution-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 32rem) {
  .gif-grid {
    grid-template-columns: 1fr;
  }
  .hero-links {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
  /* Keep author pairs inside narrow screens. Pairs unbind here:
     long names (Manuel's) take their own line rather than forcing
     horizontal scroll — but a single name never breaks (the
     .author-block nowrap holds). */
  .hero-authors {
    font-size: var(--font-size-base);
  }
  .author-pair {
    white-space: normal;
  }
  /* Metrics: single column on phones */
  .stat-grid-4 {
    grid-template-columns: 1fr;
  }
  /* Award badge sits on its own line */
  .venue-detail {
    display: block;
    margin-top: var(--ds-spacing-2);
  }
}
