/* ════════════════════════════════════════════
   SHARED ROADMAP STYLES v4
   Used by: index.html + all roadmap pages
   ════════════════════════════════════════════ */

/* ══════════════════════════════════════
   1. THEME VARIABLES
   ══════════════════════════════════════ */
[data-theme="dark"] {
  --bg: #0d0d0d;
  --bg2: #141414;
  --bg3: #1c1c1c;
  --bg4: #242424;
  --border: rgba(255, 255, 255, 0.09);
  --border2: rgba(255, 255, 255, 0.2);
  --text: #f0f0e8;
  --muted: #d0d0c8; /* very readable — sidebar labels, pills */
  --dim: #787870; /* visible — bullets, arrows, week badges */
  --sub: #b8b8b0; /* body text inside topics, notes */
  --card-hover: rgba(255, 255, 255, 0.03);
  --shadow: none;
  --note-bg: rgba(255, 255, 255, 0.03);
}
[data-theme="light"] {
  --bg: #f5f4f0;
  --bg2: #ffffff;
  --bg3: #eeeee8;
  --bg4: #e4e4dc;
  --border: rgba(0, 0, 0, 0.11);
  --border2: rgba(0, 0, 0, 0.22);
  --text: #0e0e0c;
  --muted: #484844; /* strong — sidebar labels clearly visible */
  --dim: #888882; /* arrows, bullets, week badges */
  --sub: #2c2c28; /* body text — near-black for readability */
  --card-hover: rgba(0, 0, 0, 0.02);
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  --note-bg: rgba(0, 0, 0, 0.025);
}
:root {
  --a1: #c8a96e;
  --a1l: rgba(200, 169, 110, 0.14);
  --a1b: rgba(200, 169, 110, 0.32);
  --a2: #6eb896;
  --a2l: rgba(110, 184, 150, 0.14);
  --a2b: rgba(110, 184, 150, 0.32);
  --a3: #6ea0c8;
  --a3l: rgba(110, 160, 200, 0.14);
  --a3b: rgba(110, 160, 200, 0.32);
  --a4: #c87a9a;
  --a4l: rgba(200, 122, 154, 0.14);
  --a4b: rgba(200, 122, 154, 0.32);
  --a5: #9a7ec8;
  --a5l: rgba(154, 126, 200, 0.14);
  --a5b: rgba(154, 126, 200, 0.32);
  --a6: #c8706e;
  --a6l: rgba(200, 112, 110, 0.14);
  --a6b: rgba(200, 112, 110, 0.32);
  --a7: #7ec8b8;
  --a7l: rgba(126, 200, 184, 0.14);
  --a7b: rgba(126, 200, 184, 0.32);
  --mono: "IBM Plex Mono", monospace;
  --serif: "Fraunces", serif;
  --sans: "DM Sans", sans-serif;
  --sidebar-w: 272px;
}

/* ══════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  overflow-x: hidden;
  transition:
    background 0.25s,
    color 0.25s;
}

[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg2);
}
::-webkit-scrollbar-thumb {
  background: var(--dim);
  border-radius: 3px;
}

/* ══════════════════════════════════════
   3. ROADMAP PAGE — LAYOUT & SIDEBAR
   ══════════════════════════════════════ */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.3s;
}
.sidebar-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-head .eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.sidebar-head h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}
.sidebar-head h2 em {
  font-style: italic;
  color: var(--a1);
}

.sidebar-home {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.07em;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}
.sidebar-home:hover {
  color: var(--a1);
  background: var(--a1l);
}
.sidebar-home svg {
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.theme-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sub);
  transition: all 0.15s;
  flex: 1;
  justify-content: center;
  min-height: 30px;
}
.theme-btn:hover {
  border-color: var(--a1);
  color: var(--a1);
}
.theme-btn.active {
  background: var(--a1l);
  border-color: var(--a1);
  color: var(--a1);
}

.progress-wrap {
  padding: 10px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.progress-bar-bg {
  height: 3px;
  background: var(--dim);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  border-radius: 2px;
  transition: width 0.4s ease;
}
#prog-counts {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 20px;
}
.nav-scroll::-webkit-scrollbar {
  width: 3px;
}
.nav-scroll::-webkit-scrollbar-thumb {
  background: var(--dim);
  border-radius: 2px;
}

