/*
Theme Name:  Joy Stuck
Theme URI:   https://joystuck.co.uk
Author:      Joy Stuck
Author URI:  https://joystuck.co.uk
Description: A retro gaming blog theme for Joy Stuck. Editorial, nostalgic, slightly off-kilter. Built for long-form retro gaming content, retrospectives, and reviews.
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: joystuck
Tags:        blog, dark, retro, gaming, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   TABLE OF CONTENTS
   1.  CSS Variables
   2.  CSS Reset & Base
   3.  Typography
   4.  Layout
   5.  Header & Navigation
   6.  Hero Section
   7.  Post Cards & Archive Grid
   8.  Sidebar & Widgets
   9.  Single Post
   10. Comments
   11. Archive Headers
   12. Search Results
   13. 404 Page
   14. Footer
   15. Ad Zone Containers
   16. Animations & Effects
   17. Gutenberg Block Styles
   18. Responsive / Media Queries
   ========================================================================== */


/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */

:root {
  /* Core colours */
  --bg-body:       #0a0a12;
  --bg-card:       #121220;
  --bg-header:     #07070f;
  --bg-elevated:   #1a1a2e;
  --bg-widget:     #0f0f1c;

  /* Accent colours */
  --green:         #39e75f;
  --green-dim:     #1a7a32;
  --green-glow:    rgba(57, 231, 95, 0.25);
  --amber:         #f5a623;
  --amber-dim:     #7a5210;
  --cyan:          #22d3ee;
  --cyan-dim:      #0e6b7a;
  --magenta:       #e879f9;
  --magenta-dim:   #6b2b7a;
  --red:           #ff4757;

  /* Text colours */
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;
  --text-on-dark:  #c8d6e5;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(57, 231, 95, 0.35);

  /* Fonts */
  --font-pixel:    'Press Start 2P', monospace;
  --font-heading:  'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:     'Merriweather', Georgia, 'Times New Roman', serif;
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;

  /* Sizing */
  --max-width:     1240px;
  --content-max:   740px;
  --sidebar-w:     300px;
  --gap:           2rem;

  /* Transitions */
  --transition:    0.2s ease;
  --transition-slow: 0.4s ease;

  /* Category colours — used for badges and accents */
  --cat-retro:     #39e75f;
  --cat-reviews:   #f5a623;
  --cat-retro-hardware: #22d3ee;
  --cat-forgotten: #e879f9;
  --cat-hidden:    #fbbf24;
  --cat-nostalgia: #f87171;
  --cat-default:   #64748b;
}


/* ==========================================================================
   2. CSS RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle scanline texture on the body background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.04) 3px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

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

a {
  color: var(--green);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--amber);
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--bg-elevated);
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--text-primary);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
  margin-bottom: 1.5rem;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 700;
  color: var(--text-primary);
}

em, i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--green);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--green);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  color: var(--text-on-dark);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 1em;
  color: inherit;
}

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

/* Pixel-styled horizontal rule variant */
.pixel-divider {
  border: none;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--green) 0px,
    var(--green) 8px,
    transparent 8px,
    transparent 12px
  );
  margin: 2.5rem 0;
  opacity: 0.5;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

mark {
  background: var(--amber-dim);
  color: var(--amber);
  padding: 0 0.25em;
  border-radius: 2px;
}

small {
  font-size: 0.8em;
}

sup, sub {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* Section labels — pixel font, used sparingly */
.section-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-label::before,
.section-label::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: currentColor;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 3rem;
  padding: 3rem 0 4rem;
}

.site-content-area.no-sidebar {
  grid-template-columns: 1fr;
}

.main-content {
  min-width: 0; /* prevent overflow in grid */
}

/* Post grid — used on homepage, archives */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.post-grid.single-col {
  grid-template-columns: 1fr;
}

/* Utility classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }


/* ==========================================================================
   5. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Contains the absolute-positioned mobile nav dropdown */
  isolation: isolate;
  box-shadow: 0 1px 0 0 var(--green-dim), 0 4px 20px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Site identity ---- */
.site-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  min-width: 0;
}

.custom-logo {
  max-height: 56px;
  width: auto;
  display: block;
}

/* When a custom logo is uploaded, hide the redundant text title —
   the Joystuck logo already carries the wordmark.
   WordPress adds .has-custom-logo to <body> automatically. */
.has-custom-logo .site-title-wrap {
  display: none;
}

