/*
Theme Name: Greenlog Arcade
Theme URI: https://greenlog.fr
Author: Greenlog
Description: Thème arcade 8-bit — Rétrogaming Atari ST
Version: 1.0.0
Text Domain: greenlog-arcade
Requires at least: 6.0
Tested up to: 6.7
*/

/* ============================================
   VARIABLES
   ============================================ */
:root {
  --bg:       #000018;
  --bg-panel: #00002e;
  --bg-card:  #000024;
  --bg-dark:  #000010;

  --yellow:   #ffff00;
  --orange:   #ff8800;
  --green:    #00ee00;
  --cyan:     #00ffff;
  --red:      #ff2200;
  --white:    #ffffff;
  --purple:   #aa00ff;

  --text:     #cccccc;
  --text-dim: #555577;

  /* Yellow pixel shadow offset */
  --px-shadow: 4px 4px 0 rgba(255, 255, 0, 0.4);
  --px-shadow-lg: 6px 6px 0 rgba(255, 255, 0, 0.35);

  --font-pixel: 'Press Start 2P', monospace;
  --font-vt:    'VT323', monospace;
  --font-body:  'Courier Prime', 'Courier New', monospace;

  --radius: 0px;
  --tr: 0.08s steps(1);   /* step timing = pixel feel */
  --tr-smooth: 0.15s ease;

  --max-w:  1280px;
  --gutter: 20px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: none; image-rendering: pixelated; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Dithered dot grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect x='0' y='0' width='2' height='2' fill='%23ffff00' opacity='0.03'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23ffff00' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a    { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-vt);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h4, h5, h6 {
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.4;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.section { padding: 80px 0; }

/* ============================================
   PIXEL UTILITIES
   ============================================ */
/* Raised 3D panel — Atari GEM window style */
.px-panel {
  border: 4px solid;
  border-color: #555577 #000010 #000010 #555577;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.06), inset -2px -2px 0 rgba(0,0,0,0.4);
}

/* Flat pixel box with shadow */
.px-box {
  border: 4px solid var(--yellow);
  box-shadow: var(--px-shadow);
}

/* Pixel divider */
.px-divider {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--yellow) 0px, var(--yellow) 8px,
    transparent 8px, transparent 12px
  );
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   HEADER
   ============================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-dark);
  border-bottom: 4px solid var(--yellow);
}

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #000;
  flex-shrink: 0;
  position: relative;
  /* Pixel border */
  box-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

/* Scanlines on logo */
.logo-mark::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.2) 3px, rgba(0,0,0,0.2) 4px);
}

.logo-text {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 rgba(255,255,0,0.25);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.logo-sub {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: block;
  margin-top: 4px;
  letter-spacing: 0.1em;
}

/* Nav */
#site-nav { flex: 1; display: flex; justify-content: center; }

.nav-menu { display: flex; align-items: center; gap: 0; }

.nav-menu li a {
  font-family: var(--font-pixel);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  display: block;
  transition: color var(--tr), background var(--tr);
  position: relative;
}

.nav-menu li a::before { content: ''; display: none; }

.nav-menu li a:hover,
.nav-menu .current-menu-item > a {
  color: var(--yellow);
  background: rgba(255, 255, 0, 0.06);
}

.nav-menu .current-menu-item > a::before {
  content: '▶ ';
  display: inline;
}

.nav-menu li a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

/* Header right */
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 2px solid var(--text-dim);
  cursor: pointer;
  color: var(--text-dim);
  transition: all var(--tr);
  font-family: var(--font-pixel);
  font-size: 10px;
}
.btn-icon:hover { border-color: var(--yellow); color: var(--yellow); background: rgba(255,255,0,0.05); box-shadow: 2px 2px 0 var(--yellow); }
.btn-icon:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px; height: 36px;
  cursor: pointer;
  background: transparent;
  border: 2px solid var(--text-dim);
  padding: 8px;
}
.menu-toggle span { display: block; height: 2px; background: var(--text); transition: all 0.2s; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav — pause screen style */
.mobile-nav {
  display: none;
  background: var(--bg-dark);
  border-bottom: 4px solid var(--yellow);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-nav.open { max-height: 500px; }

.mobile-nav-menu {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}
.mobile-nav-menu li a {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px var(--gutter);
  display: block;
  border-left: 4px solid transparent;
  letter-spacing: 0.08em;
  transition: all 0.1s;
}
.mobile-nav-menu li a:hover { color: var(--yellow); border-left-color: var(--yellow); background: rgba(255,255,0,0.04); }
.mobile-nav-menu li a::before { content: '  '; }
.mobile-nav-menu .current-menu-item > a::before { content: '▶ '; }

/* ============================================
   HIGH SCORE BAR (Ticker)
   ============================================ */
.ticker-bar {
  background: var(--bg-dark);
  border-bottom: 2px solid var(--orange);
  height: 28px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  background: var(--orange);
  color: #000;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-content {
  display: flex;
  animation: ticker 50s linear infinite;
  white-space: nowrap;
}
.ticker-content a {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--orange);
  text-transform: uppercase;
  padding: 0 32px;
  letter-spacing: 0.06em;
}
.ticker-content a::before { content: '★  '; }
.ticker-content a:hover { color: var(--yellow); }

@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-content { animation: none; } }

