@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a6a;
  --color-accent: #2d5faa;
  --color-accent-hover: #1e4a8a;
  --color-border: #d0d0d8;
  --color-section-alt: #f6f7fb;
  --color-table-header: #eef1f8;
  --color-code-bg: #f0f2f8;
  --max-width: 900px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

/* ── Hero ── */

.hero {
  text-align: center;
  padding: 60px 0 36px;
}

.hero-image {
  height: 1.95em;
  width: auto;
  vertical-align: middle;
  margin-right: 8px;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero-authors {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.hero-authors a {
  color: #1F9CEE;
  text-decoration: none;
}

.hero-authors a:hover {
  color: #147ac2;
}

.hero-affiliation {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
}

.hero-venue {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  padding: 4px 16px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

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

.btn-outline {
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  background: #fff;
}

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

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

.btn-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Sections ── */

section {
  padding: 48px 0;
}

section.alt {
  background: var(--color-section-alt);
}

.section-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -0.01em;
}

/* ── Video ── */

.video-wrap {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.video-wrap video {
  display: block;
  width: 100%;
}

/* ── Abstract ── */

.abstract-text {
  font-size: 1.02rem;
  max-width: 780px;
  margin: 0 auto;
  text-align: justify;
  color: var(--color-text-secondary);
}

/* ── Figures ── */

.figure {
  margin: 0 auto;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.figure-caption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.figure-caption strong {
  color: var(--color-text);
}

/* ── Method description text ── */

.method-text {
  max-width: 780px;
  margin: 0 auto 28px;
  font-size: 1.0rem;
  color: var(--color-text-secondary);
}

/* ── Tables ── */

.table-wrap {
  overflow-x: auto;
  margin: 0 auto 32px;
  max-width: 820px;
}

.table-wrap:last-child {
  margin-bottom: 0;
}

.table-caption {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text);
}

.table-caption span {
  font-weight: 400;
  color: var(--color-text-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  background: var(--color-table-header);
  font-weight: 600;
  text-align: center;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-border);
}

thead th:first-child {
  text-align: left;
}

tbody td {
  text-align: center;
  padding: 9px 14px;
  border-bottom: 1px solid #e8e8ee;
}

tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

tbody tr:last-child td {
  border-bottom: 2px solid var(--color-border);
}

.highlight-cell {
  font-weight: 700;
  color: var(--color-accent);
}

.table-group-header td {
  font-weight: 600;
  padding-top: 14px;
  border-bottom: none;
  color: var(--color-text);
}

/* Ablation side-by-side tables */
.ablation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 820px;
  margin: 0 auto;
}

/* ── Video grid ── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

.video-card {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.video-card video {
  display: block;
  width: 100%;
}

.video-card-label {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--color-text-secondary);
}

/* ── Citation ── */

.citation-block {
  background: var(--color-code-bg);
  border-radius: 8px;
  padding: 20px 24px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
  max-width: 780px;
  margin: 0 auto;
  white-space: pre;
  color: var(--color-text);
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 28px 0;
  font-size: 0.85rem;
  color: #999;
  border-top: 1px solid #eee;
}

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

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.6rem;
  }

  section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .abstract-text,
  .method-text {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0 24px;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  table {
    font-size: 0.82rem;
  }

  thead th, tbody td {
    padding: 7px 8px;
  }
}
