/* ===== 基础变量 / 主题 ===== */
:root {
  --bg: #fdf8f3;
  --bg-soft: #fbeee3;
  --card: #ffffff;
  --ink: #3d342b;
  --ink-soft: #7a6f63;
  --accent: #e8a87c;       /* 暖橘 */
  --accent-deep: #d98c5f;
  --accent-2: #f4c7a0;     /* 浅杏 */
  --line: #efe2d6;
  --shadow: 0 10px 30px rgba(180, 130, 90, 0.12);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

a { color: inherit; text-decoration: none; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 243, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}
.logo-egg { font-size: 1.5rem; }
.logo-sub { font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; margin-left: 2px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.98rem;
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-deep); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.menu-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.4rem; color: var(--ink); cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(circle at 15% 20%, var(--accent-2) 0%, transparent 40%),
    radial-gradient(circle at 85% 0%, #fde7d2 0%, transparent 45%),
    var(--bg-soft);
  padding: 80px 0 90px;
  text-align: center;
}
.hero-avatar {
  width: 110px; height: 110px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  font-size: 3.2rem;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
}
.hero-title { font-size: 2.4rem; margin-bottom: 16px; letter-spacing: 1px; }
.hero-desc { color: var(--ink-soft); font-size: 1.08rem; max-width: 620px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(217, 140, 95, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-deep); }
.btn-ghost {
  background: #fff;
  color: var(--accent-deep);
  border: 1.5px solid var(--accent-2);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }

.hero-stats {
  display: flex; justify-content: center; gap: 50px;
  margin-top: 48px;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong { font-size: 1.8rem; color: var(--accent-deep); }
.stat span { font-size: 0.9rem; color: var(--ink-soft); }

/* ===== 通用 section 头部 ===== */
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 1.8rem; margin-bottom: 8px; }
.section-head p { color: var(--ink-soft); }

/* ===== 随笔列表 ===== */
.essays { padding: 80px 0; }
.essay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}
.essay-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.essay-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(180, 130, 90, 0.18); }
.essay-cover {
  height: 130px;
  display: grid; place-items: center;
  font-size: 3rem;
}
.cover-1 { background: linear-gradient(135deg, #d9f0d3, #b8e0a8); }
.cover-2 { background: linear-gradient(135deg, #ffe0c7, #ffc8a0); }
.cover-3 { background: linear-gradient(135deg, #cfe6ff, #a9cdf0); }
.cover-4 { background: linear-gradient(135deg, #e9d6ff, #cdb4f0); }
.essay-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.essay-tag {
  align-self: flex-start;
  background: var(--bg-soft);
  color: var(--accent-deep);
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.essay-body h3 { font-size: 1.12rem; margin-bottom: 8px; line-height: 1.5; }
.essay-body p { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.essay-meta {
  margin-top: 14px;
  display: flex; gap: 16px;
  font-size: 0.8rem; color: var(--ink-soft);
}
.essays-more { text-align: center; margin-top: 40px; }

/* ===== 标签云 ===== */
.tags { padding: 60px 0 80px; background: var(--bg-soft); }
.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  max-width: 760px; margin: 0 auto;
}
.chip {
  background: #fff;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  box-shadow: 0 4px 12px rgba(180, 130, 90, 0.08);
  transition: transform 0.15s, color 0.2s, background 0.2s;
}
.chip:hover { transform: translateY(-3px); color: #fff; background: var(--accent); }

/* ===== 关于我 ===== */
.about { padding: 80px 0; }
.about-inner {
  display: flex; gap: 40px; align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow);
}
.about-avatar {
  flex-shrink: 0;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid; place-items: center;
  font-size: 3.6rem;
}
.about-text h2 { font-size: 1.6rem; margin-bottom: 14px; }
.about-text p { color: var(--ink-soft); margin-bottom: 12px; }
.about-social { display: flex; gap: 16px; margin-top: 18px; }
.social {
  font-size: 0.92rem; color: var(--accent-deep);
  border-bottom: 1.5px dashed var(--accent-2);
  padding-bottom: 2px;
}
.social:hover { border-color: var(--accent); }

/* ===== 订阅 ===== */
.subscribe { padding: 70px 0; text-align: center; background: var(--bg-soft); }
.subscribe-inner h2 { font-size: 1.6rem; margin-bottom: 8px; }
.subscribe-inner p { color: var(--ink-soft); margin-bottom: 26px; }
.sub-form {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  max-width: 480px; margin: 0 auto;
}
.sub-form input {
  flex: 1; min-width: 220px;
  padding: 12px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  background: #fff;
  outline: none;
}
.sub-form input:focus { border-color: var(--accent); }

/* ===== 页脚 ===== */
.site-footer {
  padding: 44px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.footer-beian a {
  color: var(--ink-soft);
  font-size: 0.85rem;
  opacity: 0.7;
}
.footer-beian a:hover { opacity: 1; }
.footer-quote { margin-top: 10px; color: var(--accent-deep); font-style: italic; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s;
  }
  .nav-links.open { max-height: 280px; }
  .nav-links a { padding: 14px 24px; }
  .menu-toggle { display: block; }
  .hero-title { font-size: 1.9rem; }
  .hero-stats { gap: 30px; }
  .about-inner { flex-direction: column; text-align: center; padding: 32px; }
}