.nav-group {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 18px 3px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
  border-left: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  min-height: 34px;
}
.nav-link:hover {
  color: var(--text);
  background: var(--card-hover);
}
.nav-link.active {
  color: var(--a1);
  border-left-color: var(--a1);
  background: var(--a1l);
}
.nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
  transition: background 0.15s;
}
.nav-link.active .nav-dot {
  background: var(--a1);
}
.nav-check {
  margin-left: auto;
  font-size: 10px;
  color: var(--a2);
  opacity: 0;
  transition: opacity 0.2s;
}
.nav-link.section-done .nav-check {
  opacity: 1;
}
.nav-week {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  margin-left: auto;
}
.nav-link.active .nav-week {
  display: none;
}

/* Mobile sidebar toggle */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  width: 40px;
  height: 40px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.mobile-menu-btn:hover {
  border-color: var(--a1);
}
.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  position: relative;
  transition: all 0.2s;
}
.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: all 0.2s;
}
.mobile-menu-btn span::before {
  top: -5px;
}
.mobile-menu-btn span::after {
  top: 5px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 190;
}

/* ══════════════════════════════════════
   4. ROADMAP PAGE — MAIN CONTENT
   ══════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  padding: 48px 56px 100px;
  max-width: 960px;
  min-width: 0;
}

.hero {
  margin-bottom: 52px;
}
.hero .kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--a2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: italic;
  color: var(--a1);
}
.hero p {
  font-size: 15px;
  color: var(--sub);
  max-width: 560px;
  line-height: 1.85;
  margin-bottom: 22px;
}
.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.meta-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.sec-div {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 26px;
}
.sec-div-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sec-div-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.sec-div-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}

.phase {
  margin-bottom: 40px;
  animation: fadeIn 0.35s ease both;
}
.phase-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.phase-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.phase-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.phase-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}
.phase-time {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.phase-note {
  border-left: 2px solid var(--border2);
  padding: 2px 0 2px 14px;
  font-size: 14px;
  color: var(--sub);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 600px;
  background: var(--note-bg);
}

.skip-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: var(--a1l);
  border: 1px solid var(--a1b);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--a1);
  cursor: pointer;
  margin-bottom: 12px;
  transition: background 0.15s;
}
.skip-all:hover {
  background: rgba(200, 169, 110, 0.22);
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.topic {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  transition:
    border-color 0.15s,
    background 0.25s;
  box-shadow: var(--shadow);
}
.topic:hover {
  border-color: var(--border2);
}
.topic.done-topic {
  background: var(--a2l);
  border-color: var(--a2b);
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
}
.topic-check {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid var(--dim);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--a2);
  cursor: pointer;
  transition: all 0.15s;
}
.topic-check:hover {
  border-color: var(--a2);
}
.done-topic .topic-check {
  background: rgba(110, 184, 150, 0.22);
  border-color: var(--a2);
}
.topic-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  line-height: 1.45;
}
.done-topic .topic-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--dim);
}
.topic-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  white-space: nowrap;
}
.topic-arrow {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.topic.open .topic-arrow {
  transform: rotate(90deg);
}
.topic-body {
  display: none;
  padding: 0 16px 16px 44px;
  border-top: 1px solid var(--border);
}
.topic.open .topic-body {
  display: block;
}

.sub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 11px 0 10px;
}
.sub-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.65;
}
.sub-list li::before {
  content: "▸";
  color: var(--dim);
  font-size: 9px;
  margin-top: 4px;
  flex-shrink: 0;
}
.sub-list li strong {
  color: var(--text);
  font-weight: 500;
}
.sub-list li code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg3);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border2);
  color: var(--a3);
}

.int-tag {
  display: inline-block;
  background: var(--a1l);
  border: 1px solid var(--a1b);
  color: var(--a1);
  font-family: var(--mono);
  font-size: 9px;
  padding: 0 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.sub-section-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}

.res-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.res-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  transition: all 0.15s;
  min-height: 28px;
}
.res-link:hover {
  border-color: var(--border2);
  color: var(--text);
}
.res-link.doc:hover {
  border-color: var(--a3);
  color: var(--a3);
}
.res-link.vid:hover {
  border-color: var(--a4);
  color: var(--a4);
}
.res-link.prac:hover {
  border-color: var(--a5);
  color: var(--a5);
}

.int-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--a1l);
  border: 1px solid var(--a1b);
  border-radius: 6px;
}
.int-box-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--a1);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.int-box p {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
}
.int-box p strong {
  color: var(--a1);
}
.build-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--a2l);
  border: 1px solid var(--a2b);
  border-radius: 6px;
}
.build-box-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--a2);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.build-box p {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
}
.tip-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--a5l);
  border: 1px solid var(--a5b);
  border-radius: 6px;
}
.tip-box-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--a5);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tip-box p {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
}

.complexity-table {
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}
.complexity-table th {
  background: var(--bg3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 7px 10px;
  text-align: left;
  text-transform: uppercase;
}
.complexity-table td {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  color: var(--sub);
}
.complexity-table tr:hover td {
  background: var(--card-hover);
}
.tc-good {
  color: var(--a2);
}
.tc-ok {
  color: var(--a1);
}
.tc-bad {
  color: var(--a6);
}

.b1 {
  background: var(--a1l);
  color: var(--a1);
}
.b2 {
  background: var(--a2l);
  color: var(--a2);
}
.b3 {
  background: var(--a3l);
  color: var(--a3);
}
.b4 {
  background: var(--a4l);
  color: var(--a4);
}
.b5 {
  background: var(--a5l);
  color: var(--a5);
}
.b6 {
  background: var(--a6l);
  color: var(--a6);
}
.b7 {
  background: var(--a7l);
  color: var(--a7);
}
.c1 {
  color: var(--a1);
}
.c2 {
  color: var(--a2);
}
.c3 {
  color: var(--a3);
}
.c4 {
  color: var(--a4);
}
.c5 {
  color: var(--a5);
}
.c6 {
  color: var(--a6);
}
.c7 {
  color: var(--a7);
}

.footer {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 2.2;
}

/* ══════════════════════════════════════
   5. INDEX PAGE — TOPBAR
   ══════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  backdrop-filter: blur(8px);
  transition:
    background 0.25s,
    border-color 0.25s;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #0d0d0d;
  flex-shrink: 0;
}
.topbar-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Topbar theme buttons (index page — same class as roadmap .theme-btn but scoped to topbar) */
.topbar .theme-btn {
  flex: unset;
  min-height: 30px;
  font-size: 11px;
}

