/*
Theme Name: AI CMS
Theme URI: https://blog.codersground.com
Author: Coders Ground
Author URI: https://codersground.com
Description: A modern, clean AI blog theme with gradient accents, card-based layouts, and full Gutenberg editor support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aicms
Tags: blog, one-column, custom-menu, editor-style, featured-images, full-width-template, theme-options
*/

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #eef2ff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.08);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', monospace;
  --max-w: 1200px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #0f1117;
  --surface: #1a1b26;
  --text: #e2e8f0;
  --text-secondary: #a0aec0;
  --text-muted: #636e80;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: rgba(99,102,241,.12);
  --border: #2a2d3a;
  --border-light: #1e2030;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.4);
}

[data-theme="dark"] .header {
  background: rgba(15,17,23,.85);
  border-bottom-color: var(--border);
}

[data-theme="dark"] img {
  opacity: .92;
}

/* Theme Toggle */
.theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--transition);
}

.theme-toggle:hover {
  background: var(--text-muted);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.theme-toggle-thumb svg {
  width: 11px;
  height: 11px;
  color: #f59e0b;
}

[data-theme="dark"] .theme-toggle {
  background: var(--accent);
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(20px);
  background: #1a1b26;
}

[data-theme="dark"] .theme-toggle-thumb svg {

.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }
  color: #818cf8;

.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }
}

.theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: block; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Header / Nav ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  color: var(--accent);
  background: var(--accent-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: .875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Section Titles ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 32px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.section-header a {
  font-size: .875rem;
  font-weight: 600;
  color: var(--accent);
  transition: var(--transition);
}

.section-header a:hover { text-decoration: underline; }

/* ── Featured Post ── */
.featured {
  max-width: var(--max-w);
  margin: 0 auto 64px;
  padding: 0 24px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.featured-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #c084fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.featured-img::after {
  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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%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/g%3E%3C/svg%3E");
  z-index: 2;
}

.featured-img-text {
  position: relative;
  z-index: 3;
  color: rgba(255,255,255,.9);
  font-size: 4rem;
  font-weight: 800;
}

.featured-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 16px;
  width: fit-content;
}

