/* =============================================================
   LEADOC GHOST THEME — точное воспроизведение стиля leadoc.ru
   ============================================================= */

:root {
  --bg-0: #0A1020;
  --bg-1: #111528;
  --card: #141B2B;
  --stroke: #1E222F;
  --text: #E9ECF3;
  --muted: #AAB2C5;
  --muted-2: #7F8AA3;
  --accent: #885BEF;
  --accent-2: #AD9FDB;
  --pink: #FF6B9D;
  --success: #37925F;
  --shadow: 0 20px 80px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 26px;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background-color: var(--bg-0);
  scrollbar-width: thin;
  scrollbar-color: var(--muted-2) var(--stroke);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg-0);
  background:
    radial-gradient(800px 600px at 85% 8%, rgba(255,107,157,.08), transparent 70%),
    radial-gradient(1000px 800px at 70% 12%, rgba(136,91,239,.18), transparent 70%),
    radial-gradient(800px 700px at 10% 18%, rgba(173,159,219,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, #080B14 100%);
  background-attachment: fixed;
  overflow-x: clip;
  line-height: 1.6;
}
body.menu-open {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.container {
  width: min(var(--container), 92vw);
  margin: 0 auto;
  padding: 0 20px;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}
.animate-on-scroll.delay-1 { animation-delay: 0.05s; }
.animate-on-scroll.delay-2 { animation-delay: 0.10s; }
.animate-on-scroll.delay-3 { animation-delay: 0.15s; }
.animate-on-scroll.delay-4 { animation-delay: 0.20s; }
.animate-on-scroll.delay-5 { animation-delay: 0.25s; }
.animate-on-scroll.delay-6 { animation-delay: 0.30s; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,16,32,.6);
  border-bottom: none;
  transition: all 0.3s ease;
}
.topbar.scrolled {
  background: rgba(10,16,32,.85);
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 77px;
  padding: 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.brand:hover { opacity: 0.85; }
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-subtitle { font-size: 11px; color: var(--muted); margin-top: 2px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a {
  opacity: 0.9;
  transition: all 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { opacity: 1; color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active {
  color: var(--accent-2);
  opacity: 1;
}
.nav-links a.active::after { width: 100%; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(20,27,43,.6);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
  position: relative;
}
.menu-toggle:hover { background: rgba(20,27,43,.85); }
.menu-toggle-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: opacity 0.2s;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { bottom: -6px; }
.menu-toggle-close {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { opacity: 0; pointer-events: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: flex; }

/* ===== KICKER / DOT ===== */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(20,27,43,.45);
  color: var(--muted);
  font-size: 13px;
  animation: fadeInUp 0.6s ease-out;
  margin-bottom: 20px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(55,146,95,.15);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ===== BLOG HERO ===== */
.blog-hero {
  position: relative;
  overflow: hidden;
  margin-top: -77px;
  padding-top: 77px;
}
.blog-hero-fullbg {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
}
.blog-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.blog-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: 0;
}
.blog-hero-slide.active {
  opacity: 0.82;
  z-index: 1;
}
.hero-slider-progress {
  position: absolute;
  right: 20px;
  bottom: 32px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-slider-progress-segment {
  width: 48px;
  height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.hero-slider-progress-segment:hover {
  background: rgba(255,255,255,.35);
}
.hero-slider-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: none;
}
.hero-slider-progress-segment.active .hero-slider-progress-fill {
  animation: hero-slider-fill 8s linear forwards;
}
@keyframes hero-slider-fill {
  to { width: 100%; }
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,16,32,.88) 0%, transparent 55%),
    linear-gradient(135deg, rgba(10,16,32,.75) 0%, transparent 50%, transparent 100%);
  z-index: 1;
}
.blog-hero-caption {
  position: relative;
  z-index: 2;
  width: min(var(--container), 92vw);
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 20px 60px;
  box-sizing: border-box;
  align-self: flex-end;
}
.blog-hero-caption-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--text);
  max-width: 20ch;
  animation: fadeInUp 0.6s ease-out both;
}
.blog-hero-caption-desc {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-subscribe {
  margin-top: 28px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-subscribe-cta {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 12px;
}
/* Состояния формы подписки (Ghost добавляет .success / .error к form) */
.hero-subscribe-form .success,
.hero-subscribe-form .error {
  display: none;
  margin-top: 12px;
  font-size: 14px;
}
.hero-subscribe-form.success .subscribe-form-fields { display: none !important; }
.hero-subscribe-form.success .hero-subscribe-error { display: none !important; }
.hero-subscribe-form.success .success { display: block !important; color: var(--success); }
.hero-subscribe-form.error .error { display: block !important; }
.hero-subscribe-form.error .hero-subscribe-error { display: block !important; }

.hero-subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 420px;
}
.hero-subscribe-form .subscribe-form-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.hero-subscribe-input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(20,27,43,.6);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-subscribe-input::placeholder {
  color: var(--muted-2);
}
.hero-subscribe-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(136,91,239,.2);
}
.hero-subscribe-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
}
.hero-subscribe-btn:hover {
  background: linear-gradient(135deg, #7a4ef5, var(--accent-2));
}
.hero-subscribe-error {
  margin-top: 10px;
  font-size: 14px;
  color: var(--pink);
  display: none;
}

.hero-sub {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0 auto 12px;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}
.hero-sub-sm {
  color: var(--muted-2);
  font-size: 14px;
  margin: 8px auto 0;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

/* ===== POSTS SECTION ===== */
.posts-section { padding: 40px 0 100px; }

/* ===== FEATURED POST ===== */
.featured-post { margin-bottom: 60px; }
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius2);
  background: rgba(20,27,43,.7);
  border: 1px solid rgba(30,34,47,.95);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  min-height: 360px;
}
.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 100px rgba(136,91,239,.2);
  border-color: rgba(136,91,239,.4);
}
.featured-image-wrap {
  position: relative;
  overflow: hidden;
  display: block;
}
.featured-image {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.featured-card:hover .featured-image { transform: scale(1.04); }
.featured-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,16,32,.3), transparent);
}
.featured-content {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.featured-content h2 {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.featured-content h2 a { transition: color 0.2s; }
.featured-content h2 a:hover { color: var(--accent-2); }
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(136,91,239,.2);
  border: 1px solid rgba(136,91,239,.4);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
}

/* ===== POSTS GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.posts-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ===== POST CARD ===== */
.post-card {
  border-radius: var(--radius2);
  background: rgba(20,27,43,.65);
  border: 1px solid rgba(30,34,47,.95);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 80px rgba(255,107,157,.15);
  border-color: rgba(136,91,239,.4);
}
.post-card-image-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}
.post-card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.post-card:hover .post-card-image { transform: scale(1.05); }
.post-card-no-image {
  background: rgba(10,16,32,.5);
}
.post-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  opacity: 0.4;
}
.post-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.post-card-content h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.post-card-content h3 a { transition: color 0.2s; }
.post-card-content h3 a:hover { color: var(--accent-2); }

