/* Section: Base & Tokens */
:root{
  --bg: #0a1020;
  --bg-2: #0b1a38;
  --surface: rgba(16,24,48,.28);
  --text: #e8f0ff;
  --muted: #a9b6d8;
  --accent: #4ee2ff;
  --accent-2: #7ea7ff;
  --card: rgba(8,12,28,.34);
  --card-border: rgba(255,255,255,.34);
  --radius: 14px;
  --shadow: 0 8px 26px rgba(0,0,0,.35);
  --focus: 3px solid rgba(78,216,255,.95);
  --focus-offset: 2px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Section: Global Reset & Layered Background */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, #0b1a3a 60%, var(--bg) 100%);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  /* subtle noise / scanline feel (pure CSS) */
  background: repeating-linear-gradient(to bottom,
    rgba(255,255,255,.04) 0 1px,
    transparent 1px 2px);
  opacity: .15;
}
body::after {
  /* soft glows & gradient veil for the cyberpunk shimmer */
  background: radial-gradient(circle at 20% 0%, rgba(80,110,255,.25), transparent 40%),
              radial-gradient(circle at 90% 20%, rgba(0,180,255,.15), transparent 40%),
              linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.25) 60%, rgba(0,0,0,.28));
  mix-blend-mode: screen;
  opacity: .6;
}

/* Section: Layout Helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .15em .6em;
  border-radius: 999px;
  background: rgba(78, 226, 255, .25);
  border: 1px solid rgba(126, 180, 255, .45);
  color: #eaffff;
}

/* Section: Typography */
h1, h2, h3, h4 { margin: .25em 0; line-height: 1.15; font-weight: 700; }
p { margin: .75em 0; color: var(--text); }
ul, ol { padding-left: 1.25em; margin: .75em 0; }
li { margin: .35em 0; }

/* Fluid typography */
body { font-size: clamp(15px, 1.6vw, 18px); }
h1 { font-size: clamp(22px, 5vw, 40px); }
h2 { font-size: clamp(20px, 3.5vw, 28px); }
h3 { font-size: clamp(16px, 2.5vw, 22px); }

/* Section: Glass Panels (structure-wide) */
header, main, article, footer, aside, nav {
  background: rgba(9, 12, 30, 0.28);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 0.9rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  /* Fallback when backdrop-filter unsupported */
  background-color: rgba(9,12,30,.65);
}
header { margin: 1rem auto; padding: 1.25rem; text-align: left; }
header h1 { margin-bottom: .25rem; }
main { padding: 0; }
article { padding: 1rem; }

/* Section: Images */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content helpers */
.content { padding: 0; color: var(--text); }

/* Section: Links & Buttons (interactive states) */
a, button, .btn, .cta {
  font-family: inherit;
  color: #eaffff;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
button, .btn, .cta {
  display: inline-block;
  padding: .55em 1.05em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(#203067, #0b1a38);
  color: #eaffff;
  cursor: pointer;
  user-select: none;
}
.btn.primary, .cta {
  background: linear-gradient(#2a4d8f, #12245a);
}
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,.55);
}
.btn:hover, .cta:hover, .btn.primary:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); opacity: .85; }

/* Focus ring (accessible) */
:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  border-color: rgba(255,255,255,.8);
}

/* Section: Lists & blocks (accessible typography) */
ol { padding-left: 1.25em; }
blockquote {
  margin: .75em 0; padding: .75em 1em;
  border-left: 3px solid rgba(120,170,255,.6);
  color: var(--muted);
  background: rgba(255,255,255,.04);
}

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

/* Section: Layout helpers for responsive design */
@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}