/*
Theme Name: VK2YI Amateur Radio
Theme URI: https://www.vk2yi.com
Author: VK2YI
Author URI: https://www.vk2yi.com
Description: A dark, tech-inspired amateur radio theme for VK2YI. Features a classic radio aesthetic with green/amber accents, sticky navigation, category filtering, hero section, YouTube feed, and dark/light mode toggle.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vk2yi
Tags: dark, amateur-radio, blog, technology, responsive
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* Dark mode (default) */
  --bg-primary:    #0d0f0e;
  --bg-surface:    #141a17;
  --bg-elevated:   #1c2620;
  --bg-card:       #192118;

  --accent-green:  #39ff7a;
  --accent-amber:  #ffb020;
  --accent-red:    #ff4444;

  --text-primary:  #e8f0ec;
  --text-secondary:#8fa898;
  --text-muted:    #526059;

  --border:        #253028;
  --border-strong: #38473e;

  --font-display:  'Share Tech Mono', monospace;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'Share Tech Mono', monospace;

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

  --shadow-card:   0 2px 16px rgba(0,0,0,0.45);
  --shadow-glow:   0 0 18px rgba(57,255,122,0.18);

  --nav-height:    64px;
  --transition:    0.2s ease;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg-primary:    #f0f4f1;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f7faf8;
  --bg-card:       #ffffff;

  --accent-green:  #1a8f45;
  --accent-amber:  #c47a00;

  --text-primary:  #0d1f14;
  --text-secondary:#445c4a;
  --text-muted:    #7a9880;

  --border:        #d4e2d8;
  --border-strong: #b0c8b8;

  --shadow-card:   0 2px 12px rgba(0,0,0,0.10);
  --shadow-glow:   0 0 18px rgba(26,143,69,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

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

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

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

/* Scanline signature element — one CRT-scan line across headings */
.display-heading {
  position: relative;
  display: inline-block;
}
.display-heading::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-amber) 60%, transparent 100%);
  bottom: -6px;
  border-radius: 2px;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container--wide { max-width: 1400px; }
.container--narrow { max-width: 820px; }

.grid-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

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

/* =========================================================
   STICKY NAVIGATION
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(13, 15, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .site-header {
  background: rgba(240, 244, 241, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1.5rem;
}

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

/* Custom logo image — remove white background, constrain height */
.site-logo .custom-logo-link,
.site-logo .custom-logo-link img,
.site-logo img.custom-logo {
  display: block;
  max-height: 52px;
  width: auto;
}

/* Dark mode: screen blend removes white backgrounds on logos */
[data-theme="dark"] .site-logo .custom-logo-link {
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="dark"] .site-logo .custom-logo-link img,
[data-theme="dark"] .site-logo img.custom-logo {
  mix-blend-mode: screen;
  filter: brightness(1.08) contrast(1.05) saturate(1.1);
  border-radius: 4px;
}

/* On light mode, show logo as-is */
[data-theme="light"] .site-logo .custom-logo-link img,
[data-theme="light"] .site-logo img.custom-logo {
  mix-blend-mode: normal;
  filter: none;
}

.logo-callsign {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-green);
  letter-spacing: 0.06em;
  line-height: 1;
}

.logo-tagline {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-top: 2px;
}

/* Signal bars decoration */
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}
.signal-bars span {
  width: 4px;
  background: var(--accent-green);
  border-radius: 1px;
  opacity: 0.3;
  transition: opacity 0.15s;
}
.signal-bars span:nth-child(1) { height: 5px;  opacity: 0.8; }
.signal-bars span:nth-child(2) { height: 9px;  opacity: 0.8; }
.signal-bars span:nth-child(3) { height: 13px; opacity: 0.8; }
.signal-bars span:nth-child(4) { height: 18px; opacity: 0.5; }
.signal-bars span:nth-child(5) { height: 18px; opacity: 0.2; }

/* Main nav */
.main-nav { display: flex; align-items: center; }

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

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--accent-green);
  background: rgba(57, 255, 122, 0.08);
}

/* Header right controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Search toggle */
.search-toggle,
.theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  font-size: 1rem;
}

