/* Section: Tokens & Base */
:root{
  --bg: #0a1020;
  --bg-2: #0b1a2a;
  --text: #e9feff;
  --muted: #8bd7e3;
  --accent: #2ee6d5;
  --accent-2: #6ff0e3;
  --surface: rgba(16,24,48,.34);
  --surface-2: rgba(14,20,40,.50);
  --card: rgba(255,255,255,.08);
  --border: rgba(46,230,212,.35);
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0,0,0,.28);
}
html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }
html { color-scheme: dark; }
* { box-sizing: inherit; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.5;
  background: 
    linear-gradient(#0a1020 0%, #0a1020 60%, #0a1020 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: auto;
}

/* Section: Layered background with subtle noise/scanlines (pure CSS) */
body:before {
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% -5%, rgba(46,230,213,.08), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(0,0,0,.08), transparent 40%),
    linear-gradient(to bottom, rgba(255,255,255,.03), rgba(255,255,255,.0) 40%);
  mix-blend-mode: overlay;
  opacity: .75;
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }

/* Section: Layout primitives */
.container { width: min(92%, 1100px); margin-inline: auto; padding: 0 1rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Glass panels (fallback if backdrop-filter unsupported) */
header, main, footer, aside {
  background: var(--surface);
  border: 1px solid rgba(46,230,212,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside { background: rgba(8,12,28,.72); }
}

/* Section: Typography & headings */
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
header h1 { 
  margin: .25rem 0; 
  font-size: clamp(1.75rem, 4vw + .5rem, 3rem);
  line-height: 1.05;
  letter-spacing: .2px;
  text-align: center;
}
p, li { color: var(--text); }
.muted { color: var(--muted); }

/* Section: Image frame (frame + glow) */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(46,230,212,.5);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  background: #0b122b;
  transition: transform .25s ease;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.01);
  filter: saturate(1.05);
}
.image-frame:hover { transform: translateY(-2px); }

/* Section: Content area */
.content { padding: 0.75rem 0; color: var(--text); }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: .75rem; }

/* Section: Buttons & links (CTAs) */
a, button, .btn, .cta {
  color: #041018;
  text-decoration: none;
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #041018;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, border-color .2s;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.btn.primary { background: var(--accent); color: #041018; border-color: rgba(0,0,0,.15); }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--accent); }

/* Section: Lists (ul, li) */
ul { margin: 0 0 0.75rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Section: Utility classes */
.container, .grid, .card, .tag { /* intentionally light footprint; see definitions above */ }

/* Section: Tag badge */
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(46,230,212,.4);
  background: rgba(46,230,212,.18);
  color: #eaffff;
}

/* Section: Hero pattern refinements (navy + turquoise accents) */
header { text-align: center; padding: 1.75rem 1rem; margin: 1rem auto; }
header .brand { display: inline-block; padding: .25rem .5rem; border-radius: 999px; background: rgba(46,230,212,.25); border: 1px solid rgba(46,230,212,.6); }

/* Section: Page structure assignments (explicit selectors) */
html, body, header, nav, main, article, footer, aside { }
main { padding: 1rem 0; }
article { display: block; }

/* Section: Accessibility helpers (focus visibility on interactive elements) */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Section: Light mode variant for legibility */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6faff;
    --bg-2: #eef6ff;
    --text: #0a1b2a;
    --muted: #506f83;
    --surface: rgba(255,255,255,.88);
    --surface-2: rgba(255,255,255,.95);
    --card: rgba(255,255,255,.92);
    --border: rgba(0,0,0,.08);
  }
  body {
    background: linear-gradient(#f6fbff 0%, #eef6ff 60%, #f6fbff 100%);
    color: #0a1b2a;
  }
  header, main, footer { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.08); }
  a { color: #0a4a7a; }
  .btn, .cta { background: #0a8a9b; color: white; }
  .image-frame { border-color: rgba(0,128,128,.4); background: #fff; }
  @supports not (backdrop-filter: blur(2px)) {
    header, main, footer { background: rgba(255,255,255,.95); }
  }
}

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  header, main, footer { border: none; background: none; padding: 0; }
  a { text-decoration: underline; }
}
