/* ==========================================================================
   SimShoot Public Project Page Extensions (project.css)
   Extends assets/style.css while preserving all interactive gallery widgets.
   Palette synced to SimShoot Brand Brief:
     Ink #161a21 · Cobalt #2862c9 · Terracotta #c2581d · Emerald #0a7c63
   ========================================================================== */

:root {
  --brand-ink: #161a21;
  --brand-cobalt: #2862c9;
  --brand-cobalt-soft: #eef4fc;
  --brand-cobalt-border: #bdd3f6;
  --brand-terra: #c2581d;
  --brand-terra-soft: #fdf3eb;
  --brand-terra-border: #f0c2a0;
  --brand-emerald: #0a7c63;
  --brand-emerald-soft: #ebf7f3;
  --brand-emerald-border: #b3dfd1;
  --best-bg: #dff2e8;
  --best-ink: #0c5944;
  --second-bg: #eef7f2;
  --second-ink: #1e6b52;
}

/* ---------- Smooth Anchor Offset ---------- */
section[id],
.subsection[id] {
  scroll-margin-top: 62px;
}

/* ---------- Sticky Top Navigation ---------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(219, 219, 219, 0.78);
  transition: box-shadow 0.18s ease;
}
.sticky-nav.scrolled {
  box-shadow: 0 2px 12px rgba(22, 26, 33, 0.06);
}
.sticky-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.sticky-brand img {
  height: 22px;
  width: auto;
}
.sticky-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-links::-webkit-scrollbar { display: none; }
.sticky-links a {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.14s ease, background 0.14s ease;
}
.sticky-links a:hover {
  color: var(--brand-ink);
  background: #f3f5f8;
}
.sticky-links a.active {
  color: var(--brand-cobalt);
  background: var(--brand-cobalt-soft);
  font-weight: 600;
}

/* ---------- Public Academic Hero ---------- */
.hero-header.project-hero {
  padding: 34px 0 28px;
}
.hero-header.project-hero .hero-brand {
  margin-bottom: 14px;
}
.hero-header.project-hero .hero-logo {
  height: 92px;
}
.hero-header.project-hero .publication-title {
  margin-bottom: 16px;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 22px;
  margin: 0 auto 8px;
  max-width: 820px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--brand-ink);
}
.author-item {
  white-space: nowrap;
}
.author-item a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.author-item a:hover {
  color: var(--brand-cobalt);
  border-bottom-color: var(--brand-cobalt);
}
.author-sup {
  font-size: 0.72em;
  font-weight: 600;
  color: var(--brand-cobalt);
  margin-left: 1px;
}

.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 22px;
  margin: 0 auto 6px;
  max-width: 820px;
  font-size: 0.94rem;
  color: var(--body);
}
.affiliation-item sup {
  color: var(--brand-cobalt);
  font-weight: 600;
  margin-right: 2px;
}
.corresp-note {
  margin: 0 auto 20px;
  font-size: 0.84rem;
  color: var(--muted);
}
.corresp-note a {
  color: var(--brand-cobalt);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.corresp-note a:hover {
  text-decoration: underline;
}

/* Primary Resource Pills + Coming Soon Badges */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pub-btn.resource-btn {
  padding: 9px 17px;
  font-size: 0.89rem;
  gap: 7px;
  background: #24292f;
}
.pub-btn.resource-btn:hover {
  background: var(--brand-cobalt);
}
.pub-btn.resource-btn.soon {
  background: #f4f6f9;
  color: #49525e;
  border: 1px solid #d5dbe3;
  cursor: default;
  transform: none;
}
.pub-btn.resource-btn.soon:hover {
  background: #edf1f6;
  color: var(--brand-ink);
  transform: none;
}
.soon-pill {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e3e8ef;
  color: #525d6b;
}
.pub-btn.video-cta {
  background: var(--brand-cobalt);
  color: #ffffff;
}
.pub-btn.video-cta:hover {
  background: #1f52b0;
}

.quick-jump-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}
.jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}
.jump-pill:hover {
  border-color: var(--brand-cobalt);
  color: var(--brand-cobalt);
  background: var(--brand-cobalt-soft);
}

