/* ============================================================
   RVizSplat — project page (professional, data-first)
   ============================================================ */

:root {
  --bg:           #ffffff;
  --bg-alt:       #f7f8fa;
  --bg-data:      #fafbfc;
  --ink:          #0f172a;
  --ink-soft:     #334155;
  --ink-mute:     #64748b;
  --line:         #e5e7eb;
  --line-strong:  #cbd5e1;
  --accent:       #2563eb;
  --accent-soft:  #eff6ff;
  --code-bg:      #f3f4f6;

  --green:        #0ea372;
  --green-soft:   #ecfdf5;
  --indigo:       #4f46e5;
  --indigo-soft:  #eef2ff;
  --amber:        #b45309;
  --amber-soft:   #fffbeb;

  --sans:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --col:        720px;
  --col-wide:   1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

p { margin: 0 0 14px; color: var(--ink-soft); }
strong { color: var(--ink); }

code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #f1f5f9;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
}
pre code { background: transparent; padding: 0; color: inherit; }

.muted { color: var(--ink-mute); }
.cgreen  { color: var(--green); }
.cindigo { color: var(--indigo); }

/* ============================================================
   TOP NAV (sticky, minimal)
   ============================================================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 22px; height: 22px; }
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-gh {
  background: var(--ink);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.nav-gh:hover { background: #000; }
@media (max-width: 720px) { .nav-links a:not(.nav-gh) { display: none; } }

/* ============================================================
   HERO / PAGE TOP
   ============================================================ */
.page-top {
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 64px 32px 32px;
  text-align: center;
}

.venue {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 22px;
}

.paper-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 18px;
}

.hero-tagline {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 auto 28px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.link-btn:hover { background: var(--bg-alt); border-color: var(--ink-mute); text-decoration: none; }
.link-btn:active { transform: translateY(1px); }
.link-btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.link-btn-primary:hover { background: #000; border-color: #000; }
.link-btn svg { display: block; }

.hero-figure { margin: 8px 0 0; }
.hero-figure img {
  width: 100%;
  max-width: 1080px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

/* ============================================================
   BLOCKS
   ============================================================ */
.block {
  padding: 64px 32px;
  border-top: 1px solid var(--line);
}
.block-alt { background: var(--bg-alt); }

.col {
  max-width: var(--col);
  margin: 0 auto;
}
.col-wide {
  max-width: var(--col-wide);
  margin: 0 auto;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.block-alt .kicker { color: var(--indigo); }

.h2 {
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
  line-height: 1.2;
}
.h2-left { text-align: left; }

.h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 22px 0 10px;
  color: var(--ink);
}
.h3-spaced { margin-top: 36px; }

.lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 760px;
}

/* ============================================================
   FEATURE GRID (3 col)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
@media (max-width: 820px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
}
.feature h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   DEMO VIDEO
   ============================================================ */
.video-figure { margin: 0; }
.video-figure video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.video-figure figcaption,
.diagram-figure figcaption,
.data-figure figcaption {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mute);
  margin-top: 12px;
  text-align: left;
  max-width: 840px;
}

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */
.diagram-figure {
  margin: 28px 0 22px;
  text-align: center;
}
.pipeline-svg {
  width: 100%;
  height: auto;
  max-width: 1080px;
  display: block;
  margin: 0 auto;
}
.pipeline-svg .lane-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pipeline-svg .dia-node rect {
  fill: #fff;
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.pipeline-svg .dia-core rect    { stroke: #475569; }
.pipeline-svg .dia-sorted rect  { stroke: var(--green); }
.pipeline-svg .dia-sorted-out rect { fill: var(--green-soft); stroke: var(--green); }
.pipeline-svg .dia-wboit rect   { stroke: var(--indigo); }
.pipeline-svg .dia-wboit-out rect  { fill: var(--indigo-soft); stroke: var(--indigo); }
.pipeline-svg .dia-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  fill: var(--ink);
  text-anchor: middle;
}
.pipeline-svg .dia-title-sm {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
}
.pipeline-svg .dia-sub {
  font-family: var(--sans);
  font-size: 11px;
  fill: var(--ink-mute);
  text-anchor: middle;
}
.pipeline-svg .dia-branch {
  font-family: var(--sans);
  font-style: italic;
  font-size: 12.5px;
  fill: var(--ink-mute);
}
.pipeline-svg .dia-mode {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  text-anchor: middle;
}
.pipeline-svg .dia-mode-sorted { fill: var(--green); }
.pipeline-svg .dia-mode-wboit  { fill: var(--indigo); }

/* ============================================================
   DATA TABLES (quality, comparison, recommendation)
   ============================================================ */
.data-figure {
  margin: 24px 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14.5px;
}
.data-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-data);
}
.data-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-data); }
.data-table .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
}
.data-table tbody tr.us-row {
  background: var(--accent-soft);
}
.data-table tbody tr.us-row:hover { background: var(--accent-soft); }
.data-table tbody tr.us-row td {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
}

/* Recommendation pills */
.reco {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.reco-sorted { background: var(--green-soft);  color: var(--green); }
.reco-wboit  { background: var(--indigo-soft); color: var(--indigo); }
.reco-mixed  { background: var(--amber-soft);  color: var(--amber); }
.reco-cuda   {
  background: linear-gradient(135deg, var(--green-soft), #d1fae5);
  color: var(--green);
  border: 1px solid var(--green);
  font-weight: 700;
}

/* Sub-line label inside table cells (e.g. "+ CUDA Toolkit", "≥ 3M splats") */
.row-sub {
  display: inline-block;
  font-size: 12px;
  color: var(--ink-mute);
  font-weight: 500;
}

/* "Why" column reads softer than the main columns */
.data-table .row-why {
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* Highlight the headline CUDA row */
.data-table tbody tr.row-group td {
  background: linear-gradient(180deg, rgba(14,163,114,.06), rgba(14,163,114,.02));
}
.data-table tbody tr.row-group:hover td {
  background: linear-gradient(180deg, rgba(14,163,114,.10), rgba(14,163,114,.04));
}

/* Soft horizontal break to group rows by hardware tier */
.data-table tbody tr.row-divide td {
  border-top: 1px solid var(--line-strong);
}

.data-figure figcaption {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-data);
  margin-top: 0;
  text-align: left;
  max-width: none;
}

@media (max-width: 760px) {
  .data-table thead th, .data-table tbody td { padding: 10px 12px; font-size: 13.5px; }
  .data-table-recco .reco { white-space: normal; }
}

/* ============================================================
   CUTS (what we tried & removed)
   ============================================================ */
.cut {
  border-left: 3px solid var(--line-strong);
  padding: 4px 0 4px 18px;
  margin: 18px 0 24px;
}
.cut h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}
.cut p { margin: 0; }

/* ============================================================
   TEAM
   ============================================================ */
.team-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 28px;
}
@media (max-width: 540px) { .team-list { grid-template-columns: 1fr; } }
.team-list li {
  font-size: 16px;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.team-list li strong { color: var(--ink); }

.code-block { margin: 16px 0 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 24px 32px 36px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13.5px;
}
.footer a { color: var(--ink-soft); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .page-top { padding: 48px 20px 24px; }
  .block    { padding: 48px 20px; }
}
