:root {
  --bg: #fbfaf7;
  --text: #1f1f1d;
  --muted: #6b6a64;
  --line: #e4e1d8;
  --accent: #b4441c;
  --code-bg: #f1eee6;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --text: #e9e7e1;
    --muted: #9c9a92;
    --line: #2e2d29;
    --accent: #f08a5d;
    --code-bg: #22211e;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

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

header.site {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 2rem 0 0;
}

header.site .name {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
}

header.site nav a:hover,
header.site nav a[aria-current="page"] { color: var(--text); }

main { padding: 3.5rem 0 2rem; }

h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3.5rem 0 1.25rem;
}

h3 { font-size: 1.05rem; margin: 0; }

p { margin: 0 0 1rem; }

.lede { font-size: 1.2rem; color: var(--muted); margin-bottom: 0; }

.projects { list-style: none; padding: 0; margin: 0; }

.projects li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.projects li:last-child { border-bottom: 1px solid var(--line); }

.projects p { margin: 0.25rem 0 0; }

.projects .meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 1.25rem;
}

.contact { list-style: none; padding: 0; margin: 0; }
.contact li { margin: 0.35rem 0; }

footer.site {
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Posts */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { display: flex; gap: 1rem; padding: 0.4rem 0; }
.post-list time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

article h1 { margin-bottom: 0.25rem; }
article .date { color: var(--muted); margin-bottom: 2rem; display: block; }
article h2 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
}
article img { max-width: 100%; height: auto; }
article code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 4px; font-size: 0.9em; }
article pre { background: var(--code-bg); padding: 1rem; border-radius: 6px; overflow-x: auto; }
article pre code { background: none; padding: 0; }