.tag.green { background: #ecfdf5; color: #059669; }
.tag.orange { background: #fff7ed; color: #ea580c; }
.tag.blue { background: #eff6ff; color: #2563eb; }
.tag.pink { background: #fdf2f8; color: #db2777; }

.featured-body h3 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}

.featured-body p {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .8rem;
  color: var(--text-muted);
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.meta-sep { color: var(--border); }

/* ── Post Grid ── */
.posts {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.post-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255,255,255,.85);
  position: relative;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb.t1 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.post-thumb.t2 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.post-thumb.t3 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.post-thumb.t4 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.post-thumb.t5 { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.post-thumb.t6 { background: linear-gradient(135deg, #f97316, #f59e0b); }

.post-thumb svg {
  width: 48px;
  height: 48px;
  opacity: .85;
}

.post-body {
  padding: 24px;
}

.post-body .tag { margin-bottom: 12px; }

.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-body p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-body .meta { font-size: .78rem; }

/* ── Newsletter ── */
.newsletter {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.newsletter-inner {
  background: var(--gradient-1);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.newsletter-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.newsletter-inner > * { position: relative; z-index: 1; }

.newsletter h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.newsletter p {
  max-width: 440px;
  margin: 0 auto 32px;
  opacity: .9;
  font-size: .95rem;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .9rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}

.newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form input:focus { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.18); }

.newsletter-form button {
  padding: 12px 28px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(0,0,0,.15); }

/* ── Categories Grid ── */
.categories {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: var(--transition);
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cat-card:hover::before { opacity: 1; }

.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cat-icon svg { width: 26px; height: 26px; }

.cat-icon.ci1 { background: #eef2ff; color: #6366f1; }
.cat-icon.ci2 { background: #ecfdf5; color: #059669; }
.cat-icon.ci3 { background: #fff7ed; color: #ea580c; }
.cat-icon.ci4 { background: #fdf2f8; color: #db2777; }
.cat-icon.ci5 { background: #eff6ff; color: #2563eb; }
.cat-icon.ci6 { background: #fefce8; color: #ca8a04; }
.cat-icon.ci7 { background: #f0fdfa; color: #0d9488; }
.cat-icon.ci8 { background: #faf5ff; color: #9333ea; }

.cat-card h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -.01em;
}

.cat-card span.cat-count {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Trending / Split Layout ── */
.trending {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.trending-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.trending-main {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.trending-main:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.trending-main-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.trending-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.trending-main-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.3) 0%, transparent 60%),
              radial-gradient(circle at 70% 80%, rgba(139,92,246,.2) 0%, transparent 50%);
  z-index: 2;
}

.trending-main-img span {
  position: relative;
  z-index: 3;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,.15);
  font-family: var(--mono);
}

.trending-main-body { padding: 28px; }

.trending-main-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-bottom: 10px;
}

.trending-main-body p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.trending-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.trending-item:first-child { padding-top: 0; }
.trending-item:last-child { border-bottom: none; }

.trending-item:hover { transform: translateX(4px); }

.trending-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  min-width: 40px;
  font-family: var(--mono);
}

.trending-item:hover .trending-num { color: var(--accent); }

.trending-item-body h4 {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.trending-item-body .meta { font-size: .75rem; gap: 10px; }

/* ── Two-Column Editor's Picks ── */
.editors-picks {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.ep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ep-card {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.ep-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ep-thumb {
  width: 120px;
  min-height: 100px;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-thumb svg { width: 32px; height: 32px; color: rgba(255,255,255,.8); }

.ep-thumb.ep1 { background: linear-gradient(135deg, #6366f1, #a78bfa); }
.ep-thumb.ep2 { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.ep-thumb.ep3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.ep-thumb.ep4 { background: linear-gradient(135deg, #ec4899, #f472b6); }

.ep-body { display: flex; flex-direction: column; justify-content: center; }

.ep-body .tag { margin-bottom: 8px; font-size: .7rem; padding: 3px 10px; }

.ep-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.ep-body .meta { font-size: .75rem; gap: 10px; }

/* ── Stats Bar ── */
.stats {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.stats-inner {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--border-light);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Authors / Team ── */
.authors {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.author-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}

.author-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-avatar.a1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.author-avatar.a2 { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.author-avatar.a3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.author-avatar.a4 { background: linear-gradient(135deg, #ec4899, #f472b6); }

.author-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.author-card .role {
  font-size: .8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.author-card p {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.author-social {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.author-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.author-social a:hover { background: var(--accent-light); color: var(--accent); }
.author-social a svg { width: 14px; height: 14px; }

/* ── FAQ / Accordion ── */
.faq {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.faq-inner {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  line-height: 1.4;
  transition: var(--transition);
}

.faq-question:hover { color: var(--accent); }

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 16px;
  transition: var(--transition);
}

.faq-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.faq-item.open .faq-icon {
  background: var(--accent-light);
  transform: rotate(45deg);
}

.faq-item.open .faq-icon svg { color: var(--accent); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.footer h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links,
.footer .widget ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.footer-links a,
.footer .widget ul a {
  font-size: .875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover,
.footer .widget ul a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-social a:hover { color: var(--accent); }

/* ── Single Post / Page Content ── */
.single-content,
.page-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.single-content .entry-header,
.page-content .entry-header {
  margin-bottom: 40px;
  text-align: center;
}

.single-content .entry-title,
.page-content .entry-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.single-content .entry-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.single-content .featured-image {
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.single-content .featured-image img {
  width: 100%;
  height: auto;
}

/* Gutenberg Content Styles */
.entry-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-top: 1.4em;
  margin-bottom: .6em;
}

.entry-content h2 { font-size: 1.625rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content h4 { font-size: 1.15rem; }

.entry-content p { margin-bottom: 1.15em; }

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover { color: var(--accent-hover); }

.entry-content img {
  border-radius: var(--radius);
  margin: 1.25em 0;
}
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  padding: 16px 24px;
  margin: 1.25em 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.15em;
  padding-left: 1.5em;
}

.entry-content li { margin-bottom: .35em; }

.entry-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.7;
  margin: 1.25em 0;
}

.entry-content code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 6px;
}

.entry-content pre code {
  background: none;
  padding: 0;
}

/* Wide and Full Width Gutenberg Blocks */
.entry-content .alignwide {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.entry-content .alignfull {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  width: 100vw;
}

/* ── Archive / Blog Page ── */
.archive-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 40px;
  text-align: center;
}

.archive-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}

.archive-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Pagination ── */
.pagination {
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Comments ── */
.comments-area {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.comments-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.comments-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.comments-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.comment-count {
  color: var(--accent);
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 32px;
  margin: 0;
  border-left: 2px solid var(--border-light);
}

.comment-card {
  margin-bottom: 16px;
}

.comment-body {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: var(--transition);
}

.comment-body:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.comment-meta-info {
  flex: 1;
  min-width: 0;
}

.comment-author-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}

.comment-author-badge {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
}

.comment-date {
  font-size: .75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.comment-awaiting-moderation {
  font-size: .82rem;
  color: var(--accent);
  background: var(--accent-light);
  padding: 8px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.comment-content {
  margin-bottom: 10px;
}

.comment-content p {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reply-link a,
.comment-edit a {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.reply-link a:hover,
.comment-edit a:hover {
  color: var(--accent);
}

.no-comments {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Comment Form */
.comment-respond {
  margin-top: 36px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.comment-reply-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.comment-reply-title small {
  display: inline-block;
  margin-left: 12px;
}

.comment-reply-title small a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.comment-reply-title small a:hover {
  color: var(--accent);
}

.comment-form-notice {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.comment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.comment-form label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.comment-form .required {
  color: var(--accent);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: .88rem;
  color: var(--text);
  margin-bottom: 14px;
  transition: var(--transition);
  background: var(--bg);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: var(--text-muted);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.08);
  background: var(--surface);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-form p.form-submit {
  margin-bottom: 0;
}

.comment-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-1);
  color: #fff;
  padding: 11px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.comment-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
}

.comment-submit svg {
  flex-shrink: 0;
}

.comment-form-recaptcha-notice {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.comment-form-recaptcha-notice a {
  color: var(--text-muted);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .comment-form-grid {
    grid-template-columns: 1fr;
  }
  .comment-list .children {
    padding-left: 16px;
  }
  .comment-respond {
    padding: 20px 16px;
  }
}

/* ── 404 Page ── */
.error-404 {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 24px;
  text-align: center;
}

.error-404 h1 {
  font-size: 8rem;
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-404 p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Search Form ── */
.search-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 10px;
}

.search-form .search-field {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}

.search-form .search-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.search-form .search-submit {
  padding: 12px 28px;
  background: var(--gradient-1);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.search-form .search-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-grid { grid-template-columns: 1fr; }
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2)::after { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .featured-card { grid-template-columns: 1fr; }
  .featured-body { padding: 28px 24px; }
  .hero { padding: 56px 24px 48px; }
  .hero h1 { font-size: 2rem; }
  .post-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-grid { grid-template-columns: 1fr; }
  .ep-grid { grid-template-columns: 1fr; }
  .ep-card { flex-direction: column; }
  .ep-thumb { width: 100%; min-height: 140px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); padding: 32px 24px; }
  .stat-item::after { display: none; }
  .stat-num { font-size: 2rem; }
  .authors-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
  .newsletter-inner { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
