/* 大林笔记 - 静态站点样式 */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #24292f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --code-bg: #f6f8fa;
  --max: 840px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-size: 20px; font-weight: 700; color: var(--text); }
.brand:hover { color: var(--brand); text-decoration: none; }
.nav a { margin-left: 22px; color: var(--muted); font-size: 15px; }
.nav a.active, .nav a:hover { color: var(--brand); }

.container { max-width: var(--max); margin: 0 auto; padding: 28px 20px 0; }
.page-title { margin: 0 0 22px; font-size: 26px; font-weight: 700; }
.page-intro { color: var(--muted); margin: -10px 0 24px; font-size: 15px; }

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: box-shadow .15s ease;
}
.post-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.post-card h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.4; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--brand); text-decoration: none; }
.post-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.post-excerpt { color: #4b5563; font-size: 15px; margin: 0; }

article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 30px;
}
article h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.4; }
article .meta {
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.post-body img { max-width: 100%; height: auto; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  line-height: 1.4;
  margin: 1.4em 0 .6em;
}
.post-body p { margin: .8em 0; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body blockquote {
  margin: 1em 0;
  padding: .4em 1em;
  border-left: 4px solid var(--line);
  color: var(--muted);
  background: #fafafa;
}
.post-body code {
  background: var(--code-bg);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .88em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.post-body .codehilite {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 1em 0;
  overflow: auto;
}
.post-body .codehilite pre { margin: 0; padding: 14px 16px; }
.post-body pre code {
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}
.post-body table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 6px 10px; }

.back { display: inline-block; margin: 22px 0 0; color: var(--muted); font-size: 15px; }

.site-footer {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 24px 20px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.site-footer a { color: #939393; }
.site-footer .row { display: block; }
.site-footer .beian img { width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; }

@media (max-width: 600px) {
  .site-header .inner { height: auto; padding: 10px 16px; flex-direction: column; gap: 6px; }
  .nav a { margin: 0 10px; }
  .container { padding: 20px 16px 0; }
  article { padding: 20px 18px; }
}
