/* Base palette & tokens */
:root{
  --bg: #0b0b0e;
  --bg-2: #14161d;
  --surface: rgba(18, 24, 40, 0.38);
  --glass: rgba(18, 24, 40, 0.28);
  --text: #e8e0c6;
  --muted: #b5af97;
  --accent: #ffd34f;        /* cyber yellow */
  --accent-2: #f9c846;      /* highlighted yellow */
  --card: rgba(18, 24, 40, 0.36);
  --shadow: 0 10px 28px rgba(0,0,0,.45);
  --radius: 14px;
  --focus: 3px solid rgba(255, 211, 80, 0.9);
}

/* Utilities & reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue"; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(102, 51, 0, 0.25), rgba(0,0,0,0.4) 60%, rgba(102, 51, 0, 0.25)),
    radial-gradient(circle at 20% -10%, rgba(255, 210, 102, 0.18), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255, 200, 0, 0.08), transparent 40%);
  background-color: #050505;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-size: clamp(14px, 0.9vw + 12px, 18px);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  /* Subtle noise/scanline overlay (pure CSS) */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .4;
}

/* Layout helpers (construction-friendly) */
.container { width: 100%; max-width: clamp(640px, 92vw, 1200px); padding-inline: 1rem; margin-inline: auto; }

/* Sectioning elements (layout targets) */
html, body, header, nav, main, article, aside, footer { display: block; }
header { text-align: center; padding: 2rem 0 1rem; }
main { padding: 0 0 2rem; }
footer { padding: 1rem 0 2rem; }

/* Header hero typography */
header h1 {
  font-size: clamp(1.8rem, 1.4rem + 2.5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 .25rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: .25rem;
  letter-spacing: .2px;
}

/* Article glass panel (frosted effect) */
article {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(18,24,40,.88); }
}
article h1 {
  font-size: clamp(1.6rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1.15;
  margin: .25rem 0 0.75rem;
  color: var(--text);
}
article p { color: #e9e0c3; margin: .75rem 0; }
article h2 {
  font-size: 1.25rem;
  margin: 1.1rem 0 .5rem;
  color: #fff;
}
article ul { padding-left: 1.25rem; margin: .6rem 0; }
article li { margin: .25rem 0; color: #e9e0c3; }

/* Featured image frame with frame glow */
.featured-image { display: flex; justify-content: center; padding: .6rem 0 0; }
.image-frame {
  width: min(100%, 860px);
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  padding: 2px;
  background: linear-gradient(135deg, rgba(184, 116, 33, 0.28), rgba(0,0,0,0.28));
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

p + h2 { margin-top: 1rem; }

/* Utility grid, cards and tags (responsive) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .75rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #111;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
}

/* Links & buttons (interactive states) */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn, .cta {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}
.btn.primary, .cta.primary {
  background: linear-gradient(135deg, rgba(255,211,79,.95), rgba(255,209,60,.85));
  border: 1px solid rgba(255,255,255,.75);
  color: #111;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
.btn:active { transform: translateY(0); }

/* Footer product ad (glass panel) */
.product-ad {
  display: inline-block;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(16, 24, 40, .34);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: var(--shadow);
  margin: 0 auto 1rem;
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad a { color: var(--text); text-decoration: none; }
.product-ad a:hover { text-decoration: underline; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  article { background: #fff; box-shadow: none; border: 1px solid #000; }
}

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