/* ============================================================
   BioSNICAR Classroom — Glacial Dark Theme
   Inspired by moon-classroom aesthetic
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0f1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2236;
  --border: #1e293b;
  --border-hover: #334155;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #38bdf8;        /* ice blue */
  --accent-dim: #0ea5e9;
  --accent-teal: #06b6d4;
  --accent-purple: #a78bfa;
  --accent-red: #f87171;
  --accent-green: #4ade80;

  --glow-soft: rgba(56, 189, 248, 0.15);
  --glow-strong: rgba(56, 189, 248, 0.3);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --max-width: 760px;
  --wide-width: 960px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* --- Scroll Progress Bar --- */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent), #f0f9ff);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 0.25rem; }

.nav-pill {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-pill:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-pill.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

/* --- Hero --- */
.hero {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: #f0f9ff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px var(--glow-soft);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-image {
  width: 100%;
  max-width: 700px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 0 auto 2rem;
  display: block;
}

/* --- Sections --- */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
section:last-child { border-bottom: none; }

h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #f0f9ff;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--glow-soft);
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2rem 0 0.75rem;
}

p { margin-bottom: 1.25rem; color: var(--text-primary); }
p.secondary { color: var(--text-secondary); }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #7dd3fc; text-decoration: underline; }

/* --- Cards Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.25s ease;
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card p { font-size: 0.95rem; color: var(--text-secondary); margin: 0; }

/* --- Stat Cards --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Callout Box --- */
.callout {
  background: rgba(56, 189, 248, 0.05);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout.purple {
  background: rgba(167, 139, 250, 0.05);
  border-left-color: var(--accent-purple);
}

.callout .callout-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout.purple .callout-title { color: var(--accent-purple); }

/* --- Figures --- */
.figure {
  margin: 2rem 0;
  text-align: center;
}

.figure img {
  width: 100%;
  max-width: 700px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.figure figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Code Blocks --- */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* --- CTA Button --- */
.cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent));
  color: var(--bg-primary);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 1rem;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--glow-strong);
  text-decoration: none;
  color: var(--bg-primary);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.cta.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.cta.outline:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}

/* --- Pipeline Diagram --- */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.pipeline .step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-primary);
}

.pipeline .arrow {
  color: var(--accent);
  font-size: 1.2rem;
}

/* --- Dive-deeper links --- */
.dive-deeper {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dive-deeper .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.dive-deeper a {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.dive-deeper a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.06);
  text-decoration: none;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a { color: var(--text-secondary); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.5rem 2rem; }
  .content { padding: 0 1.5rem 3rem; }
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { flex-direction: column; }
  .pipeline .arrow { transform: rotate(90deg); }
  nav { padding: 0.5rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .nav-links { overflow-x: auto; }
}
