/* Hand-written, no framework. Single column, text first, both color schemes. */

:root {
  --bg: #fbfaf8;
  --text: #1b1c1e;
  --muted: #6d6c68;
  --hairline: #e3e1db;
  --accent: #2255c4;
  --accent-soft: #dce6fa;
  --open: #2e8f5b;
  --code-bg: #f1efe9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --text: #e7e5df;
    --muted: #98968f;
    --hairline: #2a2b2e;
    --accent: #92b2f2;
    --accent-soft: #1d2a45;
    --open: #57bd85;
    --code-bg: #1b1c20;
  }
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0 auto;
  padding: 4rem 1.4rem 3rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.5rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.intro { margin: 0 0 1.4rem; font-size: 1.06rem; }

.status {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 0.95rem;
}
.dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--open);
  align-self: center;
}
.links { margin: 0.9rem 0 0; font-size: 0.95rem; }

section { margin-top: 3rem; }
h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
p { margin: 0.85rem 0; }
.meta { color: var(--muted); font-size: 0.9rem; margin-top: -0.45rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent-soft); }

.earlier { margin: 0; }
.earlier dt { font-weight: 600; margin-top: 1.1rem; }
.earlier .when { color: var(--muted); font-weight: 400; font-size: 0.9rem; margin-left: 0.4rem; }
.earlier dd { margin: 0.15rem 0 0; }

/* Writing list (homepage + /writing/) */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { margin: 1.15rem 0; }
.posts .post-meta { color: var(--muted); font-size: 0.88rem; margin-left: 0.6rem; }
.posts p { margin: 0.2rem 0 0; color: var(--muted); }

/* Article pages */
.crumb { display: inline-block; margin-bottom: 2.2rem; font-size: 0.9rem; }
article h1 { font-size: 1.45rem; margin: 0.2rem 0 0.3rem; }
article .post-meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.6rem; }
article h2 {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin: 2.2rem 0 0.6rem;
}
article h3 { font-size: 1rem; margin: 1.8rem 0 0.4rem; }

pre {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre code { background: none; padding: 0; font-size: 1em; }
blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--hairline);
  color: var(--muted);
}
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.4rem 0; }

footer {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.88rem;
}
