/* 1. Tokens & Global Baseline */
:root{
  /* Palette: midnight navy + neon accents */
  --bg: #0b1020;
  --bg-2: #0a1a2b;
  --surface: rgba(12, 18, 36, 0.28);
  --text: #eaf2ff;
  --muted: #a6b4d4;
  --accent: #4df2e8;      /* neon cyan for primary actions */
  --accent-2: #a065ff;    /* electric violet for accents */
  --card: rgba(14, 22, 46, 0.34);
  --border: rgba(120, 140, 255, 0.4);
  --shadow: 0 8px 20px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(60, 210, 255, 0.6);
  --radius: 14px;
}

/* 2. Global tweaks & background (gradient + subtle scanlines) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: ui-system, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Liberation Sans";
  color: var(--text);
  line-height: 1.5;
  background: 
    linear-gradient(135deg, #0b1020 0%, #0a1020 50%, #0b1a2d 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(255,255,255,.04) 1px, transparent 1px 2px, transparent 2px);
  background-blend-mode: normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

/* 3. Layout helpers */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card { 
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  font-size: .72rem;
  border-radius: 999px;
  background: rgba(100, 120, 255, 0.25);
  border: 1px solid rgba(120,140,255,0.5);
  color: #e8eaff;
}

/* 4. Core typography & sections (hero pattern) */
header h1 {
  font-size: clamp(1.8rem, 1.6rem + 3vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(.9rem, .4vw + .8rem, 1.05rem);
  color: var(--muted);
  margin: 0 0 .75rem;
}
header nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 8px;
  border: 1px solid rgba(120,140,255,.4);
  background: rgba(8,12,28,.28);
}
header nav a:hover { text-decoration: underline; }

/* 5. Glass panels (with backdrop-filter) + fallback */
header, main, footer, aside {
  background: rgba(8,12,28,0.28);
  border: 1px solid rgba(120,140,255,.35);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.75rem auto;
  width: min(100%, 1120px);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside {
    background: rgba(8,12,28,0.72);
    border-color: rgba(120,140,255,.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 6. Content blocks & imagery */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120,140,255,.45);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.featured-image { margin-bottom: 1rem; }

/* 7. Main text content */
.content { padding: 0 0 0.25rem; color: var(--text); }

/* 8. Links, buttons, CTAs */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(60,210,255,.6); border-radius: 6px; }

button, .btn, .cta {
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  border: 0;
}
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(120,140,255,.6);
  background: linear-gradient(to bottom, rgba(10,14,32,.95), rgba(10,14,32,.8));
  color: #eaffff;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(to bottom, rgba(10,14,32,.99), rgba(10,14,32,.85)); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); outline-offset: 2px; }

.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(120,140,255,.8);
}
.btn.outline:hover { background: rgba(120,140,255,.12); }

/* 9. Utility blocks (aside, nav, etc.) */
aside { padding: .75rem; min-width: 180px; }

/* 10. Lists & typography tweaks */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* 11. Footer & small prints */
footer { padding: 1rem; text-align: center; font-size: .92rem; color: var(--muted); }

/* 12. Print styles (basic readability) */
@media print {
  body, header, main, footer { background: #fff !important; color: #000; }
  header, main, footer { border: none; box-shadow: none; }
}
