/* Base tokens and palette */
:root {
  --bg: #0b1f3a;
  --bg-2: #0a2a64;
  --text: #e8f2ff;
  --muted: #b7c6e8;
  --surface: rgba(12, 40, 90, 0.22);
  --glass: rgba(18, 56, 120, 0.22);
  --glass-border: rgba(170, 190, 255, 0.40);
  --accent: #7fff00;
  --accent-2: #4fc3ff;
  --shadow: 0 8px 22px rgba(0,0,0,.25);
  --shadow-soft: 0 4px 12px rgba(0,0,0,.18);
  --radius: 12px;
}

/* Global (mobile-first) */
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; line-height: 1.5; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(0, 120, 255, 0.25), rgba(0, 255, 127, 0.15) 60%), #07142a;
  min-height: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layered background: blue glow + subtle grid/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
}
@supports (backdrop-filter: blur(8px)) {
  /* dark frosted glass feel on supported browsers */
  body { background: linear-gradient(135deg, rgba(6, 60, 120, 0.28), rgba(0, 180, 255, 0.18) 60%), #061a2b; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Layout helpers */
.container {
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card { /* generic glassy card */
  background: rgba(12, 40, 90, 0.22);
  border: 1px solid rgba(170, 190, 255, 0.40);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(8px)) {
  .card { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}

.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.002);
}
.content { padding: 0.75rem 0.25rem; }

/* Section typography and hero emphasis */
header, main, article, nav, aside, footer {
  background: rgba(12, 40, 90, 0.22);
  border: 1px solid rgba(170, 190, 255, 0.40);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin: 0.75rem 0;
  box-shadow: var(--shadow-soft);
}
header { padding: 1rem; }
nav { display: block; margin-top: .25rem; }
main { padding: 1rem; }
article { padding: 0.75rem; }

/* Heading styles for hierarchy */
h1 {
  font-size: clamp(1.75rem, 1.2rem + 3vw, 3rem);
  line-height: 1.08;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
}
h2 { font-size: clamp(1.25rem, 0.8rem + 2vw, 2rem); margin: .5rem 0; }
h3 { font-size: clamp(1rem, 0.6rem + 1.6vw, 1.25rem); margin: .5rem 0; }

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

/* Tags and small chips */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(127,255,0,.50);
  color: #052b00;
  background: rgba(127,255,0,.20);
}

/* Link and button styling (interactive states and accessibility) */
a, button, .btn, .cta {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a { color: inherit; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
button, .btn, .cta {
  border: 1px solid rgba(255,255,255,.25);
  background: #0e3a98;
  color: #eaffff;
  padding: .55rem .95rem;
  border-radius: 8px;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease;
}
.btn { background: var(--accent); color: #022a00; }
.btn:hover { transform: translateY(-1px); background: #6aff00; }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border-color: rgba(127,255,0,.75);
  color: var(--text);
}
.cta { padding: .65rem 1rem; }

@media (min-width: 640px) {
  .container { padding-block: 1rem; }
  header { display: block; }
  nav { margin-top: .5rem; }
}

/* Form controls (present if forms appear) */
input, textarea, select {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(180,210,255,.4);
  border-radius: 6px;
  padding: .5rem;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
label { font-size: .92rem; color: var(--muted); }

/* Print-friendly */
@media print {
  body { background: #fff; color: #000; }
  a { color: #00f; text-decoration: underline; }
}

/* Print-friendly adjustments for readability on small screens */
@media (max-width: 420px) {
  h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
}
