/*
Theme Name: Vidau AI
Theme URI: https://vidau.ai
Author: Vidau AI Team
Author URI: https://vidau.ai
Description: A cutting-edge AI-focused blog theme for Vidau AI. Built with SEO best practices, schema markup, and geo-targeting support. Features a bold violet-to-magenta gradient identity system with high performance and accessibility.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, ai, technology, custom-colors, custom-logo, featured-images, full-width-template, rtl-language-support, schema, seo, two-columns, translation-ready
Text Domain: vidau-ai

/* =============================================================
   VIDAU AI THEME — CSS DESIGN SYSTEM
   Brand: Violet #1F3080 → Purple #3858E9 → Magenta #6A82EF → Pink #92A3F3
   Accent: White #FFFFFF
   ============================================================= */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Brand Gradient Stops */
  --brand-indigo:    #1F3080;
  --brand-violet:    #2A42AF;
  --brand-purple:    #3858E9;
  --brand-magenta:   #6A82EF;
  --brand-pink:      #92A3F3;

  /* Gradients */
  --gradient-brand:  linear-gradient(135deg, var(--brand-indigo) 0%, var(--brand-purple) 50%, var(--brand-pink) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(31,48,128,0.08) 0%, rgba(146,163,243,0.08) 100%);
  --gradient-card:   linear-gradient(160deg, rgba(31,48,128,0.05) 0%, rgba(56,88,233,0.10) 100%);
  --gradient-text:   linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-pink) 100%);

  /* Neutrals */
  --white:    #FFFFFF;
  --off-white:#F8F6FF;
  --light:    #EEE8FF;
  --muted:    #C8B8F0;
  --body-text:#1A0A35;
  --subtle:   #6B5A8A;
  --border:   rgba(56,88,233,0.18);
  --dark:     #0D0520;

  /* Typography */
  --font-display: 'Clash Display', 'Syne', Georgia, serif;
  --font-body:    'DM Sans', 'Nunito', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing Scale */
  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;
  --space-2xl: 6rem;

  /* Sizing */
  --max-content: 900px;
  --max-wide:    1280px;
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   24px;
  --radius-full: 999px;

  /* Effects */
  --shadow-glow:  0 0 40px rgba(56,88,233,0.22);
  --shadow-card:  0 4px 32px rgba(31,48,128,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 48px rgba(56,88,233,0.22), 0 2px 8px rgba(0,0,0,0.08);
  --transition:   all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Single mode: light only ──────────────────────────────── */
:root {
  --vd-body-bg:     #f8f6ff;
  --vd-body-text:   #1a0835;
  --vd-body-muted:  #6b5a8a;
  --vd-body-border: rgba(56,88,233,.14);
  --vd-card-bg:     #ffffff;
  --vd-card-border: rgba(56,88,233,.12);
  --vd-link:        #7722cc;
  --vd-link-hover:  #92A3F3;
  --vd-subtle:      #6b5a8a;
  --vd-off:         #f0ecff;
  --vd-input-bg:    #ffffff;
  --vd-code-bg:     #ede8ff;
  --vd-code-color:  #5500aa;
}

/* ── Light-only theme (dark mode removed) ─────────────────── */

/* ── Bridge: map old vars to vd-* (light values hardcoded) ── */
body {
  background: var(--vd-body-bg) !important;
  color: var(--vd-body-text) !important;
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  margin-top: 0 !important; /* override WP admin bar push */
}

body {
  margin: 0;
  padding: 0;
}

/* When WP admin bar is present, offset the sticky header so it sits flush */
.admin-bar #site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}
/* For logged-out visitors — make absolutely sure there's no gap */
html:not(.admin-bar) #site-header {
  top: 0;
}

/* Bridge legacy CSS vars → vd-* */
:root {
  --white:    #ffffff;
  --off-white: var(--vd-off);
  --light:    #EEE8FF;
  --body-text: var(--vd-body-text);
  --subtle:    var(--vd-subtle);
  --border:    var(--vd-body-border);
  --dark:      #0D0520;
}

body {
  font-family: var(--font-body);
  color: var(--vd-body-text);
  background: var(--vd-body-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-purple); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-magenta); }
ul, ol { padding-left: 1.5rem; }
button, input, select, textarea { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vd-body-text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: 1.4rem; color: var(--vd-body-text); }

blockquote {
  border-left: 4px solid var(--brand-purple);
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  background: rgba(56,88,233,0.07);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--brand-indigo);
}

