:root {
  --bg: #0a0f24;
  --bg-2: #0b1220;
  --surface: rgba(9, 12, 26, 0.66);
  --text: #e8f7ff;
  --muted: #a9bdd9;
  --accent: #00e5ff;
  --accent-2: #5af2ff;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(120, 190, 255, 0.40);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(6,8,20,0.92) 0%, rgba(8,12,28,0.92) 60%, rgba(2,4,8,0.92) 100%),
    repeating-linear-gradient(to bottom, rgba(0,255,255,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,255,255,0.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
  padding: 0;
  margin: 0;
}

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

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
}

.tag {
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(0, 230, 255, 0.15);
  border: 1px solid rgba(0, 230, 255, 0.4);
  color: var(--text);
  display: inline-block;
  line-height: 1;
}

/* Glass / frosted panels (with graceful fallback) */
header, main, footer, aside {
  background: rgba(8, 12, 26, 0.50);
  border: 1px solid rgba(100, 180, 255, 0.35);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside {
    background: rgba(8, 12, 26, 0.75);
  }
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.08;
}
header .meta {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
nav {
  margin-top: .5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
main {
  padding: 0;
}
.article {
  display: block;
}
.featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 180, 255, 0.40);
  box-shadow: 0 8px 22px rgba(0, 180, 255, 0.35);
  margin: 0 0 1rem;
  background: #001018;
}
.featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.image-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 180, 255, 0.45);
  box-shadow: 0 6px 20px rgba(0, 180, 255, 0.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content styling */
.content {
  font-size: clamp(0.95rem, 0.9vw + 0.9rem, 1.125rem);
  color: var(--text);
  line-height: 1.6;
}
.content p { margin: .75em 0; }
.content ul { padding-left: 1.25rem; margin: .5em 0; }
.content li { margin: .25em 0; }

/* Typography scale for headings inside main/article */
article h2, .article h2 {
  font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem);
  margin: .75rem 0 0.5rem;
  color: var(--text);
}
article p { margin: 0.5rem 0; }

/* Link styles with accessible states */
a, button, .btn, .cta {
  color: var(--text);
}
a { text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Button styles (solid + outline variants) */
.btn, .cta {
  display: inline-block;
  padding: .55rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 210, 255, 0.6);
  background: linear-gradient(to bottom, rgba(0, 210, 255, 0.25), rgba(0, 210, 255, 0.15));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(to bottom, rgba(0, 210, 255, 0.35), rgba(0, 210, 255, 0.25));
}
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(0, 210, 255, 0.8);
  color: var(--text);
}
.btn--outline:hover {
  background: rgba(0, 210, 255, 0.15);
}
.btn--solid {
  background: linear-gradient(to bottom, rgba(0, 230, 255, 0.9), rgba(0, 210, 255, 0.75));
  border: 1px solid rgba(0, 210, 255, 0.95);
}
.cta { padding: .65rem 1rem; }

/* Product ad blocks in footer */
.product-ad, .sponsored-page {
  display: inline-block;
  margin: .25rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.45);
  background: rgba(0, 180, 255, 0.15);
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
}
.product-ad a:hover, .sponsored-page a:hover {
  text-decoration: underline;
}
footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  align-items: start;
  padding: 1rem;
  margin-top: 1rem;
}

/* Image / media helpers for potential aside or content visuals */
.aside {
  padding: .5rem;
  color: var(--muted);
}

/* Utility: print styles for readability */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  header, nav, footer { display: none; }
  article { background: #fff; border: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  .grid { display: block; }
}

/* Respect users' reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}