/* AR-WAM project page — white academic theme (Nerfies / MVISTA-4D family)
   Palette: HKUST brand colors — blue #003366, navy #0C2340, gold #FFCD00 */

:root {
  --hkust-blue: #0057b8;
  --hkust-navy: #0c2340;
  --hkust-gold: #ffcd00;
  --accent: var(--hkust-blue);
  --accent-soft: #e8eff8;
  --ink: #1f2d3d;
  --muted: #5a6b7c;
  --card-border: #e8edf3;
  --card-shadow: 0 6px 24px rgba(15, 35, 70, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0f3f7;
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-item.navbar-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--ink);
}

.navbar-item.navbar-title .icon {
  color: var(--accent);
}

.navbar-menu .navbar-item {
  font-size: 0.95rem;
  color: var(--muted);
}

.navbar-menu .navbar-item:hover {
  color: var(--accent);
  background: transparent;
}

/* ---------- Hero ---------- */
.hero-with-video {
  position: relative;
  overflow: hidden;
  background: #0b1220;
  min-height: calc(100vh - 3.25rem);
  display: flex;
  align-items: center;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.42) 100%);
}

.hero-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 4rem 1.5rem;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  /* feathered radial scrim: darkens behind the text with no visible
     panel edge, the tile wall stays visible all around */
  background: radial-gradient(ellipse 95% 90% at center,
    rgba(5, 8, 14, 0.66) 0%,
    rgba(5, 8, 14, 0.34) 58%,
    rgba(5, 8, 14, 0) 100%);
  padding: 2.6rem 2rem;
}

.hero-with-video .publication-title,
.hero-with-video .publication-authors {
  color: #fff !important;
}

.hero-with-video .publication-title {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem) !important;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.75);
  margin-bottom: 1.1rem;
}

.hero-with-video .publication-authors {
  line-height: 2;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.8);
}

.hero-with-video .publication-authors a {
  color: #6ea8e8 !important;
  font-weight: 700;
  border-bottom: none;
}

.hero-with-video .publication-authors a:hover {
  color: #b6e2ff !important;
}

.hero-with-video .publication-authors sup {
  color: rgba(255, 255, 255, 0.85);
}

.hero-with-video .affiliations {
  color: rgba(255, 255, 255, 0.88);
  margin-top: 0.35rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* never break an author name / affiliation across lines */
.author-block {
  display: inline-block;
}

.hero-with-video .author-notes {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.4rem;
  font-size: 0.85rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.arxiv-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232, 239, 248, 0.95);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 1.1rem;
}

.arxiv-badge:hover {
  color: #fff;
  background: var(--hkust-blue);
}

.publication-links {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.publication-links .button {
  border-radius: 999px;
  font-weight: 600;
}

.publication-links .button.is-dark {
  background: rgba(31, 45, 61, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
}

.publication-links .button.is-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.publication-links .button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.publication-links .icon.hf-emoji {
  font-size: 1.05rem;
  font-style: normal;
}

.publication-links .button.is-dark[disabled]:hover {
  background: rgba(31, 45, 61, 0.92);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

/* ---------- Sections ---------- */
.section {
  padding: 3.25rem 1.5rem;
}

section[id] {
  scroll-margin-top: 3.5rem;
}

.section-heading {
  display: inline-block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.section-heading::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 2px;
  background: var(--hkust-gold);
  margin: 0.55rem auto 0;
}

/* when a subtitle follows, tighten the heading's own spacing instead of
   pulling the subtitle up with a negative margin */
.section-heading:has(+ .section-subtitle) {
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.content.has-text-justified p,
p.has-text-justified {
  text-align: justify;
  hyphens: auto;
  line-height: 1.7;
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.4rem 1rem;
  height: 100%;
}

.stat-num {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

/* ---------- Key idea cards ---------- */
.idea-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.4rem;
  height: 100%;
  text-align: left;
}

.idea-card .idea-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.idea-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.idea-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- Figures & videos ---------- */
.figure-card,
.video-card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  background: #fff;
}

.video-card {
  display: block;
  margin: 0 auto;
}

.figure-caption {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.75rem;
}

/* ---------- Primitive chips ---------- */
.primitive-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  border-radius: 10px;
  padding: 0.55rem 1.1rem;
  font-size: 1rem;
}

.primitive-arrow {
  color: #b6c2cf;
  font-size: 1.2rem;
  margin: 0 0.4rem;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  background: #fff;
  padding: 0.5rem;
  margin-bottom: 1.75rem;
}

table.results-table {
  font-size: 0.86rem;
  margin: 0 auto;
  background: transparent;
}

table.results-table th:not([align]),
table.results-table td:not([align]) {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0.42em 0.7em;
  /* one rule color for every cell, highlighted or not; dark enough to
     stay visible on both #fff and the accent-soft highlight */
  border-color: #d7e2ef;
}

table.results-table td.task-name:not([align]) {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

table.results-table thead th {
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid #c2d2e8;
}

table.results-table td.ours,
table.results-table th.ours {
  background: var(--accent-soft);
  color: var(--accent);
}

table.results-table th.ours {
  font-weight: 700;
}

/* average rows are set off by the rule above them only; keeping the
   numbers regular weight lets bold/underline mean best/second-best
   exactly like the paper's tables */
table.results-table tr.row-avg td {
  border-top: 2px solid #c2d2e8;
}

table.results-table td.best {
  font-weight: 700;
}

table.results-table td.second {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.table-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: -1.1rem;
  margin-bottom: 1.75rem;
}

/* ---------- BibTeX ---------- */
pre {
  background: #f7fafd;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  font-size: 0.86rem;
  overflow-x: auto;
}

/* ---------- Footer ---------- */
.footer {
  background: #fbfcfe;
  border-top: 1px solid #f0f3f7;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
}

.footer .icon-link {
  color: var(--muted);
  font-size: 1.5rem;
  margin: 0 0.6rem;
}

.footer .icon-link:hover {
  color: var(--accent);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 768px) {
  .hero-content {
    padding: 2rem 1.5rem;
  }
  .publication-title {
    font-size: 1.55rem;
  }
  .stat-num {
    font-size: 1.7rem;
  }
}