code {
  font-family: var(--font-mono);
  background: var(--light);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  color: var(--brand-violet);
}

pre {
  background: var(--dark);
  color: #e2d9ff;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border: 1px solid rgba(56,88,233,0.25);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: var(--space-xl) 0;
}

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container--narrow { max-width: var(--max-content); }
.container--wide   { max-width: 1400px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Skip Link (Accessibility) ──────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-lg);
  background: var(--brand-purple);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Site Header ─────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--vd-body-border);
  transition: var(--transition);
}
#site-header.scrolled {
  box-shadow: 0 4px 24px rgba(31,48,128,0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 68px;
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }

.site-logo img {
  height: 36px;
  width: auto;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.site-title a {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
#primary-navigation { display: flex; align-items: center; gap: var(--space-xs); }
#primary-navigation ul { list-style: none; display: flex; align-items: center; gap: 0; padding: 0; margin: 0; }
#primary-navigation li { position: relative; }
#primary-navigation a {
  display: block;
  padding: 0.45rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--vd-body-text);
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  transition: var(--transition);
}
#primary-navigation a:hover,
#primary-navigation .current-menu-item > a {
  background: rgba(56,88,233,0.07);
  color: var(--brand-purple);
}

/* Submenu */
#primary-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--vd-card-bg);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-xs);
  flex-direction: column;
}
#primary-navigation li:hover > .sub-menu,
#primary-navigation li:focus-within > .sub-menu { display: flex; }
#primary-navigation .sub-menu a {
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: 0 2px 16px rgba(56,88,233,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56,88,233,0.45);
  color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--brand-purple);
  border: 1.5px solid var(--brand-purple);
}
.btn-ghost:hover {
  background: rgba(56,88,233,0.07);
  color: var(--brand-violet);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--vd-body-text);
}
.menu-toggle svg { display: block; }

/* ── Hero Section ────────────────────────────────────────────── */
.site-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0 var(--space-xl);
  background: var(--dark);
}

.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(31,48,128,0.5) 0%, transparent 60%),
    radial-gradient(ellipse 70% 70% at 80% 30%, rgba(106,130,239,0.4) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 60% 80%, rgba(146,163,243,0.3) 0%, transparent 60%);
  pointer-events: none;
}

.site-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(56,88,233,0.2);
  border: 1px solid rgba(106,130,239,0.4);
  color: var(--brand-magenta);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--brand-magenta);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  color: var(--white);
  margin-bottom: var(--space-md);
}
.hero-title span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  color: rgba(255,255,255,0.72);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }

.hero-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition);
}
.hero-card:nth-child(2) {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 88%;
  opacity: 0.6;
  z-index: -1;
  border-radius: var(--radius-lg);
}

.hero-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-magenta);
  margin-bottom: var(--space-sm);
}
.hero-card-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.hero-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.hero-card-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

/* ── Breadcrumbs (SEO) ───────────────────────────────────────── */
.breadcrumbs {
  padding: var(--space-sm) 0;
  font-size: 0.82rem;
  color: var(--vd-body-muted);
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; margin: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; }
.breadcrumbs li:not(:last-child)::after { content: '/'; color: var(--vd-body-muted); }
.breadcrumbs a { color: var(--vd-body-muted); }
.breadcrumbs a:hover { color: var(--brand-purple); }
.breadcrumbs [aria-current="page"] { color: var(--brand-purple); font-weight: 500; }

/* ── Section Headers ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: var(--space-sm);
}
.section-tag::before, .section-tag::after {
  content: '';
  flex: 1;
  height: 1px;
  width: 28px;
  background: var(--brand-purple);
  opacity: 0.5;
}
.section-title { margin-bottom: var(--space-sm); }
.section-title em {
  font-style: normal;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-desc { color: var(--vd-body-muted); max-width: 580px; margin: 0 auto; font-size: 1.05rem; }

/* ── Post Grid ───────────────────────────────────────────────── */
.posts-section { padding: var(--space-2xl) 0; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.posts-grid.featured {
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
}
.posts-grid.featured .post-card:first-child {
  grid-row: span 2;
}

.post-card {
  background: var(--vd-card-bg);
  border: 1px solid var(--vd-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(56,88,233,0.3);
}

.post-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gradient-subtle, rgba(56,88,233,0.07));
  flex-shrink: 0;
  display: block;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.post-card:hover .post-card__thumb img { transform: scale(1.06); }

.post-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(31,48,128,0.18) 0%, rgba(56,88,233,0.22) 50%, rgba(146,163,243,0.18) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* VidAU play icon watermark on placeholder */
.post-card__thumb-placeholder::after {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.7)'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px;
}

