/*
Theme Name: Cyb3rKnight Vuln Watch
Theme URI: https://cyb3rknight.com
Author: Cyb3rKnight
Author URI: https://cyb3rknight.com
Description: A professional vulnerability management blog theme with a dark terminal aesthetic and green colour scheme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vuln-watch
Tags: blog, dark, cybersecurity, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Core palette */
  --bg-void:        #060a06;
  --bg-deep:        #0a0f0a;
  --bg-surface:     #0f1a0f;
  --bg-raised:      #152015;
  --bg-card:        #1a2a1a;
  --bg-card-hover:  #1f321f;

  /* Green spectrum */
  --green-terminal: #00ff41;
  --green-bright:   #39ff14;
  --green-mid:      #22c55e;
  --green-muted:    #16a34a;
  --green-dark:     #0d5a1e;
  --green-dim:      #0a3d14;

  /* Text */
  --text-primary:   #e8f5e9;
  --text-secondary: #a5d6a7;
  --text-muted:     #5a8a5a;
  --text-dim:       #2e5c2e;

  /* Borders */
  --border-bright:  rgba(0, 255, 65, 0.4);
  --border-mid:     rgba(0, 255, 65, 0.15);
  --border-dim:     rgba(0, 255, 65, 0.06);

  /* Severity colours */
  --sev-critical:   #ff2d2d;
  --sev-critical-bg:#1a0000;
  --sev-high:       #ff8c00;
  --sev-high-bg:    #1a0900;
  --sev-medium:     #ffd700;
  --sev-medium-bg:  #1a1500;
  --sev-low:        #4fa3e0;
  --sev-low-bg:     #00101a;
  --sev-info:       #8a8a8a;
  --sev-info-bg:    #111111;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Layout */
  --content-width: 1200px;
  --sidebar-width: 300px;
  --header-height: 64px;

  /* Typography */
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-body:  'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'IBM Plex Sans', sans-serif;

  /* Effects */
  --glow-green: 0 0 8px rgba(0, 255, 65, 0.35), 0 0 20px rgba(0, 255, 65, 0.1);
  --glow-text:  0 0 12px rgba(0, 255, 65, 0.5);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.6), 0 1px 0 rgba(0,255,65,0.06) inset;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition: 0.2s ease;
}

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

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

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

/* Scanline overlay — subtle CRT atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

a {
  color: var(--green-terminal);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}
a:hover { color: var(--green-bright); text-shadow: var(--glow-text); }
a:focus-visible { outline: 2px solid var(--green-terminal); outline-offset: 3px; border-radius: 2px; }

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

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;
}

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--sp-6); margin-bottom: var(--sp-4); }
li { margin-bottom: var(--sp-2); }

blockquote {
  border-left: 3px solid var(--green-terminal);
  padding: var(--sp-4) var(--sp-6);
  margin: var(--sp-6) 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-card);
  color: var(--green-terminal);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
}

pre {
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  overflow-x: auto;
  margin: var(--sp-6) 0;
  position: relative;
}
pre::before {
  content: '$ ';
  color: var(--green-muted);
  font-family: var(--font-mono);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--border-mid);
  margin: var(--sp-8) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-6) 0;
  font-size: 0.9rem;
}
th {
  background: var(--bg-surface);
  color: var(--green-terminal);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border-bright);
}
td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-secondary);
}
tr:hover td { background: var(--bg-surface); }

/* ============================================================
   LAYOUT STRUCTURE
   ============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--sp-8);
  padding: var(--sp-8) 0 var(--sp-16);
  align-items: start;
}

.main-content { min-width: 0; }
.site-main { flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 10, 6, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-mid);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  height: 100%;
}

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

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

.site-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-terminal);
  text-shadow: var(--glow-text);
  letter-spacing: 0.05em;
}
.site-title a { color: inherit; text-shadow: inherit; }
.site-title a:hover { color: var(--green-bright); }

.site-description {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-page-ancestor > a {
  color: var(--green-terminal);
  background: var(--border-dim);
  text-shadow: none;
}

/* Dropdown */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + var(--sp-2));
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  flex-direction: column;
  gap: 0;
  padding: var(--sp-2);
  z-index: 200;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: flex; }
