:root {
  /* Palette tokens (bright turquoise + midnight blue) */
  --bg: #0b1020;
  --bg-2: #0a1a2b;
  --text: #e6fbff;
  --muted: #b9d8e6;
  --accent: #1ff1e0;
  --accent-2: #00e6d1;
  --panel: rgba(255, 255, 255, 0.12);
  --panel-strong: rgba(255, 255, 255, 0.22);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --focus: 0 0 0 3px rgba(31, 241, 224, 0.6);
  --radius: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans"; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, rgba(9,12,28,1) 0%, rgba(8,12,30,1) 40%, rgba(2,6,20,1) 100%);
  /* Layered background element (noise/scanline via gradients) is added with a pseudo-element for performance */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}

/* Subtle turquoise waves + headroom via layered background (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* soft gradient wash + scanline-like effect */
  background:
    radial-gradient(circle at 20% 15%, rgba(0, 255, 230, 0.10), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0, 210, 230, 0.08), transparent 40%),
    linear-gradient(135deg, rgba(8, 20, 40, 0.75) 0%, rgba(4, 8, 24, 0.85) 60%, rgba(2, 6, 20, 0.95) 100%);
  background-blend-mode: overlay;
  /* subtle scanlines to imply "future cyberpunk" texture */
  mask: linear-gradient(#000 0 60%, transparent 60%);
  pointer-events: none;
  mix-blend-mode: normal;
}

@media (min-width: 900px) {
  body::before {
    transform: translateZ(0);
  }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
}

@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(255,255,255,0.22); }
}

header, main, footer, aside { display: block; }

/* Typography */
h1, h2, h3 {
  margin: 0.25rem 0 0.5rem;
  line-height: 1.15;
  letter-spacing: .2px;
}

h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem);
  font-weight: 800;
  color: var(--text);
}

h2 {
  font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2rem);
  font-weight: 700;
  color: var(--text);
}

h3 {
  font-size: clamp(1.1rem, 2vw + 0.4rem, 1.4rem);
  font-weight: 700;
  color: var(--text);
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 0.8vw + 0.9rem, 1.125rem);
}

/* Image frame (scalable, accessible) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.image-frame:hover img {
  transform: scale(1.03);
}

/* Content area and glass panels (hero + article content) */
header {
  padding: clamp(1rem, 2vw, 1.5rem);
  text-align: center;
  margin: 1rem auto;
  border-radius: 14px;
  background: rgba(11, 14, 34, 0.48);
  border: 1px solid rgba(0, 255, 235, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
header h1 { margin-bottom: 0.25rem; font-size: clamp(1.5rem, 4vw, 2.75rem); }
header .meta { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--muted); }

/* Header and nav helpers to keep content compact on mobile */
nav { margin-top: .25rem; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.18);
}
nav a:hover, nav a:focus {
  text-decoration: underline;
  outline: none;
}
a:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Button appearances (solid and outline variants) */
.btn, .cta, .tag {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, background 0.2s ease;
  border: 1px solid rgba(255,255,255,0.28);
}
.btn {
  background: var(--accent);
  color: #041315;
  border: none;
}
.btn:hover { transform: translateY(-1px); background: #14f0e0; }
.btn:active { transform: translateY(0); }

.btn-outline, .outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 255, 235, 0.9);
}
.btn-outline:hover, .outline:hover { text-decoration: underline; background: rgba(0, 255, 235, 0.15); }

/* Glass panels for core sections */
.section-glass {
  background: rgba(8, 14, 40, 0.32);
  border: 1px solid rgba(0, 255, 235, 0.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}

/* Content wrapper styles that map to .content, .product-ad, ul/li, etc. */
.content { padding: 0; color: var(--text); }

/* Product ad blocks in footer */
.product-ad {
  display: block;
  padding: 0.75rem;
  text-align: center;
  background: rgba(2, 14, 30, 0.42);
  border: 1px solid rgba(0, 255, 235, 0.6);
  border-radius: 12px;
}
.product-ad a { color: var(--text); text-decoration: none; display: block; }

/* Lists and chips/tags */
ul { margin: 0 0 1rem 1.1rem; padding: 0; list-style: square; }
li { margin: 0.25rem 0; color: var(--muted); }
.tag {
  padding: 0.15em 0.5em;
  font-size: 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(0,255,235,0.75);
  color: var(--text);
  background: rgba(0,255,235,0.15);
  display: inline-block;
  margin-right: 0.5em;
}

/* Layout patterns for content density */
main {
  padding: 1rem 0 2rem;
}
main > article {
  display: grid;
  gap: 1rem;
  align-items: start;
}
main > article .featured-image { width: 100%; }

@media (min-width: 640px) {
  main > article { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  main > article { grid-template-columns: 1fr 1fr; align-items: start; }
  .featured-image { order: -1; }
}

/* Footer layout (grid of ad blocks) */
footer {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: start;
  border-top: 1px solid rgba(255,255,255,0.15);
  background: rgba(2, 6, 20, 0.55);
}
footer p {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

/* Print-friendly tweaks */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; color: #000; }
  a, button { text-decoration: none; color: #000; }
}
