/* openbox-llm — plain CSS, Gruvbox palette. No build step; serve as-is. */

/* ---- Gruvbox tokens (light default) ---------------------------------- */
:root {
  --bg-hard: #f9f5d7;   /* page background            */
  --bg:      #fbf1c7;   /* soft background            */
  --bg-1:    #ebdbb2;   /* raised surfaces (nav, code)*/
  --bg-2:    #d5c4a1;   /* borders / rules            */
  --fg-0:    #282828;   /* primary text               */
  --fg-1:    #3c3836;   /* secondary text             */
  --fg-mute: #7c6f64;   /* dates, captions            */
  --accent:  #af3a03;   /* links, headings accent (orange) */
  --accent-2:#8f3f71;   /* secondary accent (purple)  */
  --measure: 42rem;     /* reading column width       */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-hard: #1d2021;
    --bg:      #282828;
    --bg-1:    #3c3836;
    --bg-2:    #504945;
    --fg-0:    #fbf1c7;
    --fg-1:    #ebdbb2;
    --fg-mute: #a89984;
    --accent:  #fe8019;
    --accent-2:#d3869b;
  }
}

/* ---- Base ------------------------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: var(--measure);
  padding: 0 1.25rem 4rem;
  background: var(--bg-hard);
  color: var(--fg-0);
  font: 1.05rem/1.65 ui-serif, Georgia, "Times New Roman", serif;
  text-rendering: optimizeLegibility;
}

/* ---- Header / nav ----------------------------------------------------- */
header {
  border-bottom: 2px solid var(--bg-2);
  margin-bottom: 2.5rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  padding: 1.1rem 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95rem;
}

nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: auto;   /* pushes remaining links to the right */
}

.logo { height: 1.9em; width: auto; flex-shrink: 0; }

nav a { color: var(--fg-1); text-decoration: none; }
nav a:hover { color: var(--accent); }

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h1 { font-size: 2rem;   margin: 0 0 0.75rem; }
h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--bg-2);
}
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }

.lede { font-size: 1.15rem; color: var(--fg-1); }

/* monospace dates in lists, Xe-style */
time { font-family: ui-monospace, Menlo, Consolas, monospace;
       color: var(--fg-mute); font-size: 0.9rem; }

/* ---- Code ------------------------------------------------------------- */
code, pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--bg-1);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--bg-1);
  padding: 1rem 1.15rem;
  border-radius: 6px;
  border: 1px solid var(--bg-2);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* ---- Footer ----------------------------------------------------------- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--bg-2);
  color: var(--fg-mute);
  font-size: 0.85rem;
}
footer a { color: var(--fg-mute); text-decoration: underline; }
footer a:hover { color: var(--accent); }

/* ---- A11y ------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Blog ------------------------------------------------------------- */
.post-list { list-style: none; padding-left: 0; }
.post-list li { margin: 0.5rem 0; }
.post-meta { margin-top: -0.4rem; color: var(--fg-mute); }
article { margin-bottom: 2rem; }
.back { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; }

/* codehilite wraps fenced code; let highlight.css own the colors */
.codehilite { border-radius: 6px; overflow-x: auto; margin: 0 0 1.1rem; }
.codehilite pre { margin: 0; border: none; }