/* ============================================
   HERO — Attract Screen
   ============================================ */
.hero-section {
  border-bottom: 4px solid var(--yellow);
  overflow: hidden;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4px;
  min-height: 560px;
}

/* Main hero */
.hero-main {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
}

.hero-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.6);
  transition: filter 0.3s ease;
  image-rendering: pixelated;
}
.hero-main:hover .hero-img img { filter: brightness(0.25) saturate(0.4); }

/* CRT scanlines on hero */
.hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.14) 2px, rgba(0,0,0,0.14) 4px
  );
  pointer-events: none; z-index: 1;
}

.hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,24,0.99) 0%, rgba(0,0,24,0.5) 40%, transparent 80%);
  z-index: 2;
}

/* Flashing INSERT COIN indicator (top right of hero) */
.hero-insert-coin {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 4;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--yellow);
  letter-spacing: 0.1em;
  animation: blink-slow 1.4s step-end infinite;
}
@keyframes blink-slow { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px;
  z-index: 3;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  border: 2px solid var(--orange);
  padding: 4px 10px;
  background: rgba(0,0,0,0.7);
}

.hero-title {
  font-family: var(--font-vt);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 4px 4px 0 rgba(255,255,0,0.15), -2px -2px 0 rgba(255,136,0,0.3);
  margin-bottom: 20px;
}
.hero-title a { color: inherit; transition: color var(--tr); }
.hero-title a:hover { color: var(--white); }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.hero-meta .dot { width: 4px; height: 4px; background: var(--text-dim); }

/* HP reading bar in hero */
.hero-hp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.hp-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--green);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.hp-track {
  width: 80px;
  height: 8px;
  border: 2px solid var(--green);
  background: var(--bg-dark);
  position: relative;
}
.hp-fill {
  position: absolute;
  inset: 0;
  background: var(--green);
  transform-origin: left;
}
.hp-value {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--green);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Hero sidebar items */
.hero-sidebar { display: flex; flex-direction: column; gap: 4px; }

.hero-side-item {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-panel);
  min-height: 130px;
  border: 2px solid var(--bg-panel);
  transition: border-color var(--tr);
}
.hero-side-item:hover { border-color: var(--orange); }
.hero-side-item:hover .side-img img { filter: brightness(0.25) saturate(0.5); }

.side-img { position: absolute; inset: 0; overflow: hidden; }
.side-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
  filter: brightness(0.3) saturate(0.5);
  image-rendering: pixelated;
}

.side-content {
  position: relative; z-index: 2;
  padding: 14px 16px;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
}

.side-tag {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.side-title {
  font-family: var(--font-vt);
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--white);
}
.side-title a { color: inherit; transition: color var(--tr); }
.side-title a:hover { color: var(--yellow); }

/* ============================================
   SECTION HEADER — GEM Window Title Bar
   ============================================ */
.sec-header {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
}

.sec-header-bar {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--yellow);
  padding: 6px 12px;
  gap: 12px;
}

.sec-header-dots { display: flex; gap: 5px; }
.sec-header-dots span {
  width: 10px; height: 10px;
  background: #000;
  display: block;
}