/* ===== TAGS FILTER ===== */
.tags-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--stroke);
}
.tags-filter-item {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tags-filter-item:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(136,91,239,.4);
  color: var(--text);
}
.tags-filter-item.active {
  background: rgba(136,91,239,.22);
  border-color: rgba(136,91,239,.5);
  color: var(--accent-2);
}

/* ===== POST META ===== */
.post-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(136,91,239,.18);
  border: 1px solid rgba(136,91,239,.35);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s;
  width: fit-content;
}
.post-tag:hover {
  background: rgba(136,91,239,.28);
  border-color: rgba(136,91,239,.55);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.post-excerpt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--muted-2);
  font-size: 13px;
}
.reading-time { color: var(--muted-2); font-size: 13px; }

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(136,91,239,.3);
}
.author-avatar-placeholder {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(136,91,239,.4), rgba(255,107,157,.3));
  border: 2px solid rgba(136,91,239,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-2);
  flex-shrink: 0;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 60px;
  flex-wrap: wrap;
}
.pagination a,
.pagination .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px; height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(20,27,43,.55);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.pagination a:hover {
  border-color: rgba(136,91,239,.5);
  color: var(--text);
  background: rgba(136,91,239,.15);
}
.pagination .page-number { color: var(--text); }

/* ===== SINGLE POST ===== */
.post-header {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
  text-align: center;
}
.post-header-with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 280px;
  max-height: 50vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
}
.post-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,16,32,.75) 0%, rgba(10,16,32,.92) 100%);
  z-index: 0;
}
.post-header-with-bg .post-header-inner { position: relative; z-index: 1; }
.post-header .container { position: relative; z-index: 1; }
.post-header-caption {
  margin: 16px auto 0;
  font-size: 13px;
  color: var(--muted-2);
  max-width: 60ch;
}
.post-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.post-title {
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
  animation: fadeInUp 0.7s ease-out both;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.post-deck {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 70ch;
  margin: 0 auto 28px;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}
.post-author-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}
.author-name { font-size: 15px; font-weight: 700; }
.post-date { font-size: 13px; color: var(--muted); }

