/* Tokens */
:root {
  --bg: #0a0f0a;
  --bg-2: #0a1a0d;
  --surface: rgba(8, 16, 12, 0.22);
  --surface-2: rgba(12, 28, 22, 0.28);
  --text: #d7ffea;
  --muted: #a6f3c8;
  --accent: #4c6bff;      /* Indigo accent */
  --accent-2: #2ee173;     /* Green accent */
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 14px;
  --ring: 2px;
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle green-toned texture + scanlines */
  background-image:
    linear-gradient(135deg, rgba(2,8,6,.95), rgba(4,12,8,.95)),
    radial-gradient(circle at 15% 20%, rgba(0,255,140,.08), transparent 40px),
    radial-gradient(circle at 70% 60%, rgba(0,255,140,.06), transparent 40px),
    repeating-linear-gradient(to bottom, rgba(0,255,140,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, normal;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 1rem;
}
a, button, .btn, .cta { -webkit-tap-highlight-color: transparent; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin: 0 auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(8, 22, 16, 0.28);
  border: 1px solid rgba(0, 255, 140, 0.36);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

/* Section elements */
header, main, footer, aside {
  background: rgba(7, 14, 12, 0.28);
  border: 1px solid rgba(0, 255, 170, 0.28);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.5rem auto;
  max-width: 1100px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
header { text-align: center; }
header h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.6rem, 1.6rem + 2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: .2px;
}
main { padding: 1rem; }
footer { padding: 1rem; }

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 170, 0.4);
  background: #0a1b12;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  /* Subtle glow to enhance cyber vibe without heavy shadows */
  filter: saturate(1.05);
}
.article { margin: 0; }

/* Content area */
.content {
  max-width: 60ch;
  margin: 0 auto;
  padding: 0;
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0, 255, 140, 0.18);
  border: 1px solid rgba(0, 255, 140, 0.4);
  color: var(--text);
}

/* Product ad / CTAs in footer */
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  margin: .75rem 0;
  text-align: center;
  background: rgba(4, 12, 10, 0.28);
  border: 1px solid rgba(0, 255, 170, 0.4);
  border-radius: 12px;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .6rem;
  gap: .5rem;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Typography helpers */
h2, h3 {
  margin: .5rem 0 0.25rem;
  color: var(--text);
}
p { margin: 0 0 1rem; }

/* Interactive elements */
.btn, .cta {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65em 1.1em;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn { background: rgba(0,0,0,.25); color: var(--text); }
.btn.primary {
  background: linear-gradient(135deg, #1b8f52 0%, #0e6b40 100%);
  color: #eafff5;
  border: 1px solid rgba(0,0,0,.25);
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(0, 255, 140, .6);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Outline variant for accessibility focus */
.btn.outline {
  background: transparent;
  border: 1px solid rgba(0, 255, 140, .75);
  color: var(--text);
}
.cta { padding: .5em 1em; }

/* Focus indicators (accessible) */
:focus-visible {
  outline: 2px solid #39FF70;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Links behavior */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent); }

/* Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fff8;
    --bg-2: #e9f7ee;
    --surface: rgba(250, 253, 246, 0.95);
    --surface-2: rgba(240, 245, 242, 0.95);
    --text: #0b2d1a;
    --muted: #2b5f3d;
    --accent: #3b5bd6;
    --accent-2: #0a8f3c;
  }
  body {
    background-image:
      linear-gradient(135deg, rgba(240,245,240,.92), rgba(230,245,235,.92)),
      radial-gradient(circle at 20% 20%, rgba(0,160,40,.08), transparent 40px),
      repeating-linear-gradient(to bottom, rgba(0, 0, 0, .04) 0 1px, transparent 1px 2px);
    background-blend-mode: normal, normal, overlay;
  }
  header, main, footer { background: rgba(255,255,255,.85); border: 1px solid rgba(0,0,0,.08); color: var(--text); }
  a { color: var(--accent); }
}
@media print {
  body { background: white; color: black; }
  header, main, footer { background: none; border: none; box-shadow: none; }
}