/* ═══════════════════════════════════════════
   .NET Mastery — Unified Design System
   Apple-inspired dark mode
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #000;
  --surface: #111;
  --surface2: #1a1a1a;
  --text: #f5f5f7;
  --text-mid: #a1a1a6;
  --muted: #86868b;
  --faint: #48484a;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #2997ff;
  --accent-dim: rgba(41, 151, 255, 0.12);
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --purple: #bf5af2;
  --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  --sans: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Top Nav Bar ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 48px;
  display: flex;
  align-items: center;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}

.top-nav a:hover { color: var(--text); }

.top-nav .nav-brand {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.top-nav .nav-links {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}

/* ── Index / Home Page ── */
.hero-section {
  padding: 8rem 2rem 4rem;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.hero-section .subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 4rem;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  padding: 1.75rem 2rem;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  transition: background 0.3s;
}

.card:hover { background: rgba(255, 255, 255, 0.08); }

.card-content { display: flex; flex-direction: column; gap: 0.35rem; }

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.card-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  transition: color 0.3s, transform 0.3s;
}

.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── Page Layout (sidebar + content) ── */
.page-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 48px);
}

.sidebar {
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.sidebar-header {
  padding: 0.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sidebar-sub {
  font-size: 0.7rem;
  color: var(--faint);
  margin-top: 2px;
}

.nav-section-title {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.75rem 1.5rem 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

.nav-item.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

.badge-blue   { background: rgba(41, 151, 255, 0.15); color: var(--accent); }
.badge-purple { background: rgba(191, 90, 242, 0.15); color: var(--purple); }
.badge-green  { background: rgba(48, 209, 88, 0.15); color: var(--green); }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--faint);
  font-family: var(--mono);
  line-height: 1.7;
  margin-top: auto;
}

/* Sidebar links (keycloak style) */
.sidebar a {
  display: block;
  padding: 0.5rem 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sidebar a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

.sidebar a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.sidebar a .num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--faint);
  margin-right: 0.6rem;
}

/* ── Main Content Area ── */
.content {
  max-width: 800px;
  padding: 2.5rem 3rem 5rem;
}

.section { display: none; }
.section.active { display: block; animation: fadeIn 0.25s ease; }

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

/* ── Typography ── */
h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 0.5rem;
}

h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1.5rem 0 0.4rem;
  font-family: var(--mono);
}

p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin: 0.5rem 0 0.75rem;
}

strong { color: var(--text); }

code.inline {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-mid);
  font-family: var(--mono);
  border: 1px solid var(--border);
}

/* ── Section Header (oracle style) ── */
.section-header { margin-bottom: 2rem; }

.section-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-family: var(--mono);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

/* ── Code Blocks ── */
.code-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.25rem 0;
  position: relative;
}

.code-header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28c840; }

.code-filename {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
}

.code-lang {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-left: auto;
  color: var(--accent);
}

/* For keycloak-style code blocks (lang + copy button) */
.code-wrap .lang {
  position: absolute;
  top: 10px;
  left: 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.65rem;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--mono);
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover { color: var(--text); border-color: var(--faint); }

pre {
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
  color: #cdd6f4;
  white-space: pre;
  tab-size: 4;
}

/* Code blocks with lang/copy-btn need more top padding */
.code-wrap:has(.lang) pre { padding-top: 2rem; }

