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

:root {
  --primary: #1a1a2e;
  --accent: #e94560;
  --accent2: #0f3460;
  --light: #f8f9fa;
  --muted: #6c757d;
  --border: #dee2e6;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Georgia', serif;
  --max-width: 1000px;
  --section-gap: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: #212529;
  background: #fff;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--primary); }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

section { padding: var(--section-gap) 0; }
section:nth-child(even) { background: var(--light); }

/* Hero */
#hero {
  background: var(--primary);
  color: white;
  padding: 72px 0 60px;
  text-align: center;
}

#hero .venue-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.hero-header {
  position: relative;
}

#hero .org-logo {
  position: absolute;
  top: 0;
  right: -120px;
}

#hero .org-logo img {
  height: 150px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

#hero h1 {
  color: white;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  margin: 0 auto 28px;
  max-width: 840px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

@media (max-width: 600px) {
  #hero .org-logo { position: static; margin-bottom: 16px; }
}

.authors {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  max-width: 760px;
  margin: 0 auto 10px;
  line-height: 1.8;
}

.affiliations {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 36px;
}

/* Link buttons */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: #c73a50; text-decoration: none; color: white; }

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: white; }

.btn-dark {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-dark:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: white; }

/* Teaser figure */
.teaser {
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.teaser img { width: 100%; display: block; }
.teaser figcaption {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  padding: 12px 18px;
  line-height: 1.5;
}

/* Abstract */
#abstract .abstract-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  max-width: 820px;
  margin: 0 auto;
  border-left: 4px solid var(--accent);
  padding-left: 24px;
  color: #333;
}

/* Video */
#video video {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

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

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.stat-card .number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .label {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Method */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.method-card {
  background: white;
  border-radius: 10px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.method-card .icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.method-card h3 { color: var(--accent2); font-size: 1.0rem; }
.method-card p { font-size: 0.88rem; color: #444; margin-bottom: 0; }

/* Figures */
.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 640px) {
  .figure-grid { grid-template-columns: 1fr; }
}

.fig-item {
  text-align: center;
}

.fig-item img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.fig-item figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.fig-full { margin-top: 32px; text-align: center; }
.fig-full img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
}
.fig-full figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 10px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Section title */
.section-title {
  text-align: center;
  margin-bottom: 16px;
}

.section-title h2 {
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 8px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 24px;
}

.results-table th {
  background: var(--accent2);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.results-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.results-table tr:nth-child(even) td { background: #f6f8fb; }
.results-table tr:hover td { background: #eef2ff; }

/* BibTeX */
#citation pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 8px;
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  margin-top: 20px;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  color: #cdd6f4;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }

/* Footer */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
}

footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: white; }

/* Responsive */
@media (max-width: 640px) {
  :root { --section-gap: 48px; }
  #hero { padding: 48px 0 40px; }
  #hero h1 { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
