/*
QuantumUnix website CSS
Palette taken 1:1 from omarchy.lt (Emacs Org Mode Theme):
  --bg-primary       #1c1c1c
  --bg-secondary     #282828
  --bg-tertiary      #2f2f2f
  --fg-primary       #d0d0d0
  --fg-dim           #dcdccc
  --accent-cyan      #8cd0d3   (cursor / primary accent)
  --accent-cyan-br   #93e0e3   (highlight cyan)
  --accent-cyan-alt  #7cb8bb   (gradient companion)
  --accent-green     #6fb86f
  --accent-green-alt #7f9f7f   (muted green text)
  --accent-yellow    #f0dfaf
  --accent-red       #cc9393
  --selection        #2f2f2f
No external fonts, no trackers, no remote assets.
*/

:root {
  --bg:          #1c1c1c;
  --panel:       #282828;
  --panel-2:     #2f2f2f;
  --fg:          #d0d0d0;
  --fg-dim:      #dcdccc;
  --muted:       #7f9f7f;
  --cursor:      #8cd0d3;
  --cyan:        #8cd0d3;
  --cyan-bright: #93e0e3;
  --cyan-alt:    #7cb8bb;
  --green:       #6fb86f;
  --green-alt:   #7f9f7f;
  --yellow:      #f0dfaf;
  --red:         #cc9393;
  --selection:   #2f2f2f;
  --border:      #2f2f2f;
  --shadow:      0 4px 20px rgba(140, 208, 211, .18);
  --shadow-lg:   0 18px 48px rgba(0, 0, 0, .42);
  --radius:      8px;
  --radius-lg:   12px;
  --maxw:        1200px;
  --mono:        'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Monaco, 'Courier New', ui-monospace, monospace;
  --sans:        'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Monaco, ui-monospace, monospace;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
  color: var(--fg);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--cyan-bright);
  text-decoration: underline;
  text-underline-offset: .18em;
}

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

img, svg { max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 2rem;
}

.skip {
  position: absolute;
  top: .75rem;
  left: -999px;
  padding: .5rem .75rem;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 999;
}

.skip:focus { left: .75rem; }

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(28, 28, 28, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: .05em;
  text-shadow: 0 0 20px rgba(140, 208, 211, .3);
}

.brand:hover { text-decoration: none; color: var(--cyan-bright); }

.logo {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 18px rgba(140, 208, 211, .35));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-wrap: wrap;
}

.main-nav a, .search-button, .menu-button {
  color: var(--fg-dim);
  border: 1px solid transparent;
  padding: .42rem .7rem;
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  font-size: .92rem;
  transition: all .25s ease;
}

.main-nav a:hover, .search-button:hover {
  background: var(--panel-2);
  border-color: var(--cyan);
  color: var(--cyan-bright);
  text-decoration: none;
}

.main-nav a[aria-current="page"] {
  color: var(--cyan);
  background: var(--panel);
  border-color: var(--cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.search-button { cursor: pointer; }

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: .04rem .36rem;
  margin-left: .3rem;
  font-size: .8em;
  text-align: center;
  color: var(--bg);
  background: var(--yellow);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .2);
}

/* ─── Buttons (omarchy.lt style) ─────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 2rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: var(--panel);
  color: var(--fg);
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: all .3s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-alt));
  color: var(--bg);
  font-weight: 600;
  border-color: transparent;
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  box-shadow: var(--shadow);
}

.btn.secondary {
  background: var(--panel);
  color: var(--cyan);
  border: 1px solid var(--cyan);
}

.btn.secondary:hover {
  background: var(--panel-2);
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
}

.btn.ghost {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn.ghost:hover {
  background: var(--green);
  color: var(--bg);
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 5.8rem 0 3.1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--green-alt);
  font: 500 .82rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  padding: .42rem .7rem;
  border-radius: var(--radius);
}

h1, h2, h3 {
  line-height: 1.18;
  color: var(--fg);
  letter-spacing: .02em;
  font-weight: 400;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(140, 208, 211, .25);
  margin: 1.1rem 0 .9rem;
  max-width: 980px;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--cyan);
  margin: 3rem 0 1rem;
  letter-spacing: .03em;
}

h3 {
  font-size: 1.15rem;
  color: var(--cyan);
  margin: 0 0 .5rem;
  font-weight: 500;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--green-alt);
  font-weight: 300;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ─── ASCII / terminal card ──────────────────────────────── */

.ascii-card {
  margin-top: 2.2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.ascii-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(140, 208, 211, .2);
}

.ascii-card header {
  display: flex;
  align-items: center;
  gap: .45rem;
  border-bottom: 1px solid var(--border);
  padding: .65rem .8rem;
  color: var(--fg-dim);
  font-family: var(--mono);
  background: var(--bg);
}

.dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; }
.dot.red    { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green  { background: var(--green); }

.ascii-card pre {
  margin: 0;
  padding: 1rem;
  overflow: auto;
  color: var(--cyan);
  font-size: .82rem;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* ─── Grid / cards ───────────────────────────────────────── */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(140, 208, 211, .15);
  border-top-color: var(--cyan);
}

.card h3 { color: var(--cyan); }

.card p {
  color: var(--fg-dim);
  margin: .35rem 0 0;
  line-height: 1.6;
}

.card .number {
  color: var(--yellow);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
}

.pill-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-dim);
  border-radius: var(--radius);
  padding: .25rem .65rem;
  font-size: .85rem;
  font-family: var(--mono);
}

