/* Base tokens */
:root {
  --bg: #0b111a;
  --bg-2: #0f1b2a;
  --text: #e8f2ff;
  --muted: #a8b6d6;
  --accent: #4aa3ff;
  --accent-2: #7bd3ff;
  --surface: rgba(20,40,80,.28);      /* glass-ish surface */
  --surface-2: rgba(20,40,80,.18);
  --border: rgba(120,170,255,.35);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
  --glass-fallback: rgba(20,40,80,.72);
}

/* Base (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: 
    linear-gradient(135deg, #0b111a 0%, #0f1b2a 60%, #0b111a 100%),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.15));
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  /* subtle noise/scanline feel (pure CSS) */
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 2px),
    linear-gradient(180deg, rgba(0,0,0,.0), rgba(0,0,0,.12) 40%, rgba(0,0,0,.0) 100%);
  mix-blend-mode: overlay;
  z-index: -1;
  opacity: .95;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

/* Layout helpers (centered container, responsive grid) */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(120,170,255,.35);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #eafffb;
  background: rgba(74,163,255,.25);
  border: 1px solid rgba(120,170,255,.35);
}

/* Glass panels (fallback for backdrop-filter) */
/* Sections (header, nav, main, article, footer, aside) */
header, nav, main, article, footer, aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  header, nav, main, article, footer, aside {
    background: var(--surface-2);
    border-color: rgba(120,170,255,.5);
  }
}
.header-glow { text-shadow: 0 0 14px rgba(90,180,255,.6); }

/* Image frame (uses aspect-ratio, object-fit, glow) */
.image-frame, .featured-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(120,180,255,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  background: #111;
}
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* subtle inner glow on image edge */
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
@media (min-width: 720px) {
  .image-frame { border-radius: 14px; }
}

/* Content block inside articles/pages */
.content { line-height: 1.5; color: var(--muted); }

/* Typography (fluid, accessible) */
h1, h2, h3 { color: var(--text); margin: .25rem 0 0.25rem; }
h1 { font-size: clamp(1.6rem, 1.2rem + 3.2vw, 3.25rem); line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(1.25rem, 1.2rem + 2vw, 2rem); line-height: 1.25; font-weight: 700; }
h3 { font-size: clamp(1rem, 0.9rem + 1.5vw, 1.25rem); line-height: 1.25; font-weight: 700; }

/* Paragraphs and lists */
p { color: var(--muted); margin: .5rem 0; }
ul, ol { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Blockquote styling */
blockquote {
  margin: .75rem 0; padding: .75rem 1rem; border-left: 4px solid var(--accent);
  color: var(--text); background: rgba(10,20,45,.3); border-radius: 8px;
  quotes: "“" "”";
}
blockquote::before { content: open-quote; }
blockquote::after { content: close-quote; }

/* Hero/CTA elements (within content or header) */
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(120,170,255,.65);
  background: rgba(20,60,110,.55);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
}
.btn--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #001a33;
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
  a { text-decoration: none; }
}

/* Image/heading content alignment helpers (optional) */
header > .container { display: grid; gap: .75rem; align-items: end; padding: .75rem 0; }

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