/* =============================================================
   AS HRIDOY — Backend Engineering Roadmap
   Design language follows the portfolio: near-black navy (#070B12),
   code-window motifs, restrained indigo / cyan accents.
   ============================================================= */

:root {
  --bg: #070b12;
  --surface: #0d1522;
  --surface-2: #121c2e;
  --surface-3: #18243a;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.34);
  --text: #e8ecf4;
  --muted: #a3afc4;
  --dim: #75839d;
  --indigo: #818cf8;
  --indigo-strong: #6366f1;
  --violet: #a78bfa;
  --cyan: #38d4f0;
  --mint: #4ade9e;
  --amber: #f2b84b;
  --danger: #f87171;
  --glow: rgba(129, 140, 248, 0.45);

  --font-body: 'DM Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Sora', 'Hind Siliguri', 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
}

/* Technical grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(700px 420px at 4% 12%, rgba(56, 212, 240, 0.07), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px) 0 0 / 44px 44px;
  pointer-events: none;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #7ce6f8; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--font-mono); }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--indigo-strong); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.noscript { padding: 16px; text-align: center; background: var(--surface-2); }
.fine { font-size: 0.85rem; color: var(--dim); max-width: 62ch; }
.help { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.8em; max-width: 70ch; }
.mt { margin-top: 1.4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-md);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn .icon { font-size: 1.1em; }
.btn-primary { background: var(--indigo-strong); color: #fff; box-shadow: 0 6px 24px -8px var(--glow); }
.btn-primary:hover { background: #7578f5; color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(18, 28, 46, 0.6); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--text); background: var(--surface-3); }
.btn-danger { border-color: rgba(248, 113, 113, 0.45); color: #fca5a5; background: rgba(127, 29, 29, 0.14); }
.btn-danger:hover { background: rgba(127, 29, 29, 0.3); color: #fecaca; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }
.btn-xs { min-height: 32px; padding: 4px 10px; font-size: 0.82rem; border-radius: var(--r-sm); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin-inline: auto; padding: 0 20px;
  height: var(--header-h); display: flex; align-items: center; gap: 16px;
}
.brand {
  font-family: var(--font-mono); font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--indigo); }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 4px; }
.primary-nav a {
  display: block; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 500;
}
.primary-nav a:hover { color: var(--text); background: var(--surface-2); }
.primary-nav a[aria-current='true'] { color: var(--text); box-shadow: inset 0 -2px 0 var(--indigo); border-radius: 0; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang-toggle button {
  min-height: 34px; min-width: 46px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 0.85rem;
}
.lang-toggle button[aria-pressed='true'] { background: var(--indigo-strong); color: #fff; }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; font-size: 1.3rem;
}
.menu-btn span { display: inline-flex; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 40px; align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font-size: 0.85rem; color: var(--muted);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(74, 222, 158, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 158, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 158, 0); } }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; max-width: 18ch; margin-bottom: 20px; }
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 58ch; margin-bottom: 10px; }
.hero-sub-alt { font-size: 0.98rem; color: var(--dim); max-width: 58ch; margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.hero-facts > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.hero-facts > div:last-child { border-right: 0; }
.hero-facts dt { font-size: 0.8rem; color: var(--dim); margin-bottom: 2px; }
.hero-facts dd { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.hero-progress { max-width: 520px; margin-bottom: 14px; }
.hero-progress-top { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--muted); margin-bottom: 8px; }
.hero-progress-top strong { color: var(--text); font-family: var(--font-mono); }

.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-sm { height: 5px; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--indigo-strong), var(--cyan)); transition: width 0.4s ease; }
.meter-verify .bar-fill { background: linear-gradient(90deg, #22c58b, var(--mint)); }
.meter-job .bar-fill { background: linear-gradient(90deg, var(--violet), var(--indigo)); }

.code-window { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: rgba(13, 21, 34, 0.9); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(99, 102, 241, 0.35); }
.code-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.code-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.code-bar em { margin-left: 10px; font-style: normal; font-family: var(--font-mono); font-size: 0.8rem; color: var(--dim); }
.code-window pre { margin: 0; padding: 18px 20px; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75; color: #c3cde0; overflow-x: auto; }
.tk-k { color: var(--violet); }
.tk-s { color: #8be3a4; }
.tk-n { color: var(--amber); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 10px; }
.section-head p { color: var(--muted); max-width: 66ch; margin: 0; }

/* ---------- Map ---------- */
.map-section { padding-top: 32px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .icon { color: var(--indigo); }
.legend-help { font-size: 0.82rem; color: var(--dim); margin-bottom: 18px; }

.route-box {
  position: relative; padding: 36px 64px 56px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(13, 21, 34, 0.7), rgba(9, 14, 24, 0.7));
}
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.route-list { list-style: none; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 56px 20px; position: relative; z-index: 1; }
.node-item { display: flex; justify-content: center; align-items: flex-start; }
.node-item:nth-child(even) { transform: translateY(26px); }

