/* ========== 全局变量 ========== */
:root {
  --cream:    #fef9f5;
  --warm:     #fde8d8;
  --brown:    #6b4a3a;
  --brown-d:  #4a2e1e;
  --orange:   #e8714a;
  --orange-l: #f5a89a;
  --coral:    #e8543a;
  --peach:    #f5c6aa;
  --gold:     #e8a33d;
  --text:     #3a2820;
  --text-l:   #8a6a5a;
  --border:   #f0d8c8;
  --white:    #ffffff;
  --shadow:   0 2px 20px rgba(232,113,74,0.10);
  --radius:   12px;
}

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

html { scroll-behavior:smooth; }

body {
  font-family: "Noto Serif SC", "Source Han Serif CN", Georgia, "Times New Roman", serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== 导航 ========== */
.nav {
  position: fixed; top:0; left:0; right:0;
  z-index: 100;
  background: rgba(254,249,245,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-d);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-l);
  letter-spacing: 1px;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content:"";
  position: absolute;
  bottom: -2px; left:0; right:0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--brown-d);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform:scaleX(1); }

/* 手机导航 */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer;
  width: 28px; height: 20px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 100%; height: 2px;
  background: var(--brown-d);
  position: absolute;
  transition: all 0.3s;
}
.nav-toggle span:nth-child(1) { top:0; }
.nav-toggle span:nth-child(2) { top:9px; }
.nav-toggle span:nth-child(3) { top:18px; }
.nav-toggle.open span:nth-child(1) { top:9px; transform:rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity:0; }
.nav-toggle.open span:nth-child(3) { top:9px; transform:rotate(-45deg); }

/* ========== 主页头部 ========== */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--warm) 0%, var(--cream) 100%);
}

.hero-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-l), var(--peach));
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: var(--white);
  box-shadow: 0 8px 32px rgba(232,113,74,0.25);
}

.hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--brown-d);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-l);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid var(--border);
  color: var(--text-l);
  background: var(--white);
  transition: all 0.3s;
  cursor: pointer;
}
.tag:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(232,113,74,0.08);
}

/* ========== 内容区通用 ========== */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--brown-d);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section-header p {
  font-size: 14px;
  color: var(--text-l);
  letter-spacing: 1px;
}

/* ========== 分类导航卡片 ========== */
.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.35s;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(90,70,50,0.12);
  border-color: transparent;
}

.cat-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.cat-card.life .cat-icon    { background: rgba(232,113,74,0.15); }
.cat-card.feeling .cat-icon { background: rgba(245,168,154,0.18); }
.cat-card.work .cat-icon    { background: rgba(232,163,61,0.15); }

.cat-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brown-d);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.cat-card p {
  font-size: 13px;
  color: var(--text-l);
  line-height: 1.6;
}

.cat-count {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 1px;
}

/* ========== 文章卡片 ========== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.35s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(90,70,50,0.10);
  border-color: transparent;
}

.article-card a { display:flex; flex-direction:column; height:100%; }

.article-thumb {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--warm), var(--sage-l));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,0.7);
}

.article-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-l);
  letter-spacing: 1px;
}

.article-meta .dot::before { content:"·"; margin:0 4px; }

.article-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: 1px;
}
.article-cat.life     { background:rgba(232,113,74,0.12); color:var(--orange); }
.article-cat.feeling  { background:rgba(245,168,154,0.18); color:var(--coral); }
.article-cat.work     { background:rgba(232,163,61,0.12);  color:var(--gold); }

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-d);
  line-height: 1.5;
  margin-bottom: 10px;
}

.article-body p {
  font-size: 14px;
  color: var(--text-l);
  line-height: 1.7;
  flex: 1;
}

.article-link {
  margin-top: 18px;
  font-size: 13px;
  color: var(--orange);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}
.article-card:hover .article-link { gap: 10px; }

/* ========== 关于我 ========== */
.about {
  background: var(--warm);
  border-radius: 16px;
  padding: 48px 36px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text { flex:1; }

.about-text h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--brown-d);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.about-text p {
  font-size: 15px;
  color: var(--text-l);
  line-height: 1.9;
  margin-bottom: 12px;
}

.about-img {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage-l), var(--peach), var(--coral));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: rgba(255,255,255,0.8);
  box-shadow: 0 8px 32px rgba(212,134,107,0.20);
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-l);
  letter-spacing: 1px;
}

.footer a {
  color: var(--orange);
  transition: color 0.3s;
}
.footer a:hover { color: var(--brown-d); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

/* ========== 分类页面 ========== */
.cat-hero {
  padding: 140px 24px 60px;
  text-align: center;
}
.cat-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--brown-d);
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.cat-hero p {
  font-size: 15px;
  color: var(--text-l);
}

/* ========== 文章详情页 ========== */
.article-hero {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--warm) 0%, var(--cream) 100%);
}

.article-hero h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--brown-d);
  max-width: 700px;
  margin: 0 auto 20px;
  line-height: 1.4;
  letter-spacing: 1px;
}

.article-hero .meta {
  font-size: 13px;
  color: var(--text-l);
  letter-spacing: 1px;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-size: 16px;
  line-height: 2;
  color: var(--text);
}

.article-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--brown-d);
  margin: 40px 0 16px;
  letter-spacing: 1px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content blockquote {
  border-left: 3px solid var(--orange);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(232,113,74,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-l);
}

/* ========== 返回链接 ========== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-l);
  letter-spacing: 1px;
  margin-bottom: 32px;
  transition: color 0.3s;
}
.back-link:hover { color: var(--sage); }

/* ========== 响应式 ========== */
@media (max-width:768px) {
  .nav-links { 
    display: none;
    position: absolute;
    top: 64px; left:0; right:0;
    background: rgba(250,248,245,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display:flex; }
  .nav-toggle { display:block; }

  .hero h1 { font-size: 28px; }
  .hero { padding: 120px 20px 60px; }

  .categories { grid-template-columns:1fr; gap:16px; }

  .about { flex-direction:column; text-align:center; padding:36px 24px; }
  .about-img { width:140px; height:140px; font-size:48px; }

  .article-card a { flex-direction:column; }
  .article-thumb { height:160px; }

  .cat-hero h1 { font-size: 26px; }
  .article-hero h1 { font-size: 26px; }
}
