/* ==========================================================================
   Matthew Smith Fan Page - style.css
   ZX Spectrum attribute-clash identity
   Background: #000820  Primary: #00ffcc  Secondary: #ff00ff
   Font: Space Grotesk (Google Fonts)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg:            #000820;
  --bg-card:       #001040;
  --bg-nav:        #000618;
  --bg-alt:        #000d30;
  --text:          #e0eeff;
  --text-muted:    #7090b0;
  --accent:        #00ffcc;
  --accent-dim:    #00b08c;
  --secondary:     #ff00ff;
  --secondary-dim: #b000b0;
  --spec-yellow:   #ffff00;
  --spec-green:    #00ff00;
  --spec-red:      #ff0000;
  --spec-white:    #ffffff;
  --border:        #003060;
  --font:          'Space Grotesk', system-ui, sans-serif;
  --nav-height:    60px;
  --container-max: 1100px;
  --radius:        3px;
}

/* --------------------------------------------------------------------------
   ZX Spectrum Attribute-Flash Animation
   Cycles through all 8 Spectrum bright primary colours using step-end
   timing for authentic discrete colour switching (no fade).
   -------------------------------------------------------------------------- */
@keyframes attr-flash {
  0%    { background-color: #000000; }
  12.5% { background-color: #0000ff; }
  25%   { background-color: #ff0000; }
  37.5% { background-color: #ff00ff; }
  50%   { background-color: #00ff00; }
  62.5% { background-color: #00ffff; }
  75%   { background-color: #ffff00; }
  87.5% { background-color: #ffffff; }
  100%  { background-color: #000000; }
}

/* --------------------------------------------------------------------------
   Reset and Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

a:hover, a:focus {
  color: var(--secondary);
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

a:focus:not(:focus-visible) { outline: none; }

ul, ol { list-style: none; }

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

/* --------------------------------------------------------------------------
   Skip Link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  left: 1rem;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p + p { margin-top: 0.85em; }

strong { font-weight: 700; color: var(--spec-white); }

code {
  font-family: 'Courier New', monospace;
  background: var(--bg-alt);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  font-size: 0.9em;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 2px solid var(--accent);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-brand:hover, .nav-brand:focus {
  color: var(--secondary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover, .nav-link:focus {
  color: var(--accent);
  background: var(--bg-alt);
  outline: none;
}

.nav-link--active, .nav-link[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  gap: 0.3rem;
  flex-direction: column;
  align-items: center;
}

.burger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-nav);
    border-bottom: 2px solid var(--accent);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.25rem;
    overflow-x: visible;
  }

  .nav-menu.nav-menu--open {
    display: flex;
  }

  .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Page Layout
   -------------------------------------------------------------------------- */
body > main {
  padding-top: var(--nav-height);
}

section {
  padding: 4rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Hero Section with Attribute-Flash Grid
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

/* Attribute-flash grid container - filled by script.js */
#attr-grid {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

/* Individual attribute cell - animation applied by JS with random delay */
.attr-cell {
  animation: attr-flash 2.4s steps(8, end) infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0, 255, 204, 0.3);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-rule {
  width: 4rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--spec-yellow);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--accent);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--bg);
  outline: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover, .btn-secondary:focus {
  background: var(--accent);
  color: var(--bg);
  outline: none;
}

/* --------------------------------------------------------------------------
   Section Heading Accent
   -------------------------------------------------------------------------- */
.section-heading {
  margin-bottom: 2rem;
}

.section-heading::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

.section-heading--secondary::after {
  background: var(--secondary);
}

/* --------------------------------------------------------------------------
   Screenshot Strip (index.html)
   -------------------------------------------------------------------------- */
.screenshot-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-color: var(--accent) var(--bg-alt);
  scrollbar-width: thin;
}

.screenshot-strip img {
  height: 180px;
  width: auto;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Page Links Grid (index.html navigation panels)
   -------------------------------------------------------------------------- */
.page-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-link-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.page-link-card:hover, .page-link-card:focus {
  border-left-color: var(--secondary);
  background: var(--bg-alt);
  outline: none;
}

.page-link-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--accent);
}

.page-link-card:hover h3,
.page-link-card:focus h3 {
  color: var(--secondary);
}

.page-link-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Game Cards (games.html)
   -------------------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.game-card:hover {
  border-color: var(--accent);
}

.card-image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
  letter-spacing: 0.05em;
}

  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid;
}

.badge-zx   { color: var(--spec-green);  border-color: var(--spec-green);  }
.badge-c64  { color: var(--spec-yellow); border-color: var(--spec-yellow); }
.badge-cpc  { color: var(--accent);      border-color: var(--accent);      }
.badge-bbc  { color: var(--text-muted);  border-color: var(--text-muted);  }
.badge-nes  { color: var(--spec-red);    border-color: var(--spec-red);    }
.badge-year { color: var(--text-muted);  border-color: var(--border);      }

.card-credits {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Platform Filter
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 0.25rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
}

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

.filter-btn.active,
.filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

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

.gallery-figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-figure figcaption {
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.gallery-section {
  margin-bottom: 3rem;
}

.gallery-section h3 {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Portrait images (box art) constrained width */
.gallery-portrait {
  grid-template-columns: repeat(auto-fill, minmax(180px, 260px));
}

.gallery-portrait .gallery-figure {
  padding: 0.75rem;
  background: var(--bg-alt);
}

.gallery-portrait .gallery-figure img {
  height: 280px;
  object-fit: contain;
  background: transparent;
}

/* --------------------------------------------------------------------------
   Flagship / Editorial Article
   -------------------------------------------------------------------------- */
.flagship-intro {
  max-width: 780px;
  margin-bottom: 3rem;
}

.game-article {
  margin-bottom: 5rem;
}

.game-article-header {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

@media (max-width: 700px) {
  .game-article-header {
    grid-template-columns: 1fr;
  }
}

.article-cover {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  padding: 0.5rem;
}

.article-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.article-body {
  max-width: 780px;
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 1.1em;
}

.article-body h3 {
  color: var(--spec-yellow);
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}

.article-body h3::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--spec-yellow);
  margin-top: 0.4rem;
}

.article-screenshot {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 600px;
}

.article-screenshot img {
  width: 100%;
  height: auto;
}

.article-screenshot figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Blockquotes (developer quotes)
   -------------------------------------------------------------------------- */
blockquote.dev-quote {
  border-left: 4px solid var(--secondary);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote.dev-quote p {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

blockquote.dev-quote cite {
  font-size: 0.8rem;
  color: var(--secondary);
  font-style: normal;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Trivia Callouts
   -------------------------------------------------------------------------- */
aside.trivia {
  border: 1px solid var(--spec-yellow);
  border-left: 4px solid var(--spec-yellow);
  background: rgba(255, 255, 0, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

aside.trivia p + p { margin-top: 0.6em; }

/* --------------------------------------------------------------------------
   Video Embeds
   -------------------------------------------------------------------------- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

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

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.video-card-meta {
  padding: 1rem 1.25rem;
}

.video-card-meta h3 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.video-card-meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 2rem;
}

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

.video-section {
  margin-bottom: 3.5rem;
}

.video-section-heading {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Interviews page
   -------------------------------------------------------------------------- */
.interview-entry {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.interview-entry:last-child {
  border-bottom: none;
}

.interview-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.interview-context {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Resources
   -------------------------------------------------------------------------- */
.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.resource-item {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
}

.resource-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}

.resource-name a {
  color: inherit;
}

.resource-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.resource-section {
  margin-bottom: 2.5rem;
}

.resource-section h3 {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Play methods (play.html)
   -------------------------------------------------------------------------- */
.play-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

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

.play-method-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.play-method h2 {
  font-size: 1.2rem;
  color: var(--accent);
}

.method-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.1em;
}

.method-badge-emulation { background: var(--accent); color: var(--bg); }
.method-badge-browser   { background: var(--spec-green); color: var(--bg); }
.method-badge-download  { background: var(--spec-yellow); color: var(--bg); }
.method-badge-legal     { background: var(--secondary); color: var(--bg); }

.play-method ol {
  list-style: decimal;
  margin-left: 1.25rem;
  margin-top: 0.75rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.6;
}

.play-method ol li {
  margin-bottom: 0.4rem;
}

.play-method p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Modern Scene (modern.html)
   -------------------------------------------------------------------------- */
.modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.modern-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s;
}

.modern-card.featured {
  border-color: var(--spec-yellow);
  box-shadow: 0 0 12px rgba(255, 255, 0, 0.08);
}

.modern-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.modern-card h3 {
  font-size: 1rem;
  color: var(--accent);
}

.status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-active    { background: var(--spec-green);  color: var(--bg); }
.status-complete  { background: var(--accent);       color: var(--bg); }
.status-abandoned { background: var(--text-muted);   color: var(--bg); }
.status-wip       { background: var(--spec-yellow);  color: var(--bg); }

.modern-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modern-card p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.modern-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modern-links a {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  text-decoration: none;
  color: var(--accent);
  transition: all 0.15s;
}

.modern-links a:hover {
  background: var(--accent);
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   Aside / Callout Boxes
   -------------------------------------------------------------------------- */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   History / Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--secondary));
}

.timeline-entry {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.timeline-entry h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.timeline-entry p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.history-figure {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 280px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  padding: 0.5rem;
}

.history-figure img {
  width: 100%;
  height: auto;
}

.history-figure figcaption {
  padding: 0.4rem 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 600px) {
  .history-figure {
    float: none;
    margin: 0 0 1.5rem;
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Easter Egg Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 20, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop[hidden],
.modal-backdrop[aria-hidden="true"] {
  display: none;
}

.modal-box {
  background: var(--bg-card);
  border: 2px solid var(--secondary);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.3);
}

.modal-title {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.modal-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-body p + p { margin-top: 0.75em; }

.modal-close {
  background: var(--secondary);
  color: var(--bg);
  border: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: block;
  width: 100%;
  letter-spacing: 0.05em;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--secondary-dim);
}

/* --------------------------------------------------------------------------
   People / Portrait
   -------------------------------------------------------------------------- */
.person-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

@media (max-width: 600px) {
  .person-section {
    grid-template-columns: 1fr;
  }
}

.person-photo {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  padding: 0.5rem;
}

.person-photo img {
  width: 100%;
  height: auto;
}

.person-photo figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: var(--bg-nav);
  border-top: 2px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

footer a {
  color: var(--accent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-left p + p { margin-top: 0.4em; }

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

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--secondary); }
.text-yellow { color: var(--spec-yellow); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 4rem 0 3rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .play-methods {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 480px) {
  section { padding: 2.5rem 0; }
  .game-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
