:root {
  --bg: #060607;
  --panel: #0c0c0f;
  --panel-2: #101014;
  --line: #1e1e24;
  --ink: #e8e9ed;
  --muted: #9a9ca6;
  --dim: #82848f;
  --l1: #50ffff;   /* beginner */
  --l2: #6fb5ff;   /* intermediate */
  --l3: #a98fff;   /* advanced */
  --l4: #f380f5;   /* expert */
  --c: var(--l1);  /* current page level color */
  --focus: #50ffff;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  /* legacy aliases (kept so any stray references still resolve) */
  --bg-card: var(--panel);
  --border: var(--line);
  --text: var(--ink);
  --text-muted: var(--muted);
  --cyan: var(--l1);
  --pink: var(--l4);
  --code-bg: #08080a;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font: 400 16px/1.65 var(--body);
  background: var(--bg);
  color: var(--ink);
  background-image: radial-gradient(circle, #17171c 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* per-page level colour */
.level-beginner { --c: var(--l1); }
.level-intermediate { --c: var(--l2); }
.level-advanced { --c: var(--l3); }
.level-expert { --c: var(--l4); }

code {
  font-family: var(--mono);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 0;
  background: var(--l1);
  color: #041414;
  padding: 0.6rem 1.1rem;
  font: 500 0.8rem var(--mono);
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

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