.post-card__category {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--gradient-brand);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
}

.post-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--vd-body-muted);
  margin-bottom: var(--space-sm);
}

.post-card__meta time { font-variant-numeric: tabular-nums; }

.post-card__meta .dot {
  width: 3px; height: 3px;
  background: var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--vd-body-text);
  margin-bottom: var(--space-sm);
  transition: var(--transition);
}
.post-card:hover .post-card__title { color: var(--brand-purple); }

.post-card__excerpt {
  font-size: 0.88rem;
  color: var(--vd-body-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--vd-body-border);
}

.post-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.post-card__author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-brand);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(56,88,233,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card__author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
/* Hide default mystery-man Gravatar — show gradient bg instead */
.post-card__author-avatar img[src*="gravatar.com/avatar"][src*="d=mm"] {
  opacity: 0;
}
/* Initial fallback letter — shown behind the avatar, visible when img fails */
.post-card__avatar-initial {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 0;
}
.post-card__author-avatar {
  position: relative;
}
.post-card__author-avatar img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.post-card__author-name { font-size: 0.8rem; font-weight: 600; color: var(--vd-body-text); }

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-purple);
  transition: var(--transition);
}
.read-more-link svg { transition: transform 0.2s; }
.read-more-link:hover { color: var(--brand-magenta); }
.read-more-link:hover svg { transform: translateX(3px); }

/* Featured post card overrides */
.post-card--featured .post-card__thumb { aspect-ratio: 4/3; }
.post-card--featured .post-card__title { font-size: 1.45rem; }
.post-card--featured .post-card__excerpt { -webkit-line-clamp: 4; }

/* ── Single Post ─────────────────────────────────────────────── */
.single-post { padding: var(--space-xl) 0 var(--space-2xl); }

.post-header { margin-bottom: var(--space-xl); }

.post-header__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.cat-badge {
  background: var(--gradient-brand);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.post-header__title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--vd-body-border);
  border-bottom: 1px solid var(--vd-body-border);
  margin-bottom: var(--space-lg);
}

.post-author-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.post-author-card__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.post-author-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-card__name { font-weight: 700; font-size: 0.9rem; color: var(--vd-body-text); }
.post-author-card__date { font-size: 0.78rem; color: var(--vd-body-muted); }

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--vd-body-muted);
}
.post-meta-item svg { opacity: 0.6; }

/* Featured Image */
.post-featured-image {
  margin: 0 0 var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.post-featured-image img { width: 100%; height: auto; }

/* Post Content */
.post-content { font-size: 1.05rem; line-height: 1.8; color: var(--vd-body-text); }
.post-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.post-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content a { color: var(--brand-purple); border-bottom: 1px solid rgba(56,88,233,0.3); }
.post-content a:hover { color: var(--brand-magenta); border-color: rgba(146,163,243,0.5); }
.post-content img { border-radius: var(--radius-md); margin: var(--space-lg) 0; }

/* Table of Contents */
.toc {
  background: rgba(56,88,233,0.07);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.toc__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-purple);
  margin-bottom: var(--space-sm);
}
.toc ol { counter-reset: toc; padding: 0; }
.toc li { list-style: none; counter-increment: toc; margin-bottom: 0.4rem; }
.toc li::before {
  content: counter(toc) ". ";
  color: var(--brand-purple);
  font-weight: 600;
  font-size: 0.85rem;
}
.toc a { font-size: 0.88rem; color: var(--vd-body-text); border-bottom: none; }
.toc a:hover { color: var(--brand-purple); }

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--vd-body-border);
}
.post-tags__label { font-size: 0.82rem; font-weight: 600; color: var(--vd-body-muted); }
.tag-pill {
  background: var(--light);
  color: var(--brand-violet);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--vd-body-border);
  transition: var(--transition);
}
.tag-pill:hover {
  background: rgba(56,88,233,0.07);
  border-color: rgba(56,88,233,0.3);
  color: var(--brand-purple);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.post-nav-item {
  padding: var(--space-md);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-md);
  background: var(--vd-off);
  transition: var(--transition);
}
.post-nav-item:hover { border-color: rgba(56,88,233,0.3); background: var(--vd-card-bg); }
.post-nav-item--next { text-align: right; }
.post-nav-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--vd-body-muted); margin-bottom: 0.25rem; }
.post-nav-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--vd-body-text); }

