/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #1a1a2e;
  --accent: #e94560;
  --text: #333;
  --text-light: #666;
  --bg: #fafafa;
  --white: #fff;
  --border: #e8e8e8;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --max-width: 1140px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px; line-height: 1.75; color: var(--text); background: var(--bg);
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.35rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.logo span { color: var(--accent); }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { font-size: .9rem; color: var(--text-light); font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: var(--white); padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.hero p { font-size: 1.1rem; opacity: .8; max-width: 600px; margin: 0 auto; line-height: 1.8; }

/* ── Section ── */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--primary);
  display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-desc { color: var(--text-light); font-size: .9rem; margin-bottom: 32px; }

/* ── Article Cards (首页网格) ── */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px;
}
.article-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.article-card-body { padding: 24px; }
.article-card .card-category {
  display: inline-block; font-size: .75rem; color: var(--accent); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.article-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.article-card h3 a { color: var(--primary); }
.article-card h3 a:hover { color: var(--accent); }
.article-card .card-meta { font-size: .8rem; color: #999; display: flex; gap: 16px; }
.article-card .card-excerpt { font-size: .88rem; color: var(--text-light); margin-top: 10px; line-height: 1.7; }

/* ── Article List (列表页) ── */
.page-header {
  background: var(--white); border-bottom: 1px solid var(--border); padding: 32px 0;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.page-header .breadcrumb { font-size: .8rem; color: var(--text-light); margin-top: 6px; }
.page-header .breadcrumb a { color: var(--text-light); }

.article-list { display: flex; flex-direction: column; }
.article-item {
  display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.article-item:hover { background: #fafbfc; margin: 0 -24px; padding: 24px; border-radius: var(--radius); }
.article-item .item-date {
  flex-shrink: 0; width: 80px; text-align: center; padding-top: 4px;
}
.article-item .item-date .day { font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1; display: block; }
.article-item .item-date .month { font-size: .75rem; color: #999; text-transform: uppercase; }
.article-item .item-body { flex: 1; }
.article-item h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.article-item h2 a { color: var(--primary); }
.article-item h2 a:hover { color: var(--accent); }
.article-item .item-meta { font-size: .8rem; color: #999; margin-bottom: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.article-item .item-meta .tag-link { background: #f0f0f0; padding: 1px 8px; border-radius: 3px; font-size: .75rem; }
.article-item .item-excerpt { font-size: .88rem; color: var(--text-light); line-height: 1.7; }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: .85rem; color: var(--text); background: var(--white);
}
.pagination a:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); font-weight: 600; }
.pagination .dots { border: none; }

/* ── Article Detail ── */
.article-detail { max-width: 780px; margin: 0 auto; }
.article-detail .article-header { padding: 40px 0 24px; }
.article-detail .article-header h1 { font-size: 2rem; font-weight: 800; line-height: 1.4; color: var(--primary); }
.article-detail .article-header .meta-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .85rem; color: #999;
}
.article-detail .article-header .meta-bar a { color: var(--accent); font-weight: 500; }

.article-content { font-size: 1.05rem; line-height: 1.9; color: #2c2c2c; }
.article-content p { margin-bottom: 1.4em; }
.article-content h2 { font-size: 1.35rem; font-weight: 700; margin: 2em 0 .8em; color: var(--primary); }
.article-content h3 { font-size: 1.15rem; font-weight: 700; margin: 1.6em 0 .6em; }
.article-content img {
  max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.2em 0;
}
.article-content blockquote {
  border-left: 4px solid var(--accent); padding: 12px 20px; margin: 1.2em 0;
  background: #fff5f5; color: #555; font-style: italic; border-radius: 0 var(--radius) var(--radius) 0;
}
.article-content ul, .article-content ol { margin: 1em 0; padding-left: 1.5em; }
.article-content li { margin-bottom: .4em; }
.article-content strong { color: var(--primary); }
.article-content a { color: var(--accent); text-decoration: underline; }

/* ── Article Navigation ── */
.article-nav {
  display: flex; justify-content: space-between; gap: 24px;
  margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--border);
}
.article-nav a {
  flex: 1; display: block; padding: 16px 20px; border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  font-size: .9rem; color: var(--text); transition: all .2s;
}
.article-nav a:hover { color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.article-nav .prev { text-align: left; }
.article-nav .next { text-align: right; }
.article-nav .nav-label { font-size: .75rem; color: #999; display: block; margin-bottom: 4px; }

/* ── Sidebar ── */
.with-sidebar { display: flex; gap: 40px; }
.sidebar { width: 280px; flex-shrink: 0; }
.sidebar-widget { background: var(--white); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.sidebar-widget h4 { font-size: .95rem; font-weight: 700; margin-bottom: 14px; color: var(--primary); padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { padding: 6px 0; }
.sidebar-widget li a { font-size: .88rem; color: var(--text-light); display: flex; justify-content: space-between; }
.sidebar-widget li a:hover { color: var(--accent); }
.sidebar-widget li .count { color: #bbb; font-size: .8rem; }

/* ── Page Detail ── */
.page-detail { max-width: 780px; margin: 0 auto; padding: 40px 0; }
.page-detail h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 28px; color: var(--primary); }

/* ── Footer ── */
.site-footer {
  background: var(--primary); color: rgba(255,255,255,.7);
  padding: 48px 0 24px; margin-top: 80px; font-size: .85rem;
}
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 12px; }
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; font-size: .8rem; opacity: .6;
}

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .site-nav { display: none; }
  .mobile-menu-btn { display: block; }
.site-nav.show { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: 16px 24px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 1.6rem; }
  .article-grid { grid-template-columns: 1fr; }
  .article-item { flex-direction: column; gap: 8px; }
  .article-item .item-date { width: auto; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .article-item .item-date .day { font-size: 1.2rem; }
  .with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-detail .article-header h1 { font-size: 1.4rem; }
  .article-nav { flex-direction: column; }
}
