/* tend blog -- 90s soul, modern comforts.
   One file. Square corners. Monospace. Dark mode via the OS, like nature intended. */

:root {
  --bg: #fbfaf6;
  --ink: #1c1e1a;
  --muted: #6b7266;
  --accent: #0a7a33;
  --code-bg: #f1efe7;
  --border: #c9c7ba;
  --str: #9a6b00;
  --ty: #2b5e9e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e120f;
    --ink: #cfd6cd;
    --muted: #7d877e;
    --accent: #46d370;
    --code-bg: #151a16;
    --border: #2b332c;
    --str: #d8a84e;
    --ty: #7fb0f0;
  }
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

::selection { background: var(--accent); color: var(--bg); }

/* -- header: a shell prompt ------------------------------------------- */

header {
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
}

header .prompt { font-weight: 700; text-decoration: none; }
header .dollar { color: var(--muted); }

header .cursor {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  margin-left: 0.15em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  header .cursor { animation: none; }
}

header .tagline {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

/* -- headings, markdown-flavored -------------------------------------- */

h1, h2, h3 {
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }

h1::before { content: "# ";   color: var(--accent); }
h2::before { content: "## ";  color: var(--accent); }
h3::before { content: "### "; color: var(--accent); }

/* -- prose ------------------------------------------------------------- */

p, ul, ol, blockquote, table, pre { margin: 0 0 1.1rem; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
a code { color: inherit; }
a:hover code { background: none; }

ul { list-style-type: "* "; padding-left: 1.5rem; }
ol { padding-left: 1.75rem; }
li { margin-bottom: 0.25rem; }
li::marker { color: var(--accent); }

blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
}

hr { border: none; border-top: 1px dashed var(--border); margin: 2rem 0; }

img { max-width: 100%; }

table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { border: 1px solid var(--border); padding: 0.35rem 0.6rem; text-align: left; }
th { background: var(--code-bg); }

footer {
  border-top: 1px dashed var(--border);
  margin-top: 3rem;
  padding-top: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* -- code --------------------------------------------------------------- */

code {
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  font-size: 0.9em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  overflow-x: auto;
}

pre > code { background: none; padding: 0; font-size: 0.85rem; }

/* lean tokens, painted by hl.js */
.tok-kw   { color: var(--accent); font-weight: 700; }
.tok-str  { color: var(--str); }
.tok-cm   { color: var(--muted); font-style: italic; }
.tok-meta { color: var(--ty); font-weight: 700; }
.tok-ty   { color: var(--ty); }
.tok-num  { color: var(--str); }
