/* 文哲随记 · 极简主题样式
 * 调色板与 og-image 保持一致:深蓝 #256A96, 珊瑚 #DE7568
 */

:root {
  --primary-deep: #256a96;
  --primary: #2f78a8;
  --accent: #de7568;
  --bg: #ffffff;
  --bg-muted: #f6f7f9;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 8px;
  --radius-card: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --max-width: 720px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-muted: #1e293b;
    --bg-card: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

/* === 顶栏 === */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding-top: 0;
  padding-bottom: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary-deep);
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}
.brand-text { font-size: 18px; }

.nav { display: flex; gap: 24px; }
.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.nav-link:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* === Hero === */
.hero {
  padding: 80px 0 48px;
  text-align: center;
}
.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  color: var(--primary-deep);
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
}

/* === 章节 === */
.recent, .list-page, .single {
  padding: 32px 0 64px;
}
.section-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-deep);
  display: inline-block;
}

/* === 文章列表 === */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.post-link:hover .post-title { color: var(--primary); }
.post-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-mono);
}
.post-summary {
  margin: 8px 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.post-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.post-cat {
  font-size: 12px;
  color: var(--primary-deep);
  background: rgba(37, 106, 150, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}
.post-tag {
  font-size: 12px;
  color: var(--text-muted);
}

.more-link, .back-link { font-size: 14px; }
.empty-hint { color: var(--text-muted); padding: 24px 0; }

/* === 单文章 === */
.post-header { margin-bottom: 32px; }
.post-header .post-title { font-size: 32px; display: block; margin-bottom: 8px; }
.post-header .post-meta { color: var(--text-muted); font-size: 14px; }
.post-content {
  font-size: 16px;
  line-height: 1.8;
}
.post-content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.post-content h3 {
  font-size: 18px;
  margin: 24px 0 12px;
}
.post-content p { margin: 0 0 16px; }
.post-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-content pre {
  background: var(--bg-muted);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
.post-content pre code { background: none; padding: 0; }
.post-content blockquote {
  border-left: 3px solid var(--primary-deep);
  margin: 16px 0;
  padding: 8px 16px;
  color: var(--text-muted);
}
.post-content table {
  border-collapse: collapse;
  margin: 16px 0;
  width: 100%;
}
.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 14px;
}
.post-content th { background: var(--bg-muted); }
.post-content a { text-decoration: underline; }
.post-content img { max-width: 100%; border-radius: var(--radius); }

.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* === 页脚 === */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  margin-top: 64px;
  padding: 32px 0;
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-meta, .footer-beian { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.footer-sep { color: var(--text-muted); opacity: 0.5; }
.footer-beian a { color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.footer-beian a:hover { color: var(--primary); }
.police-icon { width: 16px; height: 16px; vertical-align: middle; }

/* === 关于页/单页 === */
.home-content, .list-intro { margin-bottom: 32px; }

/* === 移动端 === */
@media (max-width: 640px) {
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .post-header .post-title { font-size: 24px; }
  .post-link { flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav { gap: 16px; }
  .nav-link { font-size: 13px; }
  .container { padding: 0 16px; }
}
