/* ============================================
   🌱 涨知识啦 — 健康知识博客
   Minimal, professional, editorial design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
  --white: #ffffff;
  --bg: #fafafa;
  --bg-alt: #f5f5f5;
  --border: #e8e8e8;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --accent: #1a7a4c;
  --accent-light: #e8f5ee;
  --accent-dark: #0f5c37;
  --green-50: #eef6f2;
  --tag-yellow: #f7f0e1;
  --tag-blue: #e1edf7;
  --tag-purple: #ede4f7;
  --tag-green: #e1f0e8;
  --tag-rose: #f7e4ea;
  --tag-orange: #f7ede1;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Typography ===== */
::selection { background: var(--accent); color: #fff; }

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.logo span { color: var(--accent); }
.header-nav { display: flex; gap: 28px; }
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ===== Main Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero Section (Home) ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  border: 1px solid var(--accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--accent-light);
}
.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text);
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ===== Featured Section ===== */
.featured-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

/* ===== Article Grid ===== */
.article-grid { margin-bottom: 60px; }

/* Featured card (first article) */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 40px;
  transition: box-shadow 0.3s;
}
.featured-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.06); }
.featured-card .card-visual {
  height: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.featured-card .card-body {
  padding: 48px 48px 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-card .card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  width: fit-content;
}
.featured-card .card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}
.featured-card .card-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.featured-card .card-meta {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Regular cards grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.post-card .card-visual {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.post-card .card-body { padding: 20px 22px 24px; }
.post-card .card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.post-card .card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.post-card .card-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  gap: 16px;
}

/* Tag styles */
.tag-blue { background: var(--tag-blue); color: #1e40af; }
.tag-purple { background: var(--tag-purple); color: #5b21b6; }
.tag-yellow { background: var(--tag-yellow); color: #92400e; }
.tag-green { background: var(--tag-green); color: #065f46; }
.tag-rose { background: var(--tag-rose); color: #9d174d; }
.tag-orange { background: var(--tag-orange); color: #9a3400; }

/* ===== List Page ===== */
.list-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.list-header h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  font-weight: 800;
}
.list-header .sub {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 6px;
}

/* ===== Article Detail ===== */
.article-page { padding: 40px 0 80px; }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.2s;
  margin-bottom: 32px;
}
.article-back:hover { color: var(--accent); }

.article-header { margin-bottom: 40px; }
.article-header .article-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}
.article-header h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.article-header .article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-tertiary);
}
.article-header .article-visual {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}
.article-visual .bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(circle at 20px 20px, currentColor 1px, transparent 1px);
  background-size: 24px 24px;
}

.article-content {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
}
.article-content h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.article-content h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 19px;
  font-weight: 600;
  margin: 36px 0 12px;
}
.article-content p { margin-bottom: 20px; }
.article-content ul,
.article-content ol {
  margin: 0 0 24px 24px;
}
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  padding: 16px 24px;
  margin: 28px 0;
  border-radius: 0 12px 12px 0;
  color: var(--accent-dark);
  font-size: 16px;
  line-height: 1.8;
}
.article-content strong { font-weight: 600; }
.article-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', monospace;
  font-size: 14px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  margin-top: auto;
  padding: 36px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.site-footer .brand { font-weight: 600; color: var(--accent); }
.site-footer p {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.8;
}
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}
.site-footer .footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.site-footer .footer-links a:hover { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .featured-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .featured-card .card-visual { min-height: 220px; }
  .featured-card .card-body {
    padding: 28px 28px 36px;
  }
  .featured-card .card-title { font-size: 24px; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 48px 0 40px; }
  .article-header h1 { font-size: 28px; }
  .article-header .article-visual { height: 260px; font-size: 72px; }
  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .header-nav { gap: 16px; }
  .hero h1 { font-size: 26px; }
  .featured-card .card-title { font-size: 20px; }
  .article-header h1 { font-size: 24px; }
  .article-header .article-visual { height: 200px; font-size: 56px; }
  .container { padding: 0 16px; }
  .container-narrow { padding: 0 16px; }
}
