/* ═══════════════════════════════════════════════════════════════
   ReactEMG Project Page — Stylesheet
   Inspired by younghyopark.me/tune-to-learn/
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --primary:        #1a1a1a;
  --primary-dark:   #000;
  --primary-light:  #f0f0f0;
  --accent:         #555;

  --bg:             #ffffff;
  --bg-alt:         #fafafa;
  --bg-hero:        #f7f8fa;
  --text:           #1a1a1a;
  --text-muted:     #6b6b6b;
  --text-light:     #999;
  --border:         #e3e3e3;
  --border-strong:  #c8c8c8;

  --link:           #1a1a1a;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  --max-width:        1100px;
  --max-width-medium: 900px;
  --max-width-narrow: 760px;

  --section-padding: 2.5rem 0;
  --radius:    4px;
  --radius-lg: 6px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  padding-inline: 0;
}

img, video, iframe { max-width: 100%; display: block; border: 0; }
figure { margin: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { text-decoration-color: var(--text); }

::selection { background: #ffe169; color: #1a1a1a; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}
.container-medium { max-width: var(--max-width-medium); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--max-width-narrow); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: var(--section-padding); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  color: var(--text);
  padding: 3.25rem 1.5rem 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.venue-badge { margin-bottom: 1rem; }
.badge {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.95em;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0.2rem;
  border: 1px solid var(--border-strong);
}
.badge.accent {
  color: #b91c1c;
  border-color: #b91c1c;
}

.paper-title {
  font-size: clamp(1.55rem, 3.4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.22;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.paper-title .accent { color: var(--text); }
.paper-title .subtitle {
  display: block;
  font-weight: 400;
  font-size: 0.78em;
  opacity: 0.88;
  margin-top: 0.4rem;
}

/* Authors */
.author-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.4rem;
  margin: 0.5rem 0 0.6rem;
  font-size: 1.02rem;
}
.author a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}
.author a:hover { text-decoration-color: var(--text); }
.author sup { font-size: 0.7em; margin-left: 1px; opacity: 0.75; }

.affiliations {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.75rem 0 0.3rem;
  letter-spacing: 0.01em;
}
.equal-contrib {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.4rem;
  letter-spacing: 0.01em;
}

/* Link Buttons */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--text);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn i { font-size: 0.95em; }

/* ── Section Headings ─────────────────────────────────────── */
.section h2 {
  font-size: 1.55rem;
  font-weight: 600;
  text-align: left;
  margin: 0 0 1.1rem;
  color: var(--text);
  letter-spacing: 0.005em;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.section h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: left;
  margin: 2rem 0 0.85rem;
  color: var(--text);
  letter-spacing: 0.005em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Subtle inline label above a figure */
.fig-label {
  font-size: 0.95rem;
  color: var(--text);
  margin: 1.5rem 0 0.65rem;
  line-height: 1.55;
}
.fig-label b { font-weight: 600; }

/* ── Body Copy ─────────────────────────────────────────────── */
.section p { margin: 0 0 1rem; }
.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: justify;
  color: var(--text);
}
.lead strong { font-weight: 600; }

/* TL;DR card under hero */
.tldr {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.1rem 1.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  border-radius: var(--radius);
  font-size: 1rem;
  line-height: 1.65;
}
.tldr strong { font-weight: 600; }

/* ── Figures & Media ──────────────────────────────────────── */
.figure-full {
  margin: 1.25rem 0;
  text-align: center;
}
.figure-full img {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.figure-full img[src$=".svg"] {
  border: 0;
}
.figure-full figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Teaser video */
.teaser-section {
  padding: 1rem 1.5rem 0;
}
.teaser {
  max-width: var(--max-width);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.teaser video {
  width: 100%;
  display: block;
}

/* Subtle "Video" pill above teaser */
.video-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 auto 0.75rem;
  max-width: var(--max-width);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.video-label::before,
.video-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.site-footer p { margin: 0.35rem 0; }
.site-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
}
.site-footer a:hover { color: var(--text); text-decoration-color: var(--text); }

/* ── Responsive Tweaks ────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 2.25rem 1.25rem 1.75rem; }
  .section { padding: 1.75rem 0; }
  .section h2 { font-size: 1.3rem; }
  .lead { text-align: left; }
  .tldr { margin-inline: 1rem; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .hero { background: #fff; border-bottom: 1px solid #ccc; }
  .btn { border-color: #999; }
  .site-footer { background: #fff; }
}
