/* ═══════════════════════════════════════════
   BLOGGING HOUSE — Design System v3
   Publication-grade. Fast. SEO-aware.
   ═══════════════════════════════════════════ */

/* ── Variables ───────────────────────────── */
:root {
  --blue:          #1e73be;
  --blue-dark:     #155d96;
  --blue-deeper:   #0d4a7a;
  --blue-light:    #e8f3fb;

  --amber:         #f47c3c;
  --amber-dark:    #d4622a;

  --ink:           #1a202c;
  --ink-soft:      #4a5568;
  --ink-muted:     #718096;

  --bg:            #ffffff;
  --bg-soft:       #f8fafc;
  --border:        #e2e8f0;
  --border-soft:   #f0f4f8;

  --shadow-xs:     0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:     0 2px 10px rgba(0,0,0,.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:     0 10px 48px rgba(0,0,0,.14);

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;

  --max-w:    1200px;
  --prose-w:  740px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Sticky single-band header ───────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 2rem;
}
.site-logo img { height: 36px; width: auto; }
.site-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.site-logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block;
  padding: 0.375rem 0.75rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover {
  color: var(--blue);
  background: var(--blue-light);
  text-decoration: none;
}

/* ── Page containers ───────────────────── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 4px 16px rgba(244,124,60,.38);
}
.btn-primary:hover {
  background: var(--amber-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244,124,60,.46);
}
.btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); color: #fff; }
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.9);
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.875rem; }

/* ── Editorial split hero (homepage) ───── */
.hero-editorial {
  background: linear-gradient(135deg, #081f3d 0%, var(--blue-deeper) 40%, #1a5fa0 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero-editorial::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-editorial-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
  align-items: stretch;
  position: relative;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 3.5rem 4.5rem 1.5rem;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.25rem 0.875rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.85);
  width: fit-content;
}
.hero-left h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.125rem;
  color: #fff;
}
.hero-left p {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.72;
  margin-bottom: 2rem;
  max-width: 420px;
}
.hero-actions { display: flex; gap: 0.875rem; flex-wrap: wrap; }

.hero-right { position: relative; min-height: 500px; }
.hero-featured {
  display: block;
  position: absolute;
  inset: 0;
  text-decoration: none;
  overflow: hidden;
}
.hero-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.hero-featured:hover img { transform: scale(1.04); }
.hero-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,20,40,.92) 0%, rgba(5,20,40,.3) 55%, transparent 100%);
}
.hero-featured-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(255,255,255,0.07);
}
.hero-featured-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.75rem 1.75rem;
  color: #fff;
  z-index: 1;
}
.hero-featured-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}
.hero-featured-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.32;
  color: #fff;
  margin: 0.5rem 0 0.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.hero-featured-body p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.72);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.hero-featured:hover .hero-featured-body h2 { text-decoration: underline; }

