/* Theme Tokens */
:root {
  --bg: #0b0f12;
  --bg-2: #141a1f;
  --text: #eafff7;
  --muted: #a6f3c2;
  --accent: #2ee089;       /* green neon */
  --accent-2: #ff6f61;     /* coral */
  --glass: rgba(15, 23, 30, 0.28);
  --glass-border: rgba(255, 255, 255, 0.25);
  --ring: 0 0 0 3px rgba(46, 224, 137, 0.55);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.45);
  --card: rgba(18, 23, 28, 0.48);
}

:root, html, body {
  height: 100%;
}

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

/* Layered background: gradient + coral/green hints + subtle scanlines/noise (pure CSS) */
html, body {
  background-color: #0b0f12;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(255, 105, 97, 0.18) 0 20%, transparent 40%),
    radial-gradient(circle at 100% 20%, rgba(46, 224, 137, 0.15) 0 25%, transparent 40%),
    linear-gradient(135deg, rgba(12, 16, 20, 0.95) 0%, rgba(8,12,16,0.95) 60%, rgba(6,8,12,0.95) 100%),
    /* subtle coral wave tint over dark base to imply coral waves */
    linear-gradient(180deg, rgba(255, 111, 97, 0.08), rgba(0,0,0,0));
  background-blend-mode: screen, overlay, normal, overlay;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle scanlines for cyber look (pure CSS) */
  background-image: linear-gradient(rgba(0,0,0,.0), rgba(0,0,0,.0)),
                    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(0,0,0,0) 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: 0;
  /* GPU-friendly compositing */
  will-change: transform;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(520px, 78vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
  z-index: 1;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Glass panels with graceful fallback */
.glass {
  background: rgba(15, 23, 30, 0.28);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  :root { --glass: rgba(15,23,30,0.8); }
  .glass { background: rgba(15,23,30,0.8); }
}

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 14px rgba(0,0,0,.4), inset 0 0 14px rgba(0,0,0,.15);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

/* Content blocks */
header, nav, main, article, aside, footer {
  display: block;
}
header {
  padding: 1.25rem 1rem;
}
header h1 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-weight: 700;
  margin: 0 0 .25rem;
  color: var(--text);
  font-size: clamp(1.75rem, 2.4vw + 1rem, 3.5rem);
  line-height: 1.04;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem);
  margin: 0;
  letter-spacing: .3px;
}

/* Article body */
article { padding: 0; }
article h2 {
  font-size: clamp(1.5rem, 1.2vw + 1.2rem, 2.25rem);
  margin: 1rem 0 .5rem;
  color: #e8fff6;
}
article p {
  margin: .8rem 0;
  color: var(--text);
  font-size: clamp(1rem, 0.9vw + 0.95rem, 1.125rem);
  max-width: 64ch;
}
article ul {
  margin: .8rem 0 1rem 1.15rem;
  color: var(--muted);
}
article li {
  margin: .25rem 0;
}
.featured-image {
  margin: 0 0 1rem;
}
@media (prefers-color-scheme: light) {
  body {
    background: #f7f7f7;
    color: #0a0a0a;
  }
  :root {
    --bg: #f7f7f7;
    --bg-2: #ffffff;
    --text: #0a0a0a;
    --muted: #555;
    --accent: #0a7a3a;
    --accent-2: #e04a2a;
  }
  .glass, .card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,.12);
    color: #0a0a0a;
  }
}

/* Links and interactive controls */
a, button, .btn, .cta {
  transition: color .2s ease, background .2s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a:hover { text-decoration: underline; color: #b6ffd9; }
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(46,224,137,.8);
  background: linear-gradient(135deg, rgba(46,224,137,.9), rgba(0, 170, 110, .9));
  color: #04140f;
  font-weight: 700;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(46,224,137,.8);
  color: var(--text);
}
.cta {
  display: inline-flex;
  padding: .9rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #04140f;
  font-weight: 700;
}
.cta:hover { background: #28c178; }

/* Footer product ad blocks */
.product-ad, .sponsored-page {
  display: inline-block;
  margin: .5rem;
  padding: .75rem 1rem;
}
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); }
.product-ad { background: rgba(2,8,23,.36); border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: .6rem 1rem; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Footer general layout */
footer {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  align-items: start;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
}
footer p {
  align-self: end;
  justify-self: start;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
@media (prefers-reduced-motion: reduce) {
  html, body, * { animation: none !important; transition: none !important; }
}
@media (min-width: 860px) {
  .container { padding-inline: 0; }
  header { padding: 1.75rem 1.5rem; }
}

/* Print readability (basic) */
@media print {
  body { background: #fff; color: #000; }
  .glass { background: rgba(255,255,255,0.98); }
  a { text-decoration: underline; }
}