:root {
  --bg: #f4f7fd;
  --card: #ffffff;
  --border: #e3e8f2;
  --text: #1c2030;
  --muted: #6b7388;
  --accent: #d9622b;
  --chip: #eef2fa;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --card: #181c25;
    --border: #272d3a;
    --text: #e8ebf3;
    --muted: #98a0b5;
    --accent: #f08a57;
    --chip: #222836;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
}

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

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 16px 40px;
}

/* Masthead */
.masthead { margin-bottom: 28px; }

.identity { display: flex; align-items: center; gap: 16px; }

.avatar { display: inline-block; line-height: 0; }
.avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.name {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.name a { text-decoration: none; }

.tagline { margin: 0; color: var(--muted); font-size: 17px; }

.social { display: flex; gap: 8px; margin-top: 20px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform .12s ease, color .12s ease;
}
.icon-btn:hover { color: var(--accent); transform: translateY(-1px); }

.pages { display: flex; gap: 16px; margin-top: 18px; font-size: 14px; }
.pages a { text-decoration: none; color: var(--muted); }
.pages a:hover, .pages a[aria-current="page"] { color: var(--text); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.intro { font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.intro > :first-child { margin-top: 0; }
.intro > :last-child { margin-bottom: 0; }

/* Post lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 10px 0; border-top: 1px solid var(--border); }
.post-list li:first-child { border-top: 0; padding-top: 0; }
.post-list li:last-child { padding-bottom: 0; }

.post-title { font-weight: 600; text-decoration: none; display: block; }

.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tag {
  background: var(--chip);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  text-decoration: none;
}

.more { margin: 14px 0 0; font-size: 14px; }
.more a, .back a { color: var(--muted); text-decoration: none; }
.more a:hover, .back a:hover { color: var(--accent); }
.back { font-size: 14px; }
.muted { color: var(--muted); }

/* Posts / pages */
.post-heading {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.post .meta { margin-bottom: 16px; }

.prose { font-family: var(--serif); font-size: 17px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose a { color: var(--accent); }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }
.prose h2, .prose h3 { font-family: var(--sans); line-height: 1.3; margin: 1.6em 0 .5em; }
.prose blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--border); color: var(--muted); }
.prose pre, .prose code { font-size: 14px; }
.prose pre { overflow-x: auto; padding: 12px; background: var(--chip); border-radius: 8px; }

/* Updates archive */
.year { margin: 22px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.year:first-of-type { margin-top: 0; }

.cat-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.cat-nav .tag { padding: 2px 10px; font-size: 13px; }

.footer { color: var(--muted); font-size: 13px; margin-top: 32px; }
.footer p { margin: 0; }
