/* ============================================================
   One stylesheet. Edit colors and type here, everything follows.
   Light + dark mode handled automatically via prefers-color-scheme.
   ============================================================ */

:root {
  --max-width: 40rem;        /* ~680px reading column */
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --link: #1d4ed8;
  --link-hover: #1e3a8a;
  --rule: #e5e5e5;
  --bg: #fdfdfc;
  --font-body: Charter, Georgia, Cambria, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #9a9a9a;
    --link: #7aa2f7;
    --link-hover: #a9c1ff;
    --rule: #2a2a2a;
    --bg: #16161a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The single centered column everything lives in */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 6rem;
}

/* ---- Header / nav ---- */
header.site {
  font-family: var(--font-ui);
  margin-bottom: 3rem;
}
header.site a.name {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}
header.site nav {
  margin-top: 0.4rem;
  font-size: 0.95rem;
}
header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1rem;
}
header.site nav a:hover { color: var(--link); }

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-ui);
  line-height: 1.25;
  font-weight: 600;
}
h1 { font-size: 1.9rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
p { margin: 0 0 1.25rem; }

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

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

pre, code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
pre {
  background: rgba(127,127,127,0.09);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
}
code { background: rgba(127,127,127,0.12); padding: 0.1em 0.35em; border-radius: 4px; }
pre code { background: none; padding: 0; }

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

/* ---- Home: intro + writing list ---- */
.intro p { font-size: 1.18rem; }

.posts { list-style: none; padding: 0; margin: 1rem 0 0; }
.posts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.posts li a { text-decoration: none; }
.posts li a:hover { text-decoration: underline; }
.posts time {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- A single post ---- */
article .meta {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ---- Footer ---- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
}
footer.site a { color: var(--muted); }
