/* Academy — crash course for consultants */

/* Force dark mode */
:root {
  --bg: #0c0a09;
  --fg: #e7e5e4;
  --accent: #5eead4;
  --muted: #a8a29e;
  --border: #292524;
  --surface: #1c1917;
  --highlight: #042f2e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 68px; }
body {
  font-family: 'Georgia', serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  font-size: 18px;
  overflow-x: hidden;
}
.container { max-width: 680px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Nav */
nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0.75rem 0;
}
nav .container {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  max-width: 900px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
nav .container::-webkit-scrollbar { display: none; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--accent); }
nav .brand {
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  margin-right: auto;
}

/* Aegis auth bar */
body:has(#aegis-bar) nav { top: 32px; }
body:has(#aegis-bar) { scroll-padding-top: 100px; }
body:has(#aegis-bar) h1,
body:has(#aegis-bar) h2,
body:has(#aegis-bar) h3,
body:has(#aegis-bar) .section,
body:has(#aegis-bar) .chapter { scroll-margin-top: 100px; }

/* Typography */
h1, h2, h3, .section { scroll-margin-top: 68px; }
h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 700;
}
p { margin-bottom: 1.25rem; }
.subtitle {
  font-family: 'Helvetica Neue', sans-serif;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.lead { font-size: 1.05rem; color: var(--muted); }
strong { font-weight: 700; }
em { font-style: italic; }
code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
  color: var(--accent);
}

/* Dividers */
.post-divider {
  border: none;
  border-top: 2px solid var(--accent);
  margin: 4rem 0;
  opacity: 0.3;
}
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 60px 0;
}

/* Callouts */
.callout {
  background: var(--highlight);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.95rem;
  border-radius: 0 6px 6px 0;
}
.callout code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
  color: var(--accent);
}

/* Lists */
ul, ol { margin: 0.75rem 0 1.25rem 1.5rem; }
ol { padding-left: 0.25rem; }
li { margin-bottom: 0.5rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
td:first-child { color: var(--accent); font-weight: 600; }

/* Mini tables (compact variant) */
.mini-table { font-size: 0.85rem; }
.mini-table th { font-size: 0.7rem; }

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent));
  z-index: 200;
  width: 0%;
  transition: width 0.1s;
}
body:has(#aegis-bar) .progress-bar { top: 32px; z-index: 10000; }

/* Chapter (shared fade-in) */
.chapter {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.chapter.visible { opacity: 1; transform: translateY(0); }
.chapter-label {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Section fade-in */
.section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

/* Two-column layout with sticky sidebar */
.page-layout { display: flex; max-width: 1100px; margin: 0 auto; gap: 40px; }
.content { flex: 1; max-width: 680px; padding: 24px 24px 120px; }

/* Stack visualization sidebar */
.stack-viz {
  width: 260px; position: sticky; top: 40px; align-self: flex-start;
  padding-top: 20px; display: flex; flex-direction: column; gap: 0; order: 2;
}
.stack-group-label {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  padding: 12px 12px 4px;
  opacity: 0.6;
}
.stack-group-label:first-child { padding-top: 0; }
.stack-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  padding: 8px 12px; font-family: 'Helvetica Neue', sans-serif; font-size: 11px;
  font-weight: 600; color: var(--muted); opacity: 0.2;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer;
  margin-bottom: 3px;
}
.stack-block.unlocked { opacity: 1; border-color: var(--accent); color: var(--fg); }
.stack-block.active { border-color: var(--accent); box-shadow: 0 0 12px rgba(94, 234, 212, 0.15); }
.stack-block .block-label { font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.stack-block.unlocked .block-label { color: var(--accent); }

/* Hero */
.hero { text-align: left; padding: 20px 0 40px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.hero .tagline { font-size: 1.05rem; color: var(--muted); }
.hero .xp-counter { margin-top: 16px; font-family: 'Helvetica Neue', sans-serif; font-size: 13px; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.hero .xp-counter span { color: var(--accent); font-weight: 700; font-size: 18px; }

/* Landing page specific */
.landing-hero {
  text-align: center;
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 60px;
}
.landing-hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.landing-hero .tagline { font-size: 1.15rem; color: var(--muted); max-width: 520px; margin: 0 auto; }

.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: border-color 0.2s;
  text-decoration: none;
  display: block;
  color: var(--fg);
}
.path-card:hover { border-color: var(--accent); }
.path-card h3 { margin-top: 0; color: var(--accent); }
.path-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

.highlight-line {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1.25rem 0;
}

/* Footer */
footer, .footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* CTA */
.cta {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  font-family: 'Helvetica Neue', sans-serif;
}

/* Responsive */
@media (max-width: 900px) {
  .stack-viz { display: none; }
  .page-layout { display: block; }
  .content { max-width: 100%; padding: 16px 16px 80px; }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .container { padding: 1rem; }
  .landing-hero { padding: 40px 0 30px; }
  .landing-hero h1 { font-size: 2.2rem; }
  table {
    display: block;
    overflow-x: auto;
    font-size: 0.8rem;
    -webkit-overflow-scrolling: touch;
  }
  th, td { min-width: 120px; }
  .callout { font-size: 0.85rem; padding: 12px 14px; }
  code { word-break: break-all; }
}
