/* ============================================================
   Deluge Learning Sprint — Global Stylesheet
   ============================================================ */

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

:root {
  --bg:          #0e0f14;
  --bg-card:     #16181f;
  --bg-card2:    #1c1e28;
  --accent:      #e64a6a;
  --accent2:     #9b59f5;
  --accent3:     #3ecfcf;
  --gold:        #f5c842;
  --text:        #e8eaf0;
  --text-muted:  #8890a4;
  --border:      #2a2d3a;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --transition:  .22s ease;

  /* week colours */
  --w1: #e64a6a;
  --w2: #9b59f5;
  --w3: #3ecfcf;
  --w4: #f5c842;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--accent3); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { margin-bottom: .9rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

/* ---------- Layout Helpers ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.flex { display: flex; align-items: center; gap: 1rem; }
.flex-col { display: flex; flex-direction: column; gap: .75rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ---------- Navigation ---------- */
.site-nav {
  background: rgba(14,15,20,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: .85rem 0;
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}
.nav-links {
  display: flex;
  list-style: none;
  gap: .25rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card2);
  text-decoration: none;
}
.nav-links a.active { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c0335a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(230,74,106,.35);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(230,74,106,.5); filter: brightness(1.1); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent3); color: var(--accent3); }
.btn-ghost {
  background: var(--bg-card2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--border); }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: #3a3d50; box-shadow: var(--shadow); }
.card-tight { padding: 1rem; }

/* ---------- Badges / Tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-free  { background: rgba(62,207,207,.12); color: var(--accent3); border: 1px solid rgba(62,207,207,.25); }
.badge-paid  { background: rgba(155,89,245,.12); color: var(--accent2); border: 1px solid rgba(155,89,245,.25); }
.badge-video { background: rgba(230,74,106,.12); color: var(--accent);  border: 1px solid rgba(230,74,106,.25); }
.badge-article { background: rgba(245,200,66,.12); color: var(--gold);  border: 1px solid rgba(245,200,66,.25); }
.badge-week1 { background: rgba(230,74,106,.15); color: var(--w1); border: 1px solid rgba(230,74,106,.3); }
.badge-week2 { background: rgba(155,89,245,.15); color: var(--w2); border: 1px solid rgba(155,89,245,.3); }
.badge-week3 { background: rgba(62,207,207,.15); color: var(--w3); border: 1px solid rgba(62,207,207,.3); }
.badge-week4 { background: rgba(245,200,66,.15); color: var(--w4); border: 1px solid rgba(245,200,66,.3); }

/* ---------- Week Accent Borders ---------- */
.border-w1 { border-left: 4px solid var(--w1); }
.border-w2 { border-left: 4px solid var(--w2); }
.border-w3 { border-left: 4px solid var(--w3); }
.border-w4 { border-left: 4px solid var(--w4); }
.text-w1 { color: var(--w1); }
.text-w2 { color: var(--w2); }
.text-w3 { color: var(--w3); }
.text-w4 { color: var(--w4); }