/* ── Stats bar ──────────────────────────── */
.stats-bar {
  background: var(--blue-deeper);
  color: rgba(255,255,255,0.9);
  padding: 0.75rem 0;
  font-size: 0.875rem;
}
.stats-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.stats-bar-item { display: flex; align-items: center; gap: 0.5rem; }
.stats-bar-item strong { font-weight: 700; color: #fff; }

/* ── Category tiles ─────────────────────── */
.cat-tiles {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.cat-tiles-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.cat-tiles-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.cat-tiles-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1.375rem 0.625rem;
  border-radius: var(--r-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 900;
  background: rgba(255,255,255,0.3);
  margin-bottom: 0.25rem;
}
.cat-tile-name { line-height: 1.3; }
.cat-tile-count { font-size: 0.7rem; font-weight: 500; opacity: 0.65; }

.cat-tile-blogging-tips { background: #dbeafe; color: #1e40af; }
.cat-tile-seo           { background: #dcfce7; color: #14532d; }
.cat-tile-make-money    { background: #fef9c3; color: #713f12; }
.cat-tile-wordpress-tips { background: #ede9fe; color: #4c1d95; }
.cat-tile-reviews       { background: #fee2e2; color: #7f1d1d; }
.cat-tile-web-hostings  { background: #ffedd5; color: #7c2d12; }
.cat-tile-interviews    { background: #cffafe; color: #083344; }

/* ── Section ────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-bg { background: var(--bg-soft); }
.section-posts { background: var(--bg-soft); padding: 3.5rem 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}
.section-title { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.section-title span { color: var(--blue); }
.section-view-all { font-size: 0.875rem; font-weight: 500; color: var(--blue); }

/* ── Post grid ──────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

/* ── Post card ──────────────────────────── */
.post-card {
  background: var(--bg);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 3px solid transparent;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.post-card:has(.badge-blogging-tips):hover  { border-top-color: #1e40af; }
.post-card:has(.badge-seo):hover            { border-top-color: #14532d; }
.post-card:has(.badge-make-money):hover     { border-top-color: #92400e; }
.post-card:has(.badge-wordpress-tips):hover { border-top-color: #4c1d95; }
.post-card:has(.badge-reviews):hover        { border-top-color: #7f1d1d; }
.post-card:has(.badge-web-hostings):hover   { border-top-color: #7c2d12; }
.post-card:has(.badge-interviews):hover     { border-top-color: #083344; }
.post-card:has(.badge-internet):hover       { border-top-color: #065f46; }
.post-card:has(.badge-marketing):hover      { border-top-color: #9d174d; }

.post-card-img-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}
.post-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}
.post-card:hover .post-card-img-wrap img { transform: scale(1.05); }

.post-card-img-placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--blue-light) 0%, #dbeafe 50%, #eff6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.post-card-img-placeholder::before {
  content: attr(data-letter);
  font-size: 5rem;
  font-weight: 900;
  color: var(--blue);
  opacity: 0.12;
  line-height: 1;
  user-select: none;
}
.post-card-img-placeholder .placeholder-label {
  position: absolute;
  bottom: 0.75rem;
  left: 0.875rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.6;
}

.post-card-body {
  padding: 1.25rem 1.375rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-cats { margin-bottom: 0.625rem; }
.post-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.625rem;
  flex: 1;
}
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--blue); text-decoration: none; }
.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}

/* Featured card — spans full grid width */
.post-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-card-featured .post-card-img-wrap {
  width: 46%;
  flex-shrink: 0;
  aspect-ratio: unset;
  min-height: 300px;
}
.post-card-featured .post-card-body {
  padding: 2rem 2.5rem;
  justify-content: center;
}
.post-card-featured .post-card-title {
  font-size: 1.5rem;
  flex: unset;
  margin-bottom: 0.75rem;
}
.post-card-featured .post-card-excerpt {
  -webkit-line-clamp: 4;
  font-size: 0.9375rem;
}

/* ── Category badges ────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s;
}
.badge:hover { opacity: 0.8; text-decoration: none; }

.badge-blogging-tips, .badge-blogging   { background: #dbeafe; color: #1d4ed8; }
.badge-seo                              { background: #dcfce7; color: #166534; }
.badge-make-money                       { background: #fef3c7; color: #92400e; }
.badge-wordpress-tips, .badge-wordpress { background: #ede9fe; color: #5b21b6; }
.badge-reviews                          { background: #fee2e2; color: #991b1b; }
.badge-interviews                       { background: #cffafe; color: #0e7490; }
.badge-web-hostings, .badge-web-hosting { background: #ffedd5; color: #9a3412; }
.badge-internet                         { background: #d1fae5; color: #065f46; }
.badge-marketing                        { background: #fce7f3; color: #9d174d; }
.badge-giveaways                        { background: #e0e7ff; color: #3730a3; }
.badge-shopify                          { background: #ecfdf5; color: #047857; }
.badge-default, .badge-                 { background: var(--bg-soft); color: var(--ink-soft); }

/* ── Single post ────────────────────────── */
.post-hero-img {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: var(--bg-soft);
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr min(var(--prose-w), 100%) 1fr;
}
.post-layout > * { grid-column: 2; }

.post-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.875rem; }

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.post-meta-item { display: flex; align-items: center; gap: 0.375rem; }
.post-meta strong { color: var(--ink-soft); font-weight: 600; }

/* ── TOC sidebar ─────────────────────────  */
.toc-wrap { display: none; }

/* ── Prose typography ─────────────────── */
.prose {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--ink);
}
.prose h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 2.75rem 0 1rem;
  color: var(--ink);
}
.prose h3 { font-size: 1.25rem; font-weight: 700; margin: 2.25rem 0 0.75rem; }
.prose h4 { font-size: 1.0625rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
.prose p { margin-bottom: 1.5rem; }
.prose a { color: var(--blue); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-dark); }
.prose strong { font-weight: 700; }

.prose ul, .prose ol { padding-left: 1.75rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li > ul, .prose li > ol { margin-top: 0.5rem; margin-bottom: 0; }

.prose blockquote {
  border-left: 4px solid var(--blue);
  background: var(--blue-light);
  padding: 1.125rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--ink-soft);
}
.prose blockquote p { margin-bottom: 0; }

.prose img {
  border-radius: var(--r-sm);
  margin: 1.75rem auto;
  box-shadow: var(--shadow-sm);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
}
.prose th {
  background: var(--bg-soft);
  font-weight: 700;
  text-align: left;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
}
.prose td { padding: 0.625rem 1rem; border: 1px solid var(--border); }
.prose tr:nth-child(even) td { background: var(--bg-soft); }

.prose code {
  background: var(--bg-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  color: #c53030;
}
.prose pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.375rem 1.5rem;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: 1.75rem 0;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: 0.875rem; }
.prose hr { border: none; border-top: 2px solid var(--border); margin: 3rem 0; }

/* ── Post CTA box ───────────────────────── */
.post-cta {
  background: linear-gradient(135deg, var(--blue-deeper), var(--blue));
  color: #fff;
  padding: 2.5rem;
  border-radius: var(--r-lg);
  text-align: center;
  margin: 3rem 0;
  grid-column: 2;
}
.post-cta h3 { color: #fff; font-size: 1.375rem; font-weight: 700; margin-bottom: 0.5rem; }
.post-cta p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; font-size: 1rem; }

/* ── Author bio ─────────────────────────── */
.author-bio {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  display: flex;
  gap: 1.375rem;
  align-items: flex-start;
  margin: 0 0 2rem;
  background: var(--bg-soft);
  grid-column: 2;
}
.author-bio-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.author-bio-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.125rem; }
.author-bio-role { font-size: 0.8125rem; color: var(--ink-muted); margin-bottom: 0.625rem; }
.author-bio-text { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.7; margin: 0; }

/* ── Category / Archive hero ─────────────  */
.archive-hero {
  color: #fff;
  padding: 4rem 0 3.25rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-deeper) 0%, var(--blue) 100%);
}
.archive-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.archive-hero[data-cat="blogging-tips"]  { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); }
.archive-hero[data-cat="seo"]            { background: linear-gradient(135deg, #14532d 0%, #16a34a 100%); }
.archive-hero[data-cat="make-money"]     { background: linear-gradient(135deg, #78350f 0%, #d97706 100%); }
.archive-hero[data-cat="wordpress-tips"] { background: linear-gradient(135deg, #3b0764 0%, #7c3aed 100%); }
.archive-hero[data-cat="reviews"]        { background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%); }
.archive-hero[data-cat="interviews"]     { background: linear-gradient(135deg, #083344 0%, #0891b2 100%); }
.archive-hero[data-cat="web-hostings"]   { background: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%); }
.archive-hero[data-cat="internet"]       { background: linear-gradient(135deg, #052e16 0%, #059669 100%); }
.archive-hero[data-cat="marketing"]      { background: linear-gradient(135deg, #500724 0%, #be185d 100%); }

.archive-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}
.archive-hero .breadcrumb { margin-bottom: 1.25rem; }
.archive-hero .breadcrumb a,
.archive-hero .breadcrumb-sep,
.archive-hero .breadcrumb-current { color: rgba(255,255,255,0.65); }
.archive-hero .breadcrumb a:hover { color: rgba(255,255,255,0.95); }
.archive-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0.875rem 0 0.5rem;
  color: #fff;
}
.archive-desc {
  color: rgba(255,255,255,0.82);
  font-size: 1.0625rem;
  line-height: 1.68;
  max-width: 600px;
}
.archive-count {
  display: inline-block;
  margin-top: 1.125rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.25rem 0.875rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

/* ── Static pages ───────────────────────── */
.page-content {
  max-width: var(--prose-w);
  margin: 3rem auto;
  padding: 0 1.5rem 5rem;
}
.page-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

/* ── 404 / 410 ──────────────────────────── */
.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--blue); margin-bottom: 0.5rem; }
.error-page h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.error-page p { color: var(--ink-soft); margin-bottom: 2rem; }

/* ── Footer ─────────────────────────────── */
.site-footer {
  background: #1a202c;
  color: #a0aec0;
  padding: 4rem 0 0;
  margin-top: 5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand .site-logo-text { color: #f7fafc; font-size: 1.25rem; display: block; margin-bottom: 0.875rem; }
.footer-brand p { font-size: 0.875rem; line-height: 1.75; max-width: 280px; }
.footer-col h4 {
  color: #e2e8f0;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: #a0aec0; font-size: 0.875rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.375rem 1.5rem;
  border-top: 1px solid #2d3748;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #718096;
}
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: #718096; }
.footer-bottom-links a:hover { color: #fff; text-decoration: none; }

/* ── Reading progress bar ───────────────── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--amber);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ── Breadcrumb ─────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 1.375rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--blue); text-decoration: none; }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--ink-soft); font-weight: 500; }

/* ── Related posts ──────────────────────── */
.related-posts {
  grid-column: 1 / -1;
  border-top: 2px solid var(--border);
  padding-top: 3rem;
  margin-top: 1rem;
}
.related-posts-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.75rem; }
.related-posts-title span { color: var(--blue); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: 0.875rem 1rem 1.125rem; }
.related-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-title:hover { color: var(--blue); }
.related-card-meta { font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.5rem; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-img-wrap { width: 100%; min-height: unset; }
  .post-card-featured .post-card-body { padding: 1.375rem; justify-content: flex-start; }
  .post-card-featured .post-card-title { font-size: 1.25rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (min-width: 1100px) {
  .post-layout {
    grid-template-columns: 1fr min(var(--prose-w), 100%) 260px;
    column-gap: 3rem;
  }
  .post-layout > * { grid-column: 2; }
  .post-cta { grid-column: 2; }
  .author-bio { grid-column: 2; }
  .related-posts { grid-column: 1 / -1; }
  .toc-wrap {
    display: block;
    grid-column: 3;
    grid-row: 2 / 20;
    align-self: start;
    position: sticky;
    top: 80px;
  }
}

.toc-inner {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.375rem 1.25rem;
}
.toc-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-link {
  display: block;
  padding: 0.3rem 0.625rem;
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.12s, background 0.12s;
  border-left: 2px solid transparent;
}
.toc-link:hover { color: var(--blue); background: var(--blue-light); text-decoration: none; }
.toc-link.toc-active { color: var(--blue); border-left-color: var(--blue); background: var(--blue-light); font-weight: 600; }

@media (max-width: 900px) {
  .cat-tiles-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .hero-editorial-inner { grid-template-columns: 1fr; }
  .hero-right { min-height: 280px; }
  .hero-left { padding: 3rem 1.5rem 2rem; }
  .site-nav { display: none; }
  .post-grid { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  .post-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3.5rem;
  }
  .post-layout > * { grid-column: 1; }
  .post-cta { grid-column: 1; }
  .related-posts { grid-column: 1; }
  .author-bio { grid-column: 1; flex-direction: column; }
  .archive-hero { padding: 2.5rem 0 2rem; }
  .post-hero-img { max-height: 240px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .cat-tiles-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-left h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .post-meta { gap: 0.75rem; }
  .stats-bar-inner { gap: 1.5rem; }
}

/* ── Comments — WordPress-style threading ── */
.comments {
  grid-column: 2;
  border-top: 2px solid var(--border);
  padding-top: 3rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}
.comments-heading {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* Top-level list */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-list > .comment { border-bottom: 1px solid var(--border-soft); }
.comment-list > .comment:last-child { border-bottom: none; }

/* Each comment item */
.comment { padding: 1.5rem 0; }

.comment-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Avatar — shrinks per depth */
.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 800;
  flex-shrink: 0;
}
.depth-2 > .comment-inner > .comment-avatar {
  width: 38px;
  height: 38px;
  font-size: 0.9rem;
  background: var(--blue-light);
  color: var(--blue);
}
.depth-3 > .comment-inner > .comment-avatar {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

/* Comment text area */
.comment-wrap { flex: 1; min-width: 0; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.comment-author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
}
.comment-author a { color: var(--ink); }
.comment-author a:hover { color: var(--blue); text-decoration: none; }
.comment-says {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.comment-date {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-left: auto;
}
.comment-content {
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* Nested children — indented with left border */
.children {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 3.5rem;
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
}
.children .children {
  margin-left: 2.5rem;
  border-left-color: var(--border-soft);
}

.comments-closed {
  margin-top: 2rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
}

@media (max-width: 1100px) { .comments { grid-column: 1; } }
@media (max-width: 600px) {
  .children { margin-left: 1.75rem; padding-left: 1rem; }
  .children .children { margin-left: 1.25rem; }
  .comment-date { margin-left: 0; }
}
@media (max-width: 480px) {
  .comment-avatar { width: 36px; height: 36px; font-size: 0.875rem; }
  .depth-2 > .comment-inner > .comment-avatar { width: 30px; height: 30px; }
  .depth-3 > .comment-inner > .comment-avatar { width: 24px; height: 24px; }
}
