/* Shiro 的博客 — 共用样式，浅色/深色跟随系统 */
:root {
  --bg: #fdfdfb;
  --text: #2b2b28;
  --muted: #7a7a72;
  --link: #2f6fb2;
  --link-hover: #1f4e80;
  --border: #e5e3dc;
  --code-bg: #f4f3ef;
  --code-text: #33322e;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1a;
    --text: #d8d5cc;
    --muted: #8f8c81;
    --link: #7fb3e0;
    --link-hover: #a8cdec;
    --border: #33322f;
    --code-bg: #262624;
    --code-text: #d8d5cc;
    --card: #222221;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

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

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

/* 页眉 */
header.site {
  padding: 36px 0 20px;
  border-bottom: 1px solid var(--border);
}
header.site .blog-name {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}
header.site .blog-name a { color: var(--text); }
header.site .blog-name a:hover { text-decoration: none; }
header.site .tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
nav.main {
  margin-top: 16px;
  font-size: 15px;
}
nav.main a {
  margin-right: 20px;
  color: var(--muted);
}
nav.main a:hover { color: var(--link); }

/* 正文 */
main { padding: 28px 0 40px; }
h1 { font-size: 24px; line-height: 1.4; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 28px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 8px; }
p { margin: 0 0 16px; }
.meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.meta time { margin-right: 12px; }

/* 文章列表 */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-list h2 {
  font-size: 19px;
  margin: 0 0 4px;
}
.post-list h2 a { color: var(--text); }
.post-list h2 a:hover { color: var(--link); }
.post-list .date {
  color: var(--muted);
  font-size: 13px;
  margin-right: 10px;
}
.post-list .summary {
  color: var(--muted);
  font-size: 15px;
  margin: 6px 0 0;
}

/* 代码 */
code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 5px;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 16px;
}
pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.6;
}
blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
ul, ol { margin: 0 0 16px; padding-left: 24px; }
li { margin-bottom: 4px; }
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* 文章内导航 */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.post-nav .next { text-align: right; }

/* 页脚 */
footer.site {
  border-top: 1px solid var(--border);
  padding: 20px 0 36px;
  color: var(--muted);
  font-size: 13px;
}
footer.site p { margin: 0; }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 64px; margin-bottom: 8px; color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 15px; }
  header.site { padding: 28px 0 16px; }
  header.site .blog-name { font-size: 22px; }
  h1 { font-size: 21px; }
  .post-nav { flex-direction: column; gap: 8px; }
  .post-nav .next { text-align: left; }
}