/* ── Sidebar ──────────────────────────────────────────────────── */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-xl);
  align-items: start;
  max-width: 100%;
}
@media (max-width: 960px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
}

.sidebar { position: sticky; top: 72px; }
.sidebar-widget {
  background: var(--vd-card-bg);
  border: 1px solid var(--vd-card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}
.sidebar-widget__title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-purple);
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--brand-purple);
}

/* Search Widget — natural inline style */
.search-form {
  display: flex;
  align-items: center;
  background: var(--vd-off);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-full);
  padding: 0 0.5rem 0 0.85rem;
  gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(56,88,233,0.10);
}
.search-form input[type="search"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 0.4rem 0.5rem 0;
  font-size: 0.78rem;
  color: var(--vd-body-text);
  outline: none;
}
.search-form input[type="search"]::placeholder { color: var(--vd-body-muted); }
.search-form input[type="search"]:focus { box-shadow: none; border: none; }
.search-form button {
  background: var(--gradient-brand);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.search-form button svg { width: 13px; height: 13px; }
.search-form button:hover { opacity: 0.88; transform: scale(1.06); }

/* Recent Posts Widget */
.widget-recent-posts { list-style: none; padding: 0; margin: 0; }
.widget-recent-posts li {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--vd-body-border);
}
.widget-recent-posts li:last-child { border-bottom: none; }
.widget-recent-posts__thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(56,88,233,0.07);
}
.widget-recent-posts__thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-posts__title { font-size: 0.72rem; font-weight: 600; line-height: 1.3; color: var(--vd-body-text); margin-bottom: 0.15rem; }
.widget-recent-posts__title a { color: inherit; }
.widget-recent-posts__title a:hover { color: var(--brand-purple); }
.widget-recent-posts__date { font-size: 0.65rem; color: var(--vd-body-muted); }

/* Categories Widget */
.widget-categories { list-style: none; padding: 0; margin: 0; }
.widget-categories li { display: flex; align-items: center; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px solid var(--vd-body-border); }
.widget-categories li:last-child { border-bottom: none; }
.widget-categories a { font-size: 0.72rem; color: var(--vd-body-text); font-weight: 500; }
.widget-categories a:hover { color: var(--brand-purple); }
.widget-categories .count {
  background: rgba(56,88,233,0.07);
  color: var(--brand-purple);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

/* Newsletter Widget */
.newsletter-widget {
  background: var(--gradient-brand);
  border: none;
  color: var(--white);
}
.newsletter-widget .sidebar-widget__title { color: var(--white); border-color: rgba(255,255,255,0.4); }
.newsletter-widget p { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin-bottom: var(--space-md); }
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.88rem;
  margin-bottom: var(--space-sm);
  outline: none;
  transition: var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.55); }
.newsletter-form input:focus { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.22); }
.newsletter-form .btn {
  width: 100%;
  justify-content: center;
  background: var(--vd-card-bg);
  color: var(--brand-purple);
  font-weight: 700;
}
.newsletter-form .btn:hover { background: var(--vd-off); color: var(--brand-violet); }

/* ── Author Box ───────────────────────────────────────────────── */
.author-box {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  background: rgba(56,88,233,0.07);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}
.author-box__avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--brand-purple);
  background: var(--gradient-brand);
}
.author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-purple); margin-bottom: 0.2rem; }
.author-box__name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: var(--space-xs); }
.author-box__bio { font-size: 0.9rem; color: var(--vd-body-muted); line-height: 1.6; margin-bottom: var(--space-sm); }
.author-box__social { display: flex; gap: var(--space-xs); }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--vd-card-bg);
  border: 1px solid var(--vd-body-border);
  color: var(--brand-purple);
  transition: var(--transition);
}
.social-link:hover { background: var(--gradient-brand); color: var(--white); border-color: transparent; }

/* ── Related Posts ────────────────────────────────────────────── */
.related-posts { margin: var(--space-xl) 0; }
.related-posts__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: var(--space-lg);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* ── Comments ─────────────────────────────────────────────────── */
.comments-section { margin-top: var(--space-xl); }
.comments-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: var(--space-lg);
}

.comment-list { list-style: none; padding: 0; }
.comment {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--vd-body-border);
}
.comment__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-brand);
  overflow: hidden;
  flex-shrink: 0;
}
.comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment__author { font-weight: 700; font-size: 0.9rem; }
.comment__date { font-size: 0.78rem; color: var(--vd-body-muted); }
.comment__body { font-size: 0.9rem; margin-top: 0.5rem; line-height: 1.6; }
.children { padding-left: 2.5rem; list-style: none; }