.has-custom-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

/* The PNG logo has a white background. A transparent version will look
   cleaner — but this border-radius softens the square crop in the meantime. */
.has-custom-logo .custom-logo {
  border-radius: 6px;
}

.site-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 10px var(--green),
    0 0 20px var(--green-dim);
  transition: text-shadow var(--transition);
  display: block;
  line-height: 1.6;
}

/* Blinking cursor after site title */
.site-title::after {
  content: '_';
  animation: blink-cursor 1.2s step-end infinite;
  margin-left: 2px;
}

.site-title:hover {
  text-shadow:
    0 0 15px var(--green),
    0 0 30px var(--green),
    0 0 50px var(--green-dim);
}

.site-tagline {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

/* ---- Primary navigation ---- */
.primary-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-menu a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  transition: color var(--transition), background var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_item > a::after {
  transform: scaleX(1);
}

/* Dropdown support */
.nav-menu .menu-item-has-children {
  position: relative;
}

.nav-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 100;
  padding: 0.5rem 0;
  list-style: none;
}

.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 0;
}

.nav-menu .sub-menu a::after {
  display: none;
}

/* Header search toggle */
.header-search-btn {
  color: var(--text-secondary);
  padding: 0.4rem;
  border-radius: 3px;
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

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

.header-search-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

/* Header inline search dropdown */
.header-search-dropdown {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-medium);
  padding: 0.75rem 0;
}

.header-search-dropdown[hidden] {
  display: none;
}

.header-search-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-search-inner .search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
}

.header-search-inner .search-field {
  flex: 1;
  background: var(--bg-body);
  border: 1px solid var(--border-medium);
  border-radius: 3px;
  padding: 0.6rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.header-search-inner .search-field:focus {
  outline: none;
  border-color: var(--green);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.menu-toggle:hover {
  color: var(--green);
}

.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */

.hero-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}

.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
  z-index: 0;
}

.hero-section:hover .hero-bg {
  transform: scale(1.03);
}

/* Scanline overlay on hero */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  z-index: 1;
  pointer-events: none;
}

/* Dark gradient overlay */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7, 7, 15, 0.92) 0%,
    rgba(7, 7, 15, 0.7) 50%,
    rgba(7, 7, 15, 0.3) 100%
  ),
  linear-gradient(
    to top,
    rgba(7, 7, 15, 0.8) 0%,
    transparent 60%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: 680px;
}

.hero-category {
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

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

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

.hero-excerpt {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
}

.hero-meta a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.hero-meta a:hover {
  color: var(--green);
}

/* Featured label on hero */
.featured-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: rgba(245, 166, 35, 0.15);
  border: 1px solid rgba(245, 166, 35, 0.4);
  padding: 0.4em 0.8em;
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
}


/* ==========================================================================
   7. POST CARDS & ARCHIVE GRID
   ========================================================================== */

/* ---- Category badge ---- */
.cat-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25em 0.65em;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity var(--transition);
  line-height: 1.4;
}

.cat-badge:hover {
  opacity: 0.8;
  color: inherit;
}

/* Default badge colour */
.cat-badge {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Category-specific colours — added by PHP class */
.cat-badge.cat-retro-gaming         { background: rgba(57,231,95,0.12); color: var(--green); border-color: rgba(57,231,95,0.3); }
.cat-badge.cat-reviews              { background: rgba(245,166,35,0.12); color: var(--amber); border-color: rgba(245,166,35,0.3); }
.cat-badge.cat-retrospectives       { background: rgba(34,211,238,0.12); color: var(--cyan); border-color: rgba(34,211,238,0.3); }
.cat-badge.cat-forgotten-games      { background: rgba(232,121,249,0.12); color: var(--magenta); border-color: rgba(232,121,249,0.3); }
.cat-badge.cat-old-hardware         { background: rgba(34,211,238,0.12); color: var(--cyan); border-color: rgba(34,211,238,0.3); }
.cat-badge.cat-hidden-gems          { background: rgba(251,191,36,0.12); color: var(--cat-hidden); border-color: rgba(251,191,36,0.3); }
.cat-badge.cat-gaming-oddities      { background: rgba(232,121,249,0.12); color: var(--magenta); border-color: rgba(232,121,249,0.3); }
.cat-badge.cat-nostalgia            { background: rgba(248,113,113,0.12); color: var(--cat-nostalgia); border-color: rgba(248,113,113,0.3); }

/* ---- Post card ---- */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
  opacity: 0;
  transition: opacity var(--transition);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.3),
    0 0 0 1px var(--border-accent),
    0 0 20px var(--green-glow);
}

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