.main-navigation .sub-menu a {
  padding: var(--sp-2) var(--sp-3);
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Header search */
.header-search form {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.header-search form:focus-within { border-color: var(--green-terminal); }

.header-search input[type="search"] {
  background: none;
  border: none;
  outline: none;
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  width: 180px;
}
.header-search input::placeholder { color: var(--text-dim); }

.header-search button {
  background: none;
  border: none;
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  font-size: 0.9rem;
}
.header-search button:hover { color: var(--green-terminal); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}
.menu-toggle:hover { border-color: var(--green-terminal); color: var(--green-terminal); }

/* ============================================================
   HERO / PAGE HEADER
   ============================================================ */
.page-header {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-dim);
  padding: var(--sp-8) 0;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-terminal), transparent);
  opacity: 0.3;
}
.page-header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.page-header-icon {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--green-terminal);
  opacity: 0.7;
}
.page-header h1 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.page-header h1 span {
  color: var(--green-terminal);
  font-size: 1.4rem;
  display: block;
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-top: var(--sp-1);
  color: var(--text-primary);
}

/* ============================================================
   POST CARDS (index / archive)
   ============================================================ */
.posts-grid { display: flex; flex-direction: column; gap: var(--sp-6); }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-terminal), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.post-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card), var(--glow-green);
  transform: translateY(-2px);
}
.post-card:hover::before { opacity: 1; }

.post-card-inner {
  display: grid;
  grid-template-columns: 1fr;
}
.post-card.has-thumbnail .post-card-inner {
  grid-template-columns: 280px 1fr;
}

.post-thumbnail {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: saturate(0.7) brightness(0.85);
}
.post-card:hover .post-thumbnail img {
  transform: scale(1.04);
  filter: saturate(1) brightness(0.95);
}

.post-content { padding: var(--sp-6); }

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-meta a { color: var(--green-muted); }
.post-meta a:hover { color: var(--green-terminal); }

.post-meta .meta-separator { color: var(--text-dim); }

.post-categories {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.post-title {
  font-size: 1.35rem;
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}
.post-title a { color: var(--text-primary); }
.post-title a:hover { color: var(--green-terminal); text-shadow: none; }

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-terminal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.read-more:hover {
  background: var(--green-terminal);
  color: var(--bg-void);
  text-shadow: none;
  box-shadow: var(--glow-green);
}
.read-more::after { content: '→'; }

/* ============================================================
   SEVERITY BADGES & CLASSES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  border: 1px solid currentColor;
}
.badge::before { content: '●'; font-size: 0.55em; }

.severity-critical, .badge.critical {
  color: var(--sev-critical);
  background: var(--sev-critical-bg);
  border-color: rgba(255, 45, 45, 0.35);
  box-shadow: 0 0 8px rgba(255, 45, 45, 0.2);
}
.severity-high, .badge.high {
  color: var(--sev-high);
  background: var(--sev-high-bg);
  border-color: rgba(255, 140, 0, 0.35);
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.2);
}
.severity-medium, .badge.medium {
  color: var(--sev-medium);
  background: var(--sev-medium-bg);
  border-color: rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}
.severity-low, .badge.low {
  color: var(--sev-low);
  background: var(--sev-low-bg);
  border-color: rgba(79, 163, 224, 0.35);
  box-shadow: 0 0 8px rgba(79, 163, 224, 0.15);
}
.severity-info, .badge.info {
  color: var(--sev-info);
  background: var(--sev-info-bg);
  border-color: rgba(138, 138, 138, 0.25);
}

/* Severity score bar */
.cvss-score {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.cvss-score .score-value {
  font-size: 1.1rem;
  font-weight: 700;
}
.cvss-bar {
  height: 6px;
  width: 80px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}
.cvss-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Category pill */
.cat-pill {
  display: inline-block;
  padding: 0.15em 0.65em;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  transition: all var(--transition);
}
.cat-pill:hover {
  border-color: var(--green-terminal);
  color: var(--green-terminal);
  background: var(--border-dim);
  text-shadow: none;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-header {
  padding: var(--sp-8) 0 var(--sp-6);
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: var(--sp-8);
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.single-post-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.03em;
}

.single-post-excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 3px solid var(--green-terminal);
  padding-left: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-8);
  border: 1px solid var(--border-dim);
  aspect-ratio: 16/6;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) brightness(0.9);
}