.comment-form { margin-top: var(--space-xl); }
.comment-form__title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: var(--space-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-bottom: var(--space-md); }
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-md); }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--vd-body-text); }
.form-group input,
.form-group textarea {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--vd-card-bg);
  color: var(--vd-body-text);
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(56,88,233,0.1);
}
.form-group textarea { min-height: 120px; }

/* ── Newsletter Banner ────────────────────────────────────────── */
.newsletter-banner {
  background: var(--gradient-brand);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}
.newsletter-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='1.5' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
}
.newsletter-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.newsletter-banner__text h2 { color: var(--white); margin-bottom: var(--space-xs); }
.newsletter-banner__text p { color: rgba(255,255,255,0.8); margin: 0; }
.newsletter-banner__form {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  min-width: 340px;
  max-width: 460px;
  flex: 1;
}
.newsletter-banner__form input[type="email"] {
  flex: 1;
  padding: 0.7rem 1.1rem;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.newsletter-banner__form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-banner__form input:focus { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.22); }
.newsletter-banner__form .btn {
  background: var(--vd-card-bg);
  color: var(--brand-violet);
  font-weight: 700;
  padding: 0.7rem 1.5rem;
}
.newsletter-banner__form .btn:hover { background: var(--vd-off); }

/* ── Categories Section ───────────────────────────────────────── */
.categories-section { padding: var(--space-2xl) 0; background: var(--vd-off); }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
.category-card {
  background: var(--vd-card-bg);
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.category-card:hover {
  border-color: rgba(56,88,233,0.35);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.category-card__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  font-size: 1.4rem;
}
.category-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--vd-body-text);
  margin-bottom: 0.2rem;
}
.category-card__count { font-size: 0.78rem; color: var(--vd-body-muted); }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--vd-body-border);
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vd-body-text);
  border: 1px solid var(--vd-body-border);
  background: var(--vd-card-bg);
  transition: var(--transition);
  padding: 0 0.5rem;
}
.page-numbers:hover, .page-numbers.current {
  background: var(--gradient-brand);
  color: var(--white);
  border-color: transparent;
}

/* ── Footer ───────────────────────────────────────────────────── */
#site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .site-title { color: var(--white); font-size: 1.5rem; margin-bottom: var(--space-sm); }
.footer-brand p { font-size: 0.88rem; line-height: 1.65; color: rgba(255,255,255,0.6); margin-bottom: var(--space-md); }

.footer-social { display: flex; gap: var(--space-xs); }
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-social-link:hover { background: var(--gradient-brand); border-color: transparent; color: var(--white); }

