:root {
  --bg: #ffffff;
  --fg: #24292f;
  --muted: #6a737d;
  --accent: #0969da;
  --border: #d0d7de;
  --code-bg: #f6f8fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 头部 */
.site-header {
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}
.site-nav a { margin-left: 16px; color: var(--muted); }

/* 主体 */
.site-main { min-height: calc(100vh - 180px); padding-top: 32px; padding-bottom: 48px; }

.hero { margin-bottom: 32px; }
.hero-title { font-size: 2rem; margin: 0 0 8px; }
.hero-desc { color: var(--muted); margin: 0; }

.section-title, .page-title { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.post-title { font-size: 1.75rem; margin-bottom: 4px; }

.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.post-tags a { margin-right: 8px; }

/* 文章列表 */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: none; }
.post-link { font-size: 1.1rem; font-weight: 600; color: var(--fg); margin-right: 12px; }
.post-link:hover { color: var(--accent); text-decoration: none; }
.post-date { color: var(--muted); font-size: 0.85rem; }
.post-summary { color: var(--muted); font-size: 0.95rem; margin: 6px 0 0; }

/* 文章正文 */
.post-content h2 { margin-top: 1.5em; }
.post-content h3 { margin-top: 1.2em; }
.post-content img { max-width: 100%; }
.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  font-size: 0.9rem;
}
.post-content code { background: var(--code-bg); padding: 2px 5px; border-radius: 4px; font-size: 0.9em; }
.post-content pre code { background: none; padding: 0; }
.post-content blockquote { margin: 0; padding-left: 16px; border-left: 4px solid var(--border); color: var(--muted); }
.post-content table { border-collapse: collapse; width: 100%; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 6px 12px; }

/* 上下篇导航 */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.credits a { color: var(--muted); }

@media (max-width: 480px) {
  .footer-inner { flex-direction: column; }
  .header-inner { flex-direction: column; gap: 8px; }
}