.route-seg { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; transition: stroke 0.2s; }
.route-seg.is-done { stroke: var(--mint); stroke-dasharray: none; stroke-width: 3; }
.route-seg.is-active { stroke: var(--indigo); stroke-width: 3.5; stroke-dasharray: 10 9; filter: drop-shadow(0 0 6px var(--glow)); animation: flow 1.1s linear infinite; }
.route-seg.is-active.is-done { stroke: var(--mint); stroke-dasharray: none; animation: none; filter: drop-shadow(0 0 6px rgba(74, 222, 158, 0.5)); }
@keyframes flow { to { stroke-dashoffset: -19; } }
.route-arrow { fill: var(--dim); }
.route-arrow.is-done { fill: var(--mint); }
.route-arrow.is-active { fill: var(--indigo); }
.route-arrow.is-active.is-done { fill: var(--mint); }

.node {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 230px; padding: 0; border: 0; background: none;
  color: inherit; cursor: pointer; text-align: center;
}
.node-dot {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1.5px solid var(--line-strong); color: var(--indigo);
  font-size: 26px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
/* Progress ring: shows learned + implemented progress */
.node-dot::before {
  content: ''; position: absolute; inset: -6px; border-radius: inherit;
  background: conic-gradient(var(--ring, var(--indigo)) calc(var(--p, 0) * 1%), var(--line) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.node-glyph {
  position: absolute; right: -8px; bottom: -8px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px;
  background: var(--surface-3); border: 1.5px solid var(--line-strong); color: var(--text);
}
.node-glyph .icon { stroke-width: 2.6; }
.node-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r-md);
  transition: background 0.2s, border-color 0.2s;
}
.node-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); }
.node-title { font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; line-height: 1.3; color: var(--text); }
.node-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--muted); }
.node-viewing { display: none; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--indigo); }
.node:hover .node-dot { transform: translateY(-2px); border-color: var(--indigo); }
.node:hover .node-card { background: rgba(18, 28, 46, 0.7); }
.node:focus-visible { outline: none; }
.node:focus-visible .node-card { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* node states: shape + icon + text, never color alone */
.node.is-available .node-dot { border-color: var(--indigo); box-shadow: 0 0 22px -6px var(--glow); }
.node.is-inprogress .node-dot { border-color: var(--cyan); color: var(--cyan); --ring: var(--cyan); }
.node.is-completed .node-dot { background: rgba(74, 222, 158, 0.14); border-color: var(--mint); color: var(--mint); --ring: var(--mint); }
.node.is-completed .node-glyph { background: var(--mint); border-color: var(--mint); color: #05281a; }
.node.is-locked .node-dot { border-style: dashed; color: var(--dim); }
.node.is-locked .node-title { color: var(--muted); }
.node.is-start .node-dot, .node.is-final .node-dot { border-radius: 20px; }
.node.is-start .node-dot::before, .node.is-final .node-dot::before { border-radius: 26px; }
.node.is-final .node-dot { width: 72px; height: 72px; font-size: 30px; }
.node.is-final.is-completed .node-dot { box-shadow: 0 0 36px -4px rgba(74, 222, 158, 0.6); }
.node.is-selected .node-dot { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6.5px var(--indigo), 0 0 30px var(--glow); transform: scale(1.06); }
.node.is-selected .node-card { background: var(--surface-2); border-color: var(--indigo); }
.node.is-selected .node-viewing { display: inline-flex; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; line-height: 1.5;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted);
}
.chip .icon { font-size: 0.95em; }
.chip-start, .chip-available { color: #c7ccff; border-color: rgba(129, 140, 248, 0.55); background: rgba(99, 102, 241, 0.16); }
.chip-inprogress, .chip-proj-inProgress { color: #8aeaff; border-color: rgba(56, 212, 240, 0.5); background: rgba(56, 212, 240, 0.1); }
.chip-completed, .chip-reached, .chip-proj-verified { color: #8cf2c3; border-color: rgba(74, 222, 158, 0.5); background: rgba(74, 222, 158, 0.12); }
.chip-proj-implemented { color: #c9b8ff; border-color: rgba(167, 139, 250, 0.5); background: rgba(167, 139, 250, 0.12); }
.chip-locked { border-style: dashed; }
.chip-destination { color: var(--amber); border-color: rgba(242, 184, 75, 0.45); background: rgba(242, 184, 75, 0.1); }
.chip-soft { font-weight: 500; }
.node-chip { margin-top: 2px; }

/* selection bar */
.selection-bar {
  position: sticky; bottom: 14px; z-index: 20; margin-top: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: rgba(13, 21, 34, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
}
.sel-info { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-label { font-family: var(--font-mono); font-size: 0.82rem; color: var(--dim); }
.sel-title { font-family: var(--font-head); font-size: 1rem; }

/* ---------- Detail panel ---------- */
.detail-section { padding-top: 24px; }
.detail-section:focus { outline: none; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(13, 21, 34, 0.82); padding: clamp(20px, 4vw, 40px); }
.panel-head { padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.panel-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.kicker-label { font-family: var(--font-mono); font-size: 0.9rem; color: var(--indigo); }
.panel-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -0.025em; margin-bottom: 10px; }
.panel-duration { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 0.95rem; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.panel-main { min-width: 0; }
.panel-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 16px; }
.block { margin-bottom: 36px; }
.block h3 { font-size: 1.2rem; margin-bottom: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.block-head h3 { margin-bottom: 8px; }
.block-tools { display: flex; gap: 8px; }
.lead { font-size: 1.12rem; color: var(--text); max-width: 64ch; margin-bottom: 12px; }
.desc-alt { font-size: 0.95rem; color: var(--dim); max-width: 64ch; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.desc-alt-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-right: 4px; }
.bullets { list-style: none; display: grid; gap: 8px; max-width: 70ch; }
.bullets li { position: relative; padding-left: 22px; color: var(--muted); }
.bullets li::before { content: ''; position: absolute; left: 4px; top: 0.7em; width: 7px; height: 7px; border-radius: 2px; background: var(--indigo); transform: rotate(45deg); }
.numbered { padding-left: 22px; display: grid; gap: 8px; color: var(--muted); max-width: 70ch; }
.numbered li::marker { color: var(--indigo); font-family: var(--font-mono); font-weight: 600; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); margin: 0 0 28px; border: 1px solid; }
.callout p { margin: 0; font-size: 0.95rem; }
.callout .icon { margin-top: 4px; font-size: 1.1rem; }
.callout-info { background: rgba(56, 212, 240, 0.07); border-color: rgba(56, 212, 240, 0.3); }
.callout-info .icon { color: var(--cyan); }
.callout-warn { background: rgba(242, 184, 75, 0.08); border-color: rgba(242, 184, 75, 0.35); }
.callout-warn .icon { color: var(--amber); }
.callout-inline { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 0.95rem; }
.callout-inline .icon { margin-top: 4px; color: var(--cyan); }

/* topic groups */
.group { border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(18, 28, 46, 0.5); margin-bottom: 10px; }
.group summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 52px;
}
.group summary::-webkit-details-marker { display: none; }
.group-title { font-family: var(--font-head); font-weight: 600; flex: 1; }
.group-count { font-size: 0.8rem; color: var(--dim); font-family: var(--font-mono); }
.chev { transition: transform 0.2s; color: var(--muted); }
details[open] > summary .chev { transform: rotate(180deg); }
.topic-list { list-style: none; border-top: 1px solid var(--line); }
.topic { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic-text { flex: 1; min-width: 0; color: var(--text); }
.topic-checks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ai-topics { border: 1px solid var(--line); border-radius: var(--r-md); }

/* checkbox */
.check { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px; padding: 4px 10px 4px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: 0.85rem; color: var(--muted); user-select: none; }
.check:hover { border-color: var(--line-strong); }
.check input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.check-box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; font-size: 14px; transition: background 0.15s, border-color 0.15s; }
.check-box .icon { stroke-width: 3.2; }
.check input:checked ~ .check-box { background: var(--indigo-strong); border-color: var(--indigo-strong); color: #fff; }
.check input:checked ~ .check-label { color: var(--text); }
.check:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.check-wide { display: flex; width: 100%; padding: 10px 14px 10px 10px; font-size: 0.95rem; align-items: flex-start; }
.check-wide .check-box { margin-top: 2px; }

/* project box, verification, evidence */
.project-box { padding: 20px; border-radius: var(--r-md); border: 1px solid rgba(129, 140, 248, 0.35); background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(56, 212, 240, 0.04)); max-width: 72ch; }
.project-box h4 { font-size: 1.1rem; margin-bottom: 8px; }
.project-box h5 { font-size: 0.9rem; margin: 14px 0 8px; color: var(--muted); font-weight: 600; }
.criteria { list-style: none; display: grid; gap: 8px; max-width: 72ch; margin-bottom: 8px; }
.criteria-count { font-family: var(--font-mono); font-size: 0.82rem; color: var(--dim); }
.verify-status { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 0.93rem; margin-bottom: 24px; max-width: 72ch; }
.verify-status .icon { margin-top: 3px; }
.verify-status.is-done { border: 1px solid rgba(74, 222, 158, 0.5); background: rgba(74, 222, 158, 0.1); color: #b4f3d4; }
.evidence h4 { font-size: 1.05rem; margin-bottom: 6px; }
.evidence-list { list-style: none; display: grid; gap: 8px; margin-bottom: 18px; max-width: 72ch; }
.evidence-empty { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--dim); font-size: 0.92rem; }
.evidence-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ev-main { min-width: 0; display: grid; gap: 4px; }
.ev-type { font-weight: 600; font-size: 0.88rem; }
.ev-main a { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; font-size: 0.9rem; }
.ev-note { margin: 0; font-size: 0.9rem; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.evidence-form { display: grid; gap: 14px; max-width: 72ch; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(7, 11, 18, 0.5); }
.field { display: grid; gap: 6px; min-width: 0; }
.field[hidden] { display: none; }
.field label { font-size: 0.88rem; font-weight: 600; }
input[type='url'], input[type='text'], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
}
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
input[aria-invalid='true'] { border-color: var(--danger); }
.form-error, .form-msg { margin: 0; min-height: 1.2em; font-size: 0.86rem; }
.form-error, .form-msg.is-error { color: #fca5a5; }
.form-msg.is-ok { color: #8cf2c3; }
.form-msg a { display: inline-flex; vertical-align: middle; }

/* side cards */
.side-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(18, 28, 46, 0.55); }
.side-card h3 { font-size: 1rem; margin-bottom: 12px; }
.layers { list-style: none; display: grid; gap: 14px; }
.layer { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.layer-icon { color: var(--dim); font-size: 20px; margin-top: 1px; display: inline-flex; }
.layer.is-done .layer-icon { color: var(--mint); }
.layer-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.92rem; }
.layer-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.layer-help { margin: 2px 0 8px; font-size: 0.8rem; color: var(--dim); }
.layer[data-layer='verified'] .bar-fill, .layer.is-done .bar-fill { background: linear-gradient(90deg, #22c58b, var(--mint)); }
.prereq-list { list-style: none; display: grid; gap: 6px; margin-bottom: 10px; }
.prereq { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; min-height: 40px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 0.88rem; }
.prereq:hover { border-color: var(--indigo); }
.prereq .icon { color: var(--indigo); }
.order-hint { margin: 0; }
.link-list { list-style: none; display: grid; gap: 10px; }
.link-list a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.link-desc { display: block; font-size: 0.8rem; color: var(--dim); }

.panel-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.panel-nav-btn { justify-content: flex-start; text-align: left; gap: 12px; min-width: 200px; }
.panel-nav-next { justify-content: flex-end; text-align: right; }
.panel-nav-btn span { display: grid; gap: 2px; }
.panel-nav-btn small { font-size: 0.75rem; color: var(--dim); font-weight: 500; }

.competencies { list-style: none; display: grid; gap: 10px; max-width: 72ch; margin-bottom: 18px; }
.comp { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.comp .help { margin: 2px 0 0; }
.comp-icon { font-size: 22px; color: var(--dim); margin-top: 2px; }
.comp.is-done { border-color: rgba(74, 222, 158, 0.5); background: rgba(74, 222, 158, 0.08); }
.comp.is-done .comp-icon { color: var(--mint); }

/* ---------- Progress dashboard ---------- */
.dual-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.meter { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.meter-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 0.95rem; }
.meter-top span { font-family: var(--font-mono); color: var(--muted); }
.meter-help { margin: 10px 0 0; font-size: 0.82rem; color: var(--dim); }
.bar { height: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.stat { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.stat dt { font-size: 0.8rem; color: var(--dim); margin-bottom: 6px; }
.stat dd { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; overflow-wrap: anywhere; }

/* ---------- Tracks (parallel rails) ---------- */
.rail-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); padding: 0 21px 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim); text-align: center; }
.track-list { display: grid; gap: 10px; }
.track { border: 1px solid rgba(56, 212, 240, 0.22); border-radius: var(--r-md); background: rgba(56, 212, 240, 0.035); }
.track summary { display: grid; grid-template-columns: 38px 1fr auto 20px; gap: 6px 14px; align-items: center; padding: 16px 20px 14px; cursor: pointer; list-style: none; }
.track summary::-webkit-details-marker { display: none; }
.track-letter { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(56, 212, 240, 0.5); color: var(--cyan); font-family: var(--font-mono); font-weight: 600; }
.track-title { display: grid; gap: 2px; min-width: 0; }
.track-desc { font-size: 0.86rem; color: var(--muted); }
.track-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.track-rail { grid-column: 1 / -1; display: block; height: 10px; margin-top: 4px; position: relative;
  background: radial-gradient(circle, var(--cyan) 2.6px, transparent 3.2px) 0 50% / calc(100% / 11) 100% repeat-x; }
.track-rail::before, .track-rail::after { content: ''; position: absolute; left: 4.5%; right: 4.5%; height: 1px; background: rgba(56, 212, 240, 0.35); }
.track-rail::before { top: 3px; }
.track-rail::after { bottom: 3px; }
.track-body { padding: 4px 20px 20px; }
.track-items { list-style: none; display: grid; gap: 8px; max-width: 72ch; }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color 0.2s; }
.project-card:hover { border-color: rgba(129, 140, 248, 0.5); }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-path { font-size: 0.85rem; color: var(--indigo); }
.project-card h3 { font-size: 1.05rem; }
.pc-desc { margin: 0; font-size: 0.9rem; color: var(--muted); flex: 1; }
.pc-progress { margin: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); }
.project-card .btn { align-self: flex-start; }

/* ---------- Resources ---------- */
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resource-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.resource-card h3 { display: grid; gap: 2px; font-size: 1rem; margin-bottom: 14px; }
.rc-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--indigo); font-weight: 500; }
.resource-card-optional { border-style: dashed; }

/* ---------- Jobs ---------- */
.job-list { display: grid; gap: 12px; }
.meter-job { margin: 0 0 18px; }
.job { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); align-items: start; }
.job-main { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.job h3 { font-size: 1.02rem; margin-bottom: 6px; }
.job-ev { margin: 0 0 10px; font-size: 0.9rem; color: var(--muted); }

/* ---------- AI extension ---------- */
.ai-box { padding: clamp(20px, 4vw, 36px); border: 1.5px dashed rgba(167, 139, 250, 0.5); border-radius: var(--r-lg); background: rgba(167, 139, 250, 0.04); }
.ai-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 12px 0 10px; }
.ai-head p { color: var(--muted); max-width: 70ch; }
.badge-optional { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--violet); color: #d4c6ff; font-size: 0.82rem; font-weight: 600; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; margin-top: 18px; align-items: start; }
.ai-grid h3 { font-size: 1.1rem; margin-bottom: 12px; }
.count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 24px; padding: 40px 0 48px; border-top: 1px solid var(--line); background: rgba(7, 11, 18, 0.7); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; }
.footer-brand { font-size: 1.05rem; margin: 0 0 8px; }
.footer-text { font-size: 0.88rem; color: var(--muted); max-width: 64ch; }
.privacy { display: flex; gap: 8px; align-items: flex-start; }
.privacy .icon { margin-top: 4px; color: var(--cyan); }
.footer-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* ---------- Dialog + toast ---------- */
dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--text); }
dialog::backdrop { background: rgba(3, 6, 12, 0.7); backdrop-filter: blur(3px); }
.dialog-form { padding: 24px; }
.dialog-form h2 { font-size: 1.25rem; margin-bottom: 10px; }
.dialog-form p { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 90; max-width: min(520px, calc(100vw - 32px));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface-3); color: var(--text); font-size: 0.92rem; text-align: center;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .code-window { max-width: 460px; }
  .panel-grid { grid-template-columns: 1fr; }
  .panel-side { position: static; }
  .project-grid, .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-box { padding-inline: 56px; }
}