/* Feature image as background — отдельный блок убран в пользу фона в header */

/* Post body layout */
.post-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
  padding-top: 48px;
}

/* Post content (Ghost content styles) */
.post-content.gh-content {
  min-width: 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}
.gh-content h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 2em 0 0.75em;
  color: var(--text);
}
.gh-content h3 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: var(--text);
}
.gh-content h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
}
.gh-content p {
  margin: 0 0 1.4em;
  color: rgba(233,236,243,.9);
}
.gh-content a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(173,159,219,.4);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.gh-content a:hover {
  color: var(--pink);
  text-decoration-color: rgba(255,107,157,.6);
}
.gh-content ul, .gh-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.6em;
  color: rgba(233,236,243,.9);
}
.gh-content li { margin-bottom: 0.5em; }
.gh-content blockquote {
  margin: 2em 0;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: rgba(136,91,239,.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
}
.gh-content blockquote p { color: var(--muted); margin: 0; }
.gh-content code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.875em;
  background: rgba(136,91,239,.15);
  border: 1px solid rgba(136,91,239,.25);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--accent-2);
}
.gh-content pre {
  background: rgba(10,16,32,.8);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  margin: 0 0 1.8em;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}
.gh-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto 1.4em;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  object-fit: contain;
}
.gh-content figure {
  margin: 2em 0;
}
.gh-content figcaption {
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 10px;
}
.gh-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke), transparent);
  margin: 3em 0;
}
.gh-content table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 0 0 1.8em;
  font-size: 15px;
  background: rgba(10,16,32,.98);
  color: rgba(233,236,243,.94);
}
.gh-content th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(136,91,239,.22);
  border-bottom: 2px solid rgba(136,91,239,.35);
  color: var(--accent-2) !important;
  font-weight: 700;
}
.gh-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  color: rgba(233,236,243,.94) !important;
}
.gh-content th *,
.gh-content td * {
  color: inherit !important;
}
.gh-content tr:last-child td { border-bottom: none; }
.gh-content tr:hover td { background: rgba(255,255,255,.02); }

/* Callout cards */
.gh-content .kg-callout-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: rgba(136,91,239,.12);
  border: 1px solid rgba(136,91,239,.25);
  margin: 0 0 1.8em;
}
.gh-content .kg-callout-emoji { font-size: 22px; flex-shrink: 0; }
.gh-content .kg-callout-text { color: var(--text); line-height: 1.6; }

/* ===== SIDEBAR ===== */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
}
.sidebar-card {
  border-radius: var(--radius);
  background: rgba(20,27,43,.7);
  border: 1px solid rgba(30,34,47,.95);
  padding: 20px;
}
.sidebar-card h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted-2);
  margin: 0 0 14px;
}
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toc-nav { display: flex; flex-direction: column; gap: 4px; }
.toc-nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 8px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  line-height: 1.4;
}
.toc-nav a:hover,
.toc-nav a.active {
  color: var(--accent-2);
  border-left-color: var(--accent);
  background: rgba(136,91,239,.1);
}
.sidebar-toc { max-height: 400px; overflow-y: auto; }
.sidebar-back .btn { width: 100%; justify-content: center; }

