/*
Theme Name: Clusters Media
Theme URI: https://clusters.media
Author: Clusters Media
Author URI: https://clusters.media
Description: A dark, tech-forward editorial theme for Clusters Media — AI & Technology journalism. Built with brand colors, Space Mono typography, and a cluster node aesthetic.
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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clusters-media
Tags: dark, technology, blog, news, custom-colors, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready
*/

/* =========================================================
   CLUSTERS MEDIA THEME — DESIGN SYSTEM
   Brand: clusters.media
   Primary: #7c6af5 (Cluster Purple)
   Accent:  #c4b5fd (Node Lavender)
   Dark:    #08090f (Void Black)
   ========================================================= */

:root {
  /* Brand Colors */
  --cm-black:     #08090f;
  --cm-surface:   #12111f;
  --cm-surface2:  #1a1830;
  --cm-border:    rgba(196, 181, 253, 0.1);
  --cm-border2:   rgba(196, 181, 253, 0.18);
  --cm-purple:    #7c6af5;
  --cm-lavender:  #c4b5fd;
  --cm-white:     #f2f0ff;
  --cm-muted:     rgba(242, 240, 255, 0.45);

  /* AI Platform Colors */
  --cm-claude:    #c96442;
  --cm-chatgpt:   #19a37a;
  --cm-gemini:    #4285f4;

  /* Typography */
  --font-mono:    'Space Mono', 'Courier New', monospace;
  --font-sans:    'DM Sans', system-ui, sans-serif;
  --font-serif:   'DM Serif Display', Georgia, serif;

  /* Spacing */
  --radius:       8px;
  --radius-lg:    14px;

  /* Transitions */
  --ease:         0.22s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--cm-black);
}

body {
  font-family: var(--font-sans);
  background: var(--cm-black);
  color: var(--cm-white);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── DARK CONTENT GLOBAL OVERRIDES ──
   Catches any pasted HTML blocks, shortcodes, or embeds
   that bring their own light-mode styles */
body,
.entry-content,
.post-content,
.wp-block-group,
.wp-block-html {
  background-color: var(--cm-black);
  color: var(--cm-white);
}

/* Override any inline white/light backgrounds from pasted HTML */
.post-content *:not(pre):not(code):not(.post-card):not(.widget) {
  border-color: inherit;
}

/* Reset inline styles that paste in white backgrounds */
.post-content [style*="background"] {
  background-color: var(--cm-surface) !important;
}

.post-content [style*="color:#000"],
.post-content [style*="color: #000"],
.post-content [style*="color:black"],
.post-content [style*="color: black"],
.post-content [style*="color:#333"],
.post-content [style*="color: #333"] {
  color: rgba(242, 240, 255, 0.85) !important;
}

/* Gutenberg block dark resets */
.wp-block-cover,
.wp-block-media-text,
.wp-block-pullquote {
  background: var(--cm-surface);
  color: var(--cm-white);
}

.wp-block-pullquote {
  border-color: var(--cm-purple);
}

.wp-block-separator {
  border-color: var(--cm-border);
}

.wp-block-button__link {
  background: var(--cm-purple);
  color: #fff;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.wp-block-button__link:hover {
  background: #6a58e0;
}

.wp-block-code {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius);
  color: var(--cm-lavender);
  font-family: var(--font-mono);
}

.wp-block-quote {
  border-left: 3px solid var(--cm-purple);
  background: var(--cm-surface);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.wp-block-quote cite,
.wp-block-quote footer {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--cm-muted);
  text-transform: uppercase;
}

/* Force dark on any custom HTML blocks */
.wp-block-html * {
  background-color: transparent !important;
  color: inherit !important;
}

/* Admin bar offset for sticky header */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cm-lavender);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover { color: var(--cm-white); }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cm-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p {
  color: rgba(242, 240, 255, 0.75);
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

strong { color: var(--cm-white); font-weight: 600; }
em { font-style: italic; color: var(--cm-lavender); }

blockquote {
  border-left: 3px solid var(--cm-purple);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--cm-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(242, 240, 255, 0.8);
}

code {
  font-family: var(--font-mono);
  background: var(--cm-surface2);
  color: var(--cm-lavender);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--cm-border);
}

pre {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
}

hr {
  border: none;
  border-top: 1px solid var(--cm-border);
  margin: 3rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

li {
  color: rgba(242, 240, 255, 0.75);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── DARK BACKGROUND FOR HTML/IFRAME CONTENT ── */
iframe,
.post-content iframe,
.post-content embed,
.post-content object {
  background: var(--cm-black);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius);
  max-width: 100%;
}

/* Ensure any embedded HTML blocks inherit dark bg */
.wp-block-html,
.wp-block-group,
.entry-content > *,
.post-content > div {
  background-color: transparent;
  color: inherit;
}

/* If someone pastes raw HTML with white backgrounds, override */
.post-content [style*="background-color: white"],
.post-content [style*="background-color:#fff"],
.post-content [style*="background-color: #fff"],
.post-content [style*="background-color:#ffffff"],
.post-content [style*="background-color: #ffffff"],
.post-content [style*="background: white"],
.post-content [style*="background:#fff"],
.post-content [style*="background: #fff"] {
  background-color: var(--cm-surface) !important;
  color: var(--cm-white) !important;
}

/* Tables in post content */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-content table th {
  background: var(--cm-surface2);
  color: var(--cm-white);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--cm-border2);
}