/* Image wrapper */
.post-card-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  position: relative;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

/* No image placeholder */
.post-card-image.no-image {
  background: linear-gradient(
    135deg,
    var(--bg-elevated) 0%,
    var(--bg-card) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-image.no-image::after {
  content: '';
  width: 40px;
  height: 40px;
  background: var(--border-subtle);
  clip-path: polygon(
    0 20%, 20% 20%, 20% 0, 80% 0, 80% 20%, 100% 20%,
    100% 80%, 80% 80%, 80% 100%, 20% 100%, 20% 80%, 0 80%
  );
}

/* Category badge over image */
.post-card-image .cat-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
}

/* Card body */
.post-card-body {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.post-card-title a:hover {
  color: var(--green);
}

.post-card-excerpt {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.post-card-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.post-card-meta a:hover {
  color: var(--green);
}

.post-card-meta .separator {
  color: var(--border-medium);
}

/* ---- List-style post item (for archives with no sidebar) ---- */
.post-list-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 1.5rem;
}

.post-list-item:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.post-list-image {
  overflow: hidden;
  background: var(--bg-elevated);
}

.post-list-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-list-item:hover .post-list-image img {
  transform: scale(1.05);
}

.post-list-body {
  padding: 1.25rem 1.25rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-list-body .post-card-title {
  font-size: 1.15rem;
}

/* ---- Pagination ---- */
.pagination-wrap {
  margin-top: 3rem;
  text-align: center;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.page-numbers li a,
.page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-medium);
  border-radius: 3px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  background: var(--bg-card);
}

.page-numbers li a:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(57, 231, 95, 0.08);
}

.page-numbers li .current {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-body);
  font-weight: 700;
}

.page-numbers li .dots {
  border-color: transparent;
  background: none;
}

/* Post navigation (prev/next post in single) */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.nav-links a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition);
  height: 100%;
}

.nav-links a:hover {
  border-color: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
}

.nav-links .nav-direction {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.nav-links .nav-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

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


/* ==========================================================================
   8. SIDEBAR & WIDGETS
   ========================================================================== */

.sidebar {
  min-width: 0;
}

.widget {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-title::before {
  content: '>';
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* Widget: category list */
.widget_categories ul,
.widget_pages ul,
.widget_archive ul,
.widget_nav_menu ul,
.widget_meta ul,
.widget_recent_comments ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.widget_categories a,
.widget_pages a,
.widget_archive a,
.widget_nav_menu a,
.widget_meta a,
.widget_recent_comments a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition);
}

.widget_categories a:hover,
.widget_pages a:hover,
.widget_archive a:hover,
.widget_nav_menu a:hover,
.widget_meta a:hover {
  color: var(--green);
}

.widget_categories .count,
.widget_archive .count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

/* Widget: recent posts */
.widget_recent_entries ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.widget_recent_entries li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widget_recent_entries li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget_recent_entries a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  display: block;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.widget_recent_entries a:hover {
  color: var(--green);
}

.widget_recent_entries .post-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

/* Widget: tag cloud */
.widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.widget_tag_cloud .tag-cloud-link {
  font-family: var(--font-heading);
  font-size: 0.75rem !important;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.25em 0.6em;
  border-radius: 2px;
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1.4;
}

.widget_tag_cloud .tag-cloud-link:hover {
  color: var(--green);
  border-color: var(--green);
  background: rgba(57,231,95,0.08);
}

/* Widget: search */
.widget_search .search-form {
  display: flex;
  gap: 0.5rem;
}

.widget_search .search-field {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-heading);
  transition: border-color var(--transition);
}

.widget_search .search-field:focus {
  outline: none;
  border-color: var(--green);
}

.widget_search .search-field::placeholder {
  color: var(--text-muted);
}