.footer-nav__title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: var(--space-md);
}
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav li { margin-bottom: var(--space-xs); }
.footer-nav a { font-size: 0.88rem; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-nav a:hover { color: var(--brand-magenta); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin: 0; }
.footer-bottom a { color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-bottom a:hover { color: var(--brand-magenta); }

.footer-bottom-links { display: flex; gap: var(--space-md); }
.footer-bottom-links a { font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.footer-bottom-links a:hover { color: var(--brand-magenta); }

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

/* ── Back to Top ──────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(56,88,233,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: var(--transition);
  z-index: 50;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(56,88,233,0.5); }

/* ── Utilities ────────────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }

/* ── Page Templates ───────────────────────────────────────────── */
.page-header {
  background: var(--gradient-brand);
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
}
.page-header__inner { position: relative; z-index: 1; }
.page-header h1 { color: var(--white); margin-bottom: var(--space-sm); }
.page-header p { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.archive-section { padding: var(--space-xl) 0 var(--space-2xl); }

/* 404 Page */
.error-404 {
  text-align: center;
  padding: var(--space-2xl) 0;
}
.error-404__code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-md);
}
.error-404__title { font-size: 2rem; margin-bottom: var(--space-sm); }
.error-404__desc { color: var(--vd-body-muted); margin-bottom: var(--space-lg); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid.featured { grid-template-columns: 1fr; }
  .posts-grid.featured .post-card:first-child { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 3.5rem;
    --space-xl: 2rem;
  }
  #primary-navigation { display: none; }
  #primary-navigation.open { display: flex; flex-direction: column; position: fixed; inset: 68px 0 0; background: var(--vd-card-bg); padding: var(--space-lg); overflow-y: auto; z-index: 99; }
  #primary-navigation.open ul { flex-direction: column; gap: 0; }
  #primary-navigation.open a { border-radius: var(--radius-md); padding: 0.75rem 1rem; font-size: 1rem; }
  .menu-toggle { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .related-posts__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-banner__inner { flex-direction: column; }
  .newsletter-banner__form { min-width: unset; width: 100%; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .author-box { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .header-cta .btn-ghost { display: none; }
}

/* ── Print ────────────────────────────────────────────────────── */
@media print {
  #site-header, .sidebar, #site-footer, .related-posts, .comments-section,
  .back-to-top, .reading-progress-bar, .post-navigation { display: none !important; }
  body { color: #000; background: #fff; }
  .post-content a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ═══════════════════════════════════════════════════════════════
   V8 FIXES — Layout, Dark mode, No author section
═══════════════════════════════════════════════════════════════ */

/* ── Full-width single post layout (sidebar on right) ───────── */
.single-post { padding: var(--space-xl) 0 var(--space-2xl); }

.single-post-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: var(--space-lg);
  align-items: start;
  width: 100%;
}

.single-post-main {
  min-width: 0; /* prevent overflow */
}

/* ── Slim meta row ──────────────────────────────────────────── */
.post-slim-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .84rem;
  color: var(--vd-body-muted);
  padding: .85rem 0;
  border-top: 1px solid var(--vd-body-border);
  border-bottom: 1px solid var(--vd-body-border);
  margin-bottom: 1.5rem;
}
.post-slim-meta svg {
  display: inline;
  vertical-align: middle;
  margin-right: 3px;
  opacity: .7;
}
.post-slim-meta time { color: var(--vd-body-muted); }
.post-slim-sep { opacity: .35; }
.post-slim-share {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--vd-body-muted);
  text-decoration: none;
  font-size: .82rem;
  transition: color .15s;
}
.post-slim-share:hover { color: var(--brand-purple); }

/* ── Post content — light mode clean styles ─────────────────── */
.post-content {
  color: var(--vd-body-text) !important;
  font-size: 1.05rem;
  line-height: 1.85;
}
.post-content h1,.post-content h2,.post-content h3,
.post-content h4,.post-content h5,.post-content h6 {
  color: var(--vd-body-text) !important;
}
.post-content p,.post-content li,.post-content td,.post-content th {
  color: var(--vd-body-text) !important;
}
.post-content a { color: var(--vd-link) !important; }
.post-content a:hover { color: var(--vd-link-hover) !important; }
.post-content strong,.post-content b { color: var(--vd-body-text) !important; }
.post-content blockquote {
  background: rgba(56,88,233,.05) !important;
  border-left-color: var(--brand-purple) !important;
  color: var(--vd-body-muted) !important;
}
.post-content blockquote p { color: var(--vd-body-muted) !important; }
.post-content pre {
  background: var(--vd-code-bg) !important;
  color: var(--vd-code-color) !important;
  border-color: var(--vd-body-border) !important;
}
.post-content code {
  background: rgba(56,88,233,.08) !important;
  color: var(--vd-link) !important;
}
.post-content table {
  border-collapse: collapse; width: 100%;
  border: 1px solid var(--vd-body-border);
  border-radius: var(--radius-md); overflow: hidden;
}
.post-content th {
  background: rgba(56,88,233,.08) !important;
  padding: .65rem 1rem; font-weight: 700; font-size: .88rem; text-align: left;
}
.post-content td { padding: .6rem 1rem; border-top: 1px solid var(--vd-body-border); }
.post-content tr:hover td { background: rgba(56,88,233,.03); }
.post-content img { border-radius: var(--radius-md); max-width: 100%; height: auto; }
.post-content ul,.post-content ol { color: var(--vd-body-text) !important; }
.post-content hr { border-color: var(--vd-body-border) !important; }

/* ── Page content dark mode fix ─────────────────────────────── */
.entry-content,
.page-content,
.wp-block-post-content {
  color: var(--vd-body-text) !important;
}
.entry-content *:not(.wp-block-cover):not(.has-background),
.page-content *:not(.wp-block-cover):not(.has-background) {
  color: inherit;
}

/* ── Blog index — expand posts area, reduce left space ──────── */
.posts-section .container { padding-left: 1.25rem; padding-right: 1.25rem; }

/* ── General dark mode content ──────────────────────────────── */
.post-header__title { color: var(--vd-body-text) !important; }
.post-nav-title     { color: var(--vd-body-text) !important; }
.post-nav-label     { color: var(--vd-body-muted) !important; }
.post-nav-item      { background: var(--vd-card-bg) !important; border-color: var(--vd-body-border) !important; }
.post-tags__label   { color: var(--vd-body-muted) !important; }
.tag-pill           { background: rgba(56,88,233,.1); color: var(--vd-link); border-color: var(--vd-body-border); }
.tag-pill:hover     { background: rgba(56,88,233,.2); }

/* Sidebar dark mode */
.sidebar-widget                { background: var(--vd-card-bg) !important; border-color: var(--vd-body-border) !important; }
.sidebar-widget__title         { color: var(--brand-purple) !important; border-color: var(--brand-purple) !important; }
.widget-recent-posts__title a  { color: var(--vd-body-text) !important; }
.widget-recent-posts__date     { color: var(--vd-body-muted) !important; }
.widget-categories a           { color: var(--vd-body-text) !important; }
.widget-categories li          { border-color: var(--vd-body-border) !important; }

/* Search form — light mode override */
.search-form {
  background: var(--vd-off) !important;
  border-color: var(--vd-body-border) !important;
}
.search-form input[type="search"] {
  background: transparent !important;
  color: var(--vd-body-text) !important;
  border: none !important;
  box-shadow: none !important;
}
.search-form:focus-within {
  border-color: var(--brand-purple) !important;
  box-shadow: 0 0 0 3px rgba(56,88,233,0.10) !important;
}

/* ── New author box (replaces old one) ──────────────────────── */
.author-box { display: none !important; } /* hide old box */

.vidau-author-box {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--vd-card-bg);
    border: 1px solid var(--vd-card-border);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 2.5rem 0;
    box-shadow: 0 4px 24px rgba(31,48,128,.07);
}
.vidau-author-box__avatar {
    flex-shrink: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(56,88,233,.3);
}
.vidau-author-box__avatar img {
    width: 80px; height: 80px;
    object-fit: cover; display: block;
}
.vidau-author-box__body { flex: 1; min-width: 0; }
.vidau-author-box__label {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em;
    color: rgba(56,88,233,.8); margin-bottom: .3rem;
}
.vidau-author-box__name {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: .5rem;
}
.vidau-author-box__name a {
    color: var(--vd-body-text); text-decoration: none;
}
.vidau-author-box__name a:hover { color: var(--brand-purple); }
.vidau-author-box__bio {
    font-size: .9rem; color: var(--vd-body-muted);
    line-height: 1.65; margin: 0 0 .85rem;
}
.vidau-author-box__link {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; font-weight: 600;
    color: rgba(56,88,233,.8);
    border: 1px solid rgba(56,88,233,.25);
    padding: .3rem .85rem; border-radius: 999px;
    text-decoration: none; transition: all .15s;
}
.vidau-author-box__link:hover {
    background: rgba(56,88,233,.08);
    border-color: rgba(56,88,233,.5);
    color: var(--brand-purple);
}
@media (max-width: 480px) {
    .vidau-author-box { flex-direction: column; }
}

/* ── Breadcrumbs fix ────────────────────────────────────────── */
.breadcrumbs { color: var(--vd-body-muted); background: var(--vd-off); }
.breadcrumbs a { color: var(--vd-body-muted); }
.breadcrumbs [aria-current="page"] { color: var(--brand-purple); }

/* ── Responsive single post ─────────────────────────────────── */
@media (max-width: 960px) {
  .single-post-layout { grid-template-columns: 1fr; }
}

/* ── Fix TOC background ─────────────────────────────────────── */
.toc {
  background: rgba(56,88,233,.07) !important;
  border-color: var(--vd-body-border) !important;
}
.toc a { color: var(--vd-body-text) !important; }

/* ── Fix comment form ───────────────────────────────────────── */
.form-group input,
.form-group textarea {
  background: var(--vd-input-bg) !important;
  color: var(--vd-body-text) !important;
  border-color: var(--vd-body-border) !important;
}
.form-group label { color: var(--vd-body-text) !important; }
.comment__body    { color: var(--vd-body-text) !important; }
.comment__author  { color: var(--vd-body-text) !important; }
.comment__date    { color: var(--vd-body-muted) !important; }

/* ── Categories section dark mode ──────────────────────────── */
.categories-section { background: var(--vd-off) !important; }
.category-card       { background: var(--vd-card-bg) !important; border-color: var(--vd-body-border) !important; }
.category-card__name { color: var(--vd-body-text) !important; }
.category-card__count{ color: var(--vd-body-muted) !important; }

/* ── Post card dark fix ─────────────────────────────────────── */
.post-card__title   { color: var(--vd-body-text) !important; }
.post-card__excerpt { color: var(--vd-body-muted) !important; }
.post-card__meta    { color: var(--vd-body-muted) !important; }
.post-card__author-name { color: var(--vd-body-text) !important; }

/* ── Related posts heading ──────────────────────────────────── */
.related-posts__title { color: var(--vd-body-text) !important; }

/* ── Footer newsletter override ─────────────────────────────── */
.newsletter-banner { background: var(--gradient-brand) !important; }


/* ═══════════════════════════════════════════════════════════════
   FIX: Decorative brand watermark / header logo bleed-over
   The large "VIDAU" decorative text or logo background element
   that appears in the site header must be clipped to the header
   and must never overlap page content on single posts.
   ═══════════════════════════════════════════════════════════════ */

/* Clip the header so any decorative absolute/pseudo elements stay inside it */
#site-header,
.site-header,
header.site-header {
  overflow: hidden !important;
  isolation: isolate;
}

/* Any decorative large text / watermark / brand BG inside the header */
#site-header .brand-watermark,
#site-header .header-bg-text,
#site-header .logo-bg,
#site-header .hero-bg,
#site-header [class*="watermark"],
#site-header [class*="bg-text"],
#site-header [class*="brand-bg"],
.site-header .brand-watermark,
.site-header [class*="watermark"],
.site-header [class*="bg-text"] {
  overflow: hidden !important;
  max-height: 100% !important;
  clip-path: inset(0) !important;
}

/* Ensure the single post layout always sits above everything */
.single-post,
.single-post-layout,
.single-post-main,
.post-content {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* Ensure the main page wrapper clears the header properly */
#page,
#content,
.site-content,
main#primary,
main.site-main,
[role="main"] {
  position: relative;
  z-index: 1;
  isolation: isolate;
}


/* ═══════════════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS (PageSpeed fixes)
   ═══════════════════════════════════════════════════════════════ */

/* 1. Font-display: swap — prevents invisible text during font load */
@font-face { font-display: swap; }

/* 2. Remove CLS from header height — explicit min-height prevents jump */
#site-header, .site-header { min-height: 68px; contain: layout style; }

/* 3. Reserve space for logo to prevent CLS */
.vd-logo img { width: 110px; height: 36px; object-fit: contain; }

/* 4. Contain layout shifts in post cards */
.post-card { contain: layout style; }
.post-card__thumb { contain: strict; }

/* 5. content-visibility for off-screen sections (improves rendering) */
#site-footer { content-visibility: auto; contain-intrinsic-size: 0 400px; }
.related-posts { content-visibility: auto; contain-intrinsic-size: 0 600px; }
.comments-section { content-visibility: auto; contain-intrinsic-size: 0 300px; }

/* 6. Reduce paint complexity on animated elements */
.post-card__thumb img { will-change: transform; }
#site-header { will-change: box-shadow; }

/* 7. Prevent INP delays — remove transition from non-essential elements */
.post-card { transition: box-shadow 0.2s, transform 0.2s; }
.post-card * { transition: inherit; }

/* 8. Poppins as the single font stack — eliminates fallback layout shift */
:root {
    --font-display: 'Poppins', Georgia, serif;
    --font-body:    'Poppins', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
}

/* ══ AI SUMMARIZE BAR ══════════════════════════════════════════════════ */
.vidau-summarize-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  padding: .75rem 1.1rem;
  margin: 1.5rem 0;
  background: var(--vd-surface, rgba(56,88,233,.04));
  border: 1px solid var(--vd-body-border);
  border-radius: 10px;
  font-size: .82rem;
}
.vidau-summarize-bar__label {
  font-weight: 600;
  color: var(--vd-body-muted);
  white-space: nowrap;
}
.vidau-summarize-bar__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .15rem;
}
.vidau-summarize-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .75rem;
  border-radius: 6px;
  color: var(--vd-body-muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.vidau-summarize-bar__btn:hover {
  background: rgba(56,88,233,.09);
  color: var(--vd-brand, #3858E9);
}
.vidau-summarize-bar__btn svg { flex-shrink: 0; opacity: .75; }
.vidau-summarize-bar__btn:hover svg { opacity: 1; }
@media (max-width: 600px) {
  .vidau-summarize-bar { flex-direction: column; align-items: flex-start; }
}
/* ══════════════════════════════════════════════════════════════════════ */
