/* ================================================================
   DATA VAULT 2.0 MASTERY — ENTERPRISE DESIGN SYSTEM
   Aesthetic: Technical Codex — blueprint precision meets premium academy
   ================================================================ */

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

/* ----------------------------------------------------------------
   DESIGN TOKENS
   ---------------------------------------------------------------- */
:root {
  /* Core surfaces */
  --bg:          #07090f;
  --bg-2:        #0c0f1a;
  --bg-3:        #111527;
  --bg-glass:    rgba(12, 15, 26, 0.7);
  --bg-glass-2:  rgba(16, 20, 36, 0.85);

  /* Brand palette */
  --gold:        #e8b84b;
  --gold-bright: #f5cc6a;
  --gold-dim:    rgba(232, 184, 75, 0.12);
  --gold-border: rgba(232, 184, 75, 0.25);
  --teal:        #22d3c8;
  --teal-dim:    rgba(34, 211, 200, 0.10);
  --teal-border: rgba(34, 211, 200, 0.22);
  --purple:      #a78bfa;
  --purple-dim:  rgba(167, 139, 250, 0.10);
  --purple-border: rgba(167, 139, 250, 0.22);
  --coral:       #f87171;
  --coral-dim:   rgba(248, 113, 113, 0.10);
  --green:       #4ade80;
  --green-dim:   rgba(74, 222, 128, 0.10);
  --amber:       #fbbf24;

  /* Text */
  --ink:         #eef2ff;
  --ink-2:       rgba(238, 242, 255, 0.65);
  --ink-3:       rgba(238, 242, 255, 0.35);
  --ink-4:       rgba(238, 242, 255, 0.18);

  /* Borders */
  --border:      rgba(255, 255, 255, 0.07);
  --border-2:    rgba(255, 255, 255, 0.12);
  --border-3:    rgba(255, 255, 255, 0.20);

  /* Typography */
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --font-code:   'JetBrains Mono', monospace;

  /* Layout */
  --nav-h:       60px;
  --max-w:       1160px;
  --content-w:   860px;
  --radius:      10px;
  --radius-lg:   18px;
  --radius-xl:   24px;

  /* Shadows / Glows */
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.5);
  --glow-gold:   0 0 32px rgba(232,184,75,0.18), 0 0 64px rgba(232,184,75,0.06);
  --glow-teal:   0 0 32px rgba(34,211,200,0.15), 0 0 64px rgba(34,211,200,0.05);

  /* Blueprint grid */
  --grid-line:   rgba(255,255,255,0.028);
  --grid-size:   40px;
}

/* Light mode — Premium White */
[data-theme="light"] {
  /* Pure white surface hierarchy */
  --bg:          #ffffff;
  --bg-2:        #f5f7ff;
  --bg-3:        #edf0fa;
  --bg-glass:    rgba(255, 255, 255, 0.88);
  --bg-glass-2:  rgba(255, 255, 255, 0.96);

  /* Brand accent dims — slightly punchier on white */
  --gold-dim:      rgba(232, 184, 75, 0.13);
  --gold-border:   rgba(232, 184, 75, 0.32);
  --teal-dim:      rgba(34, 211, 200, 0.10);
  --teal-border:   rgba(34, 211, 200, 0.28);
  --purple-dim:    rgba(167, 139, 250, 0.10);
  --purple-border: rgba(167, 139, 250, 0.28);
  --coral-dim:     rgba(248, 113, 113, 0.10);
  --green-dim:     rgba(74, 222, 128, 0.10);

  /* Borders — hairline precision on white */
  --border:      rgba(0, 0, 0, 0.06);
  --border-2:    rgba(0, 0, 0, 0.10);
  --border-3:    rgba(0, 0, 0, 0.17);

  /* Text — near-black for maximum legibility */
  --ink:         #07091a;
  --ink-2:       rgba(7, 9, 26, 0.68);
  --ink-3:       rgba(7, 9, 26, 0.40);
  --ink-4:       rgba(7, 9, 26, 0.15);

  /* Shadows — soft lift, not dark smear */
  --shadow:      0 2px 20px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:   0 8px 48px rgba(0, 0, 0, 0.10), 0 2px 12px rgba(0, 0, 0, 0.05);
  --glow-gold:   0 0 28px rgba(232, 184, 75, 0.14), 0 0 56px rgba(232, 184, 75, 0.05);
  --glow-teal:   0 0 28px rgba(34, 211, 200, 0.12), 0 0 56px rgba(34, 211, 200, 0.04);

  /* Blueprint grid — barely-there on white */
  --grid-line:   rgba(0, 0, 0, 0.035);
}

