:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1f2a2e;
  --muted: #5b6769;
  --accent: #0f5d5a;
  --accent-soft: #e3efed;
  --health: #8a4b2a;
  --health-soft: #f6e8df;
  --line: #e6e1d8;
  --quote: #f3efe7;
  --btn-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a1b;
    --card: #1c2425;
    --text: #ecefee;
    --muted: #a4b0b0;
    --accent: #6cc3bc;
    --accent-soft: #203634;
    --health: #e3a37f;
    --health-soft: #3a2a21;
    --line: #2c3637;
    --quote: #222c2d;
    --btn-text: #0d1a19;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: "Lora", serif; line-height: 1.3; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  font-family: "Lora", serif; font-weight: 700; font-size: 20px;
  color: var(--text); text-decoration: none;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--accent); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 800px) { .hero .wrap { grid-template-columns: 1.4fr 1fr; } }
.hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 16px; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
}
.stat { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat:last-child { border-bottom: 0; }
.stat b { font-family: "Lora", serif; font-size: 26px; color: var(--accent); min-width: 72px; }
.stat span { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: var(--btn-text);
  text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 10px;
}
.btn:hover { opacity: .9; }
.btn-ghost {
  display: inline-block; color: var(--accent); text-decoration: none; font-weight: 600;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent); margin-left: 8px;
}

/* Sections */
section { padding: 32px 0; }
.section-title { font-size: 26px; margin: 0 0 20px; }
.cats { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .cats { grid-template-columns: 1fr 1fr; } }
.cat {
  display: block; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.cat h3 { margin: 0 0 6px; font-size: 21px; color: var(--accent); }
.cat.health h3 { color: var(--health); }
.cat p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Post list */
.posts { display: grid; gap: 16px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.post-card h3 { margin: 6px 0 8px; font-size: 21px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.tag {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.tag.health { background: var(--health-soft); color: var(--health); }
.meta { font-size: 14px; color: var(--muted); }

/* Article */
.article { padding: 40px 0 16px; }
.article h1 { font-size: clamp(28px, 4.5vw, 38px); margin: 10px 0 10px; }
.article h2 { font-size: 25px; margin: 36px 0 12px; }
.article h3 { font-size: 20px; margin: 28px 0 8px; }
.article blockquote {
  margin: 24px 0; padding: 16px 20px; background: var(--quote);
  border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0;
}
.article blockquote p { margin: 0; }
.article .note {
  background: var(--quote); border-radius: 10px; padding: 14px 18px; font-size: 15px; color: var(--muted);
}
.flow {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 16px 0; font-size: 15px;
}
.flow span {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  padding: 4px 12px; border-radius: 8px;
}
.flow i { color: var(--muted); font-style: normal; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Author box */
.author {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 36px 0;
}
.avatar {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: "Lora", serif; font-weight: 700; font-size: 22px;
}
.avatar.lg { flex-basis: 96px; width: 96px; height: 96px; font-size: 32px; }
img.avatar { object-fit: cover; object-position: 50% 22%; border: 2px solid var(--accent-soft); }
.hero-photo {
  display: block; width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover; object-position: 50% 22%; margin: 0 0 16px;
  border: 3px solid var(--accent-soft);
}
figure { margin: 24px 0; }
figure img { display: block; width: 100%; border-radius: 12px; }
figure.portrait img { max-width: 420px; margin: 0 auto; }
figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; }
.author h4 { margin: 0 0 4px; font-family: "Lora", serif; font-size: 18px; }
.author p { margin: 0 0 8px; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* CTA */
.cta {
  background: var(--accent-soft); border-radius: 16px; padding: 28px 24px; text-align: center; margin: 32px 0;
}
.cta h3 { margin: 0 0 8px; font-size: 22px; }
.cta p { margin: 0 0 18px; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 16px 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent);
}
.timeline b { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer p { margin: 4px 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn-ghost { margin: 10px 0 0; }
  .author { flex-direction: column; }
}