/* Widget: text */
.widget_text p {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Ad widget area — special container */
.widget.ad-widget {
  background: transparent;
  border: 1px dashed var(--border-medium);
  text-align: center;
  padding: 1rem;
}

.widget.ad-widget .widget-title {
  font-size: 0.4rem;
  color: var(--text-muted);
}

.widget.ad-widget::before {
  content: none;
}


/* ==========================================================================
   9. SINGLE POST
   ========================================================================== */

.single-post-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Post header */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-date,
.post-author-link,
.post-read-time {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-author-link {
  color: var(--text-secondary);
  text-decoration: none;
}

.post-author-link:hover {
  color: var(--green);
}

.post-header-meta .separator {
  color: var(--border-medium);
  font-size: 0.7rem;
}

.single-post-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.post-featured-image {
  margin-bottom: 2.5rem;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elevated);
}

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

.post-featured-image figcaption {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  background: var(--bg-elevated);
  font-style: italic;
}

/* ---- Post content styles ---- */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-on-dark);
}

.entry-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.entry-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.entry-content h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

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

.entry-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(57,231,95,0.4);
  transition: text-decoration-color var(--transition), color var(--transition);
}

.entry-content a:hover {
  color: var(--amber);
  text-decoration-color: rgba(245,166,35,0.6);
}

/* Lists */
.entry-content ul,
.entry-content ol {
  list-style: none;
  margin-bottom: 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.entry-content ul li,
.entry-content ol li {
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.7;
}

.entry-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.8em;
  top: 0.1em;
}

.entry-content ol {
  counter-reset: ol-counter;
}

.entry-content ol li {
  counter-increment: ol-counter;
}

.entry-content ol li::before {
  content: counter(ol-counter, decimal-leading-zero) '.';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  top: 0.15em;
}

/* Blockquote — pull-quote style */
.entry-content blockquote,
blockquote.wp-block-quote {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: var(--bg-elevated);
  border-left: 4px solid var(--green);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.entry-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: 0.75rem;
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--green);
  opacity: 0.3;
  line-height: 1;
  font-style: normal;
}

.entry-content blockquote cite,
.entry-content blockquote footer {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.entry-content blockquote cite::before {
  content: '— ';
}

/* Images in content */
.entry-content img {
  border-radius: 3px;
  margin: 1.5rem 0;
}

.entry-content figure {
  margin: 2rem 0;
}

.entry-content figcaption {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  text-align: center;
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--border-medium);
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.entry-content th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entry-content td {
  color: var(--text-secondary);
}

.entry-content tr:nth-child(even) td {
  background: var(--bg-card);
}

/* Gutenberg table blocks: override WordPress block stylesheet backgrounds so our
   dark theme colours always apply. The block library can inject white backgrounds
   via has-contrast-border-color and similar palette classes. */
.entry-content figure.wp-block-table {
  background: transparent;
}
.entry-content .wp-block-table td,
.entry-content .wp-block-table th {
  background-color: transparent;
  color: var(--text-secondary);
}
.entry-content .wp-block-table th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}
.entry-content .wp-block-table tr:nth-child(even) td {
  background: var(--bg-card) !important;
}

/* Gutenberg table blocks: ensure dark text when a light/white background is applied
   to a row or cell via the block editor colour picker. */
.entry-content .wp-block-table td.has-white-background-color,
.entry-content .wp-block-table th.has-white-background-color,
.entry-content .wp-block-table tr.has-white-background-color td,
.entry-content .wp-block-table tr.has-white-background-color th,
.entry-content .wp-block-table td[style*="background-color:#fff"],
.entry-content .wp-block-table td[style*="background-color: #fff"],
.entry-content .wp-block-table td[style*="background-color:#ffffff"],
.entry-content .wp-block-table td[style*="background-color: #ffffff"],
.entry-content .wp-block-table td[style*="background-color:white"],
.entry-content .wp-block-table td[style*="background-color: white"],
.entry-content .wp-block-table tr[style*="background-color:#fff"] td,
.entry-content .wp-block-table tr[style*="background-color: #fff"] td,
.entry-content .wp-block-table tr[style*="background-color:#ffffff"] td,
.entry-content .wp-block-table tr[style*="background-color: #ffffff"] td,
.entry-content .wp-block-table tr[style*="background-color:white"] td,
.entry-content .wp-block-table tr[style*="background-color: white"] td {
  color: #1a1a2e;
}

/* ---- Review box ---- */
.review-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--amber);
  border-radius: 0 0 4px 4px;
  padding: 1.5rem;
  margin: 2.5rem 0;
}

.review-box-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  letter-spacing: 0.15em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.review-box-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amber);
}

.review-box-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.review-box-platform {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.review-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1rem;
}

.review-score-number {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(245,166,35,0.4);
  line-height: 1;
}