/* Article body */
.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.entry-content h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: var(--sp-8) 0 var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-dim);
  position: relative;
}
.entry-content h2::before {
  content: '## ';
  color: var(--green-terminal);
  font-family: var(--font-mono);
  font-size: 0.8em;
  opacity: 0.7;
}
.entry-content h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: var(--sp-6) 0 var(--sp-3);
}
.entry-content h3::before {
  content: '### ';
  color: var(--green-muted);
  font-family: var(--font-mono);
  font-size: 0.8em;
  opacity: 0.7;
}
.entry-content a { border-bottom: 1px solid rgba(0, 255, 65, 0.3); }
.entry-content a:hover { border-bottom-color: var(--green-terminal); }

/* Post tags */
.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-8) 0;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}
.tags-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: var(--sp-2);
}
.tag-pill {
  padding: 0.2em 0.7em;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag-pill:hover {
  border-color: var(--green-terminal);
  color: var(--green-terminal);
  text-shadow: none;
}

/* Author box */
.author-box {
  display: flex;
  gap: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin: var(--sp-8) 0;
}
.author-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  flex-shrink: 0;
}
.author-info h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-1);
}
.author-info h4 span {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.author-info p { font-size: 0.875rem; color: var(--text-secondary); }

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-8) 0;
}
.nav-previous, .nav-next {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  transition: all var(--transition);
}
.nav-previous:hover, .nav-next:hover {
  border-color: var(--border-bright);
}
.nav-next { text-align: right; }
.nav-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: var(--sp-1);
}
.nav-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
  margin-top: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border-dim);
}
.comments-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}
.comments-title span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  display: block;
  text-transform: none;
  letter-spacing: -0.02em;
}

.comment-list { list-style: none; padding: 0; }
.comment { margin-bottom: var(--sp-6); }
.comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.comment-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
}
.comment-author .fn { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.comment-metadata { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); }
.comment-content p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--sp-2); }

.reply-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-muted);
}
.reply-link:hover { color: var(--green-terminal); }

.children {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-4);
  margin-left: var(--sp-6);
  padding-left: var(--sp-4);
  border-left: 2px solid var(--border-mid);
}

/* Comment form */
.comment-respond {
  margin-top: var(--sp-8);
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
}
.comment-reply-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.comment-reply-title span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  display: block;
  text-transform: none;
  letter-spacing: -0.02em;
}

.comment-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: var(--sp-4);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--green-terminal); }
.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form-cookies-consent label { text-transform: none; font-size: 0.8rem; display: inline; margin-left: var(--sp-2); }

/* ============================================================
   FORMS (search, general)
   ============================================================ */
.search-form {
  display: flex;
  gap: var(--sp-2);
}
.search-form input[type="search"] {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-form input:focus { border-color: var(--green-terminal); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn, button[type="submit"], input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  background: transparent;
  border: 1px solid var(--green-terminal);
  border-radius: var(--radius-sm);
  color: var(--green-terminal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--green-terminal);
  color: var(--bg-void);
  box-shadow: var(--glow-green);
  text-shadow: none;
}
.btn-solid {
  background: var(--green-terminal);
  color: var(--bg-void);
}
.btn-solid:hover {
  background: var(--green-bright);
  border-color: var(--green-bright);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: calc(var(--header-height) + var(--sp-4)); }

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 0.875rem;        /* ~30% smaller than sp-5 (1.25rem) */
  margin-bottom: 0.7rem;    /* ~30% smaller than sp-4 (1rem) */
  position: relative;
  overflow: hidden;
  text-align: center;
}
.widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-dim), var(--green-terminal), var(--green-dim));
  opacity: 0.6;
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;       /* slightly tighter to match reduced box */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-terminal);
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-dim);
  text-align: center;
}

