/* ============================================================
   Reshoot-Anything — Paper Website Stylesheet
   ============================================================ */

:root {
  --accent: #000000;
  --accent-light: #f0f0f0;
  --bg: #ffffff;
  --surface: #f7f7f7;
  --border: #d0d0d0;
  --text: #111111;
  --muted: #555555;
  --code-bg: #f4f4f4;
  --radius: 6px;
  --max-width: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 64px 0;
}

section:nth-child(even) {
  background: var(--surface);
}

/* ── Header ──────────────────────────────────────────────── */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────── */
#hero {
  text-align: center;
  padding: 72px 0 56px;
}

.venue-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.authors {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 8px;
}

.affiliation {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--bg);
  transition: all 0.15s;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.btn-primary {
  background: #111111;
  border-color: #111111;
  color: #fff;
}

.btn-primary:hover {
  background: #333333;
  border-color: #333333;
  color: #fff;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── TL;DR ───────────────────────────────────────────────── */
.tldr {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-size: 15px;
  max-width: 780px;
  margin: 0 auto;
}

.tldr strong { color: var(--accent); }

/* ── Section headings ────────────────────────────────────── */
h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  text-align: center;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

p {
  color: var(--text);
  margin-bottom: 12px;
}

p:last-child { margin-bottom: 0; }

/* ── Video grid ──────────────────────────────────────────── */
.video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.video-pair video, .video-single video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  background: #000;
}

.video-label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.video-card {
  display: flex;
  flex-direction: column;
}

.video-card video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  background: #000;
}

/* ── Inference example ───────────────────────────────────── */
.inference-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.inference-row-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 8px;
  text-align: center;
}

/* ── Images ──────────────────────────────────────────────── */
.figure {
  margin: 0 auto 16px;
  text-align: center;
}

.figure img {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.figure-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Data pipeline figure ────────────────────────────────── */
.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 20px 0;
}

.pipeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pipeline-item video {
  width: clamp(140px, 18vw, 220px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}

.pipeline-arrow {
  font-size: 24px;
  color: var(--accent);
  padding: 0 8px;
  font-weight: 700;
}

.pipeline-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Comparison table ────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

thead tr {
  background: var(--surface);
}

th {
  padding: 10px 12px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
}

th.left, td.left { text-align: left; }

td {
  padding: 9px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }

tr.separator td {
  border-top: 2px solid var(--border);
  padding-top: 12px;
}

.bold { font-weight: 700; }
.ours-row { background: #f0f0f0; }
.ours-row td:first-child { font-weight: 700; color: #111111; }

.best { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); }

/* ── Section divider ─────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── BibTeX ──────────────────────────────────────────────── */
.bibtex {
  background: var(--code-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  color: #334155;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

/* ── Acknowledgements ────────────────────────────────────── */
.ack {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

/* ── Arrow / label helpers ───────────────────────────────── */
.arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
  padding: 4px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
  .video-pair { grid-template-columns: 1fr; }
  .inference-table { grid-template-columns: 1fr; }
  .pipeline-item video { width: 150px; }
  .pipeline-arrow { font-size: 18px; }
  nav { flex-direction: column; align-items: flex-start; }
}