.review-score-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-verdict {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Pros/Cons box */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.pros, .cons {
  padding: 1rem;
  border-radius: 3px;
}

.pros {
  background: rgba(57,231,95,0.06);
  border: 1px solid rgba(57,231,95,0.2);
}

.cons {
  background: rgba(255,71,87,0.06);
  border: 1px solid rgba(255,71,87,0.2);
}

.pros-title, .cons-title {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.pros-title { color: var(--green); }
.cons-title { color: var(--red); }

.pros ul, .cons ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}

.pros ul li, .cons ul li {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.pros ul li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.cons ul li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* ---- Post footer (tags, share) ---- */
.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-tags-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  padding: 0.2em 0.6em;
  border-radius: 2px;
  text-decoration: none;
  transition: all var(--transition);
}

.post-tag:hover {
  color: var(--green);
  border-color: var(--green);
  background: rgba(57,231,95,0.08);
}

/* ---- Author bio ---- */
.author-bio-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.5rem;
  margin-top: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-bio-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
}

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

.author-bio-label {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.author-bio-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  text-decoration: none;
  display: inline-block;
}

.author-bio-name:hover {
  color: var(--green);
}

.author-bio-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---- Related posts ---- */
.related-posts-section {
  margin-top: 3rem;
}

.related-posts-heading {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.6;
}

.related-posts-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

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


/* ==========================================================================
   10. COMMENTS
   ========================================================================== */

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


.comments-title {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Comment list */
.comment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment {
  position: relative;
}

.comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.25rem;
}

.comment:target > .comment-body {
  border-color: var(--green);
}

.comment-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  float: left;
  margin-right: 0.75rem;
}

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

.comment-author-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-metadata {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.comment-metadata a {
  color: var(--text-muted);
  text-decoration: none;
}

.comment-metadata a:hover {
  color: var(--green);
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  clear: both;
}

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

.comment-reply-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
  transition: color var(--transition);
}

.comment-reply-link:hover {
  color: var(--green);
}

/* Nested comments */
.children {
  list-style: none;
  margin-top: 1rem;
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Comment form */
.comment-respond {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.comment-reply-title {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.comment-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  margin-bottom: 1.25rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(57,231,95,0.12);
}

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

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

.comment-form-cookies-consent label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  font-size: 0.8rem;
}

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


/* ==========================================================================
   11. ARCHIVE HEADERS
   ========================================================================== */

.archive-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.5rem 0 2rem;
  margin-bottom: 2.5rem;
}

.archive-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.archive-type-label {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: block;
}

.archive-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.archive-title .archive-accent {
  color: var(--green);
}

.archive-description {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

.archive-count {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Author archive header */
.author-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.author-header-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
}

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


/* ==========================================================================
   12. SEARCH RESULTS
   ========================================================================== */

.search-header {
  padding: 2.5rem 0 1.5rem;
}

.search-header-label {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.search-header-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.search-header-title em {
  color: var(--green);
  font-style: normal;
}

.search-again-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
}

.search-again-form .search-field {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 3px;
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.search-again-form .search-field:focus {
  outline: none;
  border-color: var(--green);
}

.no-results-wrap {
  text-align: center;
  padding: 4rem 1.5rem;
}

.no-results-code {
  font-family: var(--font-pixel);
  font-size: 2rem;
  color: var(--red);
  display: block;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255,71,87,0.3);
}

.no-results-message {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}


/* ==========================================================================
   13. 404 PAGE
   ========================================================================== */

.error-404-wrap {
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  max-width: 600px;
  margin: 0 auto;
}

.error-404-code {
  font-family: var(--font-pixel);
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--red);
  display: block;
  margin-bottom: 0.5rem;
  text-shadow:
    3px 3px 0 rgba(255,71,87,0.3),
    0 0 30px rgba(255,71,87,0.2);
  animation: glitch-text 4s infinite;
}

.error-404-subtitle {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: block;
  line-height: 1.6;
}

.error-404-message {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.error-404-sub-message {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.error-404-pixel-art {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--text-muted);
  line-height: 2;
  margin: 2rem 0;
  opacity: 0.4;
  white-space: pre;
  letter-spacing: 0.15em;
}

.continue-prompt {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  animation: blink-cursor 1s step-end infinite;
  display: block;
  margin-bottom: 2rem;
}


/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-subtle);
  padding-top: 3rem;
  /* Top glow line */
  box-shadow: 0 -1px 0 0 var(--green-dim), 0 -4px 30px rgba(0,0,0,0.3);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
}

