:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1d1f21;
  --muted: #6b6f76;
  --faint: #9a9ea5;
  --line: #e4e2dc;
  --accent: #2f6f5e;
  --accent-soft: #e3efe9;
  --code-bg: #f0eee8;
  --radius: 10px;
  --wrap: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1b1d20;
    --text: #e6e6e3;
    --muted: #a0a4ab;
    --faint: #6f747b;
    --line: #2a2d31;
    --accent: #7cc3ac;
    --accent-soft: #1f2e29;
    --code-bg: #202326;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 18px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* hero */
.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); margin: 0; max-width: 560px; }

h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 40px 0 12px; font-weight: 600; }

/* lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; }
.post-list a.title { color: var(--text); font-weight: 600; font-size: 18px; }
.post-list .meta { color: var(--faint); font-size: 14px; margin-top: 2px; }
.post-list p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-top: 10px; }

/* article */
.article { padding: 44px 0 24px; }
.article h1 { font-size: clamp(26px, 5.5vw, 34px); margin: 0 0 6px; }
.article .meta { color: var(--faint); font-size: 14px; margin-bottom: 28px; }
.article h2 { font-size: 21px; margin: 34px 0 8px; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
code { font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--code-bg); padding: 2px 5px; border-radius: 5px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 1.55; }
pre code { background: none; padding: 0; }
blockquote { margin: 20px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.back { display: inline-block; margin-top: 28px; font-size: 15px; }

/* footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.site-footer .wrap { padding-top: 22px; padding-bottom: 36px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--faint); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 18px; }
  .nav { gap: 14px; }
}
