/* ========== Blog Template Styles ========== */
/* Theme colors — single place to change for the whole site */
:root {
  --brand: #1B5E7E;
  --brand-dark: #154D68;
  --accent: #B45309;
  --accent-dark: #8B3F06;
  --bg: #FDFAF6;
  --surface: #ffffff;
  --text: #3D3935;
  --text-strong: #2A2623;
  --text-muted: #8A8580;
  --border: #E5E0DA;
  --border-light: #F0EDE8;
}

/* ========== BASE ========== */
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; line-height: 1.6;
}
h1, h2, h3 { font-family: 'Merriweather', Georgia, serif; color: var(--text-strong); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: 5rem; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--brand); color: #fff;
  padding: 0.5rem 1rem; border-radius: 0.375rem;
  font-size: 0.875rem; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 0.75rem; }

/* ========== HEADER ========== */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
  display: flex; align-items: center; gap: 0.75rem;
  font-weight: 600; font-size: 0.875rem; color: var(--text-strong);
  text-decoration: none;
}
.header-logo:hover { color: var(--text-strong); }
.logo-icon {
  width: 1.75rem; height: 1.75rem; border-radius: 0.375rem;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
}
.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted); text-decoration: none;
  padding: 0.75rem 0; min-height: 3rem; display: inline-flex; align-items: center;
}
.header-nav a:hover { color: var(--text-strong); }
.btn-header {
  background: var(--brand); color: #fff !important;
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 600; transition: background 0.15s;
}
.btn-header:hover { background: var(--brand-dark); }

/* ========== HERO ========== */
.hero-image { max-width: 48rem; margin: 0 auto; padding: 2rem 1.5rem 0; }
.hero-image img {
  width: 100%; height: 20rem; object-fit: cover; border-radius: 1rem;
  display: block;
}

/* ========== CONTENT ========== */
.content-wrap { max-width: 42rem; margin: 0 auto; padding: 0 1.5rem; }

/* ========== POST META ========== */
.post-meta { padding: 2rem 0 0; }
.category-pill {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand); padding: 0.25rem 0.75rem; border-radius: 9999px;
}
.read-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.75rem; }
.post-title {
  font-size: 3rem; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; margin: 1rem 0 0.75rem;
}
.post-byline { font-size: 0.875rem; color: var(--text-muted); margin: 0; }
.post-byline .reviewed { color: var(--accent); font-weight: 500; }

/* ========== AUTHOR CARD ========== */
.author-card {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.25rem 0 2rem; padding: 1rem 1.25rem;
  border-radius: 0.75rem; background: var(--border-light);
}
.author-card img { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-card .name { font-weight: 600; font-size: 0.9375rem; color: var(--text-strong); }
.author-card .role { font-size: 0.8125rem; color: var(--text-muted); }

/* ========== TABLE OF CONTENTS ========== */
.toc {
  background: var(--border-light); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 1.25rem 1.5rem; margin: 0 0 2rem;
}
.toc-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.toc ol { list-style: decimal; padding-left: 1.25rem; margin: 0; }
.toc li { margin-bottom: 0.25rem; }
.toc a {
  font-size: 0.875rem; color: var(--text-muted); text-decoration: none;
  display: inline-block; padding: 0.375rem 0; min-height: 2.75rem;
  line-height: 1.5;
}
.toc a:hover { color: var(--text-strong); }

/* ========== PROSE ========== */
.prose h2 {
  font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.prose h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; margin: 2rem 0 0.5rem; }
.prose p { font-size: 1.125rem; line-height: 1.65; margin-bottom: 1.25rem; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.prose li { font-size: 1.125rem; line-height: 1.65; margin-bottom: 0.5rem; color: var(--text); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--brand-dark); }

/* ========== AUTHOR BIO ========== */
.author-bio {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 2rem 0; margin-top: 2.5rem; border-top: 1px solid var(--border);
}
.author-bio img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-bio .name { font-weight: 600; color: var(--text-strong); }
.author-bio .name .reviewed { color: var(--accent); font-weight: 500; }
.author-bio .bio { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-top: 0.25rem; }

/* ========== RELATED POSTS ========== */
.related-posts { padding: 2rem 0; border-top: 1px solid var(--border); }
.related-posts-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 1rem;
}
.related-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.related-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.875rem 1rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.15s; color: inherit; text-decoration: none;
}
.related-card:hover { border-color: var(--brand); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 10%, transparent); }
.related-card .title { font-size: 0.9375rem; font-weight: 600; color: var(--text-strong); line-height: 1.35; }
.related-card:hover .title { color: var(--brand); }
.related-card .chevron { width: 1rem; height: 1rem; color: var(--border); flex-shrink: 0; margin-left: auto; }
.related-card:hover .chevron { color: var(--brand); }

/* ========== FOOTER ========== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; }
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.footer-copy { font-size: 0.8125rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1rem; margin-top: 0.5rem; }
.footer-links a { font-size: 0.8125rem; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-strong); }

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 50;
  width: 3rem; height: 3rem; background: var(--brand); color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  .post-title { font-size: 3rem; }
  .hero-image img { height: 24rem; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .hero-image img { height: 28rem; }
}
@media print {
  .site-header, .site-footer, .back-to-top { display: none; }
  .prose { font-size: 12pt; max-width: 100%; }
  body { background: white; }
}