.footer-widget-area .widget {
  background: transparent;
  border: none;
  padding: 0;
}

.footer-widget-area .widget-title {
  font-size: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copyright {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-copyright a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-copyright a:hover {
  color: var(--green);
}

.footer-tagline {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--green);
}

/* Footer logo */
.footer-logo-wrap {
  text-align: left;
  margin-bottom: 1rem;
}

.footer-logo-wrap .site-title {
  font-size: 0.65rem;
  display: inline-block;
}

.footer-about-text {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
}


/* ==========================================================================
   15. AD ZONE CONTAINERS
   ========================================================================== */

/*
 * Ad zones are marked with the class .ad-zone.
 * These are inserted via widget areas or direct template hooks.
 * Replace the inner content with your AdSense code.
 * The container is designed to be responsive and unobtrusive.
 */

.ad-zone {
  text-align: center;
  overflow: hidden;
}

/* Below header ad — full width, constrained height */
.ad-zone-header {
  padding: 0.75rem 1.5rem;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
}

.ad-zone-header .ad-zone-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Sidebar ad — fits within widget area */
.ad-zone-sidebar {
  background: var(--bg-widget);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 2rem;
  min-height: 100px;
}

/* In-content ad — appears between paragraphs */
.ad-zone-content {
  margin: 2.5rem -1rem;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Below post ad */
.ad-zone-below-post {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1.5rem;
}

/* Above footer ad */
.ad-zone-above-footer {
  padding: 1.5rem 0;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
}

/* Ad label — very subtle, for disclosure compliance */
.ad-zone-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}


/* ==========================================================================
   16. ANIMATIONS & EFFECTS
   ========================================================================== */

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes glitch-text {
  0%, 90%, 100% {
    text-shadow: 3px 3px 0 rgba(255,71,87,0.3), 0 0 30px rgba(255,71,87,0.2);
    transform: none;
  }
  92% {
    text-shadow: -3px -3px 0 var(--cyan), 3px 3px 0 var(--red);
    transform: translateX(2px);
  }
  94% {
    text-shadow: 3px -3px 0 var(--magenta), -3px 3px 0 var(--red);
    transform: translateX(-2px);
  }
  96% {
    text-shadow: -3px 3px 0 var(--cyan), 3px -3px 0 var(--red);
    transform: translateX(1px);
  }
}

@keyframes scanline-move {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ---- Single post hero — overrides ---- */

/* Bottom-heavy gradient: image shows clearly at top, text readable at bottom */
.post-hero::after {
  background:
    linear-gradient(
      to top,
      rgba(7, 7, 15, 0.96) 0%,
      rgba(7, 7, 15, 0.65) 45%,
      rgba(7, 7, 15, 0.15) 100%
    );
}

/* Content centred across the full width (no left-lean) */
.post-hero .hero-content {
  max-width: var(--content-max);
}

/* Title is plain text on the post page (not a link) — keep white */
.post-hero .hero-title {
  color: #fff;
}

/* Slightly more height so long titles have room */
.post-hero {
  min-height: 520px;
}

/* CRT glitch on hero title hover */
.hero-title:hover {
  animation: glitch-flash 0.3s step-end;
}

@keyframes glitch-flash {
  0%   { text-shadow: 2px 0 var(--cyan), -2px 0 var(--red); }
  25%  { text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta); }
  50%  { text-shadow: 0 0 none; }
  75%  { text-shadow: 2px 0 var(--red), -2px 0 var(--cyan); }
  100% { text-shadow: none; }
}

/* Pixel-style retro button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

/* Primary button — green */
.btn-primary {
  background: var(--green);
  color: var(--bg-body);
  border-color: var(--green);
  box-shadow:
    4px 4px 0 var(--green-dim),
    0 0 15px var(--green-glow);
}

.btn-primary:hover {
  background: transparent;
  color: var(--green);
  box-shadow:
    2px 2px 0 var(--green-dim),
    0 0 20px var(--green-glow);
  transform: translate(2px, 2px);
}

/* Outline button */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  color: var(--green);
  border-color: var(--green);
  background: rgba(57,231,95,0.06);
}

/* Submit button style */
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  background: var(--green);
  color: var(--bg-body);
  border: 2px solid var(--green);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 3px 3px 0 var(--green-dim);
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background: transparent;
  color: var(--green);
  box-shadow: 1px 1px 0 var(--green-dim);
  transform: translate(2px, 2px);
}


