/* Base tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #0e1c1f;
  --text: #e6fffe;
  --muted: #9de6e6;
  --accent: #00e6cc;
  --accent-2: #ff2aa5;
  --surface: rgba(15, 23, 26, 0.22);
  --glass-border: rgba(120, 240, 255, 0.28);
  --shadow: 0 8px 20px rgba(0,0,0,.35);
  --radius: 12px;
  --pad: 1rem;
  --card-surface: rgba(18, 28, 32, 0.28);
  --card-border: rgba(120, 240, 255, 0.30);
  --link: var(--accent);
}

/* Baseline + layered background (gradient + subtle scanlines/noise) */
html, body {
  height: 100%;
}
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(0, 210, 210, 0.18) 0%, rgba(210, 0, 210, 0.18) 60%, rgba(0,0,0,0) 100%),
    linear-gradient(#0b0f14, #0b0f14);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,255,255,.04) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,0,170,.04) 0 1px, transparent 1px 4px),
    linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.15));
  mix-blend-mode: overlay;
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}
.story-root { position: relative; z-index: 1; }

/* Layout helpers */
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding: 0 var(--pad); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card-surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.glass { background: rgba(14, 24, 28, 0.28); border: 1px solid var(--glass-border); border-radius: calc(var(--radius) + 2px); padding: 1rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Header / hero styling */
header {
  padding: 1rem 0;
}
header h1 {
  font-size: clamp(1.75rem, 1.6rem + 2.5vw, 3.25rem);
  line-height: 1.05;
  margin: 0 0 0.25rem;
  color: var(--text);
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}
header .meta {
  font-size: 0.92rem;
  color: var(--muted);
}
main { padding: 1rem 0; }

/* Image frame styling */
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 14px rgba(0,0,0,.28);
  background: #000;
  display: block;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
}
.featured-image { margin: 0 0 0.75rem; }

/* Content typography */
.content { padding: 0; color: var(--text); line-height: 1.6; font-size: clamp(16px, 2.9vw, 18px); }

/* Lists, quotes */
ul { padding-left: 1.25rem; margin: 0.5rem 0; }
li { margin: 0.25rem 0; }

/* Tag utility */
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0, 230, 204, 0.18);
  color: var(--text);
  border: 1px solid rgba(0, 230, 204, 0.35);
}

/* Links & buttons (accessible focus) */
a { color: var(--link); text-decoration: none; outline: none; }
a:focus-visible, a:hover { text-decoration: underline; outline: none; }
button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: var(--accent);
  color: #002626;
  padding: .55em 1.05em;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.btn:focus-visible, .cta:focus-visible { outline: 3px solid color-m-m; outline-color: var(--accent-2); outline-offset: 2px; }

/* Primary / secondary variants */
.btn.primary { background: var(--accent); color: #002626; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(0, 230, 204, 0.5); }

/* Small form element aesthetics (if used) */
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(120,240,255,0.35);
  border-radius: 8px;
  padding: .55em .75em;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Footer / ad sections */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; margin: .25rem; padding: .75rem 1rem; }
.product-ad a, .sponsored-page a { text-decoration: none; color: inherit; }

/* Typography hierarchy for article headings */
h2 { font-size: clamp(1.5rem, 2.4vw + 1rem, 2rem); margin: .75rem 0 .25rem; color: var(--text); }
h3 { font-size: clamp(1.15rem, 1.4vw + 0.9rem, 1.4rem); margin: .6rem 0; color: var(--text); }

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

/* Dark mode baseline override (default dark cyber theme) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbfb;
    --bg-2: #e9f4f4;
    --text: #0b1b1f;
    --muted: #516569;
    --accent: #006a7a;
    --accent-2: #8a00ff;
    --surface: rgba(255,255,255,0.9);
    --card-surface: rgba(255,255,255,0.8);
    --card-border: rgba(0,0,0,0.08);
    --glass-border: rgba(0,0,0,0.08);
  }
  body {
    background: linear-gradient(#f7fbfb, #eef6f6);
    color: var(--text);
  }
  body::before { opacity: 0.12; }
  a { color: var(--accent); }
  .glass { background: rgba(255,255,255,0.85); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: rgba(0,0,0,.08); }
  .card { background: rgba(255,255,255,0.92); border-color: rgba(0,0,0,.08); }
}
 
/* Print considerations */
@media print {
  body { background: white; color: black; }
  .glass, .card { background: white !important; border: none; box-shadow: none; }
}
