/* Palette & Global */
:root {
  --bg: #041a0a;
  --bg-2: #0b2314;
  --text: #eafff5;
  --muted: #a8f5c1;
  --accent: #39ff14;
  --accent-2: #2dfb70;
  --panel: rgba(6, 28, 16, 0.22);
  --border: rgba(57, 255, 164, 0.40);
  --shadow: 0 10px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(4, 26, 12, 0.65), rgba(2, 40, 8, 0.65)),
    radial-gradient(circle at 20% -10%, rgba(57,255,164,0.18), transparent 40%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Layout primitives */
header, nav, main, article, aside, footer { padding: 0 1rem; }
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; }

/* Glass panels (with fallback) */
.glass {
  background: rgba(6, 28, 16, 0.22);
  border: 1px solid rgba(57, 255, 164, 0.40);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(6, 28, 16, 0.88); border-color: rgba(57, 255, 164, 0.65); }
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(57, 255, 164, 0.5);
  box-shadow: 0 6px 18px rgba(0,0,0,.25) inset;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content helpers */
.content { padding: 1rem; }

/* Utilities (grid, card, tag) */
.grid { display: grid; gap: 1rem; }
.card { background: rgba(6, 28, 16, 0.22); border: 1px solid rgba(57, 255, 164, 0.35); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .2em .5em; border-radius: 999px; font-size: .75rem; color: #041a0a; background: #9affb0; }

/* Header / Hero */
header { text-align: center; padding: 2rem 1rem 1.5rem; }
header h1 { font-size: clamp(1.8rem, 1.5rem + 2vw, 3.6rem); margin: 0.25rem 0; }
header .meta { font-size: clamp(0.9rem, 0.6vw, 1.05rem); color: var(--muted); margin-top: .25rem; }

/* Main content area */
main { padding: 1rem 0 2rem; }
.featured-image { margin: 1rem auto; max-width: 960px; }
.featured-image img { width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(57,255,164,.5); display: block; }

/* Article typography and headings */
article { max-width: 1000px; margin: 0 auto; padding: 0 1rem; }
h1, h2, h3 { line-height: 1.25; margin: .9rem 0 .4rem; color: var(--text); }
h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem); }
h3 { font-size: clamp(1rem, 0.9vw + .8rem, 1.4rem); }

/* Lists and code blocks */
ul, ol { margin: 0.5rem 0 0.5rem 1.25rem; }
pre { overflow: auto; background: rgba(0,0,0,.25); padding: .75rem; border-radius: 8px; border: 1px solid rgba(57,255,164,.25); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

/* Footer / product ads */
footer { padding: 2rem 1rem; display: grid; gap: 1rem; grid-template-columns: 1fr; place-items: center; border-top: 1px solid rgba(0,0,0,.2); }
footer .product-ad, footer .sponsored-page { width: 100%; text-align: center; padding: .75rem; }
footer .product-ad a, footer .sponsored-page a { display: block; padding: .75rem; border-radius: 8px; text-decoration: none; color: #031909; background: linear-gradient(135deg, rgba(57,255,164,.75), rgba(0,0,0,.0)); border: 1px solid rgba(57,255,164,.6); }
footer p { color: var(--muted); }

/* Buttons & links (interactive states) */
.btn, .cta { display: inline-block; padding: .75rem 1.25rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: var(--accent); color: #fff; font-weight: 700; text-align: center; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; text-decoration: none; }
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:focus-visible, .cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--accent-2); border: 1px solid var(--accent-2); }

/* Focus accessibility for links & interactive elements */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Print styles */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; }
  * { -webkit-print-color-adjust: exact; color-adjust: exact; }
}

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