:root {
  --bg: #ffffff;
  --fg: #222222;
  --muted: #767676;
  --accent: #1a56b8;
  --line: #eaeaea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --fg: #e6e6e6;
    --muted: #9a9a9a;
    --accent: #8ab4f8;
    --line: #2a2a30;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 4rem 1.25rem 6rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 34rem; margin: 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ---- */

header { margin-bottom: 3rem; }

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.welcome { margin: 1rem 0 0; font-size: 1.05rem; }

.about { margin: 0.75rem 0 0; color: var(--muted); }

/* ---- Family ---- */

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

.person {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.person:last-child { border-bottom: 1px solid var(--line); }

.person-head { display: flex; align-items: center; gap: 0.9rem; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--line);
}

.person-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }

.role {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.person > p { margin: 0.9rem 0 0; }
.person .lede { color: var(--fg); }

ul.projects { margin: 0.9rem 0 0; padding: 0; list-style: none; }
ul.projects li { margin-top: 0.3rem; }
ul.projects li::before { content: "\2013\00A0"; color: var(--muted); }

ul.links {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.9rem;
}

.more { margin: 0.9rem 0 0; font-size: 0.9rem; }

/* ---- Recent posts on home card ---- */

.recent { margin: 0.9rem 0 0; }
.recent-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.recent-list { margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.recent-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0;
}
.recent-list time { color: var(--muted); font-size: 0.82rem; white-space: nowrap; flex: 0 0 auto; }

/* ---- Profile page ---- */

.crumb { margin: 0 0 2rem; font-size: 0.9rem; }
.crumb a { color: var(--muted); }

.profile-head { margin-bottom: 2.5rem; }
.profile-head h1 { margin: 0; font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; }
.avatar-lg { width: 72px; height: 72px; }
.profile-head .bio { margin: 1.1rem 0 0; }

.feed-title, .section-title {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.block { margin-bottom: 2.5rem; }

.post {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.post:last-child { border-bottom: 1px solid var(--line); }

.post-meta { font-size: 0.85rem; color: var(--muted); }
.post-meta a { color: var(--muted); }
.post h2 { margin: 0.25rem 0 0.75rem; font-size: 1.15rem; font-weight: 650; }

/* ---- Rendered markdown ---- */

.post-body { line-height: 1.7; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body h1, .post-body h2, .post-body h3 { font-size: 1.05rem; margin: 1.4rem 0 0.6rem; }
.post-body p { margin: 0.9rem 0; }
.post-body ul, .post-body ol { margin: 0.9rem 0; padding-left: 1.4rem; }
.post-body li { margin-top: 0.2rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 4px; }
.post-body a { color: var(--accent); }

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--line);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.post-body pre {
  background: var(--line);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
}
.post-body pre code { background: none; padding: 0; font-size: 0.85rem; }

.post-body blockquote {
  margin: 0.9rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.post-body hr { border: none; border-top: 1px solid var(--line); margin: 1.6rem 0; }

/* ---- Misc ---- */

.loading, .error, .muted { color: var(--muted); padding: 1rem 0; }
.error { color: #b00020; }

footer {
  max-width: 34rem;
  margin: 3.5rem auto 0;
  color: var(--muted);
  font-size: 0.85rem;
}
