@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Light palette — warm white + soft red */
  --bg: #F8F9FB;
  --bg-white: #FFFFFF;
  --bg-hero: #1A0B0F;
  --bg-hero-surface: #2E111A;
  --green: #E31837;
  --green-light: #F43F5E;
  --green-bright: #FB7185;
  --green-glow: rgba(227,24,55,.08);
  --green-glow-strong: rgba(227,24,55,.14);
  --amber: #D97706;
  --amber-bg: #FFFBEB;
  --blue: #2563EB;
  --blue-bg: #EFF6FF;
  --red: #DC2626;
  --text: #1E293B;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --text-heading: #0F172A;
  --border: #E2E8F0;
  --border-hover: rgba(227,24,55,.35);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
  --shadow-glow: 0 0 30px rgba(227,24,55,.07);
  --gradient-green: linear-gradient(135deg, #E31837, #F43F5E);
  --gradient-hero: linear-gradient(160deg, #1A0B0F 0%, #2E111A 40%, #381420 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Hero (Index) ─── */
.hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 72px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(227,24,55,.1) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(251,113,133,.05) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green-light), var(--green-bright), var(--green-light), transparent);
}
@keyframes heroGlow {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-1%,1%) scale(1.02); }
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -.5px;
  line-height: 1.2;
}
.hero h1 .green {
  background: linear-gradient(135deg, #FB7185, #FECDD3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  color: #94A3B8;
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}
.hero .tagline {
  color: #FB7185;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero .tagline::before,
.hero .tagline::after {
  content: '';
  width: 28px;
  height: 1px;
  background: #FB7185;
  opacity: .4;
}

/* ─── Module Hero ─── */
.module-hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 40px 44px 36px;
  position: relative;
}
.module-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--green-light), var(--green));
}
.module-hero .back-link {
  color: #FB7185;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 14px;
}
.module-hero .back-link:hover { color: #FECDD3; }
.module-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -.3px;
}
.module-hero .mod-subtitle { color: #94A3B8; font-size: 15px; max-width: 720px; }
.module-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(227,24,55,.12);
  color: #FB7185;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 14px;
  border: 1px solid rgba(227,24,55,.2);
}

/* ─── Container ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 36px 24px 72px; }

/* ─── Module Cards Grid (Index) ─── */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; margin: 28px 0; }
.module-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-body);
  transition: all .3s var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.module-card:hover::before { transform: scaleX(1); }
.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.module-card .card-emoji { font-size: 34px; margin-bottom: 14px; }
.module-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  line-height: 1.4;
}
.module-card p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; flex-grow: 1; }
.module-card .card-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-glow);
  padding: 4px 10px;
  border-radius: 12px;
  align-self: flex-start;
}

/* ─── Info Cards ─── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.info-card {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  transition: all .3s var(--ease);
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.info-card .card-icon { font-size: 28px; margin-bottom: 10px; }
.info-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-heading);
  font-weight: 700;
}
.info-card p { font-size: 13px; color: var(--text-muted); }

/* ─── Content Sections ─── */
.section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--gradient-green);
  border-radius: 2px;
  flex-shrink: 0;
}
.section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 24px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.section h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 8px;
}
.section p, .section li { font-size: 14.5px; color: var(--text-body); }
.section ul { margin: 10px 0 10px 22px; }
.section li { margin-bottom: 5px; }
.section li::marker { color: var(--green); }

/* ─── Steps Table ─── */
.steps-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.steps-table th {
  background: var(--bg-hero);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.steps-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-body);
}
.steps-table tr:last-child td { border-bottom: none; }
.steps-table tr:hover td { background: var(--green-glow); }

