/* Tokens */
:root {
  --bg: #0a0a12;
  --bg-2: #0f1220;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #eafff7;
  --muted: #a6aec4;
  --border: rgba(255, 255, 255, 0.28);
  --accent: #00ffa3;       /* iridescent green */
  --accent-2: #ff2d92;     /* plasma pink */
  --card: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 12px;
}

/* Base (mobile-first) */
html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

*, *::before, *::after { box-sizing: inherit; }

html, body {
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(12,6,22,.95) 0%, rgba(6,8,18,.95) 60%, rgba(0,0,0,.95) 100%),
    repeating-linear-gradient(135deg, rgba(255,0,140,.22) 0 6px, rgba(0,0,0,0) 6px 12px),
    radial-gradient(circle at 20% 0%, rgba(0,255,180,.08), transparent 40%);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  scroll-behavior: smooth;
  background-attachment: fixed;
  background-blend-mode: overlay;
  isolation: isolate;
}

body::before {
  /* subtle high-frequency scanlines for a cyberpunk vibe (pure CSS) */
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 2px 2px;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
  opacity: 0.6;
}

/* Layout helpers */
.container {
  width: min(100%,  clamp(320px, 92vw, 1100px));
  margin-inline: auto;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: 1rem;
}

/* Card/glass surfaces (with backdrop-filter) */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { 
    background: rgba(255, 255, 255, 0.18);
  }
}

/* Typography scales (fluid) */
h1, h2, h3, h4 {
  margin: 0.5rem 0;
  font-weight: 700;
  line-height: 1.15;
}
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1.6vw + .75rem, 1.75rem); }
h3 { font-size: clamp(1.125rem, 1.2vw + .75rem, 1.25rem); }
p { margin: 0.5rem 0 1rem; color: rgba(234,240,255,.95); }

/* Links and interactive elements (AA contrast checks) */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid rgba(0, 255, 212, .95);
  outline-offset: 2px;
}
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent); }

/* Primary button styles (solid and outline variants) */
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, rgba(0,255,162,.95), rgba(0,190,140,.95));
  color: #041a14;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
}
.btn.primary {
  background: linear-gradient(135deg, rgba(0,255,162,.95), rgba(0,210,140,.95));
}
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0,255,162,.7);
}
.btn:active, .cta:active {
  transform: translateY(0);
  filter: brightness(.98);
}
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
  body::before { display: none; }
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.01);
}

/* Specific selectors required by the page */
html, body, header, nav, main, article, footer, aside {
  /* base layout defaults just to ensure predictable rendering across browsers */
  display: block;
}
.image-frame, .image-frame img { }

.content {
  color: rgba(234,244,255,.92);
}

/* Structural sections */
header, main, footer, aside {
  padding: 1rem;
}
header {
  display: grid;
  gap: .5rem;
  justify-items: center;
  text-align: center;
  padding: 1.25rem;
  margin: 0.5rem auto 1rem;
}
nav {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
nav a {
  padding: .5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
}
main { display: block; padding: 0; }
article { max-width: 920px; margin: 0 auto; }

/* Featured image wrapper and page content spacing (glass panel) */
.featured-image { margin: 1rem 0 0; }
.meta {
  font-size: .9rem;
  color: var(--muted);
}

/* Lists and typography helpers */
ul, li { margin: 0.25rem 0; padding-left: 1.25rem; }
li { color: rgba(234,244,255,.95); }
li strong { color: #eafff7; }

/* Utility and layout primitives */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 1rem; }

/* Grid utilities (responsive) */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  line-height: 1;
  background: linear-gradient(135deg, rgba(0,255,140,.85), rgba(255,0,180,.85));
  color: #041c14;
  border: 1px solid rgba(255,255,255,.4);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  .glass { background: white; border: none; box-shadow: none; }
  a, button { color: #000; text-decoration: none; }
}
