/* Palette & Core Tokens */
:root{
  --bg: #0a0a0f;
  --bg-2: #0e1120;
  --text: #e9f2ff;
  --muted: #a6b8d9;
  --accent: #1da6ff;            /* Cosmic blue accent */
  --accent-2: #ff4d4d;          /* Red accent for cyberpunk vibe */
  --panel: rgba(12, 0, 15, 0.22);     /* frosted glass panel (with backdrop) */
  --panel-2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.28);
  --focus: #7bd1ff;
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 14px;
}

/* Global & Typography */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: -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;

  /* Layered background: gradient + red tint + subtle scanlines/noise (pure CSS) */
  background: 
    linear-gradient(135deg, rgba( σ  , 0, 0, 0.0), rgba(0,0,0,0.0)), /* placeholder for overlay color if needed */
    linear-gradient(to bottom right, #0b0a12 0%, #0a0b14 60%, #0b0f1a 100%), 
    radial-gradient(circle at 20% -10%, rgba(255,0,60,0.15), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    rgba(10,6,12,1);
  background-blend-mode: overlay, multiply;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layered container sizing */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1120px);
  margin-inline: auto;
  padding: 1rem;
}

/* Base layout sections */
header, main, footer, aside {
  display: block;
  padding: 1rem;
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
header { text-align: center; padding-top: 2rem; padding-bottom: 1.25rem; }
main { padding: 1.25rem; }
footer { padding: 1rem; }

/* Image framing */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04);
}

/* Content wrapper within articles/pages */
.content { padding: 0.5rem 0 0; color: var(--text); }

/* Cards / grid helpers */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  padding: 0.75rem;
  min-height: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); }
}
.tag {
  display: inline-block;
  padding: 0.2em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #061018;
  background: rgba(29,166,255,0.22);
  border: 1px solid rgba(29,166,255,0.45);
}

/* Links & CTAs */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Buttons: solid and outline variants */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: linear-gradient(to bottom right, rgba(29,166,255,1), rgba(8,9,32,0.85));
  color: #eaf6ff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:active, .cta:active { transform: translateY(0); }
.btn.outline, .cta.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
}
.btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.btn + .btn { margin-left: .5rem; }

/* Hero / typographic hierarchy */
h1, h2, h3 {
  margin: 0.2em 0;
  font-weight: 700;
  letter-spacing: .2px;
}
h1 {
  font-size: clamp(1.75rem, 4vw + 0.75rem, 3.5rem);
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2.25rem);
  color: var(--accent);
}
h3 {
  font-size: clamp(1rem, 1.8vw + 0.4rem, 1.25rem);
  color: #e9f0ff;
}
p { font-size: clamp(0.92rem, 1.6vw, 1rem); color: #eaf2ff; margin: 0.75em 0; }

/* Lists & blocks */
ul { padding-left: 1.25em; margin: 0.6em 0; }
li { margin: 0.4em 0; color: var(--muted); }

/* Blockquote styling */
blockquote {
  margin: 0.75em 0;
  padding: 0.75em 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-style: italic;
}

/* Print tweaks (basic readability) */
@media print {
  body { color: #000; background: #fff; }
  header, main, footer { background: transparent; box-shadow: none; border: none; }
  a { text-decoration: underline; }
}

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

/* Section-specific layout fixes for the provided structure */
header > h1 { margin-bottom: 0.25rem; }
header > .meta { font-size: 0.95rem; color: var(--muted); opacity: 0.95; }

/* Image within article content wrap adjustments */
.featured-image { margin: 1rem 0 0; }
@media (min-width: 720px) {
  .featured-image { margin: 1.25rem 0; }
}