.search-toggle:hover,
.theme-toggle:hover {
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: rgba(57, 255, 122, 0.06);
}

/* Hamburger (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search bar (expandable) */
.header-search {
  position: absolute;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: none;
}
.header-search.is-open { display: flex; }

.header-search form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.header-search input[type="search"] {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}
.header-search input[type="search"]:focus {
  border-color: var(--accent-green);
}
.header-search button[type="submit"] {
  background: var(--accent-green);
  color: #0d0f0e;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-weight: 600;
}

/* Page offset for fixed nav */
.site-main {
  margin-top: var(--nav-height);
}

/* Mobile nav */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }

  .main-nav.is-open {
    display: block;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    overflow-y: auto;
    z-index: 999;
  }

  .main-nav.is-open ul {
    flex-direction: column;
    gap: 0.25rem;
    align-items: stretch;
  }

  .main-nav.is-open a {
    display: block;
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.3) saturate(0.4);
  transition: filter 0.3s;
}

/* Overlay grid pattern — gives a radio/scope feel */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57,255,122,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,255,122,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-primary) 0%,
    rgba(13,15,14,0.7) 55%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 0 3.5rem;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-green);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent-green);
  border-radius: 2px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  max-width: 700px;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(57,255,122,0.1);
  border: 1px solid rgba(57,255,122,0.3);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.hero-badge.amber {
  background: rgba(255,176,32,0.1);
  border-color: rgba(255,176,32,0.3);
  color: var(--accent-amber);
}

/* Blinking dot */
.blink {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 1.4s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* =========================================================
   CATEGORY FILTER BAR
   ========================================================= */
.category-filter {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 0.5rem;
  border-right: 1px solid var(--border);
  margin-right: 0.25rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  text-decoration: none;
  display: inline-block;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-btn.active,
.filter-btn[aria-current="page"] {
  color: var(--bg-primary);
  background: var(--accent-green);
  border-color: var(--accent-green);
}

[data-theme="light"] .filter-btn.active {
  color: #ffffff;
}

/* =========================================================
   POST CARDS
   ========================================================= */
.posts-section {
  padding: 2.5rem 0 3rem;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.section-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

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

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

.post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
}

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

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

/* Placeholder when no thumbnail */
.post-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 2rem;
}

.post-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-amber);
  margin-bottom: 0.5rem;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  flex: 1;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}
.post-card__title a:hover { color: var(--accent-green); }

.post-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.post-card__date { letter-spacing: 0.04em; }

.post-card__read-more {
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Featured card variant */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.post-card--featured .post-card__thumb {
  width: 45%;
  flex-shrink: 0;
  aspect-ratio: unset;
  min-height: 220px;
}

.post-card--featured .post-card__body {
  padding: 1.75rem;
}

.post-card--featured .post-card__title {
  font-size: 1.3rem;
}

@media (max-width: 640px) {
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card__thumb { width: 100%; aspect-ratio: 16/9; }
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.widget-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-header::before {
  content: '//';
  color: var(--accent-green);
  font-weight: 700;
}

.widget-body {
  padding: 1rem;
}

/* Recent posts in sidebar */
.sidebar-post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-post-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.sidebar-post-list .thumb {
  width: 56px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}

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

.sidebar-post-list .info { flex: 1; min-width: 0; }

.sidebar-post-list .title {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.sidebar-post-list .title:hover { color: var(--accent-green); }

.sidebar-post-list .date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* QRZ widget */
.qrz-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qrz-link-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.qrz-link-btn:hover {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.qrz-link-btn .icon { font-size: 1rem; }

/* Station info */
.station-info {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 2;
}

.station-info .label {
  color: var(--text-muted);
  display: inline-block;
  width: 80px;
}

.station-info .value { color: var(--accent-green); }

/* Search widget */
.sidebar-search {
  display: flex;
  gap: 0.4rem;
}

.sidebar-search input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  font-family: var(--font-body);
}

.sidebar-search input:focus { border-color: var(--accent-green); }

.sidebar-search button {
  background: var(--accent-green);
  color: #0d0f0e;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}

/* Categories list */
.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.category-list a:hover {
  background: rgba(57,255,122,0.07);
  color: var(--accent-green);
}

.category-list .count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 0.1rem 0.4rem;
  border-radius: 50px;
}

/* =========================================================
   YOUTUBE FEED SECTION
   ========================================================= */
.youtube-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.yt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.yt-heading-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.yt-icon {
  background: #ff0000;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.yt-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0;
}

.yt-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: block;
  margin-top: 1px;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.yt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color var(--transition), transform var(--transition);
}

.yt-card:hover {
  border-color: #ff4444;
  transform: translateY(-2px);
}

.yt-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  overflow: hidden;
}

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

.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s;
}

