/* Root tokens: cyberpunk aubergine palette with glassy surfaces */
:root{
  --bg: #000;
  --bg-2: #12061a;
  --text: #e9e6ff;
  --muted: #b9a6c9;
  --accent: #6a0dad;        /* aubergine core */
  --accent-2: #b26af7;      /* lighter highlight */
  --glass: rgba(20, 0, 26, 0.22);
  --glass-2: rgba(24, 0, 36, 0.28);
  --border: rgba(160, 100, 180, 0.42);
  --focus: #7bdcff;
  --shadow: 0 6px 18px rgba(0,0,0,.34);
}

/* Base / reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
html, body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, Inter, Arial;
  background: #000;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient + subtle scanlines/noise (pure CSS) */
  background-image:
    radial-gradient( circle at 50% -10%, rgba(120,0,140,.25) 0%, rgba(0,0,0,0) 40% ),
    linear-gradient(135deg, rgba(20,0,40,.92) 0%, rgba(12,0,24,.92) 60%, rgba(0,0,0,.94) 100%),
    repeating-linear-gradient(0deg,
      rgba(255,255,255,.04) 0px,
      rgba(255,255,255,.04) 1px,
      transparent 1px,
      transparent 2px);
  background-blend-mode: screen, overlay, normal;
}
@media (prefers-reduced-motion: reduce) {
  html { background-image: none; }
}

/* Layout helpers (compact, responsive) */
.container { width: min(90%, 1100px); margin-inline: auto; padding-inline: 0.75rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--glass); border: 1px solid var(--border); border-radius: 12px; padding: 0.95rem 1rem; box-shadow: var(--shadow); }

.tag {
  display: inline-block;
  padding: .15rem .55rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(106, 0, 173, 0.28);
  color: #fff;
  border: 1px solid rgba(106, 0, 173, 0.6);
}

/* Glass panels: header/main/article/footer/aside styling with backdrop-filter (fallback) */
header, main, footer, aside, article {
  background: rgba(16, 0, 24, 0.22);
  border: 1px solid rgba(160, 100, 180, 0.38);
  border-radius: 14px;
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(12, 0, 20, 0.75);
    border-color: rgba(180, 120, 200, 0.5);
  }
}

/* Structural sections */
header { text-align: center; padding: 1.25rem 1rem 1rem; margin-bottom: .75rem; }
header h1 { font-size: clamp(1.75rem, 2.4vw + 1rem, 3.25rem); line-height: 1.08; margin: 0 0 .35rem; letter-spacing: .2px; color: var(--text); }
header .meta { font-size: .92rem; color: var(--muted); margin-bottom: .75rem; }

/* Header nav (back link) */
nav { display: inline-block; }
nav a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
nav a:hover, nav a:focus-visible { background: rgba(255,255,255,.14); text-decoration: none; }
nav a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Main content, article typography and layout */
main { padding: 0.75rem 0 1.5rem; }
article { max-width: clamp(720px, 85vw, 980px); margin-block: 0 auto; padding: 0; }
.featured-image { width: 100%; margin: .25rem 0 0.75rem; }

/* Image frame framework (aspect-ratio + glow) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content copy */
.content { font-size: clamp(1rem, 0.9vw + 0.25rem, 1.125rem); line-height: 1.6; color: var(--text); }
.content h2, .content h3 { color: #fff; margin: .75rem 0 .25rem; }
.content p { margin: .5rem 0; }
.content ul { padding-left: 1.25rem; margin: .5rem 0; }
.content li { margin: .25rem 0; }

/* Inline emphasis inside content */
strong { color: #fff; }

/* Links and CTAs (high contrast, focus-visible) */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

/* Buttons and button-like links */
.btn, .cta { display: inline-block; padding: .72rem 1.1rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s ease; }
.btn.primary { background: linear-gradient(135deg, rgba(100,0,120,.95), rgba(120,0,180,.95)); color: #fff; }
.btn.primary:hover { transform: translateY(-1px); opacity: 0.98; }
.btn.outline { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: var(--text); }
.btn:focus-visible, .cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

/* Footer / product ad blocks */
footer { padding: 1rem; margin-top: .75rem; display: grid; grid-template-columns: 1fr; gap: .75rem; }
.product-ad, .sponsored-page { text-align: center; padding: .75rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); }
footer p { text-align: center; margin: .5rem 0 0; color: var(--muted); }

/* Lists and hierarchy styling (compact viewed content) */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Print styles: basic readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { background: #fff; border: 0; border-radius: 0; box-shadow: none; }
  a { text-decoration: underline; color: #00f; }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}