/* ─── Prompt Block — soft mint theme ─── */
.prompt-block {
  position: relative;
  background: #FFF5F5;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid #FECDD3;
  box-shadow: 0 2px 8px rgba(227,24,55,.06);
}
.prompt-label {
  background: linear-gradient(90deg, #FFF1F2, #FFE4E6);
  color: #9F1239;
  padding: 9px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #FECDD3;
}
.prompt-text {
  color: #1E293B;
  padding: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 440px;
  overflow-y: auto;
  background: #FFFAFA;
}
.prompt-text::-webkit-scrollbar { width: 5px; }
.prompt-text::-webkit-scrollbar-track { background: transparent; }
.prompt-text::-webkit-scrollbar-thumb { background: #FECDD3; border-radius: 3px; }
.copy-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.copy-btn:hover { background: var(--green-light); transform: scale(1.03); }
.copy-btn.copied { background: #64748B; }

/* ─── Checkpoint ─── */
.checkpoint {
  background: linear-gradient(135deg, #FFF5F5, #FFF1F2);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13.5px;
  color: var(--text-body);
}
.checkpoint strong { color: var(--green); }

/* ─── Accomplishments ─── */
.accomplishments {
  background: linear-gradient(135deg, #F8F9FB, #F1F5F9);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin-top: 24px;
  border: 1px solid var(--border);
}
.accomplishments h4 {
  font-family: 'Outfit', sans-serif;
  margin-bottom: 10px;
  color: var(--text-heading);
  font-weight: 700;
}
.accomplishments li { font-size: 13.5px; margin-bottom: 5px; }

/* ─── Notice ─── */
.notice {
  background: var(--amber-bg);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-body);
}
.notice strong { color: var(--text-heading); }
.notice-blue, .notice[style*="EFF6FF"], .notice[style*="eff6ff"] {
  background: var(--blue-bg) !important;
  border-left-color: var(--blue) !important;
}
.notice[style*="FFFFF0"], .notice[style*="fffff0"] {
  background: var(--amber-bg) !important;
  border-left-color: var(--amber) !important;
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 12px;
}
.footer .logo {
  font-family: 'Outfit', sans-serif;
  color: var(--green);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 6px;
}

/* ─── Page Nav ─── */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-nav a {
  color: var(--green);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  transition: all .25s var(--ease);
  background: var(--green-glow);
  border: 1px solid rgba(5,150,105,.12);
}
.page-nav a:hover { background: var(--green-glow-strong); border-color: var(--border-hover); }

/* ─── Summary Table ─── */
.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.summary-table th {
  background: var(--bg-hero);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.summary-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-body);
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table tr:hover td { background: var(--green-glow); }

/* ─── Sidebar — stays dark ─── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #0C1322, #111A2E);
  padding: 24px 0;
  overflow-y: auto;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.sidebar .sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  color: #FB7185;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 8px;
}
.sidebar a {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  font-size: 13px;
  color: #94A3B8;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .2s var(--ease);
  font-weight: 500;
}
.sidebar a:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar a.active {
  color: #FB7185;
  border-left-color: #F43F5E;
  background: rgba(227,24,55,.08);
  font-weight: 600;
}
.sidebar .home-link {
  color: #FB7185;
  font-size: 12px;
  padding: 10px 20px;
  margin-bottom: 4px;
  font-weight: 600;
}
.sidebar .home-link:hover { color: #FECDD3; }
.sidebar .divider { height: 1px; background: rgba(255,255,255,.06); margin: 8px 20px; }
.sidebar a.step-link { font-size: 12px; padding: 4px 20px 4px 28px; color: #94A3B8; border-left: 2px solid transparent; }
.sidebar a.step-link:hover { color: #E2E8F0; background: rgba(255,255,255,.03); }

/* Sidebar layout */
.has-sidebar .module-hero { margin-left: 240px; }
.has-sidebar .container { margin-left: 240px; max-width: calc(100% - 280px); padding: 36px 40px 72px; }
.has-sidebar .footer { margin-left: 240px; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .has-sidebar .module-hero,
  .has-sidebar .container,
  .has-sidebar .footer { margin-left: 0; max-width: 100%; padding-left: 16px; padding-right: 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile responsive ─── */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  font-size: 13px;
  color: var(--text-body, #334155);
}
@media (max-width: 640px) {
  .topics-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: 40px 20px 36px; }
  .hero h1 { font-size: 24px; }
  .hero .subtitle { font-size: 14px; }
  .hero .tagline { font-size: 10px; letter-spacing: 2px; }

  /* Container */
  .container { padding: 16px 14px 48px; }

  /* Sections */
  .section { padding: 20px 16px; margin-bottom: 14px; border-radius: 10px; }
  .section h2 { font-size: 17px; }
  .section h3 { font-size: 14px; }
  .section p, .section li { font-size: 13.5px; }

  /* Module hero */
  .module-hero { padding: 28px 20px 24px; }
  .module-hero h1 { font-size: 20px; }
  .module-hero .mod-subtitle { font-size: 13px; }

  /* Tables */
  .steps-table, .summary-table { font-size: 12px; }
  .steps-table th, .summary-table th { padding: 8px 10px; font-size: 10px; }
  .steps-table td, .summary-table td { padding: 8px 10px; }

  /* Tables horizontal scroll */
  .section table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Prompt blocks */
  .prompt-block { margin: 12px 0; }
  .prompt-text { padding: 14px; font-size: 11.5px; line-height: 1.7; max-height: 300px; }
  .prompt-label { padding: 7px 12px; font-size: 10px; }

  /* Cards */
  .module-card { padding: 20px; }
  .module-card h3 { font-size: 14px; }
  .module-card p { font-size: 12.5px; }
  .info-card { padding: 16px; }
  .info-card h4 { font-size: 13px; }
  .info-card p { font-size: 12px; }

  /* Two column → single column */
  .two-col { grid-template-columns: 1fr; gap: 14px; }

  /* Page nav */
  .page-nav { flex-direction: column; gap: 10px; }
  .page-nav a { text-align: center; }

  /* Notice */
  .notice { padding: 12px 14px; font-size: 12.5px; }

  /* Checkpoint */
  .checkpoint { padding: 12px 14px; font-size: 12.5px; }

  /* Footer */
  .footer { padding: 32px 16px; }

  /* Tab navigation (index.html) */
  .tab-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
  .tab-btn { padding: 12px 16px; font-size: 12px; white-space: nowrap; }

  /* Nav list (index.html) */
  .nav-list a { padding: 12px 12px; gap: 10px; }
  .nav-list .nav-title { font-size: 13px; }
  .nav-list .nav-desc { font-size: 11.5px; }
  .nav-list .nav-badge { font-size: 10px; padding: 2px 8px; }

  /* Quick links */
  .quick-links { gap: 8px; }
  .quick-link { padding: 6px 12px; font-size: 12px; }

  /* Topics grid in index → single column */
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: 1fr !important; }
}

/* ─── Slide Viewer — stays dark ─── */
.slide-viewer {
  background: linear-gradient(135deg, #161B22, #1B2332);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,.06);
}
.slide-viewer .slide-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #000;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.slide-viewer .slide-container img { width: 100%; height: 100%; object-fit: contain; display: none; transition: opacity .3s ease; }
.slide-viewer .slide-container img.active { display: block; }
.slide-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.slide-controls button {
  background: rgba(227,24,55,.12);
  color: #FB7185;
  border: 1px solid rgba(227,24,55,.2);
  padding: 8px 22px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.slide-controls button:hover { background: rgba(227,24,55,.2); }
.slide-controls button:disabled { background: rgba(255,255,255,.05); color: #555; border-color: rgba(255,255,255,.08); cursor: default; }
.slide-controls .slide-counter { color: #94A3B8; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.slide-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.slide-dots .dot.active { background: #F43F5E; box-shadow: 0 0 10px rgba(227,24,55,.4); transform: scale(1.2); }
.slide-dots .dot:hover { background: rgba(255,255,255,.3); }

/* ─── Images in sections ─── */
.section img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ─── Scroll animations ─── */
.section, .module-card, .info-card {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp .45s var(--ease) forwards;
}
.section:nth-child(1) { animation-delay: .04s; }
.section:nth-child(2) { animation-delay: .08s; }
.section:nth-child(3) { animation-delay: .12s; }
.section:nth-child(4) { animation-delay: .16s; }
.module-card:nth-child(1) { animation-delay: .04s; }
.module-card:nth-child(2) { animation-delay: .08s; }
.module-card:nth-child(3) { animation-delay: .12s; }
.module-card:nth-child(4) { animation-delay: .16s; }
.module-card:nth-child(5) { animation-delay: .20s; }
.module-card:nth-child(6) { animation-delay: .24s; }

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

::selection { background: rgba(5,150,105,.2); color: #0F172A; }
