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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  line-height: 1.6;
}

/* ── Header ── */
header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}

header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

header h2.paper-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #444;
  max-width: none;
  margin: 0 auto 18px;
  line-height: 1.5;
}

header p.subtitle {
  font-size: 0.95rem;
  color: #888;
  max-width: 680px;
  margin: 0 auto 24px;
}

.author-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.author-links a {
  color: #007885;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.author-links a:hover { border-color: #007885; }

/* ── Section wrappers ── */
.section-wrap {
  max-width: 1180px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.section-wrap h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  margin-bottom: 14px;
}

.section-wrap p {
  font-size: 0.97rem;
  color: #333;
  line-height: 1.8;
}

/* ── Interactive layout ── */
.interactive-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 20px;
}


.chapter-wrap { position: relative; }

/* ── Video card ── */
.video-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.video-wrapper {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-wrapper iframe,
.video-wrapper > div {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Chapter description box ── */
#chapter-description {
  background: #eefcfe;
  border-left: 3px solid #50e3f2;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 0.97rem;
  color: #333;
  line-height: 1.7;
  margin: 16px 0 0;
  min-height: 72px;
  transition: background 0.25s ease;
}

/* ── Chapter list sidebar ── */
.chapter-list {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow-y: auto;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chapter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
}

.chapter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.chapter-group h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #007885;
  margin-bottom: 10px;
}

.time-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 7px 8px;
  margin-bottom: 4px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.18s ease;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.4;
}

.time-btn:hover {
  background: #e3fafc;
  color: #007885;
}

.time-btn.active {
  background: #c9f3f7;
  color: #006670;
  font-weight: 600;
}

.time-btn .timestamp {
  font-family: "SF Mono", "Fira Code", monospace;
  background: #f0f0f0;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 10px;
  font-size: 0.78rem;
  color: #666;
  min-width: 50px;
  text-align: center;
  flex-shrink: 0;
}

.time-btn:hover .timestamp,
.time-btn.active .timestamp {
  background: #c9f3f7;
  color: #006670;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.82rem;
  color: #aaa;
  border-top: 1px solid #e5e5e5;
}

/* ── Responsive ── */
@media (max-width: 780px) {
  .interactive-container {
    grid-template-columns: 1fr;
  }
  .chapter-list {
    position: static;
    max-height: 380px;
  }
  header h1 { font-size: 1.8rem; }
  header h2.paper-title { font-size: 1rem; }
}

/* ── Performance video ── */
.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.video-note {
  font-size: 0.82rem !important;
  color: #888 !important;
  margin-top: 10px;
  line-height: 1.5 !important;
}

.paper-ref {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #006670;
  background: #d7f6f9;
  border-radius: 999px;
  padding: 1px 9px;
  margin: 8px 6px 0 0;
  white-space: nowrap;
}