.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
  padding: 0.35rem 0;       /* ~30% smaller than sp-2 (0.5rem) */
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.8rem;        /* slightly reduced */
  margin: 0;
  text-align: center;
}
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--text-secondary); }
.widget li a:hover { color: var(--green-terminal); text-shadow: none; }

/* Recent posts widget */
.widget_recent_entries li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
}
.widget_recent_entries .post-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Categories widget */
.widget_categories li {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
}
.widget_categories .count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  background: var(--bg-surface);
  padding: 0.1em 0.5em;
  border-radius: 100px;
}

/* Tag cloud */
.widget_tag_cloud .tagcloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  list-style: none;
}
.widget_tag_cloud a {
  padding: 0.15em 0.5em;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem !important;
  color: var(--text-muted);
  transition: all var(--transition);
}
.widget_tag_cloud a:hover {
  border-color: var(--green-terminal);
  color: var(--green-terminal);
  text-shadow: none;
}

/* Search widget */
.widget_search .search-form { flex-direction: column; }
.widget_search input { width: 100%; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination, .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin: var(--sp-8) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.page-numbers:hover {
  border-color: var(--green-terminal);
  color: var(--green-terminal);
  text-shadow: none;
}
.page-numbers.current {
  background: var(--green-terminal);
  border-color: var(--green-terminal);
  color: var(--bg-void);
}
.page-numbers.dots {
  border: none;
  width: auto;
  color: var(--text-dim);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-mid);
  margin-top: auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  padding: var(--sp-12) 0 var(--sp-8);
}

.footer-widget-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-terminal);
  margin-bottom: var(--sp-4);
}

.footer-about p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: var(--sp-2); }
.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a::before { content: '→ '; color: var(--text-dim); font-family: var(--font-mono); }
.footer-links a:hover { color: var(--green-terminal); text-shadow: none; }

.footer-bottom {
  border-top: 1px solid var(--border-dim);
  padding: var(--sp-4) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.footer-copyright a { color: var(--text-muted); }
.footer-copyright a:hover { color: var(--green-terminal); }

.footer-credits {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-no-results { text-align: center; padding: var(--sp-12) 0; }
.search-no-results h2 { color: var(--text-muted); margin-bottom: var(--sp-4); }

/* ============================================================
   PAGE (static)
   ============================================================ */
.page-content {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: var(--sp-16) 0; }
.error-404 .error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 10rem);
  color: var(--green-terminal);
  text-shadow: var(--glow-text);
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-4);
  opacity: 0.3;
}
.error-404 h2 { color: var(--text-secondary); margin-bottom: var(--sp-4); }
.error-404 p { color: var(--text-muted); }

/* ============================================================
   UTILITIES
   ============================================================ */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal;
}
.alignleft { float: left; margin-right: var(--sp-4); margin-bottom: var(--sp-4); }
.alignright { float: right; margin-left: var(--sp-4); margin-bottom: var(--sp-4); }
.aligncenter { margin: 0 auto var(--sp-4); display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-top: var(--sp-2); }

/* Blinking cursor animation */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor::after {
  content: '█';
  animation: blink 1.2s step-end infinite;
  color: var(--green-terminal);
  font-family: var(--font-mono);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .content-area {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --header-height: 56px; }

  .site-header .container { gap: var(--sp-3); }

  .main-navigation { display: none; }
  .main-navigation.toggled {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border-mid);
    flex-direction: column;
    padding: var(--sp-4);
    z-index: 99;
  }
  .main-navigation.toggled ul {
    flex-direction: column;
    gap: var(--sp-1);
  }
  .menu-toggle { display: flex; align-items: center; gap: var(--sp-2); }

  .header-search { display: none; }

  .post-card.has-thumbnail .post-card-inner { grid-template-columns: 1fr; }
  .post-thumbnail { aspect-ratio: 16/7; }

  .post-navigation { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-8) 0 var(--sp-6); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .single-post-title { font-size: 1.5rem; }
  .author-box { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .post-content { padding: var(--sp-4); }
  .widget { padding: var(--sp-4); }
  .comment-respond { padding: var(--sp-4); }
}
