/* ========== 基础重置 ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== 全局 ========== */
body {
  background-color: #fdf6ec;
  color: #2d2d2d;
  font-family: "Noto Serif SC", "Georgia", "Times New Roman", serif;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #b8860b;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #d4a574;
  text-decoration: underline;
}

/* ========== 导航栏 ========== */
.site-nav {
  background: #fdf6ec;
  border-bottom: 2px solid #d4a574;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d2d2d;
  letter-spacing: 2px;
}

.site-title a {
  color: #2d2d2d;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: #8b7355;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.nav-links a:hover {
  color: #d4a574;
  text-decoration: none;
}

/* ========== 主内容区 ========== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ========== 首页 Hero ========== */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #e8d5b7;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  letter-spacing: 4px;
  color: #2d2d2d;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  color: #8b7355;
  font-size: 0.95rem;
  letter-spacing: 2px;
}

/* ========== 文章卡片 ========== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: #fff;
  border-left: 4px solid #d4a574;
  padding: 1.2rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  border-left-color: #b8860b;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.post-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.post-card h2 a {
  color: #2d2d2d;
}

.post-card h2 a:hover {
  color: #b8860b;
  text-decoration: none;
}

.post-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.post-meta .category {
  color: #d4a574;
  font-weight: 600;
}

.post-summary {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* ========== 文章详情 ========== */
.article-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid #d4a574;
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 1.8rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.article-content {
  font-size: 1.05rem;
  line-height: 2;
}

.article-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e8d5b7;
  letter-spacing: 1px;
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.8rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}

.article-content blockquote {
  border-left: 3px solid #d4a574;
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: #fff;
  color: #666;
  font-style: italic;
}

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

.article-content li {
  margin-bottom: 0.3rem;
}

/* ========== 代码块 ========== */
.article-content code {
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
  background: #f5f0e8;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.article-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

/* ========== 标签/分类 ========== */
.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}

.taxonomy-item {
  display: inline-block;
  background: #fff;
  border: 1px solid #d4a574;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #8b7355;
  transition: all 0.2s;
}

.taxonomy-item:hover {
  background: #d4a574;
  color: #fff;
  text-decoration: none;
}

.taxonomy-item .count {
  margin-left: 0.3rem;
  color: #bbb;
}

/* ========== 归档页 ========== */
.archive-year {
  font-size: 1.5rem;
  color: #d4a574;
  margin: 2rem 0 1rem;
  letter-spacing: 2px;
}

.archive-list {
  list-style: none;
  padding: 0;
}

.archive-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e8d5b7;
  display: flex;
  gap: 1rem;
}

.archive-date {
  color: #999;
  font-size: 0.9rem;
  min-width: 60px;
}

.archive-title a {
  color: #2d2d2d;
}

/* ========== 文章底部标签 ========== */
.article-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e8d5b7;
}

/* ========== 页脚 ========== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.85rem;
  border-top: 1px solid #e8d5b7;
  margin-top: auto;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
  .nav-inner {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .article-header h1 {
    font-size: 1.4rem;
  }

  .container {
    padding: 1rem;
  }
}
