/* Tokens */
:root {
  --bg: #220013;
  --bg-2: #130019;
  --text: #f5f7ff;
  --muted: #c9bcd7;
  --accent: #4c57ff;       /* Indigo accents */
  --accent-2: #b44cff;     /* Magenta-maroon contrast */
  --panel: rgba(18, 8, 28, 0.22);
  --panel-2: rgba(18, 8, 28, 0.14);
  --border: rgba(255, 255, 255, 0.32);
  --shadow: 0 6px 20px rgba(0,0,0,.28);
  --focus: 0 0 0 3px rgba(99, 70, 245, .65);
}

/* Base & layout */
html, body { height: 100%; }
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(120,0,40,.95) 0%, rgba(20,0,60,.95) 60%), radial-gradient(circle at 20% 0%, rgba(99,70,245,.25), transparent 40%), #0b0710;
  background-blend-mode: multiply, screen, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Layered background: subtle noise + scanlines (no images) */
body::before,
body::after { content:""; position: fixed; inset:0; pointer-events:none; z-index:0; }
body::before {
  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: 4px 4px, 4px 4px;
  mix-blend-mode: overlay;
  opacity:.25;
}
body::after {
  background: linear-gradient(to bottom, rgba(0,0,0,.07) 0 2px, transparent 2px 4px);
  background-size: 100% 2px;
  mix-blend-mode: overlay;
  opacity:.15;
  animation: scan 12s linear infinite;
}
@keyframes scan { to { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

.container { max-width: clamp(320px, 90vw, 1100px); padding: 0 1rem; margin-inline: auto; }

/* Glass panels (with fallback) */
.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px) saturate(120%);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(18,8,28,.42); }
}

/* Header / hero */
header {
  padding: 1rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
  background: rgba(18,8,28,.28);
  border-bottom: 1px solid rgba(255,255,255,.25);
}
header h1 {
  font-size: clamp(1.6rem, 2.8vw + 0.8rem, 3.2rem);
  margin: .25rem 0 .5rem;
  line-height: 1.08;
  letter-spacing: .2px;
  color: #fff;
}
header nav { display:flex; justify-content:center; gap:.75rem; flex-wrap: wrap; }

/* Main content structure */
main { padding: 1rem 0; position: relative; z-index: 1; }
article { display:block; max-width: 900px; margin: 0 auto; }

/* Image frame */
.image-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content blocks */
.content { max-width: 700px; margin: 0 auto; padding: .5rem; color: var(--muted); }

/* Grid / cards / tags (utilities) */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.card { padding: .9rem; border-radius: 12px; background: rgba(12,0,28,.22); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Tag visuals */
.tag { display:inline-block; padding: .25em .6em; font-size:.75rem; border-radius:999px; background: rgba(76,0,128,.4); border: 1px solid rgba(124,99,232,.6); color:#fff; }

/* Links & buttons (interactive) */
a, button, .btn, .cta { transition: transform .2s ease, background .2s ease, color .2s ease; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(99,70,245,.65); border-radius: 6px; }

/* Buttons (variants) */
.btn { display: inline-block; padding: .65em 1.1em; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4); cursor: pointer;
  background: linear-gradient(135deg, rgba(80,0,120,.95), rgba(40,0,60,.95)); color: #fff; }
.btn.primary { background: linear-gradient(135deg, #6b4aff, #2b0f3e); border-color: rgba(255,255,255,.6); }
.btn.outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn:hover { transform: translateY(-1px); }

/* Misc elements (lists) */
ul, li { margin: 0; padding: 0; list-style: none; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Basic form baseline (if present) */
input, button { font: inherit; color: inherit; background: transparent; border: none; padding: .5rem 0; }

/* Aside (styling placeholder for accessibility) */
aside { display: none; }

/* Accessibility helpers (contrast hints) */
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(99,70,245,.65); border-radius: 6px; }