/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #fef9f2;
  --warm-white: #fffaf5;
  --blush: #f7d9d0;
  --soft-pink: #e8c4b8;
  --clay: #c4956a;
  --sage: #a3b899;
  --deep-sage: #6b7f5d;
  --charcoal: #3d3a3a;
  --text: #4a4543;
  --text-light: #7a7370;
  --golden: #d4a853;
  --sky: #c9dde4;
  --lavender: #d5c6e0;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--warm-white);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

/* === Typography === */
h1, h2, h3, h4 { color: var(--charcoal); line-height: 1.3; }
h1 { font-size: 2.2rem; font-weight: 600; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 500; }

a { color: var(--deep-sage); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--sage); }

/* === Navigation === */
nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem; background: rgba(255,250,245,0.95);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-brand {
  font-size: 1.1rem; font-weight: 600; color: var(--charcoal);
  letter-spacing: 0.02em;
}
.nav-brand span { color: var(--clay); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-light); font-size: 0.9rem; }
.nav-links a:hover { color: var(--clay); }
.nav-links a.active { color: var(--clay); font-weight: 500; }

/* === Container === */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* === Hero === */
.hero {
  text-align: center; padding: 5rem 1.5rem 4rem;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm-white) 40%, #fdf2ea 100%);
}
.hero-tag {
  display: inline-block; background: var(--blush); color: var(--clay);
  padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.8rem;
  letter-spacing: 0.06em; margin-bottom: 1.2rem;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 0.8rem; }
.hero h1 em { font-style: normal; color: var(--clay); }
.hero p {
  max-width: 560px; margin: 0 auto 2rem; color: var(--text-light);
  font-size: 1.05rem;
}

.btn {
  display: inline-block; background: var(--clay); color: #fff;
  padding: 0.65rem 1.8rem; border-radius: 28px; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.25s;
}
.btn:hover { background: #b5834a; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196,149,106,0.3); }
.btn-outline { background: transparent; color: var(--clay); border: 1.5px solid var(--clay); }
.btn-outline:hover { background: var(--clay); color: #fff; }

/* === Timeline === */
.timeline-section { padding: 4rem 0; background: var(--warm-white); }
.timeline-section h2 { text-align: center; margin-bottom: 2.5rem; }

.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--blush), var(--sage), var(--sky), var(--lavender));
  transform: translateX(-50%);
}

