/* High-desert forest theme -- pinon, juniper, adobe, sagebrush, and
   turquoise, northern-New-Mexico register. Light = adobe plaster at
   midday; dark = pine dusk. */
:root {
  --fg: #26291f;
  --bg: #f8f4ea;
  --muted: #737a68;
  --pine: #3d4d35;
  --accent: #14766c;
  --accent2: #a9503a;
  --rule: #ddd4bf;
  --surface: #efe9d8;
  --max: 42rem;
  --serif: ui-serif, 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e3e0d1;
    --bg: #151a15;
    --muted: #99a189;
    --pine: #b9c6a6;
    --accent: #5ccabe;
    --accent2: #cf8064;
    --rule: #2a322a;
    --surface: #1e251e;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  max-width: var(--max);
  color: var(--fg);
  background: var(--bg);
  font: 1.05rem/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

header {
  margin-bottom: 2.5rem;
}

.brand {
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent2);
}

.blaze-mark {
  height: 0.95em;
  width: auto;
  margin-right: 0.45em;
  vertical-align: -0.08em;
}

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

a:hover {
  text-decoration-color: var(--accent2);
}

h1,
h2,
h3 {
  font-family: var(--sans);
  color: var(--pine);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}

/* Hover-reveal heading anchors (rehype-autolink-headings). */
.heading-anchor {
  margin-left: 0.4rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms ease-in;
}

h1:hover .heading-anchor,
h2:hover .heading-anchor,
h3:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .heading-anchor {
    opacity: 0.4;
  }
}

.meta,
time {
  color: var(--muted);
  font-size: 0.9rem;
}

.meta,
header,
footer {
  font-family: var(--sans);
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

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

/* Tables (markdown): compact sans, hairline rules, no-wrap value
   column, horizontal scroll instead of page overflow on small
   screens. */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
}

th,
td {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface);
  font-weight: 600;
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}

th:last-child,
td:last-child {
  white-space: nowrap;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-radius: 4px;
  line-height: 1.5;
}

pre code {
  font-size: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Shiki dual-theme switch (astro.config.mjs shikiConfig themes):
   the light colors are inline; dark mode flips to the --shiki-dark
   custom properties Shiki emits. */
@media (prefers-color-scheme: dark) {
  .astro-code,
  .astro-code span {
    color: var(--shiki-dark) !important;
    background-color: var(--shiki-dark-bg) !important;
  }
}

img {
  max-width: 100%;
}

footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}