/* ----------------------------------------------------------------
   RESET + BASE
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1;
  transition: background 0.35s ease, color 0.35s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* Blueprint grid overlay (applied to sections that need it) */
.bp-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

/* ----------------------------------------------------------------
   READING PROGRESS BAR
   ---------------------------------------------------------------- */
.reading-progress {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 190;
  height: 2px; background: transparent; pointer-events: none;
}
.reading-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(34,211,200,0.6);
}

/* ----------------------------------------------------------------
   NAV
   ---------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.25rem; gap: 0.75rem;
  transition: background 0.3s;
}
[data-theme="light"] .nav { background: var(--bg-glass); }

.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
  color: var(--gold); letter-spacing: -0.02em; white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo-badge {
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.1em;
  background: var(--gold); color: #000;
  padding: 0.18rem 0.45rem; border-radius: 3px; text-transform: uppercase;
  line-height: 1; flex-shrink: 0;
}

.nav-links {
  display: flex; align-items: center; gap: 0.1rem;
  flex: 1; justify-content: center; flex-wrap: wrap;
  overflow: hidden;
}
.nav-links a {
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 600;
  color: var(--ink-3); padding: 0.3rem 0.5rem; border-radius: 5px;
  transition: color 0.2s, background 0.2s; white-space: nowrap;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--gold); background: var(--gold-dim); }
.nav-links a.active { color: var(--gold); background: var(--gold-dim); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.nav-search {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 0.35rem 0.8rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search:focus-within {
  border-color: var(--teal-border);
  box-shadow: 0 0 0 3px var(--teal-dim);
}
.nav-search svg { color: var(--ink-3); flex-shrink: 0; }
.nav-search input {
  background: none; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.78rem; color: var(--ink);
  width: 130px; min-width: 0;
}
.nav-search input::placeholder { color: var(--ink-3); }

.btn-icon {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; color: var(--ink-2); flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim); }

/* ----------------------------------------------------------------
   SEARCH DROPDOWN
   ---------------------------------------------------------------- */
.search-dropdown {
  position: fixed; top: calc(var(--nav-h) + 10px);
  left: 50%; transform: translateX(-50%);
  width: min(580px, 94vw); z-index: 300;
  background: var(--bg-2); border: 1px solid var(--border-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  display: none; overflow: hidden; max-height: 380px; overflow-y: auto;
}
.search-dropdown.visible { display: block; animation: fadeSlideDown 0.18s ease; }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.search-result {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border);
  transition: background 0.15s; cursor: pointer;
}
.search-result:hover { background: var(--bg-3); }
.search-result:last-child { border-bottom: none; }
.sr-tag {
  font-family: var(--font-code); font-size: 0.62rem; font-weight: 600;
  color: var(--teal); background: var(--teal-dim); border: 1px solid var(--teal-border);
  padding: 0.2rem 0.5rem; border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 0.1rem;
}
.sr-title { font-weight: 600; font-size: 0.88rem; color: var(--ink); margin-bottom: 0.15rem; }
.sr-desc { font-size: 0.77rem; color: var(--ink-3); line-height: 1.4; }

