/* Blog pages import the same tokens as the main app for visual consistency */
:root {
  --ink: #16240A;
  --ink-soft: #4B5A3E;
  --ink-muted: #7C8870;
  --paper: #FFFFFF;
  --paper-tint: #F4F8ED;
  --line: #E1E9D3;
  --moss-50: #EAF3DE;
  --moss-100: #C7DFA0;
  --moss-300: #8FC050;
  --moss-500: #5B9A2E;
  --moss-700: #3B6D11;
  --moss-900: #1F3D07;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --max-width-narrow: 720px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--ink); margin: 0 0 0.6em; line-height: 1.2; }
p { margin: 0 0 1.2em; color: var(--ink-soft); }
a { color: var(--moss-700); }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--max-width-narrow); margin: 0 auto; padding: 0 24px; }

/* topbar reused from main site */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-display); font-size: 19px; }
.brand a { color: var(--ink); text-decoration: none; }
.topnav { display: flex; gap: 24px; font-size: 14px; }
.topnav a { color: var(--ink-soft); text-decoration: none; }
.topnav a:hover, .topnav a.active { color: var(--moss-700); }

/* blog index */
.blog-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--paper-tint); }
.blog-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.blog-hero p { font-size: 16px; max-width: 50ch; }

.post-list { padding: 48px 0 80px; }
.post-list .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover {
  border-color: var(--moss-300);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(22,36,10,0.08);
}
.post-card-thumb { border-radius: 0; overflow: hidden; margin-bottom: 0; aspect-ratio: 1200/630; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.post-card-date { font-size: 12px; color: var(--moss-700); font-weight: 600; letter-spacing: 0.02em; }
.post-meta-row { display: flex; align-items: center; gap: 6px; }
.post-meta-dot { color: var(--ink-muted); font-size: 12px; }
.post-read-time { font-size: 12px; color: var(--ink-muted); }
.post-card h2 { margin-top: 8px; margin-bottom: 0; font-size: 19px; line-height: 1.3; color: var(--ink); }
.post-card p { margin-top: 8px; margin-bottom: 0; font-size: 13px; color: var(--ink-soft); }

/* single post */
.post-banner { max-width: var(--max-width-narrow); margin: 24px auto 0; padding: 0 24px; }
.post-banner-img { width: 100%; border-radius: 16px; display: block; aspect-ratio: 1200/630; object-fit: cover; }

.post-header { padding: 32px 0 32px; border-bottom: 1px solid var(--line); }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-top: 10px; }
.post-byline { font-size: 13px; color: var(--ink-muted); margin-top: 10px; }

.post-body { padding: 40px 0 80px; font-size: 17px; line-height: 1.75; }
.post-body p { margin-bottom: 1.4em; color: var(--ink); }
.post-body h2 { font-size: 22px; margin-top: 1.6em; }
.post-body h3 { font-size: 18px; margin-top: 1.4em; }
.post-body ul, .post-body ol { color: var(--ink); padding-left: 1.4em; margin-bottom: 1.4em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--moss-500);
  color: var(--ink-soft); font-style: italic;
}
.post-body a { text-decoration: underline; }

/* share row */
.post-share { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-share-label { display: block; font-size: 12px; font-weight: 600; color: var(--moss-700); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.post-share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.post-share-btn {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.post-share-btn:hover { border-color: var(--moss-500); color: var(--moss-700); }

/* author block */
.post-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 20px;
  background: var(--paper-tint);
  border-radius: 14px;
}
.post-author-avatar {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--moss-700);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
}
.post-author-name { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; }
.post-author-bio { font-size: 13px; color: var(--ink-muted); margin: 2px 0 0; }

.back-link { display: inline-block; margin-top: 24px; font-size: 14px; color: var(--moss-700); text-decoration: none; }

.site-footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-inner p { font-size: 12px; color: var(--ink-muted); max-width: 60ch; margin: 0; }
.footer-links { display: flex; gap: 16px; margin-top: 12px; }
.footer-links a { font-size: 12px; color: var(--ink-muted); text-decoration: underline; }
.footer-links a:hover { color: var(--moss-700); }
