/* ============================================
   爱夏夏的个人笔记 · 图文杂志风
   纯静态自包含样式，无外部依赖
   ============================================ */

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-mute: #8a8a8a;
  --paper: #faf8f5;
  --card: #ffffff;
  --accent: #c2472e;      /* 杂志红 */
  --accent-dark: #9c3722;
  --line: #e6e1da;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--serif);
  font-size: 22px; font-weight: 700; letter-spacing: 1px;
}
.logo .dot { color: var(--accent); }
.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 15px; color: var(--ink-soft);
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 头图 hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(194,71,46,.08), transparent 60%),
    var(--paper);
}
.hero-inner {
  display: grid; grid-template-columns: 1.2fr .8fr;
  gap: 48px; align-items: center;
  padding: 72px 0 64px;
}
.kicker {
  display: inline-block;
  font-size: 13px; letter-spacing: 3px; color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 14px; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 44px; line-height: 1.3; font-weight: 700;
  margin-bottom: 18px;
}
.hero p {
  color: var(--ink-soft); font-size: 17px; max-width: 34em;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; }
.btn {
  display: inline-block; padding: 11px 26px;
  font-size: 15px; border: 1px solid var(--ink);
  transition: all .2s;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-art {
  width: 100%; height: 320px;
  border: 1px solid var(--line);
  box-shadow: 12px 12px 0 var(--accent);
  object-fit: cover; background: #fff;
}

/* ---------- 专栏条 ---------- */
.strip {
  background: var(--ink); color: #f5f0e8;
  font-family: var(--serif);
  overflow: hidden; white-space: nowrap;
  font-size: 14px; letter-spacing: 2px;
}
.strip-inner { padding: 10px 0; }
.strip span { margin: 0 26px; opacity: .85; }
.strip b { color: #e8b04b; font-weight: 600; }

/* ---------- 栏目标题 ---------- */
.section { padding: 64px 0 8px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 30px;
  border-bottom: 3px solid var(--ink); padding-bottom: 12px;
}
.section-head h2 {
  font-family: var(--serif); font-size: 26px; font-weight: 700;
}
.section-head h2::before {
  content: "■"; color: var(--accent); font-size: 16px; margin-right: 10px;
}
.section-head a { font-size: 14px; color: var(--ink-mute); }
.section-head a:hover { color: var(--accent); }

/* ---------- 特稿（大图左 右文） ---------- */
.feature {
  display: grid; grid-template-columns: 1.15fr .85fr;
  background: var(--card); border: 1px solid var(--line);
  margin-bottom: 56px;
}
.feature-media { position: relative; min-height: 340px; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.feature-body { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.feature-body h3 {
  font-family: var(--serif); font-size: 28px; line-height: 1.4;
  margin: 12px 0 16px;
}
.feature-body h3 a:hover { color: var(--accent); }
.feature-body p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 22px; }
.meta {
  font-size: 13px; color: var(--ink-mute);
  display: flex; gap: 16px; align-items: center;
}
.meta .cat { color: var(--accent); border: 1px solid currentColor; padding: 1px 8px; }
.more { color: var(--accent); font-size: 14px; font-weight: 600; }
.more:hover { color: var(--accent-dark); }

/* ---------- 文章卡片网格 ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 26px; padding-bottom: 56px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(26,26,26,.08); }
.card-media { aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: 14px; color: var(--ink-soft); flex: 1; }

/* ---------- 关于/订阅块 ---------- */
.about-block {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px;
  padding: 64px 0 72px; align-items: center;
}
.about-block img { border: 1px solid var(--line); box-shadow: -12px 12px 0 rgba(26,26,26,.9); width: 100%; height: 300px; object-fit: cover; }
.about-block h2 { font-family: var(--serif); font-size: 28px; margin-bottom: 16px; }
.about-block p { color: var(--ink-soft); margin-bottom: 12px; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--ink); color: #cfc8bd;
  padding: 44px 0 36px; font-size: 14px;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.footer .logo { color: #fff; font-size: 18px; margin-bottom: 6px; }
.footer a { color: #cfc8bd; border-bottom: 1px dotted #6b655c; }
.footer a:hover { color: #fff; border-color: #fff; }
.icp { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- 文章页 ---------- */
.article-page { background: var(--card); }
.article {
  max-width: 760px; margin: 0 auto; padding: 56px 24px 72px;
}
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 36px; }
.article-head .meta { margin-bottom: 14px; }
.article-head h1 {
  font-family: var(--serif); font-size: 34px; line-height: 1.45; font-weight: 700;
}
.article img.cover { width: 100%; margin: 0 0 32px; border: 1px solid var(--line); }
.article h2 {
  font-family: var(--serif); font-size: 23px; margin: 40px 0 14px;
  padding-left: 12px; border-left: 4px solid var(--accent);
}
.article h3 { font-size: 18px; margin: 28px 0 10px; }
.article p { margin-bottom: 16px; color: #333; font-size: 16px; }
.article ul { margin: 0 0 16px 22px; }
.article li { margin-bottom: 8px; color: #333; }
.article blockquote {
  margin: 24px 0; padding: 16px 20px;
  background: var(--paper); border-left: 4px solid var(--accent);
  color: var(--ink-soft); font-size: 15px;
}
.article code {
  background: #f2ede6; padding: 2px 7px; font-size: 14px;
  font-family: ui-monospace, Consolas, monospace;
}
.article pre {
  background: #23231f; color: #e8e2d5; padding: 18px 20px;
  overflow-x: auto; margin: 20px 0 24px; font-size: 13.5px; line-height: 1.7;
}
.article pre code { background: none; padding: 0; color: inherit; }
.back {
  display: inline-block; margin-top: 44px; font-size: 14px;
  color: var(--ink-mute);
}
.back:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 44px; }
  .hero h1 { font-size: 32px; }
  .hero-art { height: 220px; }
  .feature { grid-template-columns: 1fr; }
  .feature-media { min-height: 220px; position: relative; }
  .grid { grid-template-columns: 1fr; }
  .about-block { grid-template-columns: 1fr; gap: 32px; }
  .nav { gap: 16px; }
  .nav a { font-size: 13.5px; }
}