/* ----------------------------------------------------------------
   HERO — LANDING PAGE
   ---------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-h) + 5rem) 2rem 6rem;
  position: relative; overflow: hidden;
}
.hero-backdrop {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 55% at 50% 35%, rgba(34,211,200,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 20% 70%, rgba(232,184,75,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 65%, rgba(167,139,250,0.05) 0%, transparent 60%);
}
.hero-eyebrow {
  font-family: var(--font-code); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 1.75rem; position: relative;
  display: flex; align-items: center; gap: 0.75rem; justify-content: center;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ''; width: 40px; height: 1px; background: var(--teal);
  opacity: 0.4;
}
.hero h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92; letter-spacing: -0.04em;
  color: var(--ink); margin-bottom: 1.75rem; position: relative;
}
.hero h1 .accent-gold { color: var(--gold); }
.hero h1 .accent-teal { color: var(--teal); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 300; line-height: 1.75;
  color: var(--ink-2); max-width: 560px; margin: 0 auto 3rem;
  position: relative;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
  margin-bottom: 3rem; position: relative;
}
.hero-tag {
  font-family: var(--font-code); font-size: 0.68rem; font-weight: 500;
  color: var(--ink-3); background: var(--bg-2); border: 1px solid var(--border-2);
  padding: 0.3rem 0.7rem; border-radius: 4px; letter-spacing: 0.04em;
  transition: all 0.2s;
}
.hero-tag:hover { color: var(--gold); border-color: var(--gold-border); background: var(--gold-dim); }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; position: relative; }

/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--gold); color: #000;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  padding: 0.85rem 1.9rem; border-radius: 9px;
  border: none; transition: all 0.25s; letter-spacing: 0.01em; line-height: 1;
  box-shadow: 0 4px 16px rgba(232,184,75,0.25);
}
.btn-primary:hover {
  background: var(--gold-bright); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,184,75,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: transparent; color: var(--ink-2);
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  padding: 0.85rem 1.9rem; border-radius: 9px;
  border: 1px solid var(--border-3); transition: all 0.25s; line-height: 1;
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); transform: translateY(-2px); }

/* ----------------------------------------------------------------
   STATS BAR
   ---------------------------------------------------------------- */
.stats-bar {
  background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 2.25rem 2rem;
  display: flex; justify-content: center; gap: 0; flex-wrap: wrap;
}
.stat {
  text-align: center; padding: 0 3rem;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-head); font-size: 2.5rem; font-weight: 800;
  letter-spacing: -0.05em; color: var(--gold); display: block;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-code); font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
  margin-top: 0.5rem; display: block;
}

/* ----------------------------------------------------------------
   SECTION CHROME
   ---------------------------------------------------------------- */
.section { padding: 5.5rem 2rem; }
.container { max-width: var(--max-w); margin: 0 auto; }
.section-eyebrow {
  font-family: var(--font-code); font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.6rem;
}
.section-eyebrow::before { content: '//'; opacity: 0.5; }
.section-title {
  font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.05;
  margin-bottom: 0.85rem; color: var(--ink);
}
.section-sub {
  font-size: 1rem; color: var(--ink-2); max-width: 520px; line-height: 1.75;
}

/* ----------------------------------------------------------------
   MODULE GRID (Landing page)
   ---------------------------------------------------------------- */
.module-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px; margin-top: 3.5rem;
  background: var(--border); border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border);
}
.module-card {
  background: var(--bg-2); padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  text-decoration: none; transition: background 0.25s;
  position: relative; overflow: hidden;
  animation: cardReveal 0.5s ease both;
}
.module-card::after {
  content: attr(data-num);
  position: absolute; right: -0.75rem; bottom: -1rem;
  font-family: var(--font-head); font-size: 6rem; font-weight: 800;
  color: var(--border); line-height: 1; pointer-events: none;
  transition: color 0.25s;
}
.module-card:hover { background: var(--bg-3); }
.module-card:hover::after { color: var(--border-2); }
.module-card:hover .mc-arrow { transform: translateX(4px); color: var(--gold); }

.mc-num {
  font-family: var(--font-code); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
}
.mc-title {
  font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  color: var(--ink); line-height: 1.25;
}
.mc-topics { list-style: none; display: flex; flex-direction: column; gap: 0.22rem; flex: 1; }
.mc-topics li {
  font-size: 0.76rem; color: var(--ink-3); line-height: 1.4;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.mc-topics li::before { content: '—'; color: var(--teal); font-size: 0.6rem; flex-shrink: 0; }
.mc-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.4rem; }
.mc-level {
  font-family: var(--font-code); font-size: 0.62rem; font-weight: 600;
  padding: 0.2rem 0.55rem; border-radius: 4px; letter-spacing: 0.06em;
}
.level-beginner     { background: var(--green-dim);  color: var(--green);  }
.level-intermediate { background: var(--gold-dim);   color: var(--gold);   }
.level-advanced     { background: var(--coral-dim);  color: var(--coral);  }
.level-architect    { background: var(--purple-dim); color: var(--purple); }
.mc-arrow { color: var(--ink-3); transition: all 0.2s; font-size: 0.9rem; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------
   FEATURES SECTION (Landing)
   ---------------------------------------------------------------- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem; margin-top: 3rem;
}
.feature-card {
  background: var(--bg-glass-2); backdrop-filter: blur(12px);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 1.75rem; transition: all 0.25s;
}
.feature-card:hover { border-color: var(--gold-border); box-shadow: var(--glow-gold); transform: translateY(-3px); }
.feature-icon { font-size: 1.75rem; margin-bottom: 1rem; display: block; }
.feature-title {
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  color: var(--ink); margin-bottom: 0.5rem;
}
.feature-desc { font-size: 0.84rem; color: var(--ink-2); line-height: 1.65; }

