@charset "UTF-8";
/* ============================================================
   Demystifying Assembly — terminal / retro design system
   ============================================================ */
:root {
  --bg: #0a0e0a;
  --bg-panel: #0f150f;
  --bg-inset: #070b07;
  --fg: #cfe8cf;
  --fg-dim: #7f9c7f;
  --accent: #39ff14; /* phosphor green */
  --accent-soft:#2bd60f;
  --amber: #ffb000;
  --red: #ff5f56;
  --line: #1c2a1c;
  --glow: 0 0 6px rgba(57,255,20,.55);
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 64rem;
  --radius: 6px;
}

/* Light "paper terminal" for bright environments */
@media (prefers-color-scheme: light) {
  :root {
    --bg:#f4f1e9;
    --bg-panel:#fbf9f2;
    --bg-inset:#ece5d6;
    --fg:#1f2a1f;
    --fg-dim:#5e6b5e;
    --accent:#0a7d2c;
    --accent-soft:#0a7d2c;
    --amber:#9a6b00;
    --line:#d8d2c2;
    --glow:none;
  }
}
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: clamp(15px, 1rem + 0.15vw, 17px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* faint scanlines — decorative, killed by data-effects="off" / reduced motion */
body[data-effects=on]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body[data-effects=on]::before {
    display: none;
  }
  .cursor {
    animation: none !important;
  }
}
.wrap {
  width: min(var(--maxw), 92vw);
  margin-inline: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-shadow: var(--glow);
}

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

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: #000;
  padding: 0.4rem 0.7rem;
  z-index: 10000;
}

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-inset);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.2rem;
  padding: 1rem 0;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-shadow: var(--glow);
}

.brand:hover {
  text-decoration: none;
}

.cursor {
  animation: blink 1.1s steps(1) infinite;
  color: var(--accent);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
.tagline {
  margin: 0;
  flex: 1 1 100%;
  font-style: italic;
  color: var(--fg-dim);
}

.tagline .asm, .asm {
  color: var(--accent);
  font-style: normal;
  font-family: var(--mono);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.site-nav .ico {
  color: var(--accent);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
}

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

/* ---------- hero ---------- */
.hero {
  padding: clamp(2rem, 6vw, 4.5rem) 0 1.5rem;
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(2rem, 4vw + 1rem, 3.4rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--fg-dim);
  margin: 0 0 1.2rem;
}

.hero-lede {
  max-width: 46rem;
}

/* ---------- track + cards ---------- */
.track {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.track-head h2 {
  font-family: var(--mono);
  margin: 0 0 0.2rem;
}

.level-head {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  margin: 1.4rem 0 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.card a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
}

.card a:hover {
  border-color: var(--accent);
  text-decoration: none;
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.card {
  transition: none;
}

.card-num {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
}

.card-title {
  flex: 1;
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

.check {
  color: var(--accent);
  opacity: 0;
  font-family: var(--mono);
}

.is-visited .check, .card.is-visited .check {
  opacity: 1;
  text-shadow: var(--glow);
}

.empty {
  font-style: italic;
}

/* ---------- difficulty badges ---------- */
.badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.badge-beginner {
  color: var(--accent);
}

.badge-intermediate {
  color: var(--amber);
}

.badge-advanced {
  color: var(--red);
}

.badge-arch {
  color: var(--fg-dim);
}

.badge-pos {
  color: var(--fg-dim);
  border-color: var(--line);
}

/* ---------- lesson layout ---------- */
/* Lesson pages use more of the viewport than the 64rem default: the TOC moves
   left into the otherwise-wasted margin and the content column gets room to
   breathe (so wide code listings don't need a scrollbar). */
main:has(.lesson-grid) {
  width: min(82rem, 94vw);
}

/* minmax(0, 1fr) lets the content column shrink properly so any genuinely
   over-wide <pre> scrolls *within* the column instead of stretching the grid. */
.lesson-grid {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  align-items: start;
}

.toc {
  position: sticky;
  top: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.toc-toggle {
  display: none;
  width: 100%;
  text-align: left;
  margin-bottom: 0.5rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  padding: 0.35rem 0.8rem;
  color: var(--fg-dim);
  border-left: 2px solid transparent;
  margin-left: -1px;
}

.toc-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.toc-list .is-current a {
  color: var(--fg);
  border-left-color: var(--accent);
}

.toc-list .num {
  color: var(--accent-soft);
}

.lesson-head h1 {
  font-family: var(--mono);
  margin: 0.2rem 0 0.6rem;
  line-height: 1.15;
}

.crumbs {
  font-family: var(--mono);
  font-size: 0.8rem;
  margin: 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.progress {
  height: 4px;
  background: var(--bg-inset);
  border-radius: 999px;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  box-shadow: var(--glow);
}

.prose {
  max-width: 60rem;
}

.prose h2 {
  font-family: var(--mono);
  margin-top: 2.2rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.3rem;
}

.prose h3 {
  font-family: var(--mono);
  margin-top: 1.6rem;
}

.prose pre {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

.prose :not(pre) > code {
  background: var(--bg-inset);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--amber);
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.4rem 0;
  padding: 0.2rem 1rem;
  color: var(--fg-dim);
  font-style: italic;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.lnav {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lnav:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ---------- visualizer ---------- */
.viz {
  margin: 1.5rem 0 2rem;
}

.viz-frame {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.viz-titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--line);
}

.viz-titlebar .dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}

.dot.r {
  background: var(--red);
}

.dot.y {
  background: var(--amber);
}

.dot.g {
  background: var(--accent);
}

.viz-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
  margin-left: 0.4rem;
}

.viz-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.viz-code {
  border-right: 1px solid var(--line);
}

.viz-lines {
  list-style: none;
  margin: 0;
  padding: 0.8rem 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  counter-reset: ln;
}

.viz-lines li {
  counter-increment: ln;
  padding: 0.15rem 1rem 0.15rem 3rem;
  position: relative;
  white-space: pre;
}

.viz-lines li::before {
  content: counter(ln);
  position: absolute;
  left: 0;
  width: 2.2rem;
  text-align: right;
  color: var(--fg-dim);
  opacity: 0.6;
}

.viz-lines li.active {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: inset 3px 0 0 var(--accent);
}

.viz-panels {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.6rem;
  padding: 0.8rem;
}

.viz-panel h3 {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  margin: 0 0 0.3rem;
}

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.3rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.kv .cell {
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.kv .cell .k {
  color: var(--fg-dim);
}

.kv .cell .v {
  color: var(--fg);
}

.kv .cell.changed {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.kv .cell.changed .v {
  color: var(--accent);
}

.kv .empty-note {
  color: var(--fg-dim);
  font-style: italic;
  grid-column: 1/-1;
}

.viz-note {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--line);
  min-height: 1.2rem;
}

.viz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--line);
  background: var(--bg-inset);
}

.viz-controls button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.viz-controls button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.viz-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}

.viz-controls input[type=range] {
  flex: 1;
  min-width: 6rem;
  accent-color: var(--accent);
}

.viz-counter {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 1.2rem 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
}

.site-footer .prompt {
  color: var(--accent);
}

.site-footer .path {
  color: var(--amber);
}

.muted {
  color: var(--fg-dim);
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .lesson-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .toc {
    position: static;
  }
  .toc-toggle {
    display: block;
  }
  .toc-list {
    display: none;
  }
  .toc.open .toc-list {
    display: block;
  }
  .viz-body {
    grid-template-columns: 1fr;
  }
  .viz-code {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .site-nav {
    width: 100%;
    margin-left: 0;
  }
}

/*# sourceMappingURL=terminal.css.map */