.yt-card:hover .yt-play { opacity: 1; }

.yt-play-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,0,0,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  padding-left: 3px;
}

.yt-info {
  padding: 0.85rem 1rem 1rem;
}

.yt-title {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.post-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.post-category-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-amber);
  border: 1px solid rgba(255,176,32,0.35);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.post-title-main {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 820px;
  margin-bottom: 1.25rem;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.post-meta a { color: var(--text-muted); }
.post-meta a:hover { color: var(--accent-green); }

.post-meta .sep { opacity: 0.3; }

.post-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Post content */
.post-content {
  font-size: 1.0rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 {
  font-size: 1.5rem;
  margin: 2.25rem 0 0.9rem;
  color: var(--text-primary);
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--accent-green);
}

.post-content p { margin-bottom: 1.3em; }

.post-content a { color: var(--accent-green); border-bottom: 1px solid rgba(57,255,122,0.3); }
.post-content a:hover { border-bottom-color: var(--accent-green); }

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.3em;
}

.post-content li { margin-bottom: 0.35em; }

.post-content blockquote {
  border-left: 3px solid var(--accent-amber);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content pre,
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.87rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.post-content pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.3em;
}

.post-content :not(pre) > code {
  padding: 0.15em 0.4em;
  color: var(--accent-amber);
}

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

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.3em;
  font-size: 0.9rem;
}

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

.post-content th {
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

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

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

.post-nav-item:hover { border-color: var(--accent-green); }

.post-nav-item .nav-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.post-nav-item .nav-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

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

@media (max-width: 540px) {
  .post-nav { grid-template-columns: 1fr; }
}

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

.comments-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

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

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.comment-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

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

.comment-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-body { font-size: 0.9rem; color: var(--text-secondary); }

/* Comment form */
.comment-form-wrap {
  margin-top: 2rem;
}

.comment-form-title { font-size: 1.1rem; margin-bottom: 1.25rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-field { margin-bottom: 0.75rem; }

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

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent-green); }

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

.btn-submit {
  background: var(--accent-green);
  color: #0d0f0e;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-submit:hover { opacity: 0.85; }

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo-callsign { font-size: 1.6rem; display: block; margin-bottom: 0.75rem; }

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.social-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}

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

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-copy a { color: var(--text-muted); }
.footer-copy a:hover { color: var(--accent-green); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
}

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

/* =========================================================
   404 / ARCHIVE / SEARCH
   ========================================================= */
.page-header-section {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-amber);
  margin-bottom: 0.6rem;
}

.page-header-title { margin-bottom: 0.5rem; }

.page-header-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.pagination .page-numbers:hover,
.pagination .current {
  color: var(--bg-primary);
  background: var(--accent-green);
  border-color: var(--accent-green);
}

[data-theme="light"] .pagination .current { color: #fff; }

/* =========================================================
   SCROLL TO TOP
   ========================================================= */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, color var(--transition);
  z-index: 500;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover { color: var(--accent-green); border-color: var(--accent-green); }

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

.text-green  { color: var(--accent-green); }
.text-amber  { color: var(--accent-amber); }
.text-muted  { color: var(--text-muted); }

/* WordPress core alignment */
.alignleft  { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* WordPress captions */
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.4rem;
  text-align: center;
}

/* WordPress embeds */
.wp-block-embed { margin: 1.5rem 0; }

/* Responsive iframe */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* Print */
@media print {
  .site-header, .sidebar, .site-footer, .scroll-top { display: none; }
  .site-main { margin-top: 0; }
  .grid-main { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
}