.timeline-item {
  display: flex; align-items: flex-start; margin-bottom: 3rem;
  position: relative;
}
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-dot {
  position: absolute; left: 50%; top: 1.2rem; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
  font-size: 0.85rem; color: #fff; z-index: 2;
}
.dot-3 { background: var(--clay); }
.dot-4 { background: var(--sage); }
.dot-5 { background: #7a9bb5; }
.dot-6 { background: #9b7eb8; }

.timeline-card {
  width: 44%; background: #fff; border-radius: 14px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04); transition: transform 0.25s, box-shadow 0.25s;
}
.timeline-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.timeline-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.timeline-card .age-badge {
  display: inline-block; font-size: 0.75rem; padding: 0.15rem 0.7rem;
  border-radius: 12px; margin-bottom: 0.6rem;
}
.badge-3 { background: #fef0e8; color: var(--clay); }
.badge-4 { background: #edf5e5; color: var(--deep-sage); }
.badge-5 { background: #e8f0f8; color: #5a7d9a; }
.badge-6 { background: #f0e8f5; color: #7d5a9a; }

.timeline-card p { color: var(--text-light); font-size: 0.9rem; }
.timeline-card .read-more { font-size: 0.85rem; font-weight: 500; display: inline-block; margin-top: 0.5rem; }

/* === Featured === */
.featured { padding: 4rem 0; background: var(--cream); }
.featured h2 { text-align: center; margin-bottom: 2rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

.card {
  background: #fff; border-radius: 14px; padding: 1.8rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03); transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.card .icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.85rem; color: var(--text-light); }

/* === Page Header === */
.page-header {
  text-align: center; padding: 3.5rem 1.5rem 2.5rem;
  background: linear-gradient(160deg, var(--cream), var(--warm-white) 70%);
}
.page-header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-light); max-width: 500px; margin: 0 auto; }

/* === Journal Content === */
.journal-content { padding: 2rem 0 4rem; }
.journal-content h2 { margin: 2rem 0 0.6rem; color: var(--charcoal); }
.journal-content h3 { margin: 1.5rem 0 0.5rem; }
.journal-content p { margin-bottom: 1rem; color: var(--text); }
.journal-content .lead {
  font-size: 1.15rem; color: var(--text-light); font-style: italic;
  line-height: 1.9; margin-bottom: 2rem;
}

.highlight-box {
  background: var(--cream); border-left: 4px solid var(--clay);
  padding: 1.2rem 1.5rem; border-radius: 0 12px 12px 0; margin: 1.5rem 0;
  font-size: 0.95rem;
}

.highlight-box.sage { border-left-color: var(--sage); background: #f6faf3; }
.highlight-box.blue { border-left-color: #7a9bb5; background: #f4f8fb; }
.highlight-box.purple { border-left-color: #9b7eb8; background: #f8f4fb; }

.activity-list { list-style: none; margin: 1rem 0; }
.activity-list li {
  padding: 0.5rem 0; padding-left: 1.5rem; position: relative;
  font-size: 0.95rem;
}
.activity-list li::before {
  content: '✦'; position: absolute; left: 0; color: var(--clay);
  font-size: 0.7rem; top: 0.65rem;
}

.age-nav {
  display: flex; gap: 0.6rem; justify-content: center; margin: 2rem 0;
  flex-wrap: wrap;
}
.age-nav a {
  padding: 0.4rem 1.2rem; border-radius: 20px; font-size: 0.85rem;
  background: #fff; border: 1.5px solid #e8e0d8; color: var(--text-light);
  transition: all 0.2s;
}
.age-nav a:hover, .age-nav a.active { border-color: var(--clay); color: var(--clay); }

/* === Page Nav (prev/next) === */
.page-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 0; margin-top: 2rem; border-top: 1px solid #e8e0d8;
}
.page-nav a { font-size: 0.9rem; font-weight: 500; color: var(--clay); }
.page-nav a:hover { color: var(--charcoal); }
.page-nav .page-num { font-size: 0.8rem; color: var(--text-light); }

/* === Table of Contents (Home) === */
.toc { padding: 3rem 0; }
.toc h2 { text-align: center; margin-bottom: 0.4rem; }
.toc .subtitle { text-align: center; color: var(--text-light); font-size: 0.9rem; margin-bottom: 2.5rem; }

.toc-section { margin-bottom: 2.5rem; }
.toc-section h3 {
  font-size: 1rem; padding-bottom: 0.4rem; margin-bottom: 0.8rem;
  border-bottom: 2px solid var(--blush);
}
.toc-section.sec-3 h3 { color: var(--clay); border-color: #fef0e8; }
.toc-section.sec-4 h3 { color: var(--deep-sage); border-color: #edf5e5; }
.toc-section.sec-5 h3 { color: #5a7d9a; border-color: #e8f0f8; }
.toc-section.sec-6 h3 { color: #7d5a9a; border-color: #f0e8f5; }

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.3rem; }
.toc-list a {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 0.5rem 0.7rem;
  border-radius: 8px; font-size: 0.95rem; transition: background 0.15s;
}
.toc-list a:hover { background: rgba(0,0,0,0.02); }
.toc-list .num {
  font-size: 0.75rem; color: var(--text-light); font-weight: 500;
  min-width: 1.5rem; text-align: right;
}
.toc-list .title { color: var(--charcoal); flex: 1; }
.toc-list .hint {
  font-size: 0.75rem; color: var(--text-light); font-style: italic;
}

/* === Back link === */
.back-home { display: inline-block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-light); }
.back-home:hover { color: var(--clay); }

/* === About Page === */
.about-content { padding: 2rem 0 4rem; }
.about-content p { margin-bottom: 1rem; }
.about-content .values {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem; margin: 2rem 0;
}
.value-card {
  background: #fff; border-radius: 12px; padding: 1.5rem;
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.value-card .icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.value-card h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }

/* === Resources === */
.resources-content { padding: 2rem 0 4rem; }
.resource-section { margin-bottom: 2.5rem; }
.resource-section h2 { margin-bottom: 1rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--blush); }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.resource-card {
  background: #fff; border-radius: 12px; padding: 1.3rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}
.resource-card h4 { font-size: 0.95rem; color: var(--charcoal); margin-bottom: 0.3rem; }
.resource-card p { font-size: 0.8rem; color: var(--text-light); }
.resource-card .tag {
  display: inline-block; font-size: 0.7rem; background: var(--cream);
  padding: 0.1rem 0.6rem; border-radius: 10px; color: var(--clay); margin-top: 0.4rem;
}

/* === Footer === */
footer {
  text-align: center; padding: 2.5rem 1.5rem; background: var(--charcoal);
  color: rgba(255,255,255,0.6); font-size: 0.8rem;
}
footer a { color: var(--blush); }
footer a:hover { color: var(--soft-pink); }
footer .heart { color: var(--blush); }

/* === Image placeholders === */
.img-placeholder {
  width: 100%; height: 200px; border-radius: 10px; margin: 1.5rem 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: rgba(0,0,0,0.3); letter-spacing: 0.04em;
}
.img-1 { background: linear-gradient(135deg, #fef0e8, #f7d9d0); }
.img-2 { background: linear-gradient(135deg, #edf5e5, #d4e6c3); }
.img-3 { background: linear-gradient(135deg, #e8f0f8, #c9dde4); }
.img-4 { background: linear-gradient(135deg, #f0e8f5, #d5c6e0); }

/* === Responsive === */
@media (max-width: 700px) {
  html { font-size: 16px; }
  nav { flex-direction: column; gap: 0.5rem; padding: 0.8rem 1rem; }
  .nav-links { gap: 1rem; }

  .timeline::before { left: 1rem; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; padding-left: 2.5rem; }
  .timeline-dot { left: 1rem; top: 0.4rem; width: 32px; height: 32px; font-size: 0.7rem; }
  .timeline-card { width: 100%; }

  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
}
