:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-soft: #eef2ff;
  --accent-teal: #0d9488;
  --accent-teal-soft: #f0fdfa;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

code, pre {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Top Sticky Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-teal));
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3.2rem 0 2rem;
}

.venue-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 980px;
  margin: 0 auto 1.35rem;
}

.gradient-text {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.author a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.author a:hover {
  color: var(--primary);
}

.author sup {
  font-size: 0.72em;
  color: var(--primary);
  margin-left: 1px;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.4rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 0.25rem;
}

.author-notes {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

/* CTA Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.85rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s ease;
}

.cta-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.cta-btn.primary {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.cta-btn.primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* TL;DR Banner */
.tldr-box {
  text-align: left;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 100%);
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  font-size: 0.97rem;
  color: #1e293b;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.tldr-box code {
  background: rgba(255, 255, 255, 0.75);
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
  font-size: 0.88em;
}

/* Figures & Cards */
.figure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.figure-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.caption {
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.9rem;
  line-height: 1.55;
}

/* News Card */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.2rem;
}

.section-heading-inline {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.news-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.news-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  margin-right: 0.45rem;
}

/* Sections */
.section {
  padding: 2.2rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  color: var(--text);
}

.sub-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 1.6rem 0 0.75rem;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 1.25rem;
}

.abstract-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.95rem;
  font-size: 0.98rem;
  color: #1e293b;
}

/* What's New Grid (4 Horizontal Columns) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.feature-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.feature-card p {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.feature-card code {
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Demo Tabs & Video Grid */
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.demo-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.demo-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.demo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.video-wrap {
  background: #0f172a;
  aspect-ratio: 16 / 12;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.demo-meta {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.tag-multi {
  background: #ede9fe;
  color: #5b21b6;
}

.tag-single {
  background: #e0f2fe;
  color: #0369a1;
}

.tag-gen {
  background: #fef3c7;
  color: #b45309;
}

.tag-mask {
  background: var(--primary-soft);
  color: var(--primary);
}

.tag-box {
  background: var(--accent-teal-soft);
  color: var(--accent-teal);
}

.demo-meta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.demo-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.demo-prompt code {
  background: var(--surface-alt);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  color: #1e293b;
}

/* Method & Data Columns */
.two-col-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.point-box, .step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.point-box h4, .step-card h4 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.point-box p, .step-card p {
  font-size: 0.91rem;
  color: var(--text-muted);
}

.three-col-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.step-num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.4rem;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: center;
}

.results-table th,
.results-table td {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child,
.results-table th:nth-child(2),
.results-table td:nth-child(2) {
  text-align: left;
}

.results-table thead th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid #cbd5e1;
}

.results-table .group-row td {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 0.42rem 0.75rem;
}

.highlight-row-v2 td {
  background: #f5f7ff;
}

.highlight-row-lite td {
  background: #f0fdfa;
}

.delta-neg {
  font-size: 0.8em;
  color: #dc2626;
}

.delta-keep {
  font-size: 0.8em;
  color: #0d9488;
  font-weight: 600;
}

.two-col-tables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.compact-table {
  font-size: 0.84rem;
}

.compact-table th,
.compact-table td {
  padding: 0.5rem 0.55rem;
}

.qual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* BibTeX */
.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.bibtex-header .section-title {
  margin-bottom: 0;
}

.copy-btn {
  padding: 0.42rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bibtex-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.55;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 920px) {
  .feature-grid,
  .demo-grid,
  .two-col-points,
  .three-col-steps,
  .two-col-tables {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