.post-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cm-border);
  color: rgba(242,240,255,0.78);
  font-size: 0.92rem;
}

.post-content table tr:last-child td { border-bottom: none; }
.post-content table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.post-content table tr:hover td { background: rgba(124,106,245,0.05); }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cm-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

/* Site Logo / Name */
.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-white);
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}

.site-title span { color: var(--cm-purple); }

/* Navigation — sits between logo and CTA */
.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin: 0;
  padding: 0;
  border: none;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cm-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: all var(--ease);
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: var(--cm-white);
  background: rgba(255,255,255,0.06);
}

/* Header CTA — right side */
.header-cta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cm-purple);
  border: 1px solid rgba(124,106,245,0.4);
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.header-cta:hover {
  background: rgba(124,106,245,0.15);
  color: var(--cm-lavender);
  border-color: rgba(124,106,245,0.7);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cm-white);
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

/* ── HERO / FEATURED ── */
.hero-post {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--cm-border);
  position: relative;
  overflow: hidden;
}

.hero-post::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: var(--cm-purple);
  opacity: 0.05;
  pointer-events: none;
}

.hero-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-purple);
  background: rgba(124,106,245,0.12);
  border: 1px solid rgba(124,106,245,0.3);
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: all var(--ease);
}

.hero-category::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cm-purple);
  animation: pulse 2s ease-in-out infinite;
}

.hero-category:hover {
  background: rgba(124,106,245,0.2);
  color: var(--cm-lavender);
}

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

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 820px;
}

.hero-title a {
  color: var(--cm-white);
  text-decoration: none;
  transition: color var(--ease);
}

.hero-title a:hover { color: var(--cm-lavender); }

.hero-excerpt {
  font-size: 1.1rem;
  color: var(--cm-muted);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(242,240,255,0.3);
}

.hero-meta a { color: rgba(242,240,255,0.4); text-decoration: none; }
.hero-meta a:hover { color: var(--cm-lavender); }

.hero-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cm-purple);
  border: 1px solid rgba(124,106,245,0.4);
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--ease);
}

.hero-read-more:hover {
  background: rgba(124,106,245,0.12);
  color: var(--cm-lavender);
  gap: 12px;
}

/* ── POST GRID ── */
.posts-section {
  padding: 64px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cm-border);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-muted);
}

.section-link {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cm-purple);
  text-decoration: none;
  transition: color var(--ease);
}

.section-link:hover { color: var(--cm-lavender); }

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

.posts-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

/* Post Card */
.post-card {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--cm-border2);
  transform: translateY(-2px);
}

.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--cm-surface2);
  position: relative;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.04);
}

.post-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cm-surface), var(--cm-surface2));
}

.post-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cm-purple);
  margin-bottom: 10px;
  text-decoration: none;
}

.post-card__cat:hover { color: var(--cm-lavender); }

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  flex: 1;
}

.post-card__title a {
  color: var(--cm-white);
  text-decoration: none;
  transition: color var(--ease);
}

.post-card__title a:hover { color: var(--cm-lavender); }

.post-card__excerpt {
  font-size: 0.85rem;
  color: var(--cm-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--cm-border);
}

.post-card__meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(242,240,255,0.25);
  text-transform: uppercase;
}

.post-card__read {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cm-purple);
  text-decoration: none;
  transition: color var(--ease);
}

.post-card__read:hover { color: var(--cm-lavender); }

/* ── SINGLE POST ── */
.single-post {
  padding: 64px 0 80px;
}

.post-header {
  margin-bottom: 48px;
}

.post-header__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-purple);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 18px;
}

.post-header__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--cm-white);
  margin-bottom: 20px;
}

.post-header__excerpt {
  font-size: 1.15rem;
  color: var(--cm-muted);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 28px;
  font-style: italic;
}

.post-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(242,240,255,0.3);
  padding-top: 20px;
  border-top: 1px solid var(--cm-border);
}

.post-header__meta a {
  color: rgba(242,240,255,0.4);
  text-decoration: none;
}

.post-header__meta a:hover { color: var(--cm-lavender); }

/* Featured image */
.post-featured-image {
  margin-bottom: 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--cm-border);
}

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

/* Post content */
.post-content {
  font-size: 1.08rem;
  line-height: 1.85;
}

.post-content h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cm-border);
}

.post-content h3 {
  margin: 2rem 0 0.8rem;
}

.post-content p { margin-bottom: 1.6rem; }

.post-content a {
  color: var(--cm-lavender);
  border-bottom: 1px solid rgba(196,181,253,0.3);
  transition: border-color var(--ease);
}

.post-content a:hover { border-bottom-color: var(--cm-lavender); }

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--cm-border);
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  background: rgba(124,106,245,0.1);
  border: 1px solid rgba(124,106,245,0.25);
  border-radius: 20px;
  color: var(--cm-lavender);
  text-decoration: none;
  transition: all var(--ease);
}

