/*
Theme Name: 文心 WenXin
Theme URI: https://github.com/wenxin-theme
Author: 文心工作室
Author URI: https://github.com
Description: 一个为文字爱好者打造的简洁博客主题，注重阅读体验与排版美感。
Version: 1.0.0
Typecho Version: 1.3.0
Tags: minimal, typography, dark-mode, responsive
*/

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
  /* 纸张色调 */
  --bg-primary: #faf8f5;
  --bg-secondary: #f3f0eb;
  --bg-card: #ffffff;
  --bg-code: #f5f2ed;
  --bg-blockquote: #f9f6f1;
  
  /* 墨色系统 */
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-tertiary: #8a8a8a;
  --text-muted: #b0b0b0;
  
  /* 点缀色 — 朱砂红 */
  --accent: #c45a3c;
  --accent-light: #d4785e;
  --accent-bg: rgba(196, 90, 60, 0.06);
  
  /* 分隔线 */
  --border: #e8e4de;
  --border-light: #f0ece6;
  
  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  
  /* 字体 */
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
  
  /* 尺寸 */
  --content-width: 720px;
  --page-width: 1080px;
  --header-height: 72px;
  --radius: 6px;
  --radius-lg: 12px;
  
  /* 过渡 */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色模式 */
[data-theme="dark"] {
  --bg-primary: #1a1a1f;
  --bg-secondary: #222228;
  --bg-card: #28282f;
  --bg-code: #2d2d35;
  --bg-blockquote: #242430;
  
  --text-primary: #e0ddd8;
  --text-secondary: #a8a5a0;
  --text-tertiary: #787570;
  --text-muted: #555555;
  
  --accent: #d4785e;
  --accent-light: #e0907a;
  --accent-bg: rgba(212, 120, 94, 0.1);
  
  --border: #3a3a42;
  --border-light: #303038;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}

/* ============================================
   Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.8;
  transition: background-color var(--transition), color var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Site Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 248, 245, 0.85);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(26, 26, 31, 0.85);
}

.header-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-title .title-icon {
  font-size: 1.1rem;
  opacity: 0.7;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  color: var(--accent);
}

.site-description {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-left: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* 导航 */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}

.main-nav a:hover,
.main-nav a.current {
  color: var(--accent);
  background: var(--accent-bg);
}

/* 主题切换按钮 */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  margin-left: 8px;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

/* ============================================
   Main Layout
   ============================================ */
.site-main {
  flex: 1;
  max-width: var(--page-width);
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ============================================
   文章列表
   ============================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  padding: 36px 0;
  border-bottom: 1px solid var(--border-light);
  animation: fadeInUp 0.5s ease-out;
}

.post-item:first-child {
  padding-top: 0;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.post-category {
  color: var(--accent);
  font-weight: 500;
  padding: 1px 8px;
  background: var(--accent-bg);
  border-radius: 3px;
  font-size: 0.78rem;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.post-title a {
  color: var(--text-primary);
  transition: color var(--transition);
}

.post-title a:hover {
  color: var(--accent);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.post-footer .read-more {
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-footer .read-more:hover {
  gap: 8px;
}

.post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.post-tags a {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: all var(--transition);
}

.post-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   文章详情页
   ============================================ */
.article {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.article-header .post-category {
  display: inline-block;
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.article-meta .separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* 文章内容排版 */
.article-content {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text-primary);
  word-break: break-word;
}

.article-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.2em 0 0.8em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-bg);
  letter-spacing: 0.02em;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
}

.article-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
}

.article-content p {
  margin-bottom: 1.5em;
}

.article-content a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-bg);
  transition: all var(--transition);
}

.article-content a:hover {
  border-bottom-color: var(--accent);
}

.article-content blockquote {
  margin: 1.8em 0;
  padding: 16px 20px;
  background: var(--bg-blockquote);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}