.sec-title {
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  flex: 1;
}

.sec-link {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: rgba(0,0,0,0.6);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--tr);
}
.sec-link:hover { color: #000; }
.sec-link:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* ============================================
   POST CARDS — Game Select Screen
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.article-card {
  background: var(--bg-card);
  position: relative;
  display: flex;
  flex-direction: column;
  border: 4px solid var(--bg-panel);
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s;
}

.article-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--px-shadow-lg);
  border-color: var(--yellow);
  z-index: 1;
}

.article-card--wide { grid-column: span 2; flex-direction: row; }
.article-card--wide .card-image { width: 48%; aspect-ratio: auto; flex-shrink: 0; }
.article-card--wide .card-title { font-size: 28px; }

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-panel);
  flex-shrink: 0;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter 0.2s, transform 0.2s;
  image-rendering: pixelated;
}
.article-card:hover .card-image img { filter: brightness(0.4) saturate(0.4); transform: scale(1.03); }

/* CRT scanlines on cards too */
.card-image::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
  pointer-events: none;
}

.card-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-panel);
  font-family: var(--font-pixel);
  font-size: 32px;
  color: var(--yellow);
  opacity: 0.15;
}

.card-cat {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  background: var(--orange);
  padding: 4px 8px;
  z-index: 2;
}

/* Score display on image */
.card-score {
  position: absolute;
  top: 0; right: 0;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--yellow);
  background: rgba(0,0,0,0.85);
  padding: 4px 8px;
  z-index: 2;
  letter-spacing: 0.06em;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-family: var(--font-vt);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--white);
}
.card-title a { color: inherit; transition: color var(--tr); }
.card-title a:hover { color: var(--yellow); }
.card-title a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.card-excerpt {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 2px solid var(--bg-panel);
  margin-top: auto;
}

.card-date {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.card-arrow {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--yellow);
  transition: color var(--tr);
}
.card-arrow:hover { color: var(--white); }

/* ============================================
   VIDEO CARDS
   ============================================ */
.videos-section { background: var(--bg-panel); }

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

.video-card {
  background: var(--bg-card);
  border: 4px solid var(--bg-dark);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
  overflow: hidden;
  cursor: pointer;
}
.video-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--px-shadow);
  border-color: var(--orange);
}

.video-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.6);
  transition: filter 0.2s, transform 0.2s;
  image-rendering: pixelated;
}
.video-card:hover .video-thumb img { filter: brightness(0.3) saturate(0.3); transform: scale(1.04); }

.video-thumb::after {
  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);
  pointer-events: none;
}

/* Big pixel play button */
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border: 4px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  font-size: 20px;
  transition: all 0.1s;
  z-index: 2;
  background: rgba(0,0,0,0.7);
}
.video-card:hover .video-play {
  background: var(--orange);
  color: #000;
  transform: translate(-50%, -50%) translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(255,136,0,0.5);
}

.video-dur {
  position: absolute;
  bottom: 0; right: 0;
  font-family: var(--font-pixel);
  font-size: 7px;
  color: #fff;
  background: rgba(0,0,0,0.9);
  padding: 3px 6px;
  z-index: 2;
  letter-spacing: 0.05em;
}

.video-info { padding: 14px 16px; }

.video-title {
  font-family: var(--font-vt);
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 6px;
}
.video-title a { color: inherit; transition: color var(--tr); }
.video-title a:hover { color: var(--orange); }

.video-meta {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============================================
   CATEGORIES — Game Genre Select
   ============================================ */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.cat-card {
  background: var(--bg-card);
  padding: 24px 20px;
  border: 4px solid var(--bg-panel);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
}
.cat-card:hover {
  border-color: var(--cyan);
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 rgba(0,255,255,0.3);
}
.cat-card:focus-visible { outline: 2px solid var(--cyan); }

.cat-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
  filter: grayscale(0.3);
}
.cat-name {
  font-family: var(--font-pixel);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.cat-count {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  background: var(--bg-panel);
  border-top: 4px solid var(--yellow);
  border-bottom: 4px solid var(--yellow);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-eyebrow {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-eyebrow::before {
  content: '★';
  animation: blink-slow 1.8s step-end infinite;
}

.about-title {
  font-family: var(--font-vt);
  font-size: clamp(40px, 4vw, 70px);
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--yellow);
  text-shadow: 4px 4px 0 rgba(255,255,0,0.1);
  margin-bottom: 20px;
}

.about-text {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 32px;
}

.about-visual {
  position: relative;
  border: 4px solid var(--yellow);
  box-shadow: var(--px-shadow-lg);
  overflow: hidden;
}
.about-visual img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.6);
  image-rendering: pixelated;
}
.about-visual::after {
  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);
  pointer-events: none;
}

