/* ============================================================
   AuTO-Pose project page — custom styles
   (loaded after Bulma; only overrides / additions live here)
   ============================================================ */

:root {
  --accent: #2b6cb0;
  --accent-dark: #1a4971;
  --ink: #1a202c;
  --muted: #5a6472;
  --bg-soft: #f7f9fc;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}

/* ---------- Hero / title ---------- */
.hero-body { padding: 3rem 1.5rem 2rem; }

.publication-title {
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.publication-title .method-name { color: var(--accent); }

.publication-venue {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Author block, kept for when the paper goes public. */
.authors { font-size: 1.15rem; margin-bottom: 0.4rem; }
.authors .author { margin: 0 0.35rem; white-space: nowrap; }
.authors sup { color: var(--accent); font-weight: 600; }
.affiliations { color: var(--muted); font-size: 1rem; margin-bottom: 0.4rem; }
.note { color: var(--muted); font-size: 0.95rem; }

/* Stand-in byline while under review. */
.anon-byline {
  color: var(--muted);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* ---------- Link buttons ---------- */
.link-buttons { margin-top: 1.4rem; }
.link-buttons .button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  margin: 0.25rem;
  font-size: 0.9rem;
  height: auto;
  padding: 0.5rem 1.05rem;
  transition: transform 0.12s ease, background 0.12s ease;
}
.link-buttons .button:hover { background: var(--accent); transform: translateY(-2px); }
.link-buttons .button .icon { margin-right: 0.2rem; }
.link-buttons .button .icon svg { width: 1.05em; height: 1.05em; }
.link-buttons .button.is-disabled {
  background: #c2c9d2;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: 2.5rem 1.5rem; }
.section-alt { background: var(--bg-soft); }
.section-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1.5rem !important;
}

.content-narrow { max-width: 880px; margin: 0 auto; }
.content-wide { max-width: 1180px; margin: 0 auto; }

.figure { text-align: center; margin: 0 auto 0.5rem; }
.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(20, 30, 50, 0.10);
}
.figure-caption {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.9rem;
  line-height: 1.5;
  text-align: justify;
}
.figure-caption b { color: var(--ink); }

.abstract-text { font-size: 1.08rem; line-height: 1.7; text-align: justify; }

/* ---------- Video results grid ---------- */
.section-lead {
  max-width: 880px;
  margin: 0 auto 2.4rem;
  text-align: center;
  text-wrap: pretty;
}

.group-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--accent);
}
.video-grid + .group-title { margin-top: 2.2rem; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.vid-card { margin: 0; }

.vid-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #0f1722;
  box-shadow: 0 5px 18px rgba(20, 30, 50, 0.13);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.vid-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vid-card:hover .vid-frame {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(20, 30, 50, 0.22);
}

.vid-expand {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: rgba(15, 23, 34, 0.6);
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
}
.vid-card:hover .vid-expand,
.vid-expand:focus-visible { opacity: 1; }
.vid-expand:hover { background: var(--accent); }
.vid-expand svg { width: 0.85rem; height: 0.85rem; display: block; margin: auto; }

.vid-card figcaption {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.4;
}
.vid-card figcaption b { display: block; color: var(--ink); }
.vid-card figcaption span { color: var(--muted); }

@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: rgba(8, 12, 20, 0.9);
}
.lightbox.is-open { display: flex; }
.lightbox-inner { max-width: 900px; width: 100%; text-align: center; }
.lightbox-inner video {
  width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  background: #000;
}
.lightbox-caption {
  margin-top: 0.8rem;
  color: #dfe6ef;
  font-size: 0.95rem;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--accent); }
.lightbox-close svg { width: 1.1rem; height: 1.1rem; display: block; margin: auto; }

/* ---------- BibTeX ---------- */
.bibtex-box {
  position: relative;
  background: #0f1722;
  color: #e6edf3;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
}
.bibtex-box pre {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.copy-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: #2b3645;
  color: #cdd6e0;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.copy-btn:hover { background: var(--accent); color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cdd6e0; padding: 2rem 1.5rem; }
.footer a { color: #9ec5ff; }
