/* ═══════════════════════════════════════════════════════════════════
   global.css — Shared design tokens, reset, and base components
   for markzhang.org
═══════════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:           #f5f7fa;
  --surface:      #ffffff;
  --border:       #dfe4eb;

  /* Brand accents */
  --accent1:      #0d7c66;   /* teal   – microbiology  */
  --accent2:      #2d5faa;   /* blue   – biopharma     */
  --accent3:      #7c3aed;   /* violet – histology      */

  /* Discord (used on movie-bot page) */
  --discord:      #5865f2;
  --discord-l:    #7983f5;
  --tmdb:         #01d277;

  /* Typography */
  --text:         #1a2332;
  --text-dim:     #6b7a8d;
  --font-mono:    'Courier New', monospace;
  --font-sans:    'Segoe UI', system-ui, sans-serif;

  /* Transparency helpers (for nav backgrounds etc.) */
  --bg-glass:     rgba(245, 247, 250, 0.8);
  --bg-glass-solid: rgba(245, 247, 250, 0.95);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent1); border-radius: 3px; }

/* ── Shared nav base ────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 4rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent1);
  text-decoration: none;
  letter-spacing: 0.12em;
}

.nav-logo span { color: var(--accent2); }

nav ul {
  list-style: none;
  display: flex; gap: 2.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.25s;
}

nav a:hover { color: var(--accent1); }

/* ── Shared section shell ───────────────────────────────────────── */
section {
  padding: 8rem 8vw;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent1);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 3rem;
  color: var(--text);
}

h2 .hl { color: var(--accent1); }

/* ── Shared button styles ───────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--discord);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88,101,242,0.35);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-outline:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  transform: translateY(-2px);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
}

.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(88,101,242,0.35);
}

/* ── Scroll-reveal animations ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-group.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay:0s; }
.reveal-group.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay:0.12s; }
.reveal-group.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay:0.24s; }
.reveal-group.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay:0.36s; }
.reveal-group.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay:0.48s; }
.reveal-group.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay:0.60s; }

/* ── Shared footer ──────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--surface);
}

footer a {
  color: var(--accent1);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

footer span { color: var(--accent1); }

/* ── Responsive base ────────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1rem 2rem; }
  nav ul { gap: 1.5rem; }
  section { padding: 5rem 6vw; }
}

@media (max-width: 600px) {
  nav ul { display: none; }
}
