/* ===== Custom overrides on top of Bulma ===== */

body {
  font-family: 'Google Sans', 'Noto Sans', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
.result-block, #citation { scroll-margin-top: 1.5rem; }

/* ----- Hero / title ----- */
.publication-title {
  line-height: 1.25;
  margin-bottom: 1.2rem !important;
}

.tagline {
  color: #4a4a4a;
  font-style: italic;
  margin-bottom: 1.5rem !important;
}

/* Override Bulma's .title + .subtitle { margin-top: -1.25rem } which would
   pull the tagline up under the multi-line title and visually overlap. */
.publication-title + .tagline {
  margin-top: 1rem !important;
}

.publication-authors {
  margin-bottom: 0.5rem;
}

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

.publication-affiliations {
  color: #555;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.affil-block {
  display: inline-block;
}

.publication-venue {
  margin: 1rem 0 1.4rem;
}

/* ----- Link buttons ----- */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.publication-links .button {
  transition: transform 0.12s ease;
}

.publication-links .button:hover {
  transform: translateY(-2px);
}

/* Second hero button row (Schedule / Discussion) */
.publication-links.engagement-row { margin-top: 0.75rem; }

/* Visually flag buttons whose URL is still a placeholder token */
.is-placeholder-link {
  opacity: 0.7;
  border: 1px dashed #b5b5b5 !important;
}

/* Cite dropdown */
.cite-dropdown .dropdown-menu { min-width: 11rem; }
.cite-dropdown .dropdown-item { display: flex; align-items: center; gap: 0.5rem; }

/* ----- Teaser ----- */
.teaser { padding-top: 1rem; }
.teaser-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
}
.teaser-caption {
  margin-top: 1rem;
  color: #555;
  font-size: 1rem;
}

/* ----- Placeholder boxes (media the user will replace) ----- */
.placeholder-box {
  position: relative;
  width: 100%;
  background:
    repeating-linear-gradient(45deg, #f4f6f9, #f4f6f9 12px, #eef1f5 12px, #eef1f5 24px);
  border: 2px dashed #c0c8d2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6573;
  text-align: center;
}

.placeholder-16x9 { aspect-ratio: 16 / 9; }
.placeholder-wide { aspect-ratio: 21 / 9; min-height: 220px; margin-bottom: 1rem; }

.placeholder-label p { margin: 0.15rem 0; }
.placeholder-label code {
  background: #e3e8ef;
  color: #2b3340;
  border-radius: 4px;
  padding: 0.05em 0.4em;
}

/* ----- "Firsts" cards ----- */
.firsts-sub { color: #6b7280; margin-bottom: 1.5rem !important; }

.first-card {
  height: 100%;
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.first-card h3 { margin: 0.5rem 0 0.35rem; }
.first-card p { color: #4a4a4a; margin: 0; }

/* Anchor wrapper: keeps cards clickable without changing the resting appearance. */
.first-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.first-card-link:hover .first-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #c5d2e0;
}

/* ----- Result blocks ----- */
.result-block { margin-bottom: 3rem; }
.result-block .title.is-4 { margin-bottom: 1rem; }
.figure-pair { margin-bottom: 1rem; }

/* ----- Responsive YouTube embeds ----- */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin: 0.5rem 0;
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ----- BibTeX ----- */
pre.bibtex {
  background: #1f2430;
  color: #e6e6e6;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

pre.bibtex code { color: inherit; background: none; }

/* ----- Award highlight (hero) ----- */
.award-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 1.4rem;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, #fff4d6, #ffe7a3);
  border: 1px solid #e3b341;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(180, 130, 0, 0.18);
}

.award-highlight a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #7a5300;
  text-decoration: none;
}

.award-highlight a:hover { color: #523700; text-decoration: underline; }
.award-highlight .icon { color: #c8902a; }

/* ----- Paper cards (per-paper sections) ----- */
.paper-card {
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  padding: 1.6rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.paper-card .title.is-4 { margin-bottom: 0.5rem; line-height: 1.3; }
.paper-card .paper-authors { color: #555; margin-bottom: 0.75rem; }
.paper-card .publication-venue { margin: 0.4rem 0 0.9rem; }
.paper-card .publication-venue .tag { white-space: normal; height: auto; }
.paper-card .publication-venue .tag.is-warning { margin-left: 0.4rem; }
.paper-card .content { margin-bottom: 1rem; }
.paper-card .publication-links { justify-content: flex-start; }

/* ----- Figures (converted from the papers' EPS) ----- */
.figure-grid { margin-bottom: 0.5rem; }

.result-figure {
  background: #fff;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0 auto 0.4rem;
}

.result-figure img { display: block; width: 100%; height: auto; border-radius: 4px; }

.fig-caption {
  text-align: center;
  color: #6b7280;
  font-size: 0.82rem;
  margin: 0 0 1rem;
}

.fig-caption strong { color: #374151; }

/* Click-to-enlarge */
.result-figure img { cursor: zoom-in; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 24, 0.92);
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox-overlay.is-open { display: flex; }

.lightbox-overlay img {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 0.75rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.lightbox-close:hover { opacity: 1; }

/* ----- Data tables recreated from the paper (Tables II and V) ----- */
.table-wrap { overflow-x: auto; margin: 0.5rem 0 0.75rem; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  overflow: hidden;
}

table.data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: #374151;
  padding: 0 0 0.5rem;
}

table.data-table th,
table.data-table td {
  border: 1px solid #e1e6ec;
  padding: 0.4rem 0.7rem;
  text-align: center;
  white-space: nowrap;
}

table.data-table thead th {
  background: #2b3340;
  color: #f3f5f8;
  font-weight: 600;
}

table.data-table tbody th { background: #f4f6f9; font-weight: 600; }
table.data-table tbody tr:nth-child(even) td { background: #fafbfc; }
table.data-table .spike-up { color: #1f7a36; font-weight: 700; }
table.data-table .spike-down { color: #b4322a; font-weight: 700; }
table.data-table td.limit-binding { background: #fff3a8; font-weight: 600; }
.table-note { color: #6b7280; font-size: 0.8rem; margin: 0.1rem 0 1rem; }

/* ----- Footer ----- */
.footer { padding: 2.5rem 1.5rem; }