/* Syntax highlighting */
.kw   { color: #cba6f7; }
.tp   { color: #89b4fa; }
.str  { color: #a6e3a1; }
.cm   { color: #585b70; font-style: italic; }
.fn   { color: #89dceb; }
.num  { color: #fab387; }
.prop { color: #f38ba8; }
.var  { color: #f2cdcd; }
.at   { color: #f9e2af; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.6;
}

thead th {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}

tbody td:first-child {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ── Callouts ── */
.callout {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0;
  font-size: 0.83rem;
  line-height: 1.6;
}

.callout-icon { font-size: 1.1rem; flex-shrink: 0; }

.callout.info  { background: rgba(41, 151, 255, 0.08); border: 1px solid rgba(41, 151, 255, 0.2); }
.callout.warn  { background: rgba(255, 159, 10, 0.08); border: 1px solid rgba(255, 159, 10, 0.2); color: #fde68a; }
.callout.tip   { background: rgba(48, 209, 88, 0.08); border: 1px solid rgba(48, 209, 88, 0.2); color: #6ee7b7; }
.callout.error { background: rgba(255, 69, 58, 0.08); border: 1px solid rgba(255, 69, 58, 0.2); color: #fca5a5; }

/* ── Concept Cards (grid) ── */
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.concept-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.concept-card:hover { border-color: var(--accent); }
.concept-card .card-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.concept-card .card-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.concept-card .card-text { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* ── Comparison Bar ── */
.compare-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.compare-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-col-header {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.compare-col-header.dapper { background: rgba(41, 151, 255, 0.1); color: var(--accent); border-bottom: 1px solid rgba(41, 151, 255, 0.2); }
.compare-col-header.ado    { background: rgba(191, 90, 242, 0.1); color: var(--purple); border-bottom: 1px solid rgba(191, 90, 242, 0.2); }

.compare-col ul { padding: 0.9rem 1rem; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.compare-col li { font-size: 0.8rem; color: var(--muted); display: flex; gap: 0.5rem; align-items: flex-start; line-height: 1.5; }
.compare-col li::before { content: '\2192'; color: var(--accent); flex-shrink: 0; }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0 0;
}

.tab-btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  font-family: var(--sans);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-btn.active.dapper { border-bottom-color: var(--accent); color: var(--accent); }
.tab-btn.active.ado    { border-bottom-color: var(--purple); color: var(--purple); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Tags ── */
.header-tags { display: flex; gap: 0.5rem; margin-left: auto; flex-wrap: wrap; }

.tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  font-family: var(--mono);
}

.tag-dapper { background: rgba(41, 151, 255, 0.12); color: var(--accent); border: 1px solid rgba(41, 151, 255, 0.2); }
.tag-ado    { background: rgba(191, 90, 242, 0.12); color: var(--purple); border: 1px solid rgba(191, 90, 242, 0.2); }
.tag-oracle { background: rgba(255, 69, 58, 0.12); color: var(--red); border: 1px solid rgba(255, 69, 58, 0.2); }

/* ── Performance Table ── */
.perf-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.8rem; }
.perf-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.perf-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.perf-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.perf-bar { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.perf-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.bar-fast   { background: var(--green); }
.bar-medium { background: var(--orange); }
.bar-slow   { background: var(--red); }

/* ── Pills ── */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-family: var(--mono);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
}

/* ── Steps ── */
.steps { display: flex; flex-direction: column; margin: 1.25rem 0; }

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: none; }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}

.step-body { flex: 1; }
.step-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.3rem; }
.step-desc  { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

/* ── Nav Row (prev/next buttons) ── */
.nav-row {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.nav-row button {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--sans);
  padding: 0.5rem 0;
  transition: color 0.2s;
}

.nav-row button:hover { color: var(--accent); }

/* ── Diagrams ── */
.diagram { margin: 1.5rem 0; overflow-x: auto; }
.diagram svg { display: block; max-width: 100%; height: auto; }
.diagram-caption {
  font-size: 0.7rem;
  color: var(--faint);
  font-family: var(--mono);
  margin-top: 0.5rem;
}

hr.sep, .divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── A-Player Guide specifics ── */

/* Full-width section layout */
.guide-container { max-width: 860px; margin: 0 auto; padding: 0 2rem; }

.guide-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.guide-section:last-of-type { border-bottom: none; }

.guide-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.guide-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 3rem;
}

.guide-title em {
  color: var(--accent);
  font-style: normal;
}

/* Hero (a-player) */
.hero-full {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-full::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.hero-full .hero-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-full .hero-quote {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: var(--text);
  max-width: 700px;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  text-align: left;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-full .hero-attribution {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  letter-spacing: 0.15em;
  text-align: left;
  max-width: 700px;
  width: 100%;
  padding-left: 1.8rem;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-full .hero-title {
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}

.hero-full .hero-title span { color: var(--text); }

.hero-full .hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

/* Nav dots */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  cursor: pointer;
  transition: all 0.3s;
}

.nav-dot:hover, .nav-dot.active {
  background: var(--accent);
  transform: scale(1.5);
}

/* Mindset grid */
.mindset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mindset-col {
  padding: 1.5rem;
  background: var(--surface);
}

.mindset-col h4 {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.b-player h4 { color: var(--muted); }
.a-player-col h4 { color: var(--accent); }

.mindset-item {
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.mindset-item:last-child { border-bottom: none; }
.mindset-item .icon { font-size: 0.7rem; margin-top: 0.3rem; flex-shrink: 0; }
.b-player .icon { color: var(--muted); }
.a-player-col .icon { color: var(--accent); }
.b-player .text { color: var(--muted); }
.a-player-col .text { color: var(--text); }

/* Pillars (accordion) */
.pillars { display: flex; flex-direction: column; gap: 2px; }

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--faint);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-left-color 0.3s;
}

.pillar:hover { border-left-color: var(--accent); }

.pillar-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
}

.pillar-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--faint);
  line-height: 1;
  min-width: 50px;
  transition: color 0.3s;
}

.pillar:hover .pillar-num { color: var(--accent); }

.pillar-meta { flex: 1; }

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.pillar-tagline {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.pillar-arrow {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 0.85rem;
  transition: transform 0.3s, color 0.3s;
}

.pillar.open .pillar-arrow { transform: rotate(90deg); color: var(--accent); }

.pillar-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.pillar.open .pillar-body { max-height: 1200px; }

.pillar-content {
  padding: 0 1.5rem 1.5rem 5.5rem;
  border-top: 1px solid var(--border);
}

.pillar-intro {
  font-size: 0.92rem;
  color: var(--text);
  margin: 1.25rem 0 1.5rem;
  line-height: 1.7;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.resource-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-tag.book     { border-color: rgba(41, 151, 255, 0.3); color: var(--accent); }
.resource-tag.course   { border-color: rgba(191, 90, 242, 0.3); color: var(--purple); }
.resource-tag.practice { border-color: rgba(48, 209, 88, 0.3); color: var(--green); }
.resource-tag.habit    { border-color: rgba(255, 159, 10, 0.3); color: var(--orange); }

.sub-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--faint);
  text-transform: uppercase;
  margin: 1.25rem 0 0.5rem;
}

/* Habits timeline */
.habits { display: flex; flex-direction: column; }

.habit-row {
  display: grid;
  grid-template-columns: 120px 1fr;
}

.habit-time {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  padding: 1.25rem 1.25rem 1.25rem 0;
  text-align: right;
  border-right: 1px solid var(--border);
  position: relative;
}

.habit-time::after {
  content: '';
  position: absolute;
  right: -4.5px;
  top: 1.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.habit-detail { padding: 1.25rem 0 1.25rem 1.5rem; }

.habit-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.habit-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Roadmap */
.roadmap { display: flex; flex-direction: column; gap: 2px; }

.phase {
  display: grid;
  grid-template-columns: 100px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.phase-period {
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}

.phase-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.phase-unit {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.phase-detail { padding: 1.5rem; }

.phase-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.phase-items {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.phase-item {
  font-family: var(--mono);
  font-size: 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

/* Page footer */
.page-footer {
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-footer .footer-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 0.9;
  margin-bottom: 1.25rem;
  opacity: 0.12;
}

.page-footer .footer-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

/* Site footer */
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

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

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

/* ── Mobile toggle ── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 56px;
  left: 14px;
  z-index: 100;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 40;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 99px; }

/* ── Responsive ── */
@media (max-width: 800px) {
  .mobile-toggle { display: block; }

  .page-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    width: 260px;
    height: calc(100vh - 48px);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 50;
  }

  .sidebar.open { transform: translateX(0); }
  .overlay.open { display: block; }

  .content { padding: 2rem 1.5rem 4rem; }

  .concept-grid,
  .compare-bar { grid-template-columns: 1fr; }

  .mindset-grid { grid-template-columns: 1fr; }
  .mindset-col:first-child { border-right: none; }

  .pillar-content { padding-left: 1.5rem; }

  .habit-row { grid-template-columns: 80px 1fr; }
  .phase { grid-template-columns: 70px 1fr; }

  .nav-dots { display: none; }

  .top-nav .nav-links { display: none; }

  .hero-section { padding: 4rem 1.5rem 3rem; }
}
