:root {
  --cream: #F5F0EA;
  --cream-soft: #FBF7F2;
  --chocolate: #2A1810;
  --brown: #5C3520;
  --accent: #C4652A;
  --gold: #D4A964;
  --gold-light: #F0D8A8;
  --border: #E8E0D8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  background-image:
    linear-gradient(rgba(196, 101, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 101, 42, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--chocolate);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 234, 0.9);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--accent) 50%, var(--gold) 80%, transparent);
  opacity: 0.5;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--chocolate);
}
.logo img { width: 32px; height: 32px; }
.logo span {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.3rem;
}
.nav-cta {
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--accent), #D47A3A);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(196, 101, 42, 0.25);
  transition: all 0.3s;
}
.nav-cta:hover { transform: translateY(-1px); }

/* Breadcrumb */
.breadcrumb {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px 20px;
  font-size: 0.95rem;
  color: var(--brown);
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }

/* Article */
article {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px 100px;
}
.post-category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}
article h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--chocolate) 0%, var(--brown) 35%, var(--accent) 80%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.post-excerpt {
  font-family: 'Merriweather', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.45rem;
  line-height: 1.55;
  color: var(--brown);
  margin-bottom: 40px;
}
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--brown);
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 14px rgba(196, 101, 42, 0.25);
}
.author-avatar-img {
  background: var(--cream-soft);
  padding: 0;
}
.author-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-info { flex: 1; }
.author-name {
  font-weight: 800;
  color: var(--chocolate);
  font-size: 0.95rem;
}
.post-date-line {
  font-size: 0.82rem;
  opacity: 0.75;
  margin-top: 2px;
}
.read-time-badge {
  padding: 6px 14px;
  background: rgba(196, 101, 42, 0.08);
  color: var(--accent);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.78rem;
}

/* Post hero image */
.post-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 48px;
  border: 2px solid var(--border);
  box-shadow: 0 20px 60px rgba(42, 24, 16, 0.08);
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rendered markdown content — editorial reading experience */
.post-body {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  line-height: 1.85;
  color: #2A1810;
  font-weight: 400;
  letter-spacing: 0;
}
.post-body p {
  margin-bottom: 1.6em;
}

/* First paragraph is a lede — larger, brown, italic, elegant */
.post-body > p:first-of-type {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.65;
  color: var(--brown);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 2em;
}

.post-body h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-top: 3em;
  margin-bottom: 0.8em;
  color: var(--chocolate);
  position: relative;
  padding-left: 28px;
  background: linear-gradient(135deg, var(--chocolate) 0%, var(--brown) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.post-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 6px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(196, 101, 42, 0.3);
}
.post-body h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  color: var(--chocolate);
}

/* Tool heading with inline logo */
.post-body h3.tool-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  font-style: normal;
  margin-top: 2.5em;
}
.post-body h3.tool-heading .tool-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--cream-soft);
  border: 1px solid var(--border);
  padding: 6px;
  flex-shrink: 0;
  margin: 0;
  box-shadow: 0 4px 12px rgba(42, 24, 16, 0.08);
}
.post-body h3.tool-heading a {
  color: var(--chocolate);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.post-body h3.tool-heading a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.post-body em {
  font-style: italic;
  color: var(--brown);
}
.post-body strong {
  color: var(--accent);
  font-weight: 700;
  font-family: 'Merriweather', Georgia, serif;
}
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;
}
.post-body a:hover { color: #A85420; }
.post-body ul, .post-body ol {
  margin-bottom: 1.4em;
  padding-left: 1.8em;
}
.post-body li {
  margin-bottom: 0.5em;
}
.post-body li::marker { color: var(--accent); }
.post-body blockquote {
  border-left: 4px solid var(--gold);
  background: rgba(212, 169, 100, 0.08);
  padding: 20px 28px;
  margin: 1.8em 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--brown);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body code {
  background: rgba(42, 24, 16, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
  color: var(--accent);
}
.post-body pre {
  background: var(--chocolate);
  color: var(--gold-light);
  padding: 24px 28px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 1.8em 0;
  border: 1px solid var(--brown);
}
.post-body pre code {
  background: transparent;
  padding: 0;
  color: var(--gold-light);
  font-size: 0.9rem;
  line-height: 1.6;
}
.post-body img {
  max-width: 100%;
  border-radius: 16px;
  margin: 1.8em 0;
  border: 2px solid var(--border);
}
.post-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 3em 0;
}

/* Tags */
.post-tags {
  margin: 60px 0 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.post-tag {
  display: inline-block;
  padding: 8px 16px;
  background: var(--cream-soft);
  border: 1px solid var(--border);
  color: var(--brown);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Related posts */
.related-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}
.related-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--chocolate), var(--brown) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.related-card {
  background: var(--cream-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.related-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  transition: height 0.4s;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(196, 101, 42, 0.1);
}
.related-card:hover::before { height: 100%; }
.related-card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--chocolate);
}
.related-card p {
  font-size: 0.88rem;
  color: var(--brown);
  line-height: 1.5;
}

/* CTA block */
.blog-cta {
  max-width: 800px;
  margin: 60px auto 0;
  padding: 50px 40px;
  background: linear-gradient(135deg, var(--chocolate), #3D2215, var(--brown));
  border-radius: 24px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.blog-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(196, 101, 42, 0.15), transparent 70%);
}
.blog-cta > * { position: relative; z-index: 1; }
.blog-cta h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-cta p {
  font-size: 1rem;
  color: rgba(245, 240, 234, 0.8);
  margin-bottom: 28px;
  line-height: 1.6;
}
.blog-cta-btn {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--accent), #D47A3A);
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.03em;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(196, 101, 42, 0.4);
  transition: all 0.3s;
}
.blog-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(196, 101, 42, 0.5);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--chocolate), #1F110A);
  padding: 60px 24px 40px;
  text-align: center;
  color: rgba(245, 240, 234, 0.7);
}
footer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
footer a:hover { color: var(--gold-light); }
.footer-copyright {
  font-size: 0.85rem;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 169, 100, 0.15);
  margin-top: 20px;
}

/* Mobile */
@media (max-width: 768px) {
  .header-inner { padding: 18px 20px; }
  .breadcrumb { padding: 28px 20px 16px; font-size: 0.85rem; }
  article { padding: 20px 20px 60px; }
  .post-excerpt { font-size: 1.2rem; line-height: 1.6; }
  .post-body { font-size: 1.12rem; line-height: 1.8; }
  .post-body > p:first-of-type { font-size: 1.28rem; line-height: 1.6; }
  .post-body h2 { font-size: 1.85rem; padding-left: 18px; margin-top: 2.4em; }
  .post-body h3 { font-size: 1.45rem; }
  .post-body h3.tool-heading { gap: 14px; }
  .post-body h3.tool-heading .tool-logo { width: 46px; height: 46px; }
  .post-meta-bar { gap: 14px; flex-wrap: wrap; }
  .blog-cta { padding: 40px 24px; margin-top: 40px; }
  .related-section { padding: 40px 20px 80px; }
}