/* ---------- Abstract & TL;DR Band ---------- */
.tldr-box {
  max-width: 860px;
  margin: 0 auto 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f7faff 0%, #f5fbf8 100%);
  border: 1px solid #d4e3f6;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--brand-ink);
}
.tldr-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--brand-cobalt);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}
.abstract-body {
  max-width: 860px;
  margin: 0 auto;
  text-align: justify;
  font-size: 0.99rem;
  line-height: 1.76;
  color: var(--body);
}
.abstract-body p {
  margin: 0 0 12px;
}
.abstract-body p:last-child {
  margin-bottom: 0;
}

/* ---------- Method & Dataset Construction ---------- */
.method-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1020px;
  margin: 22px auto 0;
}
.method-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 15px 16px;
}
.method-card.planner { border-top: 3px solid var(--brand-cobalt); }
.method-card.simulator { border-top: 3px solid var(--brand-terra); }
.method-card.selector { border-top: 3px solid var(--brand-emerald); }
.method-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  gap: 7px;
}
.method-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.method-card.planner .method-dot { background: var(--brand-cobalt); }
.method-card.simulator .method-dot { background: var(--brand-terra); }
.method-card.selector .method-dot { background: var(--brand-emerald); }
.method-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.56;
  color: var(--body);
}

.dataset-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 1020px;
  margin: 18px auto 16px;
}
.stat-mini {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 12px 14px;
  text-align: center;
}
.stat-mini-val {
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--brand-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-mini-lbl {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Qualitative Comparisons vs. Baselines ---------- */
.compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.compare-track-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.compare-prompt-card {
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  font-size: 0.87rem;
  line-height: 1.56;
  color: var(--body);
}
.compare-prompt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.compare-prompt-head strong {
  color: var(--brand-ink);
  font-size: 0.9rem;
}
.compare-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.compare-action-chip {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--brand-cobalt-soft);
  border: 1px solid var(--brand-cobalt-border);
  color: var(--brand-cobalt);
  font-weight: 600;
}

/* Slider Comparison Stage */
.compare-slider-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
  align-items: start;
}
.compare-wipe-box {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f2f3f5;
  user-select: none;
}
.compare-wipe-box .wipe-stage {
  margin-top: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
.compare-wipe-box .wipe-stage > img,
.compare-wipe-box .wipe-overlay img {
  width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: contain;
  background: #f2f3f5;
}
.compare-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-selector-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compare-method-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.compare-method-btn {
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 500;
  transition: all 0.14s ease;
}
.compare-method-btn:hover {
  border-color: var(--brand-cobalt);
  color: var(--brand-cobalt);
}
.compare-method-btn.active {
  background: var(--brand-cobalt);
  border-color: var(--brand-cobalt);
  color: #ffffff;
}
.compare-thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.compare-mini-card {
  padding: 0;
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  text-align: center;
  transition: border-color 0.14s ease, transform 0.12s ease;
}
.compare-mini-card:hover {
  border-color: var(--brand-cobalt);
  transform: translateY(-1px);
}
.compare-mini-card.active {
  border-color: var(--brand-cobalt);
  box-shadow: 0 0 0 2px rgba(40, 98, 201, 0.18);
}
.compare-mini-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f2f3f5;
}
.compare-mini-card span {
  display: block;
  padding: 4px 5px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* All-7 Side-by-Side Grid Mode */
.compare-all-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.compare-col-card {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}
.compare-col-card.ours {
  border-color: var(--brand-cobalt);
  box-shadow: 0 0 0 1px var(--brand-cobalt);
}
.compare-col-head {
  padding: 6px 5px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compare-col-card.ours .compare-col-head {
  background: var(--brand-cobalt);
  color: #ffffff;
  border-bottom-color: var(--brand-cobalt);
}
.compare-col-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f2f3f5;
}

/* ---------- Quantitative Results & Human Evaluation ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 15px 14px;
  text-align: center;
}
.kpi-val {
  font-size: 1.56rem;
  font-weight: 700;
  color: var(--brand-cobalt);
  letter-spacing: -0.025em;
  line-height: 1.18;
}
.kpi-card.emerald .kpi-val { color: var(--brand-emerald); }
.kpi-card.terra .kpi-val { color: var(--brand-terra); }
.kpi-label {
  margin-top: 4px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--brand-ink);
}
.kpi-sub {
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.38;
}

.results-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
}
.acad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: center;
}
.acad-table th,
.acad-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f3;
  white-space: nowrap;
}
.acad-table thead th {
  background: #f8f9fb;
  color: var(--brand-ink);
  font-weight: 600;
  border-bottom: 1.5px solid #d7dde5;
  font-size: 0.8rem;
}
.acad-table td.method-col,
.acad-table th.method-col {
  text-align: left;
  padding-left: 14px;
}
.acad-table tr.group-row td {
  background: #f3f6fa;
  text-align: left;
  font-weight: 700;
  font-size: 0.79rem;
  color: var(--brand-ink);
  letter-spacing: 0.01em;
  padding: 7px 14px;
}
.acad-table tr.ours-row td {
  background: #f7faff;
  font-weight: 600;
}
.acad-table td.cell-best {
  background: var(--best-bg) !important;
  color: var(--best-ink);
  font-weight: 700;
}
.acad-table td.cell-second {
  background: var(--second-bg) !important;
  color: var(--second-ink);
  font-weight: 600;
}
.table-footnote {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.52;
}

/* Human Eval Win-Rate Chart */
.human-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  align-items: start;
}
.chart-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 16px;
}
.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.chart-head h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--brand-ink);
}
.winrate-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.wr-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) 106px;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}
.wr-name {
  font-weight: 600;
  color: var(--ink-strong);
  text-align: right;
}
.wr-track {
  position: relative;
  height: 24px;
  border-radius: 5px;
  background: #f2f4f7;
  overflow: hidden;
  border: 1px solid #e6eaef;
}
.wr-parity {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  background: #8c96a4;
  z-index: 3;
}
.wr-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  border-radius: 3px;
  transition: width 0.25s ease;
}
.wr-bar.sig {
  background: linear-gradient(90deg, #2862c9 0%, #0a7c63 100%);
}
.wr-bar.tie {
  background: #8e9bab;
}
.wr-ci {
  position: absolute;
  top: 50%;
  height: 2px;
  background: rgba(22, 26, 33, 0.65);
  transform: translateY(-50%);
  z-index: 4;
}
.wr-ci::before,
.wr-ci::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 1.5px;
  height: 8px;
  background: rgba(22, 26, 33, 0.72);
}
.wr-ci::before { left: 0; }
.wr-ci::after { right: 0; }
.wr-val {
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  gap: 5px;
}
.wr-p {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}
.wr-p.sig { background: var(--best-bg); color: var(--best-ink); }
.wr-p.ns { background: #eef1f5; color: var(--muted); }
.wr-axis {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) 106px;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.wr-axis-scale {
  display: flex;
  justify-content: space-between;
}

/* Ablation Quantitative Strip above each ablation demo */
.ablation-metrics-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -6px auto 18px;
  max-width: 920px;
}
.ab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--body);
}
.ab-pill strong {
  color: var(--brand-ink);
  font-weight: 700;
}
.ab-pill.accent {
  background: var(--brand-emerald-soft);
  border-color: var(--brand-emerald-border);
  color: var(--brand-emerald);
}
.ab-pill.accent strong {
  color: var(--brand-emerald);
}

/* ---------- BibTeX Block ---------- */
.bibtex-box {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8f9fb;
  overflow: hidden;
}
.bibtex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.14s ease;
}
.copy-btn:hover {
  border-color: var(--brand-cobalt);
  color: var(--brand-cobalt);
}
.copy-btn.copied {
  background: var(--brand-emerald);
  border-color: var(--brand-emerald);
  color: #ffffff;
}
.bibtex-pre {
  margin: 0;
  padding: 15px 18px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #24292f;
  overflow-x: auto;
  white-space: pre;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .compare-all-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .compare-slider-wrap { grid-template-columns: 1fr; }
  .human-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dataset-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .method-pills { grid-template-columns: 1fr; }
  .compare-all-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wr-row { grid-template-columns: 96px minmax(0, 1fr) 92px; gap: 7px; font-size: 0.76rem; }
  .wr-axis { grid-template-columns: 96px minmax(0, 1fr) 92px; }
  .sticky-brand span { display: none; }
}
