:root {
  --bg: #fafafa;
  --bg-alt: #ffffff;
  --border: #e0e0e0;
  --text: #222222;
  --text-muted: #666666;
  --accent: #1565c0;
  --accent-soft: rgba(21, 101, 192, 0.08);
  --conf-red: #c62828;
  --header-height: 64px;
  --radius: 10px;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ========== Layout helpers ========== */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 2.5rem 0;
}

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

.section-title {
  font-size: 1.9rem;
  margin: 0 0 0.5rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.4rem;
}

.section-lead {
  margin-top: -0.5rem;
  margin-bottom: 1.0rem;
  color: var(--text-muted);
}

/* ========== Header & Nav ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text);
}

/* ========== Hero ========== */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.venue-badge {
  display: inline-block;
  font-size: 1.0rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  margin-bottom: 0.9rem;
}

.venue-badge.conf {
  border-color: var(--conf-red);
  color: var(--conf-red);
  background: rgba(198, 40, 40, 0.06);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.3;
}

.authors {
  margin: 0 0 0.25rem;
  font-size: 1.0rem;
}

.authors span + span::before {
  content: ", ";
}

.affiliation {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta {
  margin: 0 0 1.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ========== Buttons ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  background: #0d47a1;
}

.btn.outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== Hero media ========== */

.hero-media {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.teaser {
  margin: 0;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.teaser img {
  width: 100%;
  display: block;
}

.teaser video,
.illustration video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.teaser figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Grid ========== */

.grid {
  display: grid;
  gap: 2rem;
}

.two-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ========== Cards & illustrations ========== */

.cards .card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
}

.illustration {
  margin: 0;
}

.illustration img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.illustration figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Lists ========== */

.feature-list {
  padding-left: 1.1rem;
  margin: 0.75rem 0 0;
}

.feature-list li {
  margin-bottom: 0.4rem;
}

/* ========== Video ========== */

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ========== BibTeX ========== */

.bibtex-block {
  margin-top: 0.25rem;
  padding: 0.25rem 0.25rem;
  background: #ffffff;
  color: #000000;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.85rem;
}

/* ========== Footer ========== */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f5f5f5;
}

.site-footer .small {
  margin-top: 0.3rem;
}

/* ========== Back to top button ========== */

#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ========== Responsive ========== */

@media (max-width: 880px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }

  .two-columns,
  .three-columns {
    grid-template-columns: minmax(0, 1fr);
  }

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