/* ==========================================================================
   17. GUTENBERG BLOCK STYLES
   ========================================================================== */

/* Align wide and full */
.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
}

.alignfull {
  margin-left: calc(50% - 50vw + 0.75rem);
  margin-right: calc(50% - 50vw + 0.75rem);
  max-width: 100vw;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Gutenberg blocks */
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2rem 0;
}

.wp-block-pullquote {
  border-top: 4px solid var(--green);
  border-bottom: 4px solid var(--green);
  padding: 1.5rem 0;
  margin: 2.5rem 0;
  text-align: center;
}

.wp-block-pullquote blockquote {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-primary);
}

.wp-block-pullquote blockquote::before {
  display: none;
}

.wp-block-code {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--green);
  border-radius: 0 4px 4px 0;
  padding: 1.5rem;
}

.wp-block-image figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 0.5rem;
}

.wp-block-columns {
  gap: 1.5rem;
}

.wp-block-button .wp-block-button__link {
  background: var(--green);
  color: var(--bg-body);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  padding: 0.7rem 1.4rem;
}

.wp-block-quote {
  padding: 1.25rem 1.25rem 1.25rem 1.75rem;
  background: var(--bg-elevated);
  border-left: 4px solid var(--green);
  border-radius: 0 4px 4px 0;
  margin: 2rem 0;
}

/* ==========================================================================
   18. RESPONSIVE / MEDIA QUERIES
   ========================================================================== */

/* ---- Large desktop ---- */
@media (min-width: 1200px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Tablet / Small desktop ---- */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 260px;
    --gap: 1.5rem;
  }

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

  .pros-cons {
    grid-template-columns: 1fr;
  }

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

/* ---- Tablet ---- */
@media (max-width: 900px) {
  .site-content-area {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2.5rem;
    margin-top: 0;
  }

  .sidebar .widget {
    margin-bottom: 0;
  }

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

  .hero-section {
    min-height: 380px;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  /* Keep the header on a single row — no wrapping */
  .header-inner {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  /* Logo takes available space; keeps search + toggle pinned right */
  .site-identity {
    flex: 1 1 auto;
    min-width: 0;
    flex-shrink: 1;
  }

  .site-title {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Remove the blinking cursor when it might truncate */
  }

  /* Mobile nav toggle visible */
  .menu-toggle {
    display: flex;
    flex-shrink: 0;
  }

  .header-search-btn {
    flex-shrink: 0;
  }

  /* Nav becomes an absolute dropdown from the bottom of the header —
     no longer in the header flex flow, so nothing wraps. */
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-header);
    border-bottom: 2px solid var(--green-dim);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 999;
    padding: 0.5rem 1rem 1rem;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-menu a {
    display: block;
    padding: 0.65rem 0;
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
  }

  .nav-menu a::after {
    display: none;
  }

  .nav-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 0 1rem;
    box-shadow: none;
  }

  /* Post grid goes to single column */
  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-list-item {
    grid-template-columns: 1fr;
  }

  .post-list-image {
    height: 200px;
  }

  .post-list-body {
    padding: 1rem;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 2rem 1rem;
  }

  .single-post-wrap {
    padding: 1.5rem 1rem 3rem;
  }

  .author-bio-box {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .error-404-code {
    font-size: 2.5rem;
  }

  .children {
    margin-left: 1rem;
  }

  .alignwide {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---- Small mobile ---- */
@media (max-width: 480px) {
  :root {
    --content-max: 100%;
  }

  .hero-section {
    min-height: 320px;
  }

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

  .post-card-body {
    padding: 1rem;
  }

  .archive-header {
    padding: 1.75rem 0 1.25rem;
  }
}


/* ==========================================================================
   19. LIGHTBOX
   ========================================================================== */

#js-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#js-lightbox.is-open {
  display: flex;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(4px);
}

.lb-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}

.lb-img {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 60px rgba(57, 231, 95, 0.12), 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lb-caption {
  margin-top: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 60ch;
}

.lb-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color var(--transition), color var(--transition);
}

.lb-close:hover,
.lb-close:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

/* ---- Print ---- */
@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .site-header, .sidebar, .site-footer, .ad-zone { display: none; }
  .site-content-area { display: block; }
  .single-post-wrap { padding: 0; }
  a { color: #000; text-decoration: underline; }
}
