/* World-R0 project page — styled after the PanoWorld template (Bulma based) */
:root {
  --ink: #1b2430;
  --navy: #243d54;
  --navy-2: #35506a;
  --teal: #2a9d8f;
  --coral: #e76f51;
  --amber: #c0843d;
  --blue: #3a86ff;
  --muted: #546071;
  --line: #e5e9f0;
  --surface: #fbfcfe;
}

html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans', sans-serif; color: var(--ink); background: #fff; }
.content p { font-size: 1.02rem; line-height: 1.85; }

/* ---------- top showcase: tech background image + contrast overlay ---------- */
.top-showcase {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6,14,30,.52) 0%, rgba(6,14,30,.66) 48%, rgba(6,14,30,.80) 100%),
    url('../assets/img/hero-bg.webp') center 42% / cover no-repeat,
    #0a1526;
}
.top-showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 118px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 88px);
}
.top-showcase .navbar { position: relative; z-index: 30; background: transparent; }
.top-showcase .navbar-item { color: rgba(255,255,255,.88); }
.top-showcase .navbar-item:hover, .top-showcase .navbar-item:focus { color: #fff; background-color: transparent; }
.top-showcase .navbar-burger { color: rgba(255,255,255,.9); }
.top-showcase .navbar-burger:hover { background: transparent; }
.top-showcase .hero { position: relative; z-index: 1; background: transparent; }
.navbar-item { font-weight: 500; }

.publication-title { font-family: 'Google Sans', sans-serif; line-height: 1.14; max-width: 1120px; margin-inline: auto; text-wrap: balance; color: #f5f8fc; }
/* stylized "World-R0": same font, vivid animated gradient + soft glow */
.publication-title .title-art {
  background: linear-gradient(110deg, #6fb6ff 0%, #5fe0cf 26%, #d7ecff 50%, #5fe0cf 74%, #c3a4ff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #6fb6ff; /* fallback */
  font-weight: 700;
  letter-spacing: -.015em;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
  animation: title-art-shine 7s linear infinite;
}
@keyframes title-art-shine {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
  .publication-title .title-art { animation: none; }
}
.publication-authors { font-family: 'Google Sans', sans-serif; color: #eaf1f8; }
.publication-authors sup, .publication-notes sup { font-size: .62em; vertical-align: super; line-height: 0; }
.publication-affiliation { color: #c9d6e4; margin-top: .45rem; font-size: 1.02rem; }
.publication-notes { color: #aebfd2; font-style: italic; margin-top: .55rem; }
.publication-links { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.icon .inline-icon { display: block; width: 1em; height: 1em; fill: currentColor; }
.button.is-rounded { box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.button.is-dark { background: #1f3446; }
.button.is-dark:hover { background: #2b4a63; }
.button.is-light { background: #fff; color: #1f3446; border: 1px solid #d8e0e8; }
.button.is-light:hover { background: #f2f7fa; color: #1f3446; }

/* ---------- teaser + figures ---------- */
.teaser .hero-body { padding-top: 2.6rem; padding-bottom: 1.2rem; }
.teaser + .section { padding-top: 1.4rem; }
.teaser-image, .section-image {
  display: block; width: 100%; border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15,23,42,.08);
}
.feature-figure { margin-top: 1.4rem; }
/* framework / action / video-vis figures: pull in from full-bleed width */
.framework-figure .section-image, .vis-figure .section-image { width: 78%; max-width: 820px; margin-left: auto; margin-right: auto; }
.framework-figure .figcaption-custom, .vis-figure .figcaption-custom { max-width: 820px; margin-left: auto; margin-right: auto; }
/* shift figures stacked vertically, narrower than full width */
.shift-stack { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; margin-top: 1.6rem; }
.shift-stack .feature-figure { width: 86%; max-width: 880px; margin-top: 0; }
.shift-stack .feature-figure .section-image { width: 100%; height: auto; }
.shift-stack .feature-figure .figcaption-custom { margin-top: .8rem; }
.section-copy { max-width: 940px; margin: 1.2rem auto 0; }
.teaser-caption { color: var(--muted); max-width: 940px; margin: 1.1rem auto 0; line-height: 1.6; }
.figcaption-custom { color: var(--muted); font-size: .95rem; margin-top: .8rem; text-align: center; }

/* ---------- paradigm / probe cards ---------- */
.card-grid { display: grid; gap: 1rem; }
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card-grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 1.4rem 1.15rem; box-shadow: 0 12px 30px rgba(15,23,42,.045);
  transition: transform .16s ease, box-shadow .16s ease;
}
.info-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(15,23,42,.09); }
.info-card .eyebrow { font-size: .64rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.info-card h3 { font-family: 'Google Sans', sans-serif; font-size: 1.05rem; margin: .5rem 0 .4rem; color: #1b2430; }
.info-card p { font-size: .9rem; color: #4c5563; margin: 0; }
.tag-pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; }
.tag-blue { background: rgba(58,134,255,.12); color: #2166c9; }
.tag-teal { background: rgba(42,157,143,.13); color: #16796d; }
.tag-amber { background: rgba(192,132,61,.14); color: #a4651d; }
.probe-card h3 { min-height: 2.6rem; }
.probe-img { display: block; width: 100%; height: 96px; object-fit: cover; border-radius: 9px; margin: .55rem 0 .6rem; border: 1px solid var(--line); }
.probe-card p { margin-top: .1rem; }
.probe-card .metric-label { font-size: .8rem; color: var(--muted); }
.probe-card .metric-value {
  font-family: 'Google Sans', sans-serif; font-size: 1.75rem; font-weight: 700;
  color: var(--navy-2); line-height: 1.15; margin: .35rem 0 .5rem;
}
.gap-card { border-left: 3px solid var(--teal); background: #fff; border-radius: 0 12px 12px 0; padding: 1rem 1.2rem; box-shadow: 0 10px 26px rgba(15,23,42,.04); }
.gap-card b { display: block; color: #1b2430; margin-bottom: .2rem; }
.gap-card p { font-size: .9rem; color: #4c5563; margin: 0; }

/* ---------- quantitative (template style) ---------- */
.quantitative-section { padding-top: 2.2rem; }
.quantitative-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15,23,42,.06); padding: 1.75rem 1.35rem 1.2rem;
}
.quantitative-card + .quantitative-card { margin-top: 2rem; }
.quantitative-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem 1rem; margin: .65rem 0 1.1rem; color: #475467; font-size: .94rem; }
.quantitative-legend-item { display: inline-flex; align-items: center; gap: .45rem; }
.quantitative-legend-swatch { width: .85rem; height: .85rem; border-radius: .3rem; display: inline-block; flex: none; }
.quantitative-highlight-chip { width: 1.1rem; height: .85rem; border-radius: .35rem; display: inline-block; background: rgba(39,74,99,.10); border: 1px dashed rgba(39,74,99,.4); }
.quantitative-highlight-note { color: #35506a; }
.quantitative-chart { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
.quantitative-chart svg { display: block; height: auto; }
.quantitative-caption { max-width: 940px; margin: 1rem auto 0; color: var(--muted); font-size: .96rem; line-height: 1.75; text-align: justify; }
.chart-block { margin-top: .4rem; padding-top: 0; border-top: 0; }
.quantitative-conclusion { max-width: 940px; margin: 1.1rem auto 0; padding: .9rem 1.1rem; border-left: 3px solid #2166c9; background: rgba(33,102,201,.06); color: #1f2b3d; font-size: .98rem; line-height: 1.75; text-align: justify; }

/* ---------- chain / formula ---------- */
.chain { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; margin: 1.6rem 0 1rem; }
.chain-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; box-shadow: 0 10px 26px rgba(15,23,42,.04); }
.chain-step .num { font-size: .72rem; font-weight: 700; letter-spacing: .07em; color: #2166c9; }
.chain-step h3 { font-size: 1rem; margin: .45rem 0 .4rem; }
.chain-step p { font-size: .88rem; color: #4c5563; margin: 0; }
.chain-step:not(:last-child)::after { content:""; position:absolute; right:-9px; top:50%; width:8px; height:8px; border-top:2px solid #aeb9c8; border-right:2px solid #aeb9c8; transform:translateY(-50%) rotate(45deg); }
.formula-box {
  background: linear-gradient(135deg,#f4f9f9,#f7f9fc); border: 1px solid #dbe7e6;
  border-radius: 14px; padding: 1.1rem 1.4rem; text-align: center;
  font-family: 'Cambria Math','STIX Two Math',Georgia,serif; font-size: 1.35rem; color: #1b3b4a;
  max-width: 720px; margin: 1.6rem auto 0;
}
.formula-box .note { display:block; font-family:'Noto Sans',sans-serif; font-size:.85rem; color:var(--muted); margin-top:.5rem; }
.formula-expand { max-width: 940px; margin: 1rem auto 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(15,23,42,.04); }
.formula-box .math-formula { display: block; font-family: 'Cambria Math','STIX Two Math',Georgia,serif; }
.formula-box .math-formula .katex { font-size: 1.15em; color: #1b3b4a; }
.formula-box .math-formula .katex-display { margin: 0; }

/* ---------- data table ---------- */
.table-wrap { overflow-x: auto; margin-top: 1.4rem; }
table.data-table { border-collapse: collapse; width: 100%; font-size: .9rem; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 30px rgba(15,23,42,.05); }
table.data-table th, table.data-table td { border-bottom: 1px solid var(--line); padding: .65rem .8rem; text-align: center; white-space: nowrap; }
table.data-table th { background: #f4f7fa; font-weight: 700; color: #33404f; }
table.data-table td:first-child, table.data-table th:first-child { text-align: left; }
table.data-table tr.hl td { background: rgba(42,157,143,.10); font-weight: 700; color: #12685e; }
table.data-table tr.hl2 td { background: rgba(192,132,61,.10); }
table.data-table caption { caption-side: top; text-align: left; font-weight: 700; margin-bottom: .6rem; color: #33404f; }

/* ---------- video galleries (side by side) ---------- */
.gallery-grid { display: grid; gap: .75rem; }
.gallery-grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.gallery-grid.cols-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.video-cell { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 22px rgba(15,23,42,.06); transition: transform .16s ease, box-shadow .16s ease; }
.video-cell:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,23,42,.11); }
.video-cell video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #0f141b; }
.video-cell figcaption { padding: .55rem .6rem .7rem; font-size: .78rem; line-height: 1.4; color: #3d4451; min-height: 3.3rem; }
.video-cell figcaption .suite { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .04em; color: #2166c9; margin-bottom: .15rem; }

/* ---------- reconstruction comparison cards (GT / V-RAE / World-R0) ---------- */
.rec-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem; max-width: 1000px; margin: 1.6rem auto 0; }
.rec-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(15,23,42,.06); }
.rec-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .95rem; background: #f6f9fb; border-bottom: 1px solid var(--line); }
.rec-card-head b { font-size: .95rem; color: #1b2430; }
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .45rem; padding: .7rem; }
.rec-cell { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.rec-label { text-align: center; font-size: .78rem; font-weight: 600; color: #546071; }
.rec-label-hl { color: #12685e; }
.rec-cell video { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #0f141b; border-radius: 7px; }

/* ---------- bibtex + limits ---------- */
.bibtex-card { margin-top: 1rem; padding: 1.1rem; border: 1px solid #d9dde5; border-radius: 16px; background: #fff; }
.bibtex-card pre { margin: 0; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid #e2e7ef; background: #fff !important; color: #111827 !important; overflow-x: auto; }
.bibtex-card code { font-size: .92rem; line-height: 1.6; white-space: pre; color: #111827 !important; background: transparent !important; }
.limits-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 0; box-shadow: 0 16px 40px rgba(15,23,42,.06); margin: 1.6rem auto 0; overflow: hidden; }
.limits-head { display: flex; align-items: center; gap: .95rem; padding: 1.15rem 1.4rem; background: linear-gradient(100deg,#eef4fb 0%,#f3f9f8 100%); border-bottom: 1px solid var(--line); }
.limits-head-icon { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg,#3a86ff,#2a9d8f); box-shadow: 0 6px 16px rgba(58,134,255,.24); }
.limits-head-icon svg { width: 23px; height: 23px; fill: #fff; }
.limits-title { font-family: 'Google Sans',sans-serif; font-size: 1.2rem; font-weight: 700; color: #1b2430; margin: 0; text-align: left; }
.limits-subtitle { font-size: .85rem; color: var(--muted); margin: .1rem 0 0; }
.limits-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; }
.limit-item { position: relative; background: #fff; padding: 1.15rem 1.25rem 1.3rem; border-right: 1px solid var(--line); transition: background .18s ease, transform .18s ease; }
.limit-item:last-child { border-right: 0; }
.limit-item:hover { background: #fbfcfe; transform: translateY(-3px); }
.limit-item::before { content:""; position:absolute; top:0; left:0; right:0; height:3px; }
.limit-item.accent-blue::before { background: linear-gradient(90deg,#3a86ff,#7bb0ff); }
.limit-item.accent-amber::before { background: linear-gradient(90deg,#c0843d,#e8b878); }
.limit-item.accent-teal::before { background: linear-gradient(90deg,#2a9d8f,#6cc9bb); }
.limit-item-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.limit-num { font-family: 'Google Sans',sans-serif; font-size: 1.7rem; font-weight: 700; line-height: 1; color: #e7ecf3; }
.limit-item h4 { font-family: 'Google Sans',sans-serif; font-size: 1rem; font-weight: 700; color: #1b2430; margin: .55rem 0 .5rem; }
.limit-item p { font-size: .88rem; line-height: 1.65; color: #4c5563; margin: 0; }
.limit-item p b { color: #1b2430; }
.limit-tag { font-size: .66rem; font-weight: 700; letter-spacing: .07em; white-space: nowrap; }
.stat-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }
.stat-strip .info-card { text-align: center; }

@media screen and (max-width: 1023px) {
  .card-grid.cols-5, .card-grid.cols-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid.cols-3 { grid-template-columns: 1fr; }
  .chain, .stat-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gallery-grid.cols-6 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .gallery-grid.cols-5 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .rec-list { grid-template-columns: 1fr; }
  .formula-box .math-formula .katex { font-size: 1em; }
  .limits-grid { grid-template-columns: 1fr; }
  .limit-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .limit-item:last-child { border-bottom: 0; }
}
@media screen and (max-width: 640px) {
  .publication-title { font-size: 2.1rem !important; }
  .card-grid.cols-5, .card-grid.cols-4, .chain, .stat-strip { grid-template-columns: 1fr 1fr; }
  .gallery-grid.cols-6, .gallery-grid.cols-5 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content p { font-size: .98rem; }
}

/* ---------- image lightbox (click to enlarge) ---------- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 4vmin; background: rgba(6, 14, 30, .88);
  cursor: zoom-out;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-img {
  max-width: 100%; max-height: 92vh; width: auto; height: auto;
  box-shadow: 0 18px 60px rgba(0,0,0,.55); border-radius: 6px;
  background: #fff;
}
.lightbox-close {
  position: absolute; top: 2.2vmin; right: 3vmin;
  font-size: 2.4rem; line-height: 1; color: #fff; opacity: .85;
  cursor: pointer; user-select: none;
}
.lightbox-close:hover { opacity: 1; }
img.zoomable { transition: opacity .15s ease; }
img.zoomable:hover { opacity: .88; }