/* ----------------------------------------------------------------
   CTA SECTION (Landing)
   ---------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, #0c1f1d 0%, #0a1525 100%);
  border-top: 1px solid var(--teal-border); border-bottom: 1px solid var(--teal-border);
  text-align: center; padding: 6rem 2rem; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(34,211,200,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(34,211,200,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-section h2 {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; letter-spacing: -0.04em; color: var(--ink);
  margin-bottom: 1rem; position: relative;
}
.cta-section p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 2.5rem; position: relative; }

/* ----------------------------------------------------------------
   MODULE HERO
   ---------------------------------------------------------------- */
.mod-hero {
  padding: calc(var(--nav-h) + 3.75rem) 2rem 3.5rem;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.mod-hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}
.mod-hero-ghost {
  position: absolute; right: -1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-head); font-size: clamp(8rem, 20vw, 16rem); font-weight: 800;
  line-height: 1; pointer-events: none; user-select: none;
  color: transparent; -webkit-text-stroke: 1px var(--border);
}
.mod-hero-inner { max-width: var(--content-w); margin: 0 auto; position: relative; z-index: 1; }

.mod-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-code); font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid; border-radius: 5px; padding: 0.3rem 0.7rem;
  margin-bottom: 1.5rem;
}
.mod-hero h1 {
  font-family: var(--font-head); font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800; color: var(--ink); letter-spacing: -0.035em;
  line-height: 1.05; margin-bottom: 1rem;
}
.mod-hero h1 em { font-style: normal; }
.mod-hero-desc { color: var(--ink-2); font-size: 1.05rem; line-height: 1.7; max-width: 640px; }

.mod-meta { display: flex; gap: 0; margin-top: 2.25rem; flex-wrap: wrap; }
.mod-meta-item {
  font-size: 0.8rem; color: var(--ink-3);
  padding-right: 1.75rem; margin-right: 1.75rem;
  border-right: 1px solid var(--border);
}
.mod-meta-item:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.mod-meta-item strong { color: var(--ink); display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.15rem; }

.mod-progress { margin-top: 2rem; max-width: 360px; }
.mod-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.45rem; }
.mod-progress-label { font-family: var(--font-code); font-size: 0.65rem; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.mod-progress-pct { font-family: var(--font-code); font-size: 0.72rem; font-weight: 600; color: var(--teal); }
.mod-progress-track { height: 3px; background: var(--border-2); border-radius: 2px; overflow: hidden; }
.mod-progress-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 2px; transition: width 0.4s ease; }

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

/* Concept block */
.concept { margin-bottom: 5rem; padding-bottom: 5rem; border-bottom: 1px solid var(--border); }
.concept:last-child { border-bottom: none; margin-bottom: 0; }
.concept-num {
  font-family: var(--font-code); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.18em; color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem;
}
.concept-num::before { content: ''; width: 20px; height: 1px; background: currentColor; }
.concept > h2 {
  font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 2rem;
  line-height: 1.1; color: var(--ink);
}
.concept h3 {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  margin: 2.25rem 0 0.85rem; color: var(--ink);
}
.concept h4 {
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 700;
  margin: 1.5rem 0 0.5rem; color: var(--ink-2);
}

/* ELI5 */
.eli5 {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem; margin-bottom: 2rem;
  position: relative; overflow: hidden;
}
.eli5::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--teal), var(--purple));
}
.eli5-label {
  font-family: var(--font-code); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.15em; color: var(--gold); text-transform: uppercase;
  margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.5rem;
}
.eli5 p { color: var(--ink-2); font-size: 0.97rem; line-height: 1.8; }
.eli5 strong { color: var(--gold); font-weight: 600; }
.eli5 em { color: var(--teal); font-style: normal; }

