:root {
  --text: #18181b;
  --text-soft: #3f3f46;
  --muted: #71717a;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.18);
  --bg: #fafaf7;
  --card: #ffffff;
  --rule: #e7e5dd;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 4px 16px rgba(20, 20, 20, 0.04);
  --serif: "Iowan Old Style", "Charter", "Apple Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max: 680px;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f4f4f5;
    --text-soft: #d4d4d8;
    --muted: #a1a1aa;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.22);
    --bg: #0c0c0d;
    --card: #161618;
    --rule: #26262a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* ---- header / nav ---- */

header.site {
  margin-bottom: 64px;
}

header.site .nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

header.site a.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
  letter-spacing: -0.01em;
}

header.site nav {
  display: flex;
  gap: 22px;
  align-items: center;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border-bottom: none;
  transition: color 0.15s ease;
}

header.site nav a:hover { color: var(--text); }

/* ---- typography ---- */

h1 {
  font-family: var(--sans);
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
}

h2 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 56px 0 14px;
  color: var(--text);
}

h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 6px;
  color: var(--text);
}

p { margin: 16px 0; color: var(--text-soft); }

strong { color: var(--text); font-weight: 600; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover { border-bottom-color: var(--accent); }

/* ---- hero ---- */

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 8px;
}

.hero img.headshot {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
}

.hero .intro { min-width: 0; }

.hero .intro h1 {
  font-size: 36px;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}

.hero .tagline {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

/* ---- pills ---- */

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: 0.005em;
}

.pill .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- profile chip list ---- */

ul.profiles {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

ul.profiles li { margin: 0; }

ul.profiles a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: all 0.15s ease;
}

ul.profiles a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---- post list ---- */

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

ul.posts li {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

ul.posts li:last-child { border-bottom: none; }

ul.posts .post-title {
  display: block;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
  margin-bottom: 6px;
  line-height: 1.3;
  transition: color 0.15s ease;
}

ul.posts .post-title:hover { color: var(--accent); }

ul.posts .post-meta {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 8px;
}

ul.posts .post-excerpt {
  color: var(--text-soft);
  font-size: 15.5px;
  margin: 0;
  line-height: 1.55;
}

/* ---- single post (serif body) ---- */

article.post {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
}

article.post header.post-header {
  margin-bottom: 36px;
  padding-bottom: 0;
  border-bottom: none;
  font-family: var(--sans);
}

article.post header.post-header h1 {
  font-size: 38px;
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin-bottom: 14px;
}

article.post .post-meta {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

article.post p {
  margin: 22px 0;
  color: var(--text-soft);
}

article.post h2 {
  font-family: var(--sans);
  font-size: 22px;
  margin: 48px 0 14px;
}

article.post h3 { font-family: var(--sans); }

article.post strong { color: var(--text); }

article.post em { color: var(--text); }

article.post ul, article.post ol {
  padding-left: 22px;
  margin: 20px 0;
}

article.post li {
  margin: 10px 0;
  color: var(--text-soft);
}

article.post a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

article.post blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--muted);
  font-style: italic;
}

/* ---- back link ---- */

.back-link {
  display: inline-block;
  margin-top: 56px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s ease;
}

.back-link:hover { color: var(--accent); }

/* ---- footer ---- */

footer.site {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--sans);
}

footer.site a {
  color: var(--muted);
  border-bottom: none;
}

footer.site a:hover { color: var(--text); }

/* ---- mobile ---- */

@media (max-width: 480px) {
  .container { padding: 28px 20px 64px; }
  header.site { margin-bottom: 44px; }
  header.site nav { gap: 14px; }
  header.site nav a { font-size: 14px; }
  h1 { font-size: 30px; }
  h2 { font-size: 20px; margin: 44px 0 12px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero img.headshot { width: 84px; height: 84px; }
  .hero .intro h1 { font-size: 30px; }
  article.post { font-size: 18px; }
  article.post header.post-header h1 { font-size: 28px; }
  ul.posts .post-title { font-size: 19px; }
}