.split {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.panel.emph {
  border-left-width: 3px;
  border-left-color: var(--cyan-bright);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
}

.layer {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}

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

.layer strong {
  color: var(--yellow);
  font-family: var(--mono);
}

.layer p { margin: 0; color: var(--fg-dim); }

/* ─── Tables ─────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  padding: .9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--fg-dim);
}

th {
  color: var(--cyan);
  font-family: var(--mono);
  font-weight: 600;
  background: var(--bg);
  letter-spacing: .04em;
}

tr:last-child td { border-bottom: none; }

/* ─── Code blocks ────────────────────────────────────────── */

pre {
  background: var(--bg);
  border: 1px solid var(--selection);
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
  font-family: var(--mono);
}

pre code, code {
  font-family: var(--mono);
  color: var(--green);
  font-size: .9rem;
  background: transparent;
}

p code, li code, td code {
  color: var(--yellow);
  background: var(--bg);
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .9em;
}

/* ─── Notices ────────────────────────────────────────────── */

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--fg-dim);
}

.notice strong { color: var(--cyan); }

.notice.warning {
  border-left-color: var(--yellow);
}

.notice.warning strong { color: var(--yellow); }

/* ─── Utility colours ────────────────────────────────────── */

.muted  { color: var(--green-alt); }
.yellow { color: var(--yellow); }
.cyan   { color: var(--cyan-bright); }
.green  { color: var(--green); }
.red    { color: var(--red); }

/* ─── Page layout ────────────────────────────────────────── */

.page { padding: 3.5rem 0 2rem; }

.page h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
}

.toc {
  position: sticky;
  top: 90px;
  border-left: 3px solid var(--green);
}

.toc h3 { color: var(--green); }

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li + li { margin-top: .4rem; }

.toc li::before {
  content: "*";
  color: var(--cyan);
  margin-right: .5rem;
  font-weight: bold;
}

.toc a {
  color: var(--fg-dim);
  padding: .25rem 0;
}

.toc a:hover {
  color: var(--cyan-bright);
}

/* ─── Lists with org-mode bullets ────────────────────────── */

main ul:not(.feature-list):not(.pill-row):not(.search-results):not(.main-nav ul):not(.toc ul):not(footer ul) {
  list-style: none;
  padding-left: 0;
}

main ul:not(.feature-list):not(.pill-row):not(.search-results):not(.toc ul):not(footer ul) > li {
  position: relative;
  padding-left: 1.4rem;
  margin: .35rem 0;
  color: var(--fg-dim);
}

main ul:not(.feature-list):not(.pill-row):not(.search-results):not(.toc ul):not(footer ul) > li::before {
  content: "✓";
  color: var(--green);
  position: absolute;
  left: 0;
  font-weight: bold;
}

main ol > li {
  margin: .5rem 0 .5rem 1.5rem;
  color: var(--fg-dim);
}

main ol > li::marker { color: var(--cyan); font-family: var(--mono); }

main p { color: var(--fg-dim); }

main strong { color: var(--cyan-bright); font-weight: 600; }

/* ─── Footer ─────────────────────────────────────────────── */

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--selection);
  padding: 2rem 0;
  color: var(--fg-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
}

.footer h3 {
  font-size: 1rem;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: .04em;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: .5rem 0 0;
}

.footer li {
  margin: .4rem 0;
  padding-left: 1rem;
  position: relative;
}

.footer li::before {
  content: "*";
  color: var(--cyan);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.footer a { color: var(--cyan); }

.footer a:hover { color: var(--cyan-bright); }

/* ─── Search modal ───────────────────────────────────────── */

.search-modal {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, .72);
  z-index: 100;
  padding: 6rem 1rem 1rem;
  backdrop-filter: blur(8px);
}

.search-modal[aria-hidden="false"] { display: block; }

.search-box {
  width: min(760px, 100%);
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-box input {
  width: 100%;
  padding: 1rem;
  background: var(--bg);
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font: 1rem var(--mono);
  outline: none;
}

.search-box input::placeholder { color: var(--green-alt); }

.search-results {
  list-style: none;
  padding: .4rem;
  margin: 0;
  max-height: 52vh;
  overflow: auto;
}

.search-results li a {
  display: block;
  padding: .75rem;
  border-radius: var(--radius);
  color: var(--fg);
}

.search-results li a:hover {
  background: var(--panel-2);
  text-decoration: none;
}

.search-results li a strong { color: var(--cyan-bright); }

.menu-button { display: none; }

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 980px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 1rem;
    right: 1rem;
    padding: .75rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: grid; }
  .menu-button { display: inline-flex; }
  .split { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 740px) {
  .container { padding: 0 1rem; }
  .hero { padding-top: 3.2rem; }
  .header-actions .btn.primary { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; letter-spacing: .04em; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
}
