/* Core Theme */
:root {
  --bg: #0b0f14;
  --bg-2: #0f141b;
  --text: #e6fffb;
  --muted: #b6d9d6;
  --accent: #2af0ff;
  --accent-2: #e7d0b1;
  --card: rgba(15, 20, 26, 0.66);
  --glass: rgba(255,255,255,0.14);
  --border: rgba(170,210,210,0.45);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --maxw: clamp(700px, 92vw, 1100px);
}

html, body { height: 100%; }
html, body { margin: 0; padding: 0; }

/* Layered background: gradient + cyan geometry + subtle scanlines */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  line-height: 1.5;
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0, rgba(0,255,255,.10) 0 14px, transparent 14px),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,.05) 0 22px, transparent 22px),
    linear-gradient(135deg, rgba(0,60,80,.55), rgba(0,0,0,0) 40%),
    repeating-linear-gradient(to bottom, rgba(0,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, overlay, normal, overlay;
}

/* Glass panels (fallback included) */
.glass {
  background: rgba(8,12,18,0.22);
  border: 1px solid rgba(140,210,210,0.40);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(8,12,18,0.80); border-color: rgba(140,210,210,0.60); }
}

/* Typography & structure */
header, nav, main, article, aside, footer { display: block; }
header { padding: 1.25rem 0; text-align: center; }
header h1 { font-size: clamp(1.75rem, 5vw, 3.25rem); line-height: 1.15; margin: 0 0 .25rem; color: #eaffff; font-weight: 700; }
header .meta { color: #b6d9d6; font-size: clamp(0.75rem, 1.8vw, 1rem); }

/* Container / layout helpers */
.container { width: 100%; max-width: var(--maxw); padding: 0 1rem; margin: 0 auto; }
.main, main { display: block; }

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

/* Article content blocks */
.content { padding: 0.75rem 0; }

/* Grid utilities & cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 1rem; }

/* Lists & tags */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }
.tag { display: inline-block; padding: .25em .5em; border-radius: 999px; font-size: .75rem; background: rgba(42,240,255,.18); color: #cffaff; border: 1px solid rgba(42,240,255,.5); }

/* CTAs & links */
a, button, .btn, .cta { transition: all .2s ease; text-decoration: none; color: inherit; }
a { color: var(--accent); }
a:focus-visible, a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.btn, .cta { display: inline-flex; align-items: center; justify-content: center; padding: .6em 1em; border-radius: 999px; border: 1px solid rgba(42,240,255,.65); background: rgba(42,240,255,.22); color: #001b1f; font-weight: 600; cursor: pointer; }
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(42,240,255,.32); }
.btn:focus-visible, .cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Outline variant helper */
.btn.outline { background: transparent; border-color: rgba(42,240,255,.85); color: var(--text); }

/* Product ad & related sections */
.product-ad { margin: 1rem 0; padding: .75rem; }
.sponsored-page { margin: 0.5rem 0; padding: .75rem; }

/* Footer */
footer { padding: 1.25rem 0; text-align: center; color: var(--muted); }

/* Navigation / layout placeholders (present for selector coverage) */
nav { padding: 0.5rem 0; }
aside { padding: 0.5rem 0; }

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

/* Light mode overrides for readability on non-dim backgrounds */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f6;
    --bg-2: #ececee;
    --text: #111;
    --muted: #555;
    --accent: #006c7a;
    --accent-2: #b08654;
    --card: rgba(255,255,255,0.92);
    --glass: rgba(255,255,255,0.85);
    --border: rgba(0,0,0,.15);
  }
  body { background-color: var(--bg); color: var(--text); }
  a { color: var(--accent); }
  .glass { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,.15); }
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}