/* ---------- Progress Bar ---------- */
.progress-wrap { background: var(--border); border-radius: 50px; height: 6px; overflow: hidden; }
.progress-bar  { height: 6px; border-radius: 50px; transition: width .5s ease; }
.progress-w1   { background: linear-gradient(90deg, var(--w1), #ff8fa3); }
.progress-w2   { background: linear-gradient(90deg, var(--w2), #c38eff); }
.progress-w3   { background: linear-gradient(90deg, var(--w3), #8fffef); }
.progress-w4   { background: linear-gradient(90deg, var(--w4), #ffe08a); }

/* ---------- Resource Card ---------- */
.resource-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: border-color var(--transition), transform var(--transition);
}
.resource-card:hover { border-color: #3a3d50; transform: translateY(-2px); }
.resource-card .rc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.resource-card .rc-title {
  font-weight: 600;
  font-size: .97rem;
  color: var(--text);
  line-height: 1.35;
}
.resource-card .rc-title a {
  color: var(--text);
}
.resource-card .rc-title a:hover { color: var(--accent3); }
.resource-card .rc-desc {
  font-size: .88rem;
  color: var(--text-muted);
}
.resource-card .rc-time {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ---------- Objective List ---------- */
.objective-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.objective-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .92rem;
  color: var(--text-muted);
}
.objective-list li::before {
  content: '→';
  color: var(--accent3);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .05rem;
}

/* ---------- Subtopic Block ---------- */
.subtopic-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  position: relative;
  overflow: hidden;
}
.subtopic-block::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.subtopic-block.w1::before { background: var(--w1); }
.subtopic-block.w2::before { background: var(--w2); }
.subtopic-block.w3::before { background: var(--w3); }
.subtopic-block.w4::before { background: var(--w4); }

.subtopic-block h4 { margin-bottom: .55rem; }

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .92rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  transition: color var(--transition);
}
.checklist li.done { color: var(--text); text-decoration: none; }
.checklist li input[type="checkbox"] {
  accent-color: var(--accent3);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.checklist li.done label { text-decoration: line-through; opacity: .6; }

/* ---------- Week Hero Banner ---------- */
.week-hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.week-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background: radial-gradient(ellipse 70% 60% at 60% 40%, currentColor, transparent);
  pointer-events: none;
}
.week-hero .week-tag {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .65rem;
}
.week-hero h1 { margin-bottom: .75rem; }
.week-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
}
.week-hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.week-hero .meta-chip {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: .3rem .8rem;
}

/* ---------- Timeline / Sprint Overview ---------- */
.sprint-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.sprint-timeline::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--w1), var(--w2), var(--w3), var(--w4));
  opacity: .35;
}
.timeline-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  align-items: flex-start;
}
.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 3px solid;
  background: var(--bg);
  z-index: 1;
}
.dot-w1 { border-color: var(--w1); color: var(--w1); }
.dot-w2 { border-color: var(--w2); color: var(--w2); }
.dot-w3 { border-color: var(--w3); color: var(--w3); }
.dot-w4 { border-color: var(--w4); color: var(--w4); }
.timeline-content { flex: 1; padding-top: .35rem; }
.timeline-content h3 { margin-bottom: .3rem; }
.timeline-content p { font-size: .92rem; }
.timeline-content .week-topics {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}
.topic-chip {
  font-size: .78rem;
  padding: .2rem .6rem;
  border-radius: 50px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin: 2rem 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  text-align: center;
  min-width: 140px;
}
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-card .stat-label {
  font-size: .82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---------- Tab Component ---------- */
.tab-group { display: flex; flex-direction: column; gap: 0; }
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  gap: .15rem;
}
.tab-btn {
  padding: .65rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent3); }
.tab-panel { display: none; padding: 1.5rem 0; }
.tab-panel.active { display: block; }

/* ---------- Callout / Tip Box ---------- */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .93rem;
}
.callout-info  { background: rgba(62,207,207,.07); border: 1px solid rgba(62,207,207,.2); }
.callout-warn  { background: rgba(245,200,66,.07); border: 1px solid rgba(245,200,66,.2); }
.callout-tip   { background: rgba(155,89,245,.07); border: 1px solid rgba(155,89,245,.2); }
.callout-icon  { font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }

