:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5b6573;
  --accent: #1f5fa8;
  --accent-soft: #e8f0fb;
  --border: #e3e6ea;
  --card-bg: #f7f8fa;
  --max-width: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--accent);
}

.subtitle {
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 28px;
  line-height: 1.4;
}

.authors {
  font-size: 17px;
  margin: 0 0 4px;
  color: var(--fg);
}

.venue {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 32px;
}

.links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--fg);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .12s ease, background .12s ease;
}

.btn:hover { transform: translateY(-1px); background: var(--accent); }

.btn-disabled {
  background: #d6dae0;
  color: #6b7380;
  cursor: not-allowed;
}

.btn-disabled:hover { transform: none; background: #d6dae0; }

/* ---------- Content ---------- */

.content { padding: 56px 24px 32px; }

.content-trailer { padding-top: 16px; padding-bottom: 32px; }

section { margin-bottom: 56px; }

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

p { margin: 0 0 16px; }

ol, ul { padding-left: 22px; }
li { margin-bottom: 8px; }

a { color: var(--accent); }

/* ---------- Teaser ---------- */

.teaser-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  display: block;
}

.caption {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

/* ---------- Highlights cards ---------- */

.grid {
  display: grid;
  gap: 16px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 760px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .title { font-size: 40px; }
  .subtitle { font-size: 18px; }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}

.stat {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* ---------- Figures ---------- */

figure {
  margin: 24px 0;
}

figure img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

figcaption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

/* ---------- Video gallery ---------- */

.video-grid { margin-top: 8px; }

.video-card {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.video-card video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  display: block;
}

.video-card figcaption {
  text-align: left;
  margin-top: 10px;
  padding: 0 4px;
}

/* ---------- BibTeX ---------- */

.bibtex {
  background: #0e1116;
  color: #e6e8eb;
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Wide sections (teaser + catalogue) ---------- */

.wide-section {
  padding: 40px 0 24px;
}

.wide-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.teaser-grid {
  gap: 20px;
  margin-bottom: 14px;
}

.teaser-grid .video-card {
  padding: 14px;
}

.teaser-grid .video-card video {
  border-radius: 10px;
}

@media (max-width: 760px) {
  .wide-inner { padding: 0 16px; }
}

/* ---------- Catalogue carousel ---------- */

.catalogue-heading {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.catalogue-intro {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px;
}

.catalogue {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.cat-track {
  flex: 1 1 auto;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.cat-track::-webkit-scrollbar { height: 6px; }
.cat-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.cat-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
}

.case-header {
  margin-bottom: 12px;
}

.case-header h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

.case-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 0;
}

.cat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}

.cat-nav:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.cat-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.cat-nav.prev { left: -8px; }
.cat-nav.next { right: -8px; }

@media (max-width: 760px) {
  .cat-nav.prev { left: 0; }
  .cat-nav.next { right: 0; }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: #fafbfc;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