/* Analogy */
.analogy {
  background: var(--bg-3); border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem; margin-bottom: 2rem;
}
.analogy-label {
  font-family: var(--font-code); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.15em; color: var(--teal); text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.analogy p { color: var(--ink-2); font-size: 0.95rem; line-height: 1.8; }
.analogy strong { color: var(--teal); font-weight: 600; }

/* Detail prose */
.detail { margin-bottom: 2rem; }
.detail p { font-size: 0.97rem; line-height: 1.85; color: var(--ink-2); margin-bottom: 1rem; }
.detail p:last-child { margin-bottom: 0; }
.detail ul, .detail ol { padding-left: 1.4rem; margin: 0.75rem 0; }
.detail li { font-size: 0.95rem; line-height: 1.75; color: var(--ink-2); margin-bottom: 0.5rem; }
.detail strong { color: var(--ink); font-weight: 600; }
.detail code {
  font-family: var(--font-code); font-size: 0.82rem;
  background: var(--bg-3); border: 1px solid var(--border-2);
  padding: 0.15rem 0.45rem; border-radius: 4px; color: var(--amber);
}

/* Code block */
.code-block {
  background: #030508; border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); margin: 2rem 0; overflow: hidden;
  box-shadow: var(--shadow);
}
[data-theme="light"] .code-block { background: #13161f; }
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 0.4rem; }
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #28c940; }
.code-label {
  font-family: var(--font-code); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase;
}
.copy-btn {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-code); font-size: 0.65rem; font-weight: 500;
  color: var(--ink-3); background: none; border: none;
  padding: 0.25rem 0.6rem; border-radius: 4px; transition: all 0.2s;
  letter-spacing: 0.05em;
}
.copy-btn:hover { color: var(--gold); background: var(--gold-dim); }
.copy-btn.copied { color: var(--green); }
.code-block pre {
  font-family: var(--font-code); font-size: 0.83rem;
  color: #c9d1d9; line-height: 1.8; padding: 1.5rem;
  overflow-x: auto; white-space: pre;
}
/* Syntax tokens */
.kw  { color: #7dd3fc; }
.str { color: #86efac; }
.cm  { color: #6b7280; font-style: italic; }
.num { color: #fbbf24; }
.fn  { color: #c4b5fd; }
.op  { color: #f472b6; }
.hub { color: #22d3c8; }
.lnk { color: #e8b84b; }
.sat { color: #a78bfa; }
.typ { color: #7dd3fc; }
.cst { color: #f97316; }

/* Callouts */
.callout {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--teal-dim); border: 1px solid var(--teal-border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 2rem 0;
}
.callout-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 0.05rem; }
.callout p { font-size: 0.9rem; line-height: 1.7; color: var(--ink-2); }
.callout strong { color: var(--ink); }

.warn {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--coral-dim); border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 2rem 0;
}
.warn-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 0.05rem; }
.warn p { font-size: 0.9rem; line-height: 1.7; color: var(--ink-2); }
.warn strong { color: var(--coral); }

.tip {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 2rem 0;
}
.tip p { font-size: 0.9rem; line-height: 1.7; color: var(--ink-2); }
.tip strong { color: var(--gold); }

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse; margin: 2rem 0;
  font-size: 0.84rem; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table thead { background: var(--bg-3); }
.data-table th {
  padding: 0.85rem 1rem; text-align: left;
  font-family: var(--font-head); font-size: 0.72rem;
  letter-spacing: 0.07em; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--border-2); white-space: nowrap;
}
.data-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody { background: var(--bg-2); }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--bg-3); }
.data-table code {
  font-family: var(--font-code); font-size: 0.78rem;
  background: var(--bg); border: 1px solid var(--border-2);
  padding: 0.12rem 0.4rem; border-radius: 3px; color: var(--amber);
}

/* Best Practices / Mistakes */
.bpm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.bp-box, .mistake-box { border-radius: var(--radius); padding: 1.5rem; }
.bp-box { background: var(--green-dim); border: 1px solid rgba(74,222,128,0.2); }
.mistake-box { background: var(--coral-dim); border: 1px solid rgba(248,113,113,0.2); }
.bp-box h4 { color: var(--green); font-family: var(--font-head); font-size: 0.82rem; font-weight: 700; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.mistake-box h4 { color: var(--coral); font-family: var(--font-head); font-size: 0.82rem; font-weight: 700; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.bp-box ul, .mistake-box ul { list-style: none; }
.bp-box ul li, .mistake-box ul li { font-size: 0.82rem; line-height: 1.65; color: var(--ink-2); padding: 0.3rem 0; display: flex; gap: 0.55rem; align-items: flex-start; }
.bp-box ul li::before { content: '✓'; color: var(--green); flex-shrink: 0; font-weight: 700; margin-top: 0.1rem; }
.mistake-box ul li::before { content: '✗'; color: var(--coral); flex-shrink: 0; font-weight: 700; margin-top: 0.1rem; }

/* Pillars (Hub / Link / Sat) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2.25rem 0; }
.pillar { border-radius: var(--radius-lg); padding: 2rem; text-align: center; position: relative; overflow: hidden; }
.pillar-hub  { background: var(--teal-dim);   border: 1px solid var(--teal-border); }
.pillar-link { background: var(--gold-dim);   border: 1px solid var(--gold-border); }
.pillar-sat  { background: var(--purple-dim); border: 1px solid var(--purple-border); }
.pillar-icon { font-size: 2.25rem; display: block; margin-bottom: 1rem; }
.pillar-name { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; margin-bottom: 0.5rem; }
.pillar-hub  .pillar-name { color: var(--teal); }
.pillar-link .pillar-name { color: var(--gold); }
.pillar-sat  .pillar-name { color: var(--purple); }
.pillar-desc { color: var(--ink-3); font-size: 0.8rem; line-height: 1.6; }

/* Accordion */
.accordion { border: 1px solid var(--border-2); border-radius: var(--radius-lg); overflow: hidden; margin: 2rem 0; }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; cursor: pointer; user-select: none;
  background: var(--bg-2); transition: background 0.15s;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.acc-header:hover { background: var(--bg-3); }
.acc-item.open .acc-header { color: var(--gold); background: var(--bg-3); }
.acc-chevron { color: var(--ink-3); font-size: 0.75rem; transition: transform 0.25s, color 0.2s; flex-shrink: 0; }
.acc-item.open .acc-chevron { transform: rotate(90deg); color: var(--gold); }
.acc-body {
  display: none; padding: 1.4rem 1.5rem;
  background: var(--bg); border-top: 1px solid var(--border);
  animation: accOpen 0.2s ease;
}
.acc-item.open .acc-body { display: block; }
@keyframes accOpen { from { opacity: 0; } to { opacity: 1; } }
.acc-body p { font-size: 0.92rem; line-height: 1.8; color: var(--ink-2); margin-bottom: 0.75rem; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body strong { color: var(--ink); font-weight: 600; }
.acc-body code {
  font-family: var(--font-code); font-size: 0.8rem;
  background: var(--bg-2); border: 1px solid var(--border-2);
  padding: 0.12rem 0.4rem; border-radius: 3px; color: var(--amber);
}

/* Interview Q label */
.interview-section-label {
  font-family: var(--font-code); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold);
  margin: 2.5rem 0 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.interview-section-label::before { content: ''; flex: 1; max-width: 40px; height: 1px; background: var(--gold-border); }

/* SVG Diagram container */
.diagram {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 2rem;
  margin: 2rem 0; overflow-x: auto;
}
.diagram svg { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; }

/* Summary box */
.summary {
  background: linear-gradient(145deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border-2); border-radius: var(--radius-xl);
  padding: 2.5rem; margin-top: 3.5rem; position: relative; overflow: hidden;
}
.summary::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.summary h3 {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  color: var(--gold); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.summary ul { list-style: none; }
.summary ul li {
  color: var(--ink-2); font-size: 0.92rem; padding: 0.4rem 0;
  display: flex; align-items: flex-start; gap: 0.75rem; line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.summary ul li:last-child { border-bottom: none; }
.summary ul li::before { content: '✓'; color: var(--teal); font-weight: 700; flex-shrink: 0; margin-top: 0.15rem; }

/* Timeline (for history concept) */
.timeline { margin: 2rem 0; position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0.4rem; top: 0.5rem; bottom: 0.5rem; width: 1px; background: var(--border-2); }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.7rem; top: 0.45rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--teal);
}
.timeline-year {
  font-family: var(--font-code); font-size: 0.68rem; font-weight: 600;
  color: var(--teal); letter-spacing: 0.1em; margin-bottom: 0.2rem;
}
.timeline-title { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--ink); margin-bottom: 0.25rem; }
.timeline-desc { font-size: 0.82rem; color: var(--ink-3); line-height: 1.55; }

/* Comparison grid (Kimball vs Inmon vs DV) */
.comparison-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.comp-card { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 1.5rem; }
.comp-card h4 { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.comp-card ul { list-style: none; }
.comp-card ul li { font-size: 0.8rem; color: var(--ink-2); line-height: 1.65; padding: 0.25rem 0; display: flex; gap: 0.5rem; }
.comp-card ul li::before { content: '•'; flex-shrink: 0; }

/* Benefits grid */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin: 2rem 0; }
.benefit-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; transition: all 0.2s;
}
.benefit-card:hover { border-color: var(--gold-border); background: var(--bg-3); }
.benefit-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.benefit-title { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--gold); margin-bottom: 0.4rem; }
.benefit-desc { font-size: 0.8rem; color: var(--ink-3); line-height: 1.6; }

/* Use case cards */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 2rem 0; }
.usecase-card {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 1.25rem; border-top: 2px solid;
}
.usecase-card.banking  { border-top-color: var(--gold); }
.usecase-card.insurance { border-top-color: var(--teal); }
.usecase-card.retail   { border-top-color: var(--purple); }
.usecase-card.telecom  { border-top-color: var(--coral); }
.usecase-card.health   { border-top-color: var(--green); }
.usecase-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.usecase-industry { font-family: var(--font-code); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.35rem; }
.usecase-title { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--ink); margin-bottom: 0.35rem; }
.usecase-desc { font-size: 0.78rem; color: var(--ink-3); line-height: 1.55; }

/* Page navigation */
.page-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem; border-top: 1px solid var(--border);
  max-width: var(--content-w); margin: 0 auto; gap: 1rem;
}
.page-nav a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  color: var(--ink-2); padding: 0.7rem 1.4rem;
  border: 1px solid var(--border-2); border-radius: 9px;
  transition: all 0.2s; line-height: 1;
}
.page-nav a:hover { border-color: var(--teal-border); color: var(--teal); background: var(--teal-dim); }
.page-nav a.next { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }
.page-nav a.next:hover { background: var(--gold-bright); border-color: var(--gold-bright); transform: translateX(3px); }
.page-nav a.disabled { opacity: 0.3; pointer-events: none; }

/* Footer */
footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 2.25rem 2rem; text-align: center;
  color: var(--ink-3); font-size: 0.78rem; font-family: var(--font-code); letter-spacing: 0.04em;
}
footer strong { color: var(--gold); font-weight: 600; }

