/* 1) Base Theme */
:root {
  --bg: #0b0b12;
  --bg-2: #1a0f2e;
  --surface: rgba(18, 18, 28, 0.22);
  --surface-2: rgba(18, 18, 28, 0.40);
  --text: #e8e1ff;
  --muted: #b9b3cc;
  --accent: #8a2be2;
  --accent-2: #d24aff;
  --border: rgba(138, 43, 226, 0.40);
  --card: rgba(18, 18, 28, 0.28);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.38);
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.25);
  --focus: 2px solid var(--accent-2);
}

html, body {
  height: 100%;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(18,0,54,0.95) 0%, rgba(60,0,90,0.95) 60%, rgba(8,8,12,0.95) 100%), #000;
  min-height: 100%;
  /* Layered background: subtle noise + scanlines (pure CSS) */
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% -10%, rgba(138,43,226,0.25), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(255,20,140,0.15), transparent 40%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.6;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    /* subtle horizontal scanlines */
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    /* light vertical noise specks */
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.04), transparent 2px);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.25;
  z-index: 0;
}

/* 2) Layout Utilities */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(138,43,226,0.25);
  color: #fff;
  border: 1px solid rgba(138,43,226,0.55);
}
ul, li {
  margin: 0;
  padding: 0;
  list-style-position: inside;
}
li { margin-block: .5em; }

/* 3) Glass Panels & Visual Components */
header, main, article, footer, aside {
  background: rgba(18,18,28,0.28);
  border: 1px solid rgba(138,43,226,0.35);
  border-radius: 12px;
  padding: 1rem;
  margin: .75rem 0;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(18,18,28,0.72);
  }
}
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.01);
}
.content {
  font-size: clamp(14px, 2.4vw, 18px);
  line-height: 1.5;
  color: var(--text);
}
.content a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid rgba(210,70,255,0.5); }
.content a:hover { text-decoration: underline; }

/* 4) Typography & Accessibility */
h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 .5rem 0;
}
h1 { font-size: clamp(1.75rem, 3vw + 1rem, 3.25rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.25rem, 1.5vw + 1rem, 1.75rem); }
p { margin: .75em 0; color: var(--text); }
.meta { color: var(--muted); font-size: .9rem; margin-top: .25rem; }

/* 5) Interactive Elements */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  outline: none;
}
a { transition: color .15s ease; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); }

/* Button variants (solid and outline) */
.btn {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(138,43,226,0.6);
  background: linear-gradient(135deg, rgba(138,43,226,0.9), rgba(60,0,90,0.8));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 4px 12px rgba(138,43,226,0.5);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: var(--focus); outline-offset: 2px; }

.btn--outline {
  background: transparent;
  border: 1px solid rgba(138,43,226,0.8);
  color: var(--text);
}
.btn--outline:hover { background: rgba(138,43,226,0.2); }

/* Generic CTA links */
.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(138,43,226,0.6);
  background: rgba(26, 0, 60, 0.55);
  color: #fff;
}
.cta:hover { background: rgba(138,43,226,0.8); }

/* 6) Print Styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer, aside { background: transparent; border: none; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
 
/* 7) Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}