/* drk.wtf — light paper, dark ink, serif.
   Headings prefer "Clauthbound" (SimpleBits) when self-hosted;
   see fonts/README.md. Body is a system serif stack. */

@font-face {
  /* Drop your licensed files here to activate:
     fonts/clauthbound-regular.woff2
     fonts/clauthbound-semibold.woff2
     fonts/clauthbound-bold.woff2
  font-family: "Clauthbound";
  src: url("/fonts/clauthbound-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap; */
}

:root {
  color-scheme: light dark;
  --paper: #faf8f3;
  --ink: #1d1a15;
  --muted: #6c6459;
  --rule: #e3ddd0;
  --accent: #7c2f22;
  --max: 40rem;
}

/* Same terminal after hours as yagni.club: paper becomes the screen,
   ink becomes phosphor, keeping the warm olive cast.
   An explicit data-theme choice always wins over the system. */
:root[data-theme="dark"] {
  --paper: #181b12;
  --ink: #e6e4d1;
  --muted: #8d9279;
  --rule: #363b2c;
  --accent: #d2d1bd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #181b12;
    --ink: #e6e4d1;
    --muted: #8d9279;
    --rule: #363b2c;
    --accent: #d2d1bd;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 112.5%;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.kicker {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

h1, h2 {
  font-family: "Clauthbound", "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: 2.6rem; margin: 0 0 0.5rem; }

h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }

.lede { font-size: 1.2rem; margin: 0 0 0.25rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 1rem; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
}

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

section { margin: 0 0 2.75rem; }

.label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

ul { padding-left: 1.2rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--muted); }

.projects { list-style: none; padding-left: 0; }
.projects li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
  margin: 0;
}
.projects li:last-child { border-bottom: 1px solid var(--rule); }

.jobs { margin: 0; }
.jobs div { margin-bottom: 1.1rem; }
.jobs dt { font-weight: 700; }
.jobs dd { margin: 0.15rem 0 0; }

.dates, .earlier, .note { color: var(--muted); }
.dates { font-weight: 400; font-size: 0.9em; }
.earlier, .note { font-size: 0.95rem; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
}

.elsewhere { list-style: none; padding-left: 0; }
.elsewhere li { margin-bottom: 0.3rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: flex-end;
}

.theme-toggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
}

@media (max-width: 480px) {
  html { font-size: 100%; }
  h1 { font-size: 2rem; }
}
