/* Theme tokens */
:root {
  --bg: #04060a;
  --bg-2: #0b0f14;
  --text: #e8fbff;
  --muted: #9bd7e8;
  --accent: #14fff0;      /* neon teal */
  --accent-2: #a65cff;    /* neon purple */
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  --radius: 12px;
}

/* 1. Base & layout resets */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* layered background: gradient + city-light hints + scanlines */
  background-image:
    radial-gradient(circle at 15% 0%, rgba(0, 255, 200, 0.25), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(160, 0, 255, 0.25), transparent 40%),
    linear-gradient(135deg, rgba(0, 40, 40, 0.85), rgba(20, 0, 60, 0.95)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 3px);
  background-blend-mode: screen, screen, normal, overlay;
  background-size: cover, cover, cover, 100% 100%;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* 2. Global helpers & containers */
.container { max-width: clamp(28rem, 92vw, 1200px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* 3. Typography */
h1, h2 { margin: 0 0 .5rem; line-height: 1.25; }
article h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.8rem); font-weight: 700; color: var(--text); }
article h2 { font-size: clamp(1.15rem, 2vw + 0.6rem, 1.4rem); font-weight: 700; color: var(--text); }
p { margin: .8rem 0; color: var(--text); }
blockquote { margin: .8rem 0; padding-left: 1rem; border-left: 4px solid var(--accent-2); color: var(--muted); font-style: italic; }

/* 4. Core layout sections (semantic targets) */
header, nav, main, article, footer, aside { display: block; }

/* 5. Glassy surfaces (fallback included) */
header {
  margin: 1rem auto;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
header h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.8rem); }

.meta { font-size: 0.92rem; color: var(--muted); }

/* subtle header nav styling */
nav { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .25rem; }
nav a { color: var(--accent-2); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; border: 1px solid rgba(126,255,255,.25); background: rgba(0,0,0,.15); }

/* 6. Main content styling */
main { padding: 1rem 0; }
article {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.featured-image {
  margin: 0 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.3);
}
.featured-image img { width: 100%; height: auto; display: block; }

/* generic image-frame (style target) */
.image-frame { aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.4); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 6px 20px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 7. Text content helpers */
.content { font-size: clamp(0.95rem, 0.8vw + 0.8rem, 1.05rem); line-height: 1.6; }

/* 8. Lists & inline helpers */
ul, li { padding: 0; margin: 0; }
ul { padding-left: 1.25rem; margin-top: .25rem; }
li { margin: .25rem 0; }

/* 9. Cards & tags (utility classes) */
.card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1rem;
}
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .8rem;
  background: rgba(126, 255, 255, 0.25);
  color: #00241a;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* 10. Interactive elements (links, buttons, CTAs) */
a, button, .btn, .cta {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
.btn {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 255, 235, 0.95), rgba(160, 0, 255, 0.95));
  color: #021016;
  font-weight: 700;
  text-decoration: none;
}
.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn:hover { transform: translateY(-1px); }

/* 11. Footer layout & styling */
footer {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
footer .product-ad,
footer .sponsored-page { padding: .75rem; text-align: center; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); }
footer p { text-align: center; color: var(--muted); margin: .25rem 0 0; }

/* responsive footer arrangement */
@media (min-width: 720px) {
  footer { grid-template-columns: 1fr 1fr; align-items: start; }
  .featured-image { margin-bottom: 0; }
}

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

/* 13. Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, footer { display: none; }
  article { background: #fff; border: none; }
}