/* Prior-driven 3DGS project page — conventional academic layout */
:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-faint: #7a7a7a;
  --line: #e5e5e5;
  --bg-alt: #f7f7f8;
  --link: #3273dc;
  --ours: #c0392b;
  --max: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- header ---------- */
.hero { text-align: center; padding: 40px 0 10px; }
.title {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 2.15rem; line-height: 1.2; font-weight: 700;
  margin: 0 auto; max-width: 900px; letter-spacing: -.01em;
}
.venue {
  margin: 8px 0 0; font-size: 1.15rem; font-weight: 600; color: var(--ink-soft);
}
.authors { margin: 10px 0 0; font-size: 1.08rem; }
.authors span { white-space: nowrap; margin: 0 .45em; }
.authors sup, .affils sup { font-size: .68em; }
.affils { margin: 6px 0 0; color: var(--ink-soft); font-size: 1rem; }
.affils span { margin: 0 .6em; white-space: nowrap; }

.buttons { margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px;
  background: #363636; color: #fff; font-size: .95rem; font-weight: 500;
}
.button:hover { background: #1f1f1f; text-decoration: none; }
.button svg { width: 17px; height: 17px; fill: currentColor; }
.button.disabled { background: #b5b5b5; cursor: default; }

/* ---------- sections ---------- */
section { padding: 22px 0; }
section.alt { background: var(--bg-alt); }
h2 {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.5rem; font-weight: 700; text-align: center; margin: 0 0 12px;
}
h3 { font-size: 1.08rem; font-weight: 700; margin: 20px 0 8px; }
p { margin: 0 0 14px; }
.abstract p { text-align: justify; }

figure { margin: 0; }
figure img {
  display: block; width: 100%; height: auto; border-radius: 6px;
  cursor: zoom-in;
}
figcaption { margin-top: 10px; color: var(--ink-soft); font-size: .93rem; text-align: center; }
.teaser figcaption { text-align: left; font-size: 1rem; color: var(--ink); }
.teaser figcaption b { font-weight: 700; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 10px; }
.two-col h4 { margin: 0 0 6px; font-size: 1.02rem; }
.two-col p { font-size: .96rem; color: var(--ink-soft); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 6px 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th {
  font-weight: 700; text-align: center; padding: 5px 8px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
}
thead tr + tr th { border-top: 0; font-weight: 600; font-size: .85rem; color: var(--ink-soft); }
tbody td { text-align: center; padding: 4px 8px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
th:first-child, td:first-child { text-align: left; }
td .m { color: var(--ink-faint); font-size: .85em; }
tr.ours td { font-weight: 700; background: #fdf3f2; }
.note { font-size: .88rem; color: var(--ink-faint); margin-top: 6px; }

/* ---------- bibtex ---------- */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0; padding: 18px 20px; background: #f5f5f5; border-radius: 6px;
  font-family: "JetBrains Mono", Menlo, Consolas, monospace; font-size: .85rem;
  line-height: 1.55; overflow-x: auto; white-space: pre;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  font: 500 .8rem "Noto Sans", sans-serif; padding: 4px 11px;
  border: 1px solid #d0d0d0; border-radius: 5px; background: #fff; cursor: pointer;
}
.copy-btn:hover { background: #eee; }

footer { padding: 30px 0 44px; text-align: center; color: var(--ink-faint); font-size: .88rem; }
/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88);
  display: none; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .title { font-size: 1.75rem; }
  .two-col { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- method cards ---------- */
.eq {
  margin: 10px 0 4px; padding: 10px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; text-align: center; font-size: .98rem; overflow-x: auto;
}
.eq i { font-family: "Times New Roman", Times, serif; font-size: 1.08em; }
.eq b { color: var(--ours); }

/* ---------- comparison slider ---------- */
.cmp-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.cmp-bar {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); background: #fafafa;
}
.cmp-nav {
  width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #fff; background: #363636; border: 0; border-radius: 50%; cursor: pointer;
}
.cmp-nav:hover { background: #1f1f1f; }
.cmp-counter { font-family: "JetBrains Mono", monospace; font-size: .85rem; font-weight: 600; min-width: 58px; text-align: center; }
.cmp-scene { font-size: .85rem; color: var(--ink-soft); }
.cmp-left { margin-left: auto; display: flex; gap: 4px; }
.cmp-left button {
  font: 500 .8rem "Noto Sans", sans-serif; padding: 4px 10px; cursor: pointer;
  border: 1px solid #d0d0d0; border-radius: 5px; background: #fff;
}
.cmp-left button.on { background: #363636; color: #fff; border-color: #363636; }
.cmp {
  position: relative; width: 100%; aspect-ratio: 1200 / 665; background: #1f2333;
  user-select: none; touch-action: none; cursor: ew-resize; overflow: hidden;
}
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cmp .cmp-top { clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.5); }
.cmp-knob {
  position: absolute; top: 50%; left: var(--x, 50%); width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; font-size: .75rem; color: #363636;
}
.cmp-tag {
  position: absolute; top: 10px; padding: 2px 9px; border-radius: 4px;
  background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; font-weight: 600;
}
.cmp-tag.l { left: 10px; }
.cmp-tag.r { right: 10px; background: rgba(192,57,43,.85); }
.cmp-psnr { padding: 7px 14px; font-family: "JetBrains Mono", monospace; font-size: .8rem; color: var(--ink-faint); border-top: 1px solid var(--line); }
.cmp-psnr b { color: var(--ours); }
@media (max-width: 760px) { .cmp-left { margin-left: 0; } }

/* ---------- v2: pipeline, demo, chart, 3D ---------- */
.pipeline { margin: 8px 0 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px; }
.pipeline svg { display: block; width: 100%; height: auto; }
.katex-block { margin: 10px 0; overflow-x: auto; text-align: center; }
.eq-caption { text-align: center; font-size: .9rem; color: var(--ink-soft); margin-top: -2px; }

.demo { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fff; }
.demo-head h4 { margin: 0 0 4px; font-size: 1.02rem; }
.demo-head p { margin: 0 0 10px; font-size: .93rem; color: var(--ink-soft); }
.demo-body { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: center; }
#nlCanvas { width: 100%; height: auto; display: block; border-radius: 6px; background: #fafafa; border: 1px solid var(--line); }
.demo-controls label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
.demo-controls input[type="range"] { width: 100%; margin: 6px 0 2px; accent-color: var(--ours); }
.demo-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.demo-readout > div { display: flex; flex-direction: column; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; }
.ro-num { font-size: 1.1rem; font-weight: 700; color: var(--ours); font-variant-numeric: tabular-nums; }
.ro-lab { font-size: .76rem; color: var(--ink-faint); }
.demo-btn { margin-top: 10px; font: 500 .82rem "Noto Sans", sans-serif; padding: 5px 12px; border: 1px solid #d0d0d0; border-radius: 5px; background: #fff; cursor: pointer; }
.demo-btn:hover { background: #eee; }
.demo-foot { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }

.hw { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.hw figure { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.hw figure img { height: 190px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.hw h4 { margin: 10px 0 4px; font-size: 1rem; }
.hw p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

.chart { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px 14px 8px; }
.chart h4 { margin: 0 0 6px; font-size: .98rem; }
.chart svg { display: block; width: 100%; height: auto; }
.findings { margin: 12px 0 0; padding-left: 20px; font-size: .95rem; color: var(--ink-soft); }
.findings li { margin-bottom: 6px; }

.gs-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.gs-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: #fafafa; flex-wrap: wrap; }
.gs-bar .tab { font: 500 .85rem "Noto Sans", sans-serif; padding: 5px 13px; border: 1px solid #d0d0d0; border-radius: 999px; background: #fff; cursor: pointer; }
.gs-bar .tab.on { background: #363636; color: #fff; border-color: #363636; }
.gs-bar .hint { margin-left: auto; font-size: .78rem; color: var(--ink-faint); }
.gs-2col { display: grid; grid-template-columns: 1fr 1fr; }
.gs-panel { position: relative; border-right: 1px solid var(--line); }
.gs-panel:last-child { border-right: 0; }
.gs-label { text-align: center; padding: 6px 0; font-size: .88rem; font-weight: 700; border-bottom: 1px solid var(--line); }
.gs-panel.ours .gs-label { color: var(--ours); }
.gs-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #1f2333; }
.gs-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gs-start {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: #1f2333 center / cover no-repeat; color: #fff; cursor: pointer; border: 0; width: 100%; font: inherit;
}
.gs-start::before { content: ""; position: absolute; inset: 0; background: rgba(20,24,36,.55); }
.gs-start span { position: relative; }
.gs-start .big { font-size: 1.05rem; font-weight: 700; padding: 9px 20px; border-radius: 999px; background: var(--ours); }
.gs-start .small { font-size: .8rem; opacity: .85; }
@media (max-width: 760px) {
  .demo-body, .hw { grid-template-columns: 1fr; }
  .gs-2col { grid-template-columns: 1fr; }
  .gs-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .gs-bar .hint { display: none; }
}