/* ══════════════════════════════════════
   6. INDEX PAGE — HERO
   ══════════════════════════════════════ */
.hub-page {
  position: relative;
  z-index: 1;
}

.hub-hero {
  padding: 80px 40px 64px;
  max-width: 900px;
  margin: 0 auto;
}
.hub-hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--a2);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hub-hero-eyebrow::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--a2);
}

.hub-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.06;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.hub-hero h1 em {
  font-style: italic;
  color: var(--a1);
}
.hub-hero p {
  font-size: 15px;
  color: var(--sub);
  max-width: 520px;
  line-height: 1.85;
  margin-bottom: 32px;
}

.hub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hub-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.hub-stat strong {
  color: var(--text);
}

/* ══════════════════════════════════════
   7. INDEX PAGE — ROADMAP GRID & CARDS
   ══════════════════════════════════════ */
.hub-section {
  padding: 0 40px 80px;
  max-width: 900px;
  margin: 0 auto;
}
.hub-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.hub-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hub-section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.roadmap-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  animation: cardIn 0.4s ease both;
}
.roadmap-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.roadmap-card:nth-child(1) {
  animation-delay: 0.05s;
}
.roadmap-card:nth-child(2) {
  animation-delay: 0.1s;
}
.roadmap-card:nth-child(3) {
  animation-delay: 0.15s;
}
.roadmap-card:nth-child(4) {
  animation-delay: 0.2s;
}