/* ----------------------------------------------------------------
   ANIMATIONS
   ---------------------------------------------------------------- */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.anim-fade-up { animation: fadeUp 0.6s ease both; }
.anim-fade-up-1 { animation: fadeUp 0.6s 0.1s ease both; }
.anim-fade-up-2 { animation: fadeUp 0.6s 0.2s ease both; }
.anim-fade-up-3 { animation: fadeUp 0.6s 0.3s ease both; }
.anim-fade-up-4 { animation: fadeUp 0.6s 0.4s ease both; }
.anim-fade-up-5 { animation: fadeUp 0.6s 0.5s ease both; }
.anim-fade-up-6 { animation: fadeUp 0.6s 0.6s ease both; }

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .bpm-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .stat { padding: 0 2rem; }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-search input { width: 90px; }
  .module-grid { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; }
  .page-nav a { width: 100%; justify-content: center; text-align: center; }
  .mod-meta { gap: 1.25rem; }
  .mod-meta-item { border-right: none; padding-right: 0; }
  .stats-bar { gap: 0; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); padding: 1.25rem 2rem; width: 50%; }
}
@media (max-width: 480px) {
  .hero h1 { letter-spacing: -0.025em; }
  .content { padding: 2.5rem 1.25rem 5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr 1fr; }
}