/* ============================================
   ARCHIVE HEADER — Game Over / Continue?
   ============================================ */
.archive-header {
  padding: 64px 0 48px;
  border-bottom: 4px solid var(--yellow);
  position: relative;
  overflow: hidden;
}
/* Big ghost number behind */
.archive-header::after {
  content: attr(data-count);
  position: absolute;
  right: var(--gutter);
  bottom: -0.1em;
  font-family: var(--font-vt);
  font-size: 30vw;
  color: rgba(255,255,0,0.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
}

.archive-eyebrow {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.archive-eyebrow::before { content: '> '; }

.archive-title {
  font-family: var(--font-vt);
  font-size: clamp(56px, 10vw, 140px);
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--yellow);
  text-shadow: 6px 6px 0 rgba(255,255,0,0.1);
  position: relative; z-index: 1;
}

.archive-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 18px;
  max-width: 500px;
  line-height: 1.7;
  position: relative; z-index: 1;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 48px 0;
}

/* ============================================
   SINGLE POST HERO
   ============================================ */
.single-hero {
  position: relative;
  height: 65vh;
  min-height: 440px;
  max-height: 720px;
  overflow: hidden;
  background: var(--bg-card);
  border-bottom: 4px solid var(--yellow);
}

.single-hero-img {
  position: absolute; inset: 0;
}
.single-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.3) saturate(0.5);
  image-rendering: pixelated;
}
.single-hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.14) 2px, rgba(0,0,0,0.14) 4px);
  z-index: 1; pointer-events: none;
}

.single-hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,24,1) 0%, rgba(0,0,24,0.55) 45%, transparent 100%);
  z-index: 2;
}

.single-hero-content {
  position: absolute;
  bottom: 40px; left: 0; right: 0;
  z-index: 3;
}

/* Category badge — pixel chip */
.post-cat-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  background: var(--yellow);
  padding: 5px 12px;
  margin-bottom: 18px;
  font-weight: 400;
}

.single-title {
  font-family: var(--font-vt);
  font-size: clamp(36px, 6vw, 84px);
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--yellow);
  text-shadow: 4px 4px 0 rgba(255,255,0,0.1);
  margin-bottom: 20px;
  max-width: 900px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.post-meta-bar .dot { width: 4px; height: 4px; background: var(--text-dim); }
.read-time { color: var(--green); }

/* HP reading bar on single post */
.single-hp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-layout { padding: 64px 0; }

.article-layout .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  max-width: 1100px;
}

.article-content { max-width: 680px; }

.article-content p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.4em;
}

.article-content h2 {
  font-family: var(--font-vt);
  font-size: 36px;
  margin: 2em 0 0.8em;
  color: var(--yellow);
  border-left: 4px solid var(--yellow);
  padding-left: 14px;
}

.article-content h3 {
  font-family: var(--font-vt);
  font-size: 26px;
  margin: 1.6em 0 0.5em;
  color: var(--orange);
}

.article-content img {
  width: 100%; margin: 2em 0;
  filter: brightness(0.95) saturate(0.85);
  border: 4px solid var(--bg-panel);
}
.article-content img:hover { filter: brightness(0.9) saturate(0.9); transition: filter 0.3s; }

.article-content blockquote {
  border-left: 4px solid var(--yellow);
  padding: 16px 20px;
  margin: 2em 0;
  background: var(--bg-panel);
  font-style: normal;
  color: var(--yellow);
  font-family: var(--font-vt);
  font-size: 24px;
  line-height: 1.4;
}
.article-content blockquote::before { content: '> '; opacity: 0.5; }