.post-tag:hover {
  background: rgba(124,106,245,0.2);
  color: var(--cm-white);
}

/* ── SIDEBAR ── */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 80px;
}

.widget {
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cm-border);
}

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

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--cm-border);
  font-size: 0.88rem;
  color: rgba(242,240,255,0.65);
}

.widget ul li:last-child { border-bottom: none; }

.widget ul li a {
  color: rgba(242,240,255,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color var(--ease);
}

.widget ul li a:hover { color: var(--cm-lavender); }

/* About widget */
.widget-about {
  text-align: center;
}

.widget-about__logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
}

.widget-about__name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-white);
  margin-bottom: 6px;
}

.widget-about__name span { color: var(--cm-purple); }

.widget-about__url {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--cm-purple);
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.widget-about__desc {
  font-size: 12px;
  color: var(--cm-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 48px 0 16px;
}

/* WordPress outputs .page-numbers — target all variants */
.pagination .page-numbers,
.page-numbers {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 9px 15px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--cm-border);
  color: var(--cm-muted);
  background: var(--cm-surface);
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  line-height: 1;
}

.pagination .page-numbers:hover,
.page-numbers:hover {
  border-color: var(--cm-border2);
  color: var(--cm-white);
  background: rgba(124,106,245,0.1);
}

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

.pagination .page-numbers.dots,
.page-numbers.dots {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.pagination .page-numbers.dots:hover,
.page-numbers.dots:hover {
  border-color: transparent;
  background: transparent;
  color: var(--cm-muted);
}

/* nav-links from the_posts_pagination */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 48px 0 16px;
}

.nav-links .nav-previous a,
.nav-links .nav-next a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--cm-border);
  color: var(--cm-muted);
  background: var(--cm-surface);
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-links .nav-previous a:hover,
.nav-links .nav-next a:hover {
  border-color: rgba(124,106,245,0.4);
  color: var(--cm-lavender);
  background: rgba(124,106,245,0.08);
}

/* ── COMMENTS ── */
.comments-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--cm-border);
}

.comments-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-muted);
  margin-bottom: 32px;
}

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

.comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--cm-border);
}

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

.comment-author img {
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.comment-author__name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cm-white);
}

.comment-author__date {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(242,240,255,0.25);
  letter-spacing: 1px;
}

.comment-body {
  font-size: 0.9rem;
  color: rgba(242,240,255,0.7);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Comment Form */
.comment-form-wrap {
  margin-top: 40px;
  background: var(--cm-surface);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.comment-form-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-purple);
  margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--cm-surface2);
  border: 1px solid var(--cm-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--cm-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin-bottom: 12px;
  outline: none;
  transition: border-color var(--ease);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(124,106,245,0.5);
}

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

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

.comment-submit {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--cm-purple);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--ease);
}

.comment-submit:hover {
  background: #6a58e0;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--cm-surface);
  border-top: 1px solid var(--cm-border);
  padding: 56px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-decoration: none;
}

.footer-brand__name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--cm-white);
}

.footer-brand__name span { color: var(--cm-purple); }

.footer-brand__url {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cm-purple);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 12px;
}

.footer-brand__desc {
  font-size: 12.5px;
  color: var(--cm-muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cm-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
  border: none;
}

.footer-col ul li a {
  font-size: 13px;
  color: rgba(242,240,255,0.5);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-col ul li a:hover { color: var(--cm-lavender); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--cm-border);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(242,240,255,0.2);
}

.footer-copy a { color: rgba(242,240,255,0.3); text-decoration: none; }

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

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--cm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cm-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  transition: all var(--ease);
}

.footer-social a:hover {
  background: rgba(124,106,245,0.15);
  border-color: rgba(124,106,245,0.4);
  color: var(--cm-lavender);
}

/* ── CATEGORY COLORS ── */
.cat-ai       { color: var(--cm-purple)  !important; }
.cat-openai   { color: var(--cm-chatgpt) !important; }
.cat-google   { color: var(--cm-gemini)  !important; }
.cat-anthropic{ color: var(--cm-claude)  !important; }

/* ── UTILITIES ── */
.text-mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(124,106,245,0.12);
  border: 1px solid rgba(124,106,245,0.25);
  color: var(--cm-lavender);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar { position: static; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .posts-grid--2col {
    grid-template-columns: 1fr;
  }

  /* Hide nav by default on mobile */
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--cm-surface);
    border-bottom: 1px solid var(--cm-border);
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 99;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .main-nav li { width: 100%; }

  .main-nav a {
    display: block;
    padding: 10px 14px;
    width: 100%;
  }

  .menu-toggle { display: flex; }

  .header-cta { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-title { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .posts-section { padding: 40px 0; }
  .hero-post { padding: 40px 0; }
}

/* ── WORDPRESS CORE CLASSES ── */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-family: var(--font-mono); font-size: 11px; color: var(--cm-muted); margin-top: 8px; letter-spacing: 0.5px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.sticky { border-left: 3px solid var(--cm-purple); padding-left: 20px; }
