/* Base & Palette */
:root {
  --bg: #0b1020;
  --bg-2: #0a0f1a;
  --text: #e6fbff;
  --muted: #93a4b8;
  --accent: #00e5ff;   /* cyan */
  --accent-2: #ff8a00; /* orange */
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: #0b1020;
  min-height: 100dvh;
  line-height: 1.6;
  background-image:
    linear-gradient(135deg, rgba(0,0,0,0.25), rgba(0,0,0,0.0)),
    repeating-linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0 4px, transparent 4px 8px),
    linear-gradient(#0b1020 0%, #0a0f1a 100%);
  background-blend-mode: overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; outline: none; }
a:focus-visible { outline: 3px solid #ffd776; outline-offset: 2px; text-decoration: underline; }
a:hover { text-decoration: underline; }

header, nav, main, article, aside, footer {
  display: block;
}
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Header / Hero */
header {
  padding: 2rem 0 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .4px;
  color: #eaffff;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
}

/* Main content layout */
main { padding: 1rem 0 2rem; display: grid; place-items: center; }
article { width: min(72rem, 92%); }

/* Image frame (hero image) */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  background: #111;
  display: block;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  margin: 0 auto 1rem;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: saturate(1.05);
}

/* Content styles (glass panels, typography) */
.content { margin: 0 auto; max-width: 60rem; padding: 1rem 0; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); margin: 1rem 0 .5rem; color: #eaffff; }
p { margin: .75rem 0; color: var(--text); }
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; color: var(--text); }

/* Glassy cards & panels */
.card, .glass, .product-ad, .sponsored-page {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.card { padding: 1rem; }

/* Quotes / blocks */
blockquote {
  border-left: 3px solid rgba(0, 229, 255, 0.6);
  padding-left: .75rem;
  margin: .5rem 0;
  color: var(--muted);
}

/* Lists - ensure accessible contrast in dark theme */
ul { color: var(--text); }

/* Footer / product ads */
footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}
.product-ad, .sponsored-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: .25rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}
.product-ad { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.25); color: #eaffff; }
.sponsored-page { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.25); color: #eaffff; }

/* Buttons & links variants */
.btn, a.btn, a.cta, button {
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: .75rem 1rem;
  border: 1px solid rgba(0,0,0,.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #00151e;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn { background: rgba(0, 0, 0, 0.25); color: #eaffff; border-color: rgba(255,255,255,.25); }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid #ffd776; outline-offset: 2px; }
.btn.primary {
  background: linear-gradient(135deg, rgba(0,229,255,.95), rgba(0,178,255,.9));
  color: #00131a;
  border: 1px solid rgba(0,0,0,.25);
}
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 229, 255, 0.85);
}
a.cta { background: rgba(255, 138, 0, 0.95); color: #061012; border: 1px solid rgba(255, 200, 100, 0.6); }

/* Utility & typography helpers */
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.25);
  color: #eaffff;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Layout semantics for required selectors */
html, body, header, nav, main, article, footer, aside { }
.image-frame, .image-frame img, .content, .product-ad, ul, li, a, button, .btn, .cta, .grid, .card, .tag { will-change: transform; }

/* Glass fallback for backdrop-filter absence (non-critical) */
@supports not (backdrop-filter: blur(12px)){
  .glass, .card { background: rgba(255,255,255,0.12); backdrop-filter: none; }
}

/* Dark-mode primaries tweak (default is dark cyber) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --bg-2: #eef2f7;
    --text: #0b1220;
    --muted: #425266;
    --accent: #0066cc;
    --accent-2: #d85a00;
  }
  body {
    background: linear-gradient(#f7f9fc 0%, #eef2f7 100%), 
                repeating-linear-gradient(135deg, rgba(0,102,204,0.08) 0 4px, transparent 4px 8px);
    color: var(--text);
  }
  .glass { background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.1); backdrop-filter: blur(6px); }
  a { color: var(--accent); }
  .btn { color: #04111b; }
}

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

/* Print styles: basic readability */
@media print {
  body { background: white; color: black; }
  .image-frame { border: none; }
}