/* Section: Theme & Foundations */
:root{
  --bg: #160b22;
  --bg-2: #1f0f32;
  --surface: rgba(20, 6, 40, 0.42);
  --surface-2: rgba(20, 6, 40, 0.62);
  --text: #eaf2ff;
  --muted: #b6c6ff;
  --accent: #00e5ff;
  --accent-2: #1a9cff;
  --border: rgba(140, 180, 255, 0.3);
  --shadow: 0 8px 28px rgba(0,0,0,.38);
  --radius: 14px;
  --focus: 3px solid var(--accent);
  --focus-offset: 2px;
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines/noise (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(30,0,40,.85), rgba(10,0,25,.95)),
    repeating-linear-gradient(to bottom, rgba(0,255,255,.04) 0, rgba(0,255,255,.04) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(to right, rgba(0,255,255,.04) 0, rgba(0,255,255,.04) 1px, transparent 1px, transparent 4px);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  padding: 0;
  margin: 0;
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce){
  html, body { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, 1200px);
  padding: 0 1rem;
  margin: 0 auto;
}
.grid { display: grid; grid-gap: 1rem; }

/* Section: Basic page structure visuals (glass panels) */
header, nav, main, article, aside, footer {
  background: rgba(12, 0, 28, 0.32);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
header { padding: 1.25rem; display: grid; gap: .5rem; }
header h1 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.75rem); line-height: 1.12; margin: 0; }
header .meta { color: var(--muted); font-size: .92rem; margin-top: .25rem; }

/* Section: Navigation tweaks */
nav { display: flex; gap: .75rem; align-items: center; justify-content: flex-start; }
nav a { color: var(--accent); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
nav a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }

/* Section: Main content area */
main { padding: 1rem 0; }
article { display: block; padding: 1rem; }

/* Section: Image framing */
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(120, 100, 240, .4); box-shadow: 0 6px 22px rgba(0,0,0,.35), inset 0 0 12px rgba(0,180,255,.25); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05); }
.image-frame:focus { outline: none; }

/* Section: Content typography */
.content { color: var(--text); font-size: clamp(14px, 1.4vw, 17px); line-height: 1.55; }
.content h1, .content h2, .content h3 { line-height: 1.1; margin: .75rem 0 .25rem; font-weight: 700; }
.content h1 { font-size: clamp(1.6rem, 3vw + 1rem, 2.75rem); }
.content h2 { font-size: clamp(1.15rem, 2vw + .5rem, 1.6rem); color: #eaffff; }
.content h3 { font-size: 1.05rem; color: #eaffff; }
.content p { margin: .5rem 0 1rem; }
.content ol, .content ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }

/* Section: Lists & blocks aesthetics */
ul, li { color: var(--text); }
li { margin: .25rem 0; }
blockquote { margin: 0.75rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: #eaffff; background: rgba(0,0,0,.18); border-radius: 6px; }

/* Section: Product ad & aside blocks in footer area treated as panels */
.product-ad, .sponsored-page { display: block; text-align: center; padding: .75rem; margin: .5rem 0; background: rgba(0,0,0,.22); border-radius: 10px; border: 1px solid rgba(0,180,255,.35); }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Section: Buttons & links (interactive states, accessibility) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0);
  padding: .6rem .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0,0,0,0.28));
  transition: transform .15s ease, background .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { background: rgba(0, 0, 0, 0.36); transform: translateY(-1px); color: #eaffff; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  outline: var(--focus);
  outline-offset: var(--focus-offset);
  text-decoration: underline;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
}
.btn-outline:hover { background: rgba(0, 229, 255, .15); }
.btn {
  background: linear-gradient(90deg, #00244d, #00172e);
  border: 1px solid rgba(0, 230, 255, 0.6);
  color: #eaffff;
  box-shadow: 0 6px 14px rgba(0, 186, 255, .25);
}
.btn.primary { background: linear-gradient(90deg, rgba(0,229,255,.95), rgba(0,186,255,.95)); border: 1px solid rgba(0,255,255,.8); color: #00131a; }

/* Section: utility classes */
.container.grid { display: grid; gap: 1rem; }
.card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 1rem; }

/* Section: Layout helpers for responsive grids */
@media (min-width: 640px){
  .grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 639px){
  header { padding: 1rem; }
  nav { overflow-x: auto; }
}

/* Section: Typography helpers (system UI stack tweaks) */
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas; font-size: .9em; padding: .1em .45em; border-radius: 6px; border:1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.25); color: #eaffff; }

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