/* ═══════════════════════════════════════════════════════════
   Base / Typography
   ═══════════════════════════════════════════════════════════ */
body { font-family: 'Noto Sans', sans-serif; }

.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
}
.publication-subtitle {
  font-family: 'Google Sans', sans-serif;
  font-weight: 400;
  color: #555;
}

/* ═══════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════ */
.hero { background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%); }
.hero .hero-body { padding: 3rem 1.5rem; }

/* teaser hero */
.hero.teaser { background: #111; }
.hero.teaser .hero-body { padding: 1.5rem 1rem 2.5rem; }
.hero.teaser .subtitle { color: #ccc; font-size: 0.95rem; }

/* ── Author list ─────────────────────────────────────────── */
.publication-authors {
  font-size: 1rem;
  line-height: 1.9;
  margin-top: 0.9rem;
  color: #222;
}
.publication-authors .author-block { display: inline; white-space: nowrap; }
.publication-authors .author-block a { color: #2d6a4f; text-decoration: none; }
.publication-authors .author-block a:hover { text-decoration: underline; }

/* ── Affiliations ────────────────────────────────────────── */
.affil-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.9rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid #d0e8d8;
  color: #555;
  font-size: 0.84rem;
  line-height: 1.6;
}
.affil-item { white-space: nowrap; }

/* ── Link buttons ────────────────────────────────────────── */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.publication-links .link-block { display: inline-block; }
.publication-links .button {
  background-color: #2d6a4f;
  border-color: transparent;
  font-size: 0.9rem;
  height: 2.4em;
  white-space: nowrap;
}
.publication-links .button:hover { background-color: #1b4332; }

/* ═══════════════════════════════════════════════════════════
   Teaser figure
   ═══════════════════════════════════════════════════════════ */
.teaser-fig {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  max-width: 1254px;            /* native GIF width — never upscale (stays crisp) */
  margin: 0 auto;
}
.teaser-fig img { width: 100%; display: block; }

/* ═══════════════════════════════════════════════════════════
   Placeholder boxes (missing images)
   ═══════════════════════════════════════════════════════════ */
.placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  color: #888;
  font-size: 0.88rem;
  text-align: center;
  padding: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════
   Demo GIFs
   ═══════════════════════════════════════════════════════════ */
.demo-gif-wrap {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,0.2);
  background: #0d1a0d;
  margin: 0 auto;
}
.demo-gif-wrap img { width: 100%; display: block; }
/* Wide 360° banner — full container width */
.demo-360-wrap { max-width: 100%; }
.demo-360-wrap img { width: 100%; }
.ours-border { box-shadow: 0 0 0 3px #2d6a4f, 0 3px 16px rgba(0,0,0,0.25); }

.demo-method-label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #333;
}
.ours-label { color: #2d6a4f; }

/* ── Click legend ────────────────────────────────────────── */
.click-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  font-size: 0.82rem;
  color: #444;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.legend-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 3px;
  font-size: 0.7em;
  font-weight: bold;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Method figure
   ═══════════════════════════════════════════════════════════ */
.method-fig {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  background: #fff;
  padding: 0.75rem;
}
.method-fig img { width: 100%; display: block; }

/* ═══════════════════════════════════════════════════════════
   Result stats
   ═══════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.result-stat {
  padding: 1.2rem 0.5rem;
  text-align: center;
  background: #f9fdf9;
  border-radius: 8px;
  border: 1px solid #d8f3dc;
}
.result-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #2d6a4f;
  font-family: 'Google Sans', sans-serif;
  line-height: 1;
}
.result-label {
  display: block;
  font-size: 0.75rem;
  color: #555;
  margin-top: 0.4rem;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   Table images (with scroll wrapper on mobile)
   ═══════════════════════════════════════════════════════════ */
.table-scroll-wrap { border-radius: 6px; }
.table-fig img { display: block; height: auto; }
.qual-fig {
  margin: 1rem auto 0;
  background: #fff;
  padding: 0.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.qual-fig img { width: 100%; display: block; }

/* ── Table caption ───────────────────────────────────────── */
.table-caption {
  font-size: 0.86rem;
  color: #666;
  text-align: center;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   BibTeX
   ═══════════════════════════════════════════════════════════ */
.bibtex-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: 0.84rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.65;
  white-space: pre;
}

/* ═══════════════════════════════════════════════════════════
   Cite links in table rows
   ═══════════════════════════════════════════════════════════ */
.cite-link {
  color: #2d6a4f;
  font-size: 0.76em;
  margin-left: 2px;
  opacity: 0.8;
  white-space: nowrap;
}
.cite-link:hover { opacity: 1; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   ── TABLET  (≤ 1023px, Bulma's mobile breakpoint)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   ── MOBILE  (≤ 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hero */
  .hero .hero-body { padding: 2rem 1rem; }
  .publication-title.title.is-1 { font-size: 2rem !important; }
  .publication-subtitle.subtitle.is-3 { font-size: 1.1rem !important; }
  .publication-authors { font-size: 0.88rem; line-height: 1.75; }
  .affil-block { font-size: 0.78rem; gap: 0.2rem 0.6rem; }
  .publication-links .button { font-size: 0.82rem; padding: 0 0.85em; }

  /* Teaser */
  .hero.teaser .subtitle { font-size: 0.85rem !important; }

  /* Sections */
  .section { padding: 2rem 1rem; }

  /* Demo */
  .click-legend { font-size: 0.76rem; gap: 0.3rem 0.6rem; }
  /* Force GIF columns to full-width stack on mobile */
  .columns.demo-gif-pair .column.is-half {
    width: 100% !important;
    padding: 0.5rem 0 !important;
  }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .result-number { font-size: 1.8rem; }
  .result-label { font-size: 0.7rem; }

  /* Table images scale down to fit the screen */
  .table-fig img { width: 100%; min-width: unset; }

  /* BibTeX */
  .bibtex-block { font-size: 0.72rem; padding: 0.75rem 0.9rem; }

  /* Method description list */
  .content ol li { margin-bottom: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════
   ── SMALL PHONE  (≤ 480px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .publication-title.title.is-1 { font-size: 1.7rem !important; }
  .publication-subtitle.subtitle.is-3 { font-size: 1rem !important; }
  .publication-authors { font-size: 0.82rem; }

  /* Single-column stats on very small phones */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .result-number { font-size: 1.6rem; }

  /* Tighter sections */
  .section { padding: 1.5rem 0.75rem; }
  .hero .hero-body { padding: 1.5rem 0.75rem; }

  /* Affiliations: smaller gap */
  .affil-block { gap: 0.15rem 0.5rem; }

  /* Link buttons: slightly smaller */
  .publication-links { gap: 0.3rem; }
  .publication-links .button { font-size: 0.78rem; height: 2.2em; }
}
