/* Section: Tokens & Global Defaults */
:root {
  --bg: #0a0f14;
  --bg-2: #0b141b;
  --text: #e8fbff;
  --muted: #a6b4c7;
  --accent: #00e5ff;
  --accent-2: #7af0ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
}
html { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  background-color: var(--bg);
  line-height: 1.5;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  /* Layered background: cyan diagonal lines + subtle dark gradient (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(0, 229, 255, .10) 0 25%, transparent 25% 50%, rgba(0,229,255,.10) 50% 75%, transparent 75% 100%),
    linear-gradient(to bottom, rgba(9,12,15,.95), rgba(9,12,15,.95) 60%, rgba(9,12,15,.92));
  background-size: 48px 48px, 100% 100%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle scanline/noise overlay (pure CSS) */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.04) 0 1px,
    transparent 1px 2px
  );
  mix-blend-mode: overlay;
  opacity: .45;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,.05) 0 2px,
    transparent 2px 4px
  );
  mix-blend-mode: overlay;
  opacity: .25;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Section: Layout primitives */
.container {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  border-radius: 999px;
  background: rgba(0, 229, 255, .18);
  color: var(--text);
  font-size: .75rem;
  border: 1px solid rgba(0, 229, 255, .4);
}

/* Section: Typography & content flow */
html, body, header, nav, main, article, footer, aside { font-synthesis-weight: none; }
header {
  padding: 1.25rem;
  margin: 1rem auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  margin: 0 0 .25rem;
  font-weight: 700;
  font-size: clamp(1.75rem, 2vw + 1.0rem, 3.5rem);
  line-height: 1.04;
  letter-spacing: .4px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.6vw + 0.8rem, 1rem);
}
main { padding: 1rem 0; }
article { max-width: clamp(420px, 92vw, 1100px); margin: 0 auto; padding: 0; }

/* Image framing (supports .image-frame and .featured-image usage) */
.image-frame, .featured-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  margin: 0 0 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
h2 { font-size: clamp(1.4rem, 1vw + 1.4rem, 2.6rem); margin: .75rem 0; color: var(--text); }
h3 { font-size: clamp(1.25rem, 0.9vw + 1.1rem, 1.75rem); margin: .75rem 0; color: var(--text); }
p { color: var(--text); margin: 0 0 1rem; }
blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }
.content { padding: 0; }

/* Section: Interactions (buttons, links, focus) */
.btn, .cta, button {
  font: inherit;
  padding: .6em 1em;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #001015;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn:hover, .cta:hover, .btn-outline:hover {
  transform: translateY(-1px);
}
a.btn, a.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* Section: Footer / ad blocks */
.product-ad, .sponsored-page {
  display: block;
  margin: .75rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem 1rem;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .15s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); background: rgba(0,0,0,.32); }
footer { padding: 1rem; text-align: center; }

/* Section: Accessibility & motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f7fb;
    --bg-2: #eef4f8;
    --text: #102029;
    --muted: #4a5968;
    --accent: #006b8e;
    --accent-2: #0a9bd6;
    --glass: rgba(255,255,255,.9);
    --glass-2: rgba(255,255,255,.95);
    --border: rgba(0,0,0,.15);
  }
  body { background: var(--bg); color: var(--text); }
  body::before { opacity: .25; }
  body::after { opacity: .18; }
  header { background: rgba(255,255,255,.95); border: 1px solid rgba(0,0,0,.15); }
  .card { background: rgba(255,255,255,.98); border: 1px solid rgba(0,0,0,.1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  a { color: var(--accent); }
}
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
}