.article-content a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,0,0.4); }
.article-content a:hover { text-decoration-color: var(--yellow); }

.article-content ul { padding-left: 0; margin-bottom: 1.5em; }
.article-content ul li { padding-left: 20px; position: relative; margin-bottom: 0.5em; font-family: var(--font-body); font-size: 16px; color: var(--text); }
.article-content ul li::before { content: '▸'; position: absolute; left: 0; color: var(--yellow); font-size: 12px; }
.article-content ol { padding-left: 24px; margin-bottom: 1.5em; list-style: decimal; }
.article-content ol li { margin-bottom: 0.5em; font-family: var(--font-body); font-size: 16px; color: var(--text); }

.article-content pre, .article-content code {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--green);
  background: var(--bg-dark);
  border: 2px solid var(--bg-panel);
}
.article-content pre { padding: 16px; overflow-x: auto; margin: 2em 0; }
.article-content code { padding: 1px 5px; }

/* ============================================
   POST NAVIGATION
   ============================================ */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 4px solid var(--yellow);
}

.post-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--bg-card);
  border: 4px solid var(--bg-panel);
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}
.post-nav-item:hover { border-color: var(--yellow); transform: translate(-3px, -3px); box-shadow: var(--px-shadow); }
.post-nav-item.next { text-align: right; }

.post-nav-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.14em;
  color: var(--orange);
  text-transform: uppercase;
}
.post-nav-title {
  font-family: var(--font-vt);
  font-size: 20px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}
.post-nav-item:hover .post-nav-title { color: var(--yellow); }

/* ============================================
   SIDEBAR — High Score Table
   ============================================ */
.article-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-widget {
  margin-bottom: 36px;
  border: 4px solid var(--bg-panel);
}

.sidebar-widget-title {
  font-family: var(--font-pixel);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  background: var(--yellow);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget-title::before { content: '★ '; }

.sidebar-widget-body { padding: 8px; }

.related-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-bottom: 2px solid var(--bg-panel);
  transition: background var(--tr);
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { background: var(--bg-panel); }

.related-thumb {
  width: 64px; height: 46px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-dark);
  border: 2px solid var(--bg-panel);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); image-rendering: pixelated; transition: filter 0.2s; }
.related-item:hover .related-thumb img { filter: brightness(0.45); }

.related-title {
  font-family: var(--font-vt);
  font-size: 16px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.15;
}
.related-title a:hover { color: var(--yellow); }

.related-date {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   FOOTER — GEM Dialog Box
   ============================================ */
#site-footer {
  background: var(--bg-dark);
  border-top: 4px solid var(--yellow);
}

/* GEM title bar at top of footer */
.footer-titlebar {
  background: var(--yellow);
  padding: 6px 0;
}
.footer-titlebar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-titlebar span {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-titlebar-btns { display: flex; gap: 4px; }
.footer-titlebar-btns span {
  width: 16px; height: 12px;
  background: rgba(0,0,0,0.2);
  border: 2px solid rgba(0,0,0,0.3);
  display: block;
}

.footer-top {
  padding: 56px 0 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  border-bottom: 2px solid var(--bg-panel);
}

.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.footer-tagline {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 280px;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 6px; }
.social-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--text-dim);
  color: var(--text-dim);
  font-size: 12px;
  transition: all var(--tr);
}
.social-btn:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: 2px 2px 0 var(--yellow); }

.footer-widget-title {
  font-family: var(--font-pixel);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bg-panel);
}
.footer-widget-title::before { content: '★ '; }

.footer-widget ul li {
  padding: 5px 0;
  border-bottom: 2px solid var(--bg-panel);
}
.footer-widget ul li:last-child { border-bottom: none; }
.footer-widget ul li a {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  transition: color var(--tr);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-widget ul li a::before { content: '>'; color: var(--yellow); font-family: var(--font-pixel); font-size: 8px; }
.footer-widget ul li a:hover { color: var(--text); }

.footer-bottom {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-copy, .footer-tech {
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.footer-tech .hl { color: var(--yellow); }

/* ============================================
   SEARCH OVERLAY — Terminal Screen
   ============================================ */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 16, 0.98);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-overlay::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.2) 2px, rgba(0,0,0,0.2) 4px);
  pointer-events: none;
}
.search-overlay.open { opacity: 1; pointer-events: all; }

