/* ============================================================
 * theme.css — PolyU VCLab style overlay for DepthMaster page
 * Designed to coexist with the existing Bulma-based interactive
 * sections (Three.js viewers, selection panels, pagination).
 * ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --c-text: #1a1a1a;
  --c-muted: #6b6b6b;
  --c-border: #e5e5e5;
  --c-bg: #ffffff;
  --c-bg-soft: #fafafa;
  --c-accent: #b30000;          /* PolyU red */
  --c-accent-dark: #8a0000;
  --c-link: #b30000;
  --max-w: 1100px;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--c-text);
  background-color: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
}

.container-narrow {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--c-border);
  background: #fff;
  padding: 14px 0;
}
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.site-header .logos {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-header .logos img {
  height: 38px;
  width: auto;
  display: block;
}

/* ---------- Hero ---------- */
.hero-section {
  padding: 56px 0 28px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  border-bottom: 1px solid var(--c-border);
}
.hero-title {
  font-family: 'Source Serif 4', 'Georgia', serif;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-title-main {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
  line-height: 1.05;
}
.hero-title-sub {
  font-size: 22px;
  font-weight: 600;
  color: #2a2a2a;
  line-height: 1.3;
  font-style: italic;
}
.hero-section .tagline {
  color: var(--c-muted);
  font-size: 15px;
  margin: 6px 0 22px;
}
.hero-section .authors {
  font-size: 17px;
  margin: 16px 0 6px;
  line-height: 1.7;
}
.hero-section .authors a {
  color: var(--c-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.hero-section .authors a:hover { border-bottom-color: var(--c-link); }
.hero-section .authors sup { color: var(--c-muted); font-size: 0.78em; }
.hero-section .affiliations {
  color: #444;
  font-size: 15px;
  margin: 4px 0 0;
}
.hero-section .notes {
  color: var(--c-muted);
  font-size: 13px;
  margin: 6px 0 18px;
}

/* ---------- Badges ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #1a1a1a;
  transition: all .15s ease;
}
.badge:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff !important;
  transform: translateY(-1px);
}
.badge.badge-disabled {
  background: #e5e5e5;
  color: #999 !important;
  border-color: #e5e5e5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Section frame ---------- */
.themed-section {
  padding: 48px 0 28px;
  border-top: 1px solid var(--c-border);
  background: #fff;
}
.themed-section.alt { background: var(--c-bg-soft); }
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--c-accent);
  font-weight: 600;
  margin: 0 0 6px;
}
.section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.section-lead {
  color: #2a2a2a;
  font-size: 16px;
  margin: 0 0 24px;
  max-width: 820px;
}

/* ---------- Abstract ---------- */
.abstract-box {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #222;
  text-align: justify;
}
.abstract-box p { margin: 0 0 12px; }
.abstract-box p:last-child { margin-bottom: 0; }
.abstract-box strong { color: var(--c-accent-dark); }

.pipeline-figure {
  margin: 28px 0 0;
  text-align: center;
}
.pipeline-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.pipeline-figure figcaption {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 8px;
}

/* ---------- Citation ---------- */
.bibtex-wrap {
  position: relative;
  background: #1a1a1a;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 16px;
}
.bibtex-wrap pre {
  margin: 0;
  color: #f0f0f0;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  color: #1a1a1a;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background .15s;
}
.copy-btn:hover { background: var(--c-accent); color: #fff; }
.copy-btn.copied { background: #2a8a2a; color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 24px 0;
  text-align: center;
  color: var(--c-muted);
  font-size: 13px;
  background: #fafafa;
}
.site-footer a { color: var(--c-link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Floating Navigation ---------- */
.float-nav {
  position: fixed;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.float-nav a {
  color: #555;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.float-nav a:hover { color: var(--c-accent); }
.float-nav a.active {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
  background: rgba(179,0,0,0.05);
  font-weight: 600;
}
@media (max-width: 1300px) {
  .float-nav { display: none; }
}

/* ---------- Adjust embedded Bulma sections ---------- */
/* The interactive viewer sections still rely on Bulma's
   .hero / .container is-max-desktop / etc. We tone down their
   default padding/background so they sit nicely under the new
   themed wrapper sections. */
.themed-wrap .hero,
.themed-wrap .hero.is-light {
  background: transparent !important;
}
.themed-wrap .hero-body { padding: 0 !important; }
.themed-wrap .container.is-max-desktop {
  max-width: var(--max-w);
}
.themed-wrap h2.title.is-3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px !important;
  letter-spacing: -0.01em;
  margin: 0 0 8px !important;
  color: var(--c-text) !important;
}
.themed-wrap .content.has-text-justified p {
  font-size: 15.5px;
  color: #2a2a2a;
  line-height: 1.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero-title-main { font-size: 38px; }
  .hero-title-sub  { font-size: 18px; }
  .section-title   { font-size: 24px; }
  .hero-section    { padding: 36px 0 20px; }
  .themed-section  { padding: 36px 0 18px; }
  .badges          { gap: 8px; }
  .badge           { padding: 7px 14px; font-size: 13px; }
  .site-header .logos img { height: 30px; }
}
