/* Theme tokens */
:root {
  --bg: #0f1117;
  --bg-2: #1a1f26;
  --text: #e8f7f1;
  --muted: #9fb9c8;
  --accent: #2ee0d6;
  --accent-2: #14b8a6;
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 14px;
}

/* Base / Layout setup */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(12,16,20,.9) 0%, rgba(18,28,34,.8) 50%, rgba(12,16,20,.9) 100%),
    radial-gradient(circle at 20% 20%, rgba(46, 224, 214, .22), transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(0, 150, 150, .18), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, overlay, normal;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }

/* Containers & grids */
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass panels (with backdrop-filter) */
.glass {
  background: rgba(15, 20, 26, 0.34);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(15, 20, 26, 0.78); }
}

/* Image frame helpers */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.image-frame { aspect-ratio: 16 / 9; width: 100%; }
.image-frame img, .featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography */
h1 { font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem); line-height: 1.08; margin: 0 0 .25rem; }
h2 { font-size: clamp(1.125rem, 1vw + .9rem, 1.4rem); margin: .75rem 0 0; }
p, li { color: var(--text); }
blockquote { margin: .75rem 0; padding-left: .75rem; border-left: 3px solid var(--accent); color: var(--muted); }

/* Links & buttons */
a, button, .btn, .cta { cursor: pointer; transition: transform .15s ease, background .2s ease, color .2s; text-decoration: none; color: inherit; }
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; color: #7ff7e9; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75em 1.25em; border-radius: 999px;
  border: 1px solid rgba(46,224,214,.6);
  background: var(--accent);
  color: #041f1d; font-weight: 700;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(46,224,214,.8);
}
.cta { display: inline-flex; align-items: center; justify-content: center; padding: .65em 1em; border-radius: 999px; }

.product-ad { display: block; padding: .95rem; text-align: center; background: rgba(15,20,26,.38); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); }

/* Header / main / footer sections */
header, main, footer, aside { padding: 0.75rem 0; }
header { padding-block: 1.25rem; }
header h1 { font-weight: 800; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: .95rem; }

nav { margin-top: .5rem; display: inline-flex; gap: .5rem; flex-wrap: wrap; }

main { padding-block: 1rem; }
article { display: block; }

/* Utilities for content blocks */
.content { max-width: 68ch; margin-inline: auto; padding-block: 0; padding-inline: 0; }
.tag { display: inline-block; padding: .15em .5em; font-size: .75rem; border-radius: 999px; background: rgba(46,224,214,.15); color: var(--text); border: 1px solid rgba(46,224,214,.4); }

/* Layout helpers (for potential sections) */
.aside { display: block; }

/* Footer layout */
footer { padding: 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { color: blue; text-decoration: underline; }
  .glass { background: white; border: 1px solid #ccc; }
  header, main, footer { padding: 0.25in; }
}

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