/* Base */
:root {
  --bg: #0a1a2e;
  --bg-2: #0b2540;
  --text: #e9fbff;
  --muted: #a6f0ff;
  --accent: #2ee0d2;
  --accent-2: #4ff0ff;
  --card: rgba(10, 20, 40, 0.70);
  --card-2: rgba(9, 16, 32, 0.72);
  --focus: #8ef2ff;
  --border: rgba(80, 230, 255, 0.55);
}

html, body {
  height: 100%;
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, #061428 100%);
  /* Layered background: subtle scanlines */
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle noise + scanlines over the gradient */
  background:
    linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.15)),
    repeating-linear-gradient(to bottom,
      rgba(0,255,255,0.04) 0px, rgba(0,255,255,0.04) 1px,
      transparent 1px, transparent 2px);
  background-blend-mode: overlay;
  opacity: 0.65;
  z-index: 0;
}
* { box-sizing: border-box; }

/* Layout primitives */
.container { max-width: clamp(680px, 85vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass panels (layout sections: header, main, article, footer, aside) */
header, main, article, footer, aside {
  background: rgba(6, 14, 32, 0.60);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  z-index: 1;
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(6, 14, 32, 0.88);
    border-color: rgba(0, 255, 255, 0.35);
    box-shadow: 0 6px 18px rgba(0,0,0,0.20);
    backdrop-filter: none;
  }
}

/* Header content styling */
header { text-align: center; padding: 1.25rem 1rem; }
header h1 { margin: 0.25rem 0 0.25rem; font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem); line-height: 1.08; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem); margin: .25rem 0 0.5rem; }

/* Nav styling */
nav { display: inline-flex; gap: 0.5rem; margin-top: .25rem; }
nav a { color: var(--accent-2); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(46,224,210,.4); background: rgba(46,224,210,.12); }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Featured media */
.featured-image { width: 100%; margin: .5rem auto 1rem; display: grid; place-items: center; }
.image-frame { aspect-ratio: 3 / 2; width: 100%; overflow: hidden; border-radius: 12px; 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; }

/* Typography hierarchy within main/article */
main { padding: 1rem; }
article h2 { font-size: clamp(1.4rem, 1vw + 1.2rem, 2rem); margin: .75rem 0 .25rem; letter-spacing: .2px; color: #eaffff; }
article p { line-height: 1.55; color: #eafaff; margin: .5rem 0; }
article blockquote { margin: .75rem 0; padding: .5rem 1rem; border-left: 4px solid var(--accent); color: #dff8ff; opacity: .95; }

/* Lists inside content */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Inline content wrapper (content) */
.content { padding: 0.5rem 0; color: var(--text); }

/* Product ad / footer-like sections */
.product-ad { margin: .75rem 0; text-align: center; }
.product-ad a { display: inline-block; padding: .75rem 1rem; border-radius: 8px; border: 1px solid rgba(46,224,210,.8); background: rgba(46,224,210,.15); color: var(--text); text-decoration: none; transition: transform .15s ease, background .2s ease; }
.product-ad a:hover { transform: translateY(-1px); background: rgba(46,224,210,.25); }

/* Generic link/button styling */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; color: var(--accent-2); }

/* Buttons (solid + outline) */
.btn, button, .cta { font: inherit; padding: .75rem 1.15rem; border-radius: 8px; border: 1px solid rgba(0,255,255,0.6); color: #00141a; background: rgba(46,224,210,0.92); cursor: pointer; display: inline-block; text-align: center; transition: transform .2s ease, background .2s ease, border-color .2s ease; text-decoration: none; }
.btn:hover, button:hover, .cta:hover { transform: translateY(-1px); background: rgba(46,224,210,1); }
.btn:focus-visible, button:focus-visible, .cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Outlined variant for CTAs */
.btn.outline { background: transparent; color: var(--text); border: 1px solid rgba(46,224,210,.9); }
.btn.outline:hover { background: rgba(46,224,210,.15); }

/* Card helper class for compact blocks */
.card { background: rgba(0,0,0,0.25); border: 1px solid rgba(0,255,255,.25); border-radius: 12px; padding: 1rem; }

/* Tag / pill styling */
.tag { display: inline-block; padding: .25em .5em; font-size: .75rem; border-radius: 999px; border: 1px solid rgba(80,230,255,.6); background: rgba(0,0,0,.25); color: var(--text); }

/* Lists and misc defaults */
ul, li { list-style: disc; }
ul { padding-left: 1.25rem; }

/* Print friendly (basic) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
  header, main, article, footer, aside { background: none; border: none; box-shadow: none; }
  .container { padding: 0; }
}

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