.card-top {
  padding: 20px 20px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.card-meta {
  flex: 1;
  min-width: 0;
}
.card-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.card-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}
.card-title em {
  font-style: italic;
  color: var(--a1);
}
.card-desc {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.65;
}

.card-pills {
  padding: 12px 20px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-top: 1px solid var(--border);
}
.card-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
}
.card-progress-wrap {
  flex: 1;
  margin-right: 12px;
}
.card-progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.card-progress-bar {
  height: 2px;
  background: var(--dim);
  border-radius: 2px;
  overflow: hidden;
}
.card-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.card-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.roadmap-card:hover .card-cta {
  color: var(--a1);
}

/* Accent top bar on hover */
.roadmap-card.c-dsa {
  --card-accent: var(--a1);
}
.roadmap-card.c-db {
  --card-accent: var(--a3);
}
.roadmap-card.c-java {
  --card-accent: var(--a2);
}
.roadmap-card.c-soon {
  --card-accent: var(--dim);
  pointer-events: none;
}
.roadmap-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--border));
  opacity: 0;
  transition: opacity 0.2s;
}
.roadmap-card:hover::before {
  opacity: 1;
}

/* Progress bar colours */
.card-progress-fill.c-dsa {
  background: linear-gradient(90deg, var(--a1), var(--a2));
}
.card-progress-fill.c-db {
  background: linear-gradient(90deg, var(--a3), var(--a7));
}
.card-progress-fill.c-java {
  background: linear-gradient(90deg, var(--a2), var(--a3));
}

.roadmap-card.c-soon {
  opacity: 0.5;
  border-style: dashed;
  cursor: default;
}
.soon-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   8. INDEX PAGE — FOOTER
   ══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 2.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.site-footer span {
  color: var(--dim);
}

/* ══════════════════════════════════════
   9. ANIMATIONS
   ══════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero {
  animation: fadeIn 0.45s ease both;
}
.hub-hero {
  animation: fadeIn 0.5s ease both;
}

/* ══════════════════════════════════════
   10. RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1200px) {
  :root {
    --sidebar-w: 250px;
  }
  .main {
    padding: 40px 40px 80px;
  }
}
@media (max-width: 960px) {
  .main {
    padding: 36px 28px 70px;
  }
  .hero h1 {
    font-size: 40px;
  }
}
@media (max-width: 820px) {
  :root {
    --sidebar-w: 272px;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .main {
    margin-left: 0;
    padding: 56px 20px 60px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .phase-title {
    font-size: 22px;
  }
}
@media (max-width: 640px) {
  .topbar {
    padding: 0 18px;
  }
  .topbar-name {
    display: none;
  }
  .hub-hero {
    padding: 48px 18px 48px;
  }
  .hub-section {
    padding: 0 18px 60px;
  }
  .hub-hero h1 {
    font-size: 2rem;
  }
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 20px 18px;
  }
}
@media (max-width: 520px) {
  .main {
    padding: 56px 14px 60px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .topic-badge {
    display: none;
  }
  .res-row {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════
   15. AUTH & MODAL STYLES (NEW)
   ══════════════════════════════════════ */
.auth-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  transition: all 0.15s;
}
.auth-btn:hover {
  border-color: var(--a1);
  color: var(--a1);
}
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.user-email {
  color: var(--a1);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 20px;
  cursor: pointer;
}
.modal-title {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text);
}
.modal-desc {
  font-size: 14px;
  color: var(--sub);
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
}
.form-input:focus {
  border-color: var(--a1);
}
.submit-btn {
  background: var(--a1);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  margin-top: 8px;
}
.submit-btn:hover {
  filter: brightness(1.1);
}
.auth-switch {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--sub);
}
.auth-switch span {
  color: var(--a1);
  cursor: pointer;
  text-decoration: underline;
}

#auth-error {
  color: var(--a6);
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  display: none;
}

/* ── Page Loader ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.page-loader.visible {
  opacity: 1;
  pointer-events: all;
}
.page-loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--a1, #7c6fff);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.page-loader-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.03em;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
