/* Section: Global Tokens */
:root {
  --bg: #060b16;
  --bg-2: #041a2b;
  --text: #e8fbff;
  --muted: #a9c6e6;
  --accent: #4bd6ff;
  --accent-2: #7bf0ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.28);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --focus-ring: 0 0 0 3px rgba(123, 240, 255, .65);
  --grid-gap: 1rem;
  --container-max: clamp(320px, 92vw, 1100px);
}

/* Section: Base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(0,180,255,.08) 0%, rgba(0,60,140,.18) 60%, rgba(0,0,0,.0) 100%),
    linear-gradient(#030614, #040a15);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Layered noise + scanlines (pure CSS) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,180,255,.025) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% -10%, rgba(0,180,255,.08), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(0,60,140,.08), transparent 40%);
  background-blend-mode: overlay;
  opacity: .9;
  filter: saturate(120%);
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
a { color: inherit; text-decoration: none; }

/* Section: Layout primitives */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--grid-gap); }
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .2em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #dff7ff;
  background: rgba(75,214,255,.25);
  border: 1px solid rgba(75,214,255,.5);
}
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(0,180,255,.25), rgba(0,0,0,.15));
  border: 1px solid rgba(255,255,255,.25);
  overflow: hidden;
  display: block;
  box-shadow: inset 0 0 12px rgba(0,0,0,.25), 0 6px 16px rgba(0,180,255,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  filter: brightness(.98) saturate(1.05);
}
.content {
  color: var(--text);
  font-size: clamp(1rem, .92rem + .4vw, 1.125rem);
  line-height: 1.6;
}
ul { margin: .5rem 0 1rem 1.15rem; padding: 0; }
li { margin: .15rem 0; }

/* Section: Typography (hero) */
h1, h2 { color: var(--text); margin: .25rem 0; }
h1 { font-size: clamp(1.8rem, 1.4rem + 4vw, 3.8rem); line-height: 1.04; letter-spacing: .5px; }
h2 { font-size: clamp(1.25rem, 0.9rem + 2vw, 2rem); }

/* Section: Header / Hero styling (glass panels) */
header, main, footer, aside, article {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header { margin: 1rem auto; text-align: center; }
header h1 { margin-bottom: .25rem; font-weight: 700; }
header .meta { color: var(--muted); font-size: .9rem; }

/* Section: Navigation links with focus state */
nav { margin-top: .25rem; display: inline-block; }
nav a {
  padding: .5rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.08);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { text-decoration: underline; background: rgba(0,0,0,.12); transform: translateY(-1px); }
nav a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Section: Links and interactive controls */
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn, .cta, a.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(75,214,255,.6);
  background: linear-gradient(135deg, rgba(75,214,255,1) 0%, rgba(0,180,255,.95) 100%);
  color: #022033;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover, a.btn:hover, button:hover { transform: translateY(-1px); }
.btn:active, .cta:active, a.btn:active, button:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(75,214,255,.9);
}
.btn.secondary:hover {
  background: rgba(75,214,255,.15);
}
.btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
p { margin: 0.65rem 0; }

/* Section: List styling for content lists */
ul { list-style: disc; padding-left: 1.25rem; }
li { line-height: 1.5; }

/* Section: Content area wrappers for layout coherence */
.main-content { display: block; padding: 0; margin: 0 auto; max-width: 64ch; }
.article { padding: 1rem 0; }

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

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

/* Section: Minor utility tweaks for better responsiveness */
@media (min-width: 720px) {
  header { padding: 1.25rem 1.5rem; }
  main { padding: 1rem 1.25rem; }
}
@media (min-width: 1024px) {
  .container { padding-inline: 2rem; }
  .grid { gap: 1.25rem; }
}

/* Section: Glass fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(255,255,255,.14);
  }
  header { border-color: rgba(255,255,255,.4); }
}
