:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --text: #1f2a24;
  --muted: #5b665f;
  --line: #e4e2d9;
  --accent: #2f5d4a;
  --accent-text: #ffffff;
  --primrose: #f2d877;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141816; --surface: #1c211e; --text: #e9ece8; --muted: #a3ada6;
    --line: #2c332f; --accent: #8cc2a8; --accent-text: #10201a; --primrose: #d9bd57;
  }
}
:root[data-theme="dark"] {
  --bg: #141816; --surface: #1c211e; --text: #e9ece8; --muted: #a3ada6;
  --line: #2c332f; --accent: #8cc2a8; --accent-text: #10201a; --primrose: #d9bd57;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 Inter, system-ui, -apple-system, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }
p { margin: 0 0 14px; }

/* Top nav */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 19px; color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--primrose); }

/* Hero */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.tag {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding-left: 14px; position: relative;
}
.tag::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px;
  margin-top: -4px; border-radius: 50%; background: var(--primrose);
}
h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(36px, 8vw, 54px); line-height: 1.1; margin: 14px 0 12px;
}
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  text-decoration: none; font-weight: 600; padding: 13px 22px; border-radius: 10px;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); margin-left: 8px; }

/* Sections */
section { padding: 44px 0; border-bottom: 1px solid var(--line); }
h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 26px; margin: 0 0 16px; }
.interests { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.interests li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 8px 16px; }
.card dt { color: var(--muted); font-size: 15px; }
.card dd { margin: 0; }
.note { font-size: 15px; color: var(--muted); }
.more { font-weight: 600; text-decoration: none; }

/* Post lists */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { padding: 16px 0; border-top: 1px solid var(--line); }
.posts li:first-child { border-top: 0; padding-top: 0; }
.posts a { font-family: Fraunces, Georgia, serif; font-size: 21px; font-weight: 500; text-decoration: none; color: var(--text); }
.posts a:hover { color: var(--accent); }
.posts .meta { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.posts .summary { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

/* Article / page body */
.page-head { padding: 52px 0 28px; }
.page-head h1 { font-size: clamp(32px, 7vw, 44px); }
.page-head .meta { color: var(--muted); font-size: 15px; }
.prose { padding-bottom: 48px; }
.prose h2 { margin-top: 36px; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose blockquote { margin: 0 0 14px; padding-left: 14px; border-left: 3px solid var(--primrose); color: var(--muted); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primrose); border-radius: 10px; padding: 14px 16px; margin: 0 0 24px; font-size: 16px; }

/* Footer */
footer { padding: 32px 0 56px; font-size: 14px; color: var(--muted); }
.emergency { border-left: 3px solid #c0392b; padding-left: 12px; margin-bottom: 18px; color: var(--text); }
.todo { background: var(--primrose); color: #1f2a24; padding: 0 4px; border-radius: 3px; }

@media (max-width: 480px) {
  .hero { padding: 44px 0 36px; }
  .btn.ghost { margin: 10px 0 0; }
  .card dl { grid-template-columns: 1fr; gap: 2px; }
  .card dd { margin-bottom: 10px; }
  .nav { gap: 16px; }
}