@media (max-width: 899px) {
  .menu-btn { display: inline-flex; margin-left: 0; }
  .lang-toggle { margin-left: auto; }
  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: rgba(7, 11, 18, 0.98); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: 14px 12px; }
  .primary-nav a[aria-current='true'] { box-shadow: none; color: var(--indigo); }
}

@media (max-width: 719px) {
  .section { padding: 40px 0; }
  .hero { padding-top: 36px; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts > div:nth-child(2) { border-right: 0; }
  .hero-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dual-bars, .ai-grid, .footer-grid, .job { grid-template-columns: 1fr; }
  .project-grid, .resource-grid { grid-template-columns: 1fr; }
  .topic { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topic-checks { justify-content: flex-start; }
  .panel-nav-btn { min-width: 0; flex: 1 1 100%; }
  .track summary { grid-template-columns: 34px 1fr 20px; }
  .track-count { grid-column: 2; }
  .track-rail { display: none; }
  .rail-scale { display: none; }
}

/* Mobile route: vertical journey with the dot on the left */
.route-list[data-cols='1'] { grid-template-columns: 1fr; gap: 22px; }
.route-list[data-cols='1'] .node-item { justify-content: flex-start; transform: none; }
.route-list[data-cols='1'] .node-item:nth-child(even) .node { padding-left: 26px; }
.route-list[data-cols='1'] .node { flex-direction: row; align-items: flex-start; text-align: left; max-width: none; gap: 14px; }
.route-list[data-cols='1'] .node-card { align-items: flex-start; }
.route-list[data-cols='1'] .node-dot { margin-top: 4px; }
.route-box:has(.route-list[data-cols='1']) { padding: 24px 22px 28px 26px; }

@media (max-width: 440px) {
  .stat-grid { grid-template-columns: 1fr; }
  .brand { font-size: 0.9rem; }
  .nav-inner { gap: 10px; padding-inline: 14px; }
  .wrap { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .route-seg.is-active { stroke-dasharray: none; }
}
