:root {
  --text: #1a1d24;
  --text-soft: #4c5361;
  --text-mute: #8b93a3;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --line: #e8eaef;
  --accent: #2f5fe0;
  --accent-soft: #eef2fd;
  --max: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

/* ---------- header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }

.brand .mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}

.nav { display: flex; gap: 4px; }

.nav a {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--text-soft);
}

.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ---------- intro ---------- */
.intro { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: 28px; letter-spacing: -0.4px; margin-bottom: 14px; }
.intro p { color: var(--text-soft); font-size: 16px; max-width: 56ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  font-size: 12.5px; padding: 4px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-mute);
}

/* ---------- sections ---------- */
main { padding: 8px 0 64px; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 44px 0 6px;
}

/* ---------- post list ---------- */
.post { padding: 22px 0; border-bottom: 1px solid var(--line); display: block; }
.post:last-child { border-bottom: none; }
.post h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
.post:hover h2 { color: var(--accent); }
.post p { color: var(--text-soft); font-size: 14.5px; margin-top: 6px; }
.meta { display: flex; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--text-mute); }

/* ---------- article ---------- */
.article { padding-top: 56px; padding-bottom: 24px; }
.article > h1 { font-size: 30px; letter-spacing: -0.5px; line-height: 1.35; margin-bottom: 10px; }
.article .lede { color: var(--text-soft); font-size: 16.5px; margin-bottom: 8px; }
.article h2 { font-size: 20px; margin: 40px 0 12px; letter-spacing: -0.2px; }
.article h3 { font-size: 16.5px; margin: 28px 0 8px; }
.article p { margin: 14px 0; color: #262b36; }
.article ul, .article ol { margin: 14px 0 14px 22px; color: #262b36; }
.article li { margin: 6px 0; }
.article strong { font-weight: 600; }
.article code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.article pre {
  background: #14161c; color: #e6e9f0;
  border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 18px 0;
}
.article pre code {
  background: none; border: none; padding: 0; color: inherit; font-size: 13.5px; line-height: 1.65;
}
.article blockquote {
  margin: 18px 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--line); color: var(--text-soft);
}
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.article th, .article td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article th { background: var(--bg-soft); font-weight: 600; }
.article .callout {
  background: var(--accent-soft); border-radius: 10px;
  padding: 14px 18px; margin: 20px 0; font-size: 14.5px; color: #263a6b;
}
.back { display: inline-block; margin-top: 40px; font-size: 14px; color: var(--text-mute); }
.back:hover { color: var(--accent); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 28px 0 32px; }
.site-foot .wrap { text-align: center; font-size: 13px; color: var(--text-mute); line-height: 2.1; }
.beian { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.beian a { color: var(--text-mute); }
.beian a:hover { color: var(--accent); }
.beian .sep { opacity: 0.45; }

/* ---------- misc ---------- */
.empty { padding-top: 48px; padding-bottom: 48px; text-align: center; color: var(--text-mute); font-size: 15px; }

@media (max-width: 600px) {
  .site-head .wrap { height: 58px; }
  .intro { padding: 40px 0 28px; }
  .intro h1 { font-size: 23px; }
  .article { padding-top: 36px; }
  .article > h1 { font-size: 24px; }
  .brand { font-size: 15px; }
  .nav a { padding: 6px 9px; font-size: 13.5px; }
}
