:root {
  /* Palette: lavender holographic shimmer + pastel pink accents */
  --bg: #0b0b1a;
  --bg-2: #1e1140;
  --text: #eef0ff;
  --muted: #c9b8d6;
  --accent: #d8a8ff;
  --accent-2: #ffd9eb;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(214, 158, 255, 0.85);
  --radius-sm: 10px;
  --gap: 1rem;
}

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

html, body, header, nav, main, article, footer, aside {
  height: auto;
}

/* Layered background: gradient + scanlines + subtle glow */
html, body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(180, 140, 255, 0.28), transparent 40%),
    linear-gradient(135deg, rgba(68, 34, 120, 0.40), rgba(170, 120, 210, 0.28) 60%, rgba(255,255,255,0.05) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, overlay, normal;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
@media (prefers-color-scheme: dark) {
  /* keep consistent glow in dark environments */
  body { text-shadow: 0 1px 0 rgba(0,0,0,.2); }
}

/* Global layout helpers */
.container {
  width: 100%;
  padding-inline: 1rem;
  margin-inline: auto;
  max-width: clamp(640px, 82vw, 1100px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--glass);
  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)) {
  .card { background: rgba(255,255,255,0.14); }
}

/* Header / hero styling */
header {
  display: grid;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  margin: 1rem auto;
  max-width: clamp(640px, 90vw, 1100px);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
header h1 {
  font-size: clamp(1.5rem, 2.2rem + 1vw, 2.75rem);
  line-height: 1.04;
  margin: 0;
  font-weight: 700;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.6rem + 0.8vw, 1rem);
  margin: 0;
}
nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.15);
  transition: transform .15s ease, background .2s ease;
}
nav a:hover { background: rgba(0,0,0,0.25); }
nav a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}

/* Main content area */
main {
  display: grid;
  gap: 1rem;
  padding: 0 0 2rem;
}
article {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  max-width: clamp(640px, 90vw, 1100px);
  margin: 0 auto;
}
.featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  background: #0b0b1a;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Content text styling */
.content { color: var(--text); font-size: clamp(0.98rem, 0.9rem + 0.5vw, 1.05rem); }
h2, h3 {
  color: #f5f7ff;
  margin-top: 0.25rem;
}
h2 { font-size: clamp(1.25rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem); }

/* Ordered / unordered lists with nice spacing */
ol, ul {
  margin: 0.5rem 0 1rem 1.25rem;
  padding: 0;
}
li { margin: 0.25rem 0; }

/* Content-specific helpers */
.content a, .content a:visited {
  color: var(--accent);
}
.content a:hover, .content a:focus-visible {
  text-decoration: underline;
  outline: none;
}
a, button, .btn, .cta {
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}

/* Button variants */
.btn {
  display: inline-block;
  padding: 0.75em 1.25em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(216,168,255,0.25);
  color: var(--text);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(216,168,255,0.95), rgba(255,210,240,0.85));
  border: 1px solid rgba(255,255,255,0.6);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Glass panels for content blocks (fallback-ready) */
.glass {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.14); }
}

/* Subsections in footer (ad blocks) */
footer {
  padding: 1.5rem 1rem;
  display: grid;
  gap: 0.75rem;
  align-items: start;
  justify-items: center;
}
footer .product-ad,
footer .sponsored-page {
  width: min(680px, 92%);
}
footer .product-ad a,
footer .sponsored-page a {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text);
  text-decoration: none;
}
footer .product-ad a:hover,
footer .sponsored-page a:hover { background: rgba(0,0,0,0.15); }

/* Footer copy */
footer p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.25rem 0;
  text-align: center;
}

/* Accessibility helpers for print (basic readability) */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  header, main, footer { background: transparent; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Base typography sizing on root for fluid typography */
html {
  font-size: 16px;
}
@media (min-width: 700px) {
  html { font-size: 17px; }
}
@media (min-width: 1000px) {
  html { font-size: 18px; }
}

/* Small print-safe color contrast helpers (simple utility) */
.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(216,168,255,0.25);
  color: #fff;
}
ul.inline { padding-left: 0; display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; }
ul.inline li { margin: 0; }

/* Section header styling (optional internal sections) */
.section-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #f4f6ff;
  margin: 0.25rem 0 0.5rem;
}

/* Print-friendly adjustments for long documents */
@media print {
  header { page-break-after: avoid; }
  article { page-break-inside: avoid; }
}