/*
Theme Name: NeuralMind
Theme URI: https://emergingminds.tech
Author: Emerging Minds
Author URI: https://emergingminds.tech
Description: A modern, dark ML/AI-inspired WordPress theme with glassmorphism, neural network aesthetics, and a focus on technical content readability.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neuralmind
Tags: dark, technology, blog, ai, machine-learning, modern, responsive
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg-base:       #080b14;
  --bg-surface:    #0d1117;
  --bg-card:       rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --border:        rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 212, 255, 0.3);

  --cyan:    #00d4ff;
  --purple:  #7c3aed;
  --green:   #00ff88;
  --pink:    #f472b6;
  --orange:  #fb923c;

  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-glow-cyan:   0 0 20px rgba(0, 212, 255, 0.15);
  --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.2);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grid background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #fff; }

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

p { margin-bottom: 1.25rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

strong { color: var(--text-primary); font-weight: 600; }
em { color: var(--cyan); font-style: italic; }

/* ============================================================
   CODE BLOCKS
   ============================================================ */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--cyan);
}

pre {
  background: #0a0f1a;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: #a5d8ff;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.site-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* Custom logo image — constrained to header height */
.site-logo__img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.site-logo__icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-logo__text span {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

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

/* Search button */
.header-search-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-search-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text-secondary);
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(8, 11, 20, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    backdrop-filter: blur(16px);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 0.6rem 1rem; }
}

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--cyan);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title .gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35);
  color: #fff;
}

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

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.05);
}

/* ============================================================
   POST CARDS GRID
   ============================================================ */
.section {
  padding: 4rem 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section__title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: linear-gradient(to bottom, var(--cyan), var(--purple));
  border-radius: 2px;
}

.section__link {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.section__link:hover { color: var(--cyan); }

/* Featured post (large) */
.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 3rem;
}

.post-featured:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow-cyan);
}

.post-featured__image {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

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

.post-featured:hover .post-featured__image img {
  transform: scale(1.03);
}

.post-featured__image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(0, 212, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.post-featured__content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

/* Post cards grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.post-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(0, 212, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.post-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

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

/* ============================================================
   POST META (date, read time, author)
   ============================================================ */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.post-meta__dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
}

.post-meta__date { color: var(--text-muted); }

.post-meta__read-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================================
   CATEGORY / TAG CHIPS
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition);
}

.chip--cyan {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--cyan);
}
.chip--cyan:hover { background: rgba(0, 212, 255, 0.2); color: var(--cyan); }

.chip--purple {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #a78bfa;
}
.chip--purple:hover { background: rgba(124, 58, 237, 0.22); color: #a78bfa; }

.chip--green {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--green);
}
.chip--green:hover { background: rgba(0, 255, 136, 0.15); color: var(--green); }

.chip--pink {
  background: rgba(244, 114, 182, 0.08);
  border: 1px solid rgba(244, 114, 182, 0.2);
  color: var(--pink);
}

.chip--orange {
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.2);
  color: var(--orange);
}

.chips-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ============================================================
   POST TITLE LINKS
   ============================================================ */
.post-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.post-title:hover { color: var(--cyan); }

/* ============================================================
   SIDEBAR & LAYOUT
   ============================================================ */
.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 3rem 0;
}

@media (max-width: 1024px) {
  .content-area { grid-template-columns: 1fr; }
}

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.widget__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.widget-categories li {
  list-style: none;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}
.widget-categories li:last-child { border-bottom: none; }

.widget-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.widget-categories a:hover { color: var(--cyan); }

.widget-categories .count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 0.1rem 0.5rem;
  border-radius: 50px;
}

/* Recent posts widget */
.widget-recent-post {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.widget-recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.widget-recent-post:first-child { padding-top: 0; }

.widget-recent-post__thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.2);
}
.widget-recent-post__thumb img { width: 100%; height: 100%; object-fit: cover; }

.widget-recent-post__text a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
  display: block;
}
.widget-recent-post__text a:hover { color: var(--cyan); }
.widget-recent-post__date { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: 0.25rem; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 68px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  z-index: 200;
  transition: width 0.1s linear;
}

.post-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.post-hero__meta { margin-bottom: 1.25rem; }

.post-hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.post-hero__excerpt {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.post-hero__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-accent);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.author-info__name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.author-info__date { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

.post-hero__cover {
  margin-top: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 480px;
}
.post-hero__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Article content */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.entry-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-primary);
}

.entry-content h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.entry-content h2::before {
  content: '## ';
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.entry-content h3::before {
  content: '### ';
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 0.85em;
  opacity: 0.7;
}

.entry-content p { margin-bottom: 1.5rem; }

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.entry-content li {
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.entry-content li::marker { color: var(--cyan); }

.entry-content blockquote {
  border-left: 3px solid var(--cyan);
  background: rgba(0, 212, 255, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.entry-content blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.entry-content img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.entry-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 212, 255, 0.4);
}

.entry-content a:hover {
  text-decoration-color: var(--cyan);
  color: #fff;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.entry-content th {
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entry-content td {
  border: 1px solid var(--border);
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
}

.entry-content tr:hover td { background: rgba(255,255,255,0.02); }

/* Post nav */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-nav-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
  text-decoration: none;
}

.post-nav-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow-cyan);
}

.post-nav-item__label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.post-nav-item__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.post-nav-item--next { text-align: right; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-list { list-style: none; }

.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

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

/* Comment form */
.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

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

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  text-align: center;
  padding: 6rem 1.5rem;
}

.page-404__code {
  font-size: 8rem;
  font-weight: 900;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 2rem auto;
}

.search-form input[type="search"] {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

.search-form input:focus {
  outline: none;
  border-color: var(--cyan);
}

.search-form button {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

.footer-brand__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

.footer-col__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

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

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--cyan); }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-neural {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-neural__dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-cyan    { color: var(--cyan); }
.text-purple  { color: #a78bfa; }
.text-green   { color: var(--green); }
.text-muted   { color: var(--text-muted); }
.text-mono    { font-family: var(--font-mono); }
.text-center  { text-align: center; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured__image { min-height: 200px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .section__header { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .hero__cta { flex-direction: column; align-items: center; }
}