.article-content pre {
  margin: 1.8em 0;
  padding: 20px;
  background: var(--bg-code);
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.article-content ul,
.article-content ol {
  margin: 1em 0;
  padding-left: 1.8em;
}

.article-content li {
  margin-bottom: 0.4em;
}

.article-content li > ul,
.article-content li > ol {
  margin: 0.3em 0;
}

.article-content img {
  margin: 2em auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-content hr {
  margin: 2.5em 0;
  border: none;
  border-top: 1px solid var(--border);
  position: relative;
}

.article-content hr::after {
  content: '· · ·';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 4px;
}

.article-content table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.article-content th,
.article-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: var(--bg-secondary);
  font-weight: 600;
}

/* 文章底部 */
.article-footer {
  max-width: var(--content-width);
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.article-tags .label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* 文章导航 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-nav-item {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.post-nav-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.post-nav-item .nav-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-nav-item .nav-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.post-nav-item.next {
  text-align: right;
}

.post-nav-item.empty {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================
   分页（Typecho pageNav 默认输出）
   ============================================ */
.page-navigator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  list-style: none;
}

.page-navigator li {
  margin: 0;
}

.page-navigator li a,
.page-navigator li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.page-navigator li a {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.page-navigator li a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

.page-navigator li.current span {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  font-weight: 500;
}

.page-navigator li.prev a,
.page-navigator li.next a {
  font-size: 0.82rem;
  padding: 0 16px;
}

/* 也兼容自定义分页结构 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  list-style: none;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: all var(--transition);
}

.pagination a {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pagination a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

.pagination span.current {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

/* ============================================
   侧边栏
   ============================================ */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.widget {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
}

.widget:hover {
  border-color: var(--border);
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title .icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* 作者卡片 */
.widget-author {
  text-align: center;
}

.widget-author .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid var(--border);
  object-fit: cover;
}

.widget-author .name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.widget-author .bio {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* 分类列表 */
.widget-categories ul,
.widget-links ul {
  list-style: none;
}

.widget-categories li,
.widget-links li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.widget-categories li:last-child,
.widget-links li:last-child {
  border-bottom: none;
}

.widget-categories a {
  color: var(--text-secondary);
}

.widget-categories a:hover {
  color: var(--accent);
}

.widget-categories .count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 8px;
  border-radius: 10px;
}

/* 标签云 */
.widget-tags .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.widget-tags .tag-cloud a {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all var(--transition);
}

.widget-tags .tag-cloud a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* 最新文章 */
.widget-posts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.widget-posts li:last-child {
  border-bottom: none;
}

.widget-posts a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: block;
  line-height: 1.5;
}

.widget-posts a:hover {
  color: var(--accent);
}

.widget-posts .date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   评论区
   ============================================ */
.comments-section {
  max-width: var(--content-width);
  margin: 48px auto 0;
}

.comments-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-title .count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* 评论列表 */
.comment-list {
  list-style: none;
  margin-bottom: 40px;
}

.comment-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-author {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-body {
  padding-left: 52px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.comment-body p {
  margin-bottom: 0.8em;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.comment-reply {
  padding-left: 52px;
  margin-top: 8px;
}

.comment-reply a {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.comment-reply a:hover {
  color: var(--accent);
}

/* 子评论 */
.comment-children {
  list-style: none;
  margin-left: 52px;
  border-left: 2px solid var(--border-light);
  padding-left: 24px;
}

/* 评论表单 */
.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.comment-form h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
  margin-bottom: 12px;
  line-height: 1.7;
}

.form-submit {
  display: flex;
  justify-content: flex-end;
}

.btn-submit {
  padding: 10px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   页面（关于等）
   ============================================ */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.page-content .article-content {
  padding-top: 0;
}

/* ============================================
   归档页
   ============================================ */
.archive-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.archive-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.archive-title .icon {
  color: var(--accent);
}

.archive-desc {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

/* ============================================
   搜索结果
   ============================================ */
.search-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.search-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.search-title .query {
  color: var(--accent);
}

/* ============================================
   404
   ============================================ */
.error-page {
  text-align: center;
  padding: 80px 24px;
}

.error-page .code {
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page .message {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-page .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.error-page .back:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  transition: background var(--transition), border-color var(--transition);
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-quote {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px 24px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .page-with-sidebar {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }
  
  .site-description {
    display: none;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    box-shadow: var(--shadow-md);
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .main-nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
  }
  
  .main-nav a:last-child {
    border-bottom: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .header-inner {
    position: relative;
  }
  
  .article-title {
    font-size: 1.7rem;
  }
  
  .post-title {
    font-size: 1.25rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .post-nav {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .site-main {
    padding: 24px 16px;
  }
  
  .article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
  }
  
  .comment-body,
  .comment-reply {
    padding-left: 0;
    margin-top: 8px;
  }
  
  .comment-children {
    margin-left: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 480px) {
  .article-meta {
    flex-direction: column;
    gap: 6px;
  }
  
  .article-meta .separator {
    display: none;
  }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .comments-section,
  .post-nav,
  .theme-toggle,
  .menu-toggle {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .article-content {
    font-size: 12pt;
    line-height: 1.6;
  }
}