.search-inner {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.search-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--yellow);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.search-label::before { content: '> '; animation: blink-slow 1s step-end infinite; }

.search-inner .search-form {
  display: flex;
  align-items: center;
  border-bottom: 4px solid var(--yellow);
  gap: 12px;
  padding-bottom: 12px;
}
.search-inner .search-field {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-vt);
  font-size: 52px;
  font-weight: 400;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  caret-color: var(--yellow);
}
.search-inner .search-field::placeholder { color: var(--text-dim); }
.search-inner .search-submit {
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 22px; transition: color var(--tr);
}
.search-inner .search-submit:hover { color: var(--yellow); }

.search-close {
  position: absolute;
  top: -60px; right: var(--gutter);
  background: none; border: 2px solid var(--text-dim);
  cursor: pointer; color: var(--text-dim); font-size: 14px;
  transition: all var(--tr); padding: 6px 10px;
  font-family: var(--font-pixel);
}
.search-close:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: 2px 2px 0 var(--yellow); }
.search-close:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

/* ============================================
   PAGINATION & BUTTONS
   ============================================ */
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 48px 0;
}

.page-numbers {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  border: 4px solid var(--bg-panel);
  color: var(--text-dim);
  transition: all 0.1s;
}
.page-numbers:hover,
.page-numbers.current {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(255,255,0,0.3);
}
.page-numbers:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

.load-more { text-align: center; padding-top: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 4px solid var(--bg-panel);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s, color 0.1s;
  text-decoration: none;
  background: transparent;
  color: var(--text);
}
.btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translate(-3px, -3px);
  box-shadow: var(--px-shadow);
}
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 1px; }

.btn--fill {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}
.btn--fill:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #000;
  box-shadow: 6px 6px 0 rgba(255,136,0,0.4);
}

/* ============================================
   WP CORE
   ============================================ */
.wp-caption { max-width: 100%; margin: 2em 0; }
.wp-caption-text { font-family: var(--font-pixel); font-size: 7.5px; color: var(--text-dim); text-align: center; padding: 6px; letter-spacing: 0.06em; }
.aligncenter { display: block; margin: 0 auto; }
.alignleft  { float: left;  margin: 0 20px 14px 0; }
.alignright { float: right; margin: 0 0 14px 20px; }
.wp-block-embed { margin: 2em 0; }
.wp-block-embed iframe { width: 100%; aspect-ratio: 16/9; }

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: var(--gutter);
  background: var(--yellow); color: #000;
  padding: 8px 14px;
  font-family: var(--font-pixel); font-size: 8px;
  font-weight: 400; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 6px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-sidebar { flex-direction: row; height: 180px; }
  .hero-side-item { flex: 1; }

  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card--wide { grid-column: span 1; flex-direction: column; }
  .article-card--wide .card-image { width: 100%; aspect-ratio: 16/10; }

  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .cats-grid   { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }

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

@media (max-width: 860px) {
  .article-layout .container { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 14px; }

  #site-nav { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: block; }

  .hero-content { padding: 24px; }
  .hero-sidebar { flex-direction: column; height: auto; }
  .hero-side-item { min-height: 100px; }
  .hero-title { font-size: clamp(32px, 8vw, 56px); }

  .articles-grid { grid-template-columns: 1fr; }
  .videos-grid   { grid-template-columns: 1fr; }
  .archive-grid  { grid-template-columns: 1fr; }
  .cats-grid     { grid-template-columns: repeat(2, 1fr); }

  .footer-top    { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  .section { padding: 48px 0; }
  .single-hero { height: 55vh; min-height: 360px; }
  .single-title { font-size: clamp(32px, 8vw, 56px); }

  .post-nav { flex-direction: column; }
  .search-inner .search-field { font-size: 32px; }

  /* Disable pixel translate on mobile (touch experience) */
  .article-card:hover,
  .video-card:hover,
  .cat-card:hover,
  .post-nav-item:hover,
  .btn:hover { transform: none; }
}

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