/* ---------- Hero Section (Homepage) ---------- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(230,74,106,.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 30%, rgba(155,89,245,.10), transparent 50%),
    radial-gradient(ellipse 50% 40% at 60% 80%, rgba(62,207,207,.08), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(230,74,106,.08);
  border: 1px solid rgba(230,74,106,.2);
  border-radius: 50px;
  padding: .3rem .9rem;
  margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 span { color: var(--accent); }
.hero .hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.device-mockup {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  position: relative;
}
.device-screen {
  background: #0a0b10;
  border-radius: 10px;
  aspect-ratio: 2/1;
  display: grid;
  grid-template-columns: repeat(16,1fr);
  grid-template-rows: repeat(8,1fr);
  gap: 3px;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid #1e2030;
}
.device-pad {
  border-radius: 3px;
  transition: background var(--transition);
}
.pad-off  { background: #1a1c24; }
.pad-red  { background: var(--w1); box-shadow: 0 0 6px rgba(230,74,106,.6); }
.pad-purple { background: var(--w2); box-shadow: 0 0 6px rgba(155,89,245,.6); }
.pad-teal   { background: var(--w3); box-shadow: 0 0 6px rgba(62,207,207,.6); }
.pad-gold   { background: var(--w4); box-shadow: 0 0 6px rgba(245,200,66,.6); }
.pad-dim  { background: #2a2c38; }
.device-controls {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.device-knob {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a3d50, #1a1c24);
  border: 2px solid #2a2d3a;
  display: flex; align-items: center; justify-content: center;
}
.device-btn-row {
  display: flex;
  gap: .4rem;
}
.device-btn {
  width: 28px; height: 16px;
  border-radius: 4px;
  background: #2a2d3a;
  border: 1px solid #3a3d50;
}
.device-btn.active { background: var(--accent); }

/* ---------- Week Cards (Homepage) ---------- */
.week-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.25rem; }
.week-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.week-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.week-card.wk1:hover { border-color: var(--w1); }
.week-card.wk2:hover { border-color: var(--w2); }
.week-card.wk3:hover { border-color: var(--w3); }
.week-card.wk4:hover { border-color: var(--w4); }
.week-card .wk-num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  opacity: .08;
  position: absolute;
  right: 1rem; top: .5rem;
}
.week-card .wk-icon {
  font-size: 2rem;
}
.week-card h3 { font-size: 1.1rem; }
.week-card p { font-size: .88rem; color: var(--text-muted); margin: 0; }
.week-card .wk-meta {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
  text-align: center;
}
.site-footer p {
  font-size: .88rem;
  color: var(--text-muted);
  margin: 0;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent3); }
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  list-style: none;
}

/* ---------- Page Header (inner pages) ---------- */
.page-header {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}
.breadcrumb {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); text-decoration: none; }
.breadcrumb span { color: var(--border); }

/* ---------- Sidebar Layout ---------- */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}
.sidebar {
  position: sticky;
  top: 80px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-nav a {
  font-size: .9rem;
  color: var(--text-muted);
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: color var(--transition), background var(--transition);
  font-weight: 500;
}
.sidebar-nav a:hover { color: var(--text); background: var(--bg-card2); text-decoration: none; }
.sidebar-nav a.active { color: var(--accent3); background: rgba(62,207,207,.06); }
.sidebar-section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .75rem .85rem .3rem;
}

/* ---------- Resources Page ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: .4rem .9rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent3); color: var(--accent3); }
.filter-btn.active { background: var(--accent3); border-color: var(--accent3); color: #000; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .hero { min-height: auto; padding: 4rem 0; }
  .hero-visual { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .stats-row { gap: .75rem; }
  .stat-card { min-width: 120px; padding: 1rem 1.25rem; }
  .timeline-item { gap: 1rem; }
  .timeline-dot { width: 44px; height: 44px; font-size: .9rem; }
}

/* ---------- Utility Animations ---------- */
.fade-in {
  animation: fadeIn .5s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .1s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .2s; }

/* ---------- YouTube Embed ---------- */
.yt-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Section Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ---------- Back to Top ---------- */
#back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), background var(--transition);
  z-index: 50;
}
#back-top.show { opacity: 1; pointer-events: auto; }
#back-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Print styles ---------- */
@media print {
  .site-nav, .sidebar, #back-top, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .subtopic-block, .resource-card { border: 1px solid #ccc; }
}