/* ===== BTN ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(20,27,43,.55);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  cursor: pointer;
  user-select: none;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  background: rgba(20,27,43,.75);
}
.btn:active { transform: translateY(0); }

/* ===== POST SUBSCRIBE CTA (lead magnet) ===== */
.post-subscribe-cta {
  padding: 48px 0 56px;
}
.post-subscribe-cta-inner {
  width: 100%;
  padding: 32px 36px 36px;
  background: rgba(20,27,43,.5);
  border: 1px solid rgba(136,91,239,.25);
  border-radius: var(--radius2);
  box-shadow: 0 12px 48px rgba(0,0,0,.2);
}
.post-subscribe-cta-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text);
}
.post-subscribe-cta-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 22px;
}
.post-subscribe-cta-form {
  max-width: 100%;
}
.post-subscribe-cta .hero-subscribe-error,
.post-subscribe-cta .hero-subscribe-msg {
  margin-top: 12px;
}

/* ===== RELATED POSTS ===== */
.post-related {
  padding: 60px 0 80px;
  border-top: 1px solid rgba(30,34,47,.6);
}
.post-related h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 28px;
}

/* ===== AUTHOR HERO ===== */
.author-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.author-hero-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(136,91,239,.4);
  box-shadow: 0 0 0 6px rgba(136,91,239,.1);
}
.author-hero-avatar-placeholder {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(136,91,239,.4), rgba(255,107,157,.3));
  border: 3px solid rgba(136,91,239,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-2);
}

/* ===== FOOTER ===== */
footer {
  padding: 34px 0 60px;
  color: var(--muted-2);
  border-top: 1px solid rgba(30,34,47,.6);
  margin-top: 60px;
}
.foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  font-size: 13px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.foot-copy {
  font-size: 14px;
  color: var(--muted-2);
}
.foot-credit {
  font-size: 12px;
  color: var(--muted-2);
  opacity: 0.7;
}
.foot-credit a { color: inherit; }
.foot-credit a:hover { color: var(--accent-2); opacity: 1; }
.foot a { transition: color 0.2s; }
.foot a:hover { color: var(--accent-2); }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .blog-hero-caption { padding: 32px 20px 48px; }
  .menu-toggle { display: flex; position: relative; z-index: 60; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(10,16,32,.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 80px 20px 20px;
    z-index: 49;
    font-size: 20px;
  }
  .nav-links[aria-hidden="false"] { display: flex; }
  .nav-links a::after { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-image-wrap { aspect-ratio: 16/9; }
  .post-body { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .sidebar-toc { max-height: none; }
  .posts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 640px) {
  .blog-hero-fullbg { min-height: 100vh; }
  .hero-slider-progress { right: 20px; bottom: 24px; gap: 6px; }
  .hero-slider-progress-segment { width: 36px; }
  .blog-hero-caption { padding: 24px 20px 40px; }
  .blog-hero-caption-title { max-width: none; }
  .post-header { padding: 60px 0 40px; }
  .post-header-with-bg { max-height: 50vh; padding: 60px 0 48px; }
  .post-body { padding-top: 40px; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-sm { grid-template-columns: 1fr; }
  .featured-content { padding: 24px; }
  .post-body { margin-bottom: 50px; }
  .post-subscribe-cta-inner { padding: 24px 20px 28px; }
  .post-related { padding: 40px 0 60px; }
  .author-hero { flex-direction: column; text-align: center; }
  .author-hero .kicker { justify-content: center; }
}

/* Page (static) */
.post-body-page {
  grid-template-columns: 1fr;
  max-width: 780px;
}

/* Ghost card assets */
.kg-width-wide {
  margin-left: -80px;
  margin-right: -80px;
}
.kg-width-full {
  margin-left: -100vw;
  margin-right: -100vw;
  width: 100vw;
}
.kg-video-card, .kg-embed-card {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.8em;
}
.kg-bookmark-card {
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(20,27,43,.7);
  overflow: hidden;
  margin: 0 0 1.8em;
  transition: border-color 0.2s;
}
.kg-bookmark-card:hover { border-color: rgba(136,91,239,.4); }
.kg-bookmark-container { display: flex; color: inherit; }
.kg-bookmark-content { padding: 20px; flex: 1; min-width: 0; }
.kg-bookmark-title { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.kg-bookmark-description { color: var(--muted); font-size: 14px; line-height: 1.5; }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
