:root {
  --bg: #ffffff;
  --text: #111418;
  --muted: #5b6069;
  --accent: #5b6cff;
  --border: #e6e8eb;
  --card: #fafbfc;
  --shadow: 0 10px 25px rgba(0,0,0,0.08);
  --radius: 16px;
  --maxw: 1100px;

  --color-task: #ff6b6b;
  --color-insight: #228B22;
  --color-why: #1e5ba8;
  --color-better: #f7b731;
  --color-results: #5f27cd;

  --color-task-light: #ffe5e5;
  --color-insight-light: #e0f7f5;
  --color-why-light: #e3f4f9;
  --color-better-light: #fff4dc;
  --color-results-light: #f0e6ff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}

.nav-logo { font-weight: 700; color: var(--text); font-size: 18px; }

.nav-links a {
  text-decoration: none; color: var(--muted);
  font-weight: 500; margin-left: 20px;
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  max-width: var(--maxw); margin: 40px auto 32px;
  padding: 0 20px; text-align: center;
}

.title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15; margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.venue {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

.authors {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.8;
}
.authors a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.authors a:hover { color: var(--accent); }
.authors sup {
  font-size: 11px;
  margin-left: 1px;
  color: var(--accent);
}
.affiliations {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.affiliations sup {
  font-size: 10px;
  color: var(--accent);
}

.btn-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 24px 0 0; justify-content: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(91,108,255,0.15);
}

.btn i { font-size: 16px; }

/* Sections */
section {
  max-width: var(--maxw); margin: 48px auto;
  padding: 0 20px; scroll-margin-top: 80px;
}

.section-title {
  font-size: 32px; margin: 0 0 24px 0;
  letter-spacing: -0.01em; text-align: center;
  font-weight: 700;
}

/* Abstract */
.abstract-text {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
}

.abstract-text p {
  margin: 0;
}

/* Figure Section */
.figure-container {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 32px 0;
}

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

.figure-caption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

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

/* Video Gallery */
.stack { display: flex; flex-direction: column; gap: 20px; }

.hero-video {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-video:hover { transform: scale(1.01); }
.hero-video video { width: 100%; height: auto; display: block; }

.caption {
  background: var(--bg); color: var(--muted);
  margin-top: -8px; margin-bottom: 20px;
  font-size: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

/* Tabs */
.sticky-tabs {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.tab {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

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

.tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.lightbox {
  width: min(1100px, 95vw);
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.lightbox video { width: 100%; height: auto; display: block; }

/* Back to top */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(91,108,255,0.3);
  transition: transform 0.2s;
}

.back-to-top:hover { transform: scale(1.1); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  color: var(--muted);
  margin-top: 60px;
}

footer .inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
footer a { color: var(--accent); }

/* BibTeX */
.bibtex-container {
  background: #1e1e1e;
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
}

.bibtex-container pre {
  margin: 0;
  color: #d4d4d4;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* Video loading indicator */
.hero-video.loading {
  position: relative;
  min-height: 200px;
}

.hero-video.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .nav-links a { margin-left: 12px; font-size: 14px; }
  .abstract-text { padding: 20px; font-size: 15px; }
  .tab { padding: 10px 16px; font-size: 13px; }
}
