/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-text: #1a1a2e;
  --color-text-secondary: #555;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e2e8f0;
  --color-card-bg: #ffffff;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1280px;
  --max-width-narrow: 1000px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.section {
  padding: 64px 0;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 64px 0 20px;
  background: linear-gradient(175deg, #f0f5ff 0%, #ffffff 60%);
}

.venue-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--color-text);
}

.authors {
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--color-text-secondary);
}

.venue-line {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #515863;
}

.venue-line a {
  color: var(--color-text);
  text-decoration: none;
}

.venue-line a:hover {
  text-decoration: underline;
}

.author {
  margin: 0 4px;
}

.authors a {
  color: #06a923;
  text-decoration: none;
}

.authors a:hover {
  text-decoration: underline;
}

.affiliations {
  font-size: 1.1rem;
  color: #4e5869;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .authors {
    font-size: 1.25rem;
  }

  .affiliations {
    font-size: 0.98rem;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

/* ===== Teaser ===== */
.teaser {
  padding: 0 0 32px;
}
.teaser figure {
  margin: 0 auto;
}
.teaser img {
  border-radius: 0;
  box-shadow: none;
}

figure figcaption {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}

/* ===== Section Headings ===== */
.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
}

#abstract p {
  text-align: justify;
  text-justify: inter-word;
}

#abstract.section {
  padding-top: 28px;
  padding-bottom: 24px;
}

#overview.section {
  padding-top: 24px;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 40px 0 20px;
  text-align: center;
}

/* ===== Video ===== */
.project-video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: #000;
}

/* ===== Method Grid ===== */
.full-width-figure {
  margin-bottom: 40px;
}
.full-width-figure img {
  border-radius: 0;
  box-shadow: none;
  margin: 0 auto;
}

.overview-description {
  max-width: 920px;
  margin: -8px auto 36px;
  text-align: justify;
  text-justify: inter-word;
  color: var(--color-text-secondary);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
}

.method-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.method-card:hover {
  box-shadow: var(--shadow-md);
}

.method-icon {
  font-size: 1.35rem;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.method-card h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.method-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* ===== Results ===== */
.results-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  text-align: center;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.results-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 20px;
}

.results-col figure img {
  border-radius: 0;
  box-shadow: none;
}

.results-note {
  max-width: 860px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--color-text-secondary);
}

/* ===== Scenario Cards ===== */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 8px 0 40px;
}

.scenario-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.scenario-card img {
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.scenario-card h3,
.task-list-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.scenario-card p,
.task-list-card li,
.gallery-caption {
  color: var(--color-text-secondary);
}

/* ===== Video Placeholders ===== */
.video-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;
  margin-top: 8px;
}

.video-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-task-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--color-text);
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  background: #fafafa;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ===== Qualitative Grid ===== */
.qual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.qual-grid figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.qual-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-caption {
  max-width: 900px;
  margin: 18px auto 0;
  text-align: center;
}

/* ===== Task List ===== */
.task-list-card {
  max-width: 760px;
  margin: 0 auto 36px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.task-list-card ol {
  padding-left: 20px;
}

.task-list-card li + li {
  margin-top: 8px;
}

/* ===== BibTeX ===== */
.bibtex {
  background: #1e293b;
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ===== Footer ===== */
footer {
  padding: 32px 0;
  text-align: center;
  font-size: 0.82rem;
  color: #999;
  border-top: 1px solid var(--color-border);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero {
    padding: 56px 0 36px;
  }
  .section {
    padding: 48px 0;
  }
  .results-row {
    grid-template-columns: 1fr;
  }
  .scenario-grid {
    grid-template-columns: 1fr;
  }
  .qual-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .task-list-card {
    padding: 20px;
  }
  .video-placeholder-grid {
    grid-template-columns: 1fr;
  }
}

/* YouTube embed style aligned with robi-butler.github.io */
.publication-video {
  width: 100%;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.publication-video:has(iframe) {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
