/* 1. Theme Tokens & Setup */
:root{
  --bg: #0a0f12;
  --bg-2: #0b1b10;
  --text: #e9fff5;
  --muted: #a6ffd3;
  --accent: #2fe58a;      /* iridescent green */
  --accent-2: #d6a07d;    /* rose gold */
  --glass: rgba(255,255,255,.14);
  --glass-2: rgba(255,255,255,.22);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 24px rgba(0,0,0,.32);
  --shadow-soft: 0 4px 12px rgba(0,0,0,.18);
  --radius: 14px;
}

/* 2. Layered Background (gradient + subtle scanlines/noise) */
html, body { height: 100%; }
html {
  background: radial-gradient(circle at 60% -10%, rgba(0,180,110,.25), transparent 40%),
              linear-gradient(135deg, #07150d 0%, #04080a 60%, #020606 100%);
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.0) 60%),
              radial-gradient(circle at 60% 0%, rgba(0,180,110,.25), transparent 40%),
              #050704;
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(0,0,0,.0) 0 40%, rgba(0,0,0,.06) 41% 100%);
  mix-blend-mode: overlay;
  opacity: .25;
}

/* 3. Global Layout Elements */
html, body, header, nav, main, article, aside, footer { /* section placeholders for consistent styling */ }
header { text-align: center; padding-block: 1rem; }
header h1 { font-size: clamp(1.4rem, 2vw + 1rem, 2.6rem); margin: .25rem auto; letter-spacing: .2px; }
nav { display: flex; justify-content: center; gap: .75rem; padding: .25rem 0; flex-wrap: wrap; }
nav a { color: var(--accent); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; border: 1px solid rgba(47,229,138,.6); background: rgba(47,229,138,.12); font-weight: 600; }
nav a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,229,138,.75); border-color: rgba(47,229,138,.9); }
main { display: grid; justify-items: center; padding: 1rem 0 2rem; width: 100%; }
.container { max-width: clamp(320px, 90vw, 1120px); width: 100%; padding-inline: 1rem; margin-inline: auto; }

/* 4. Glass Panels & Cards (fallback handled) */
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,.18); }
}
.image-frame {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem auto;
  border: 1px solid rgba(255,255,255,.28);
  background: #111;
  box-shadow: var(--shadow);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 5. Lists, Grids, Cards, Tags */
ul, li { list-style: none; padding: 0; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card + .card { margin-top: .75rem; }
.tag { display: inline-block; padding: .25em .6em; border-radius: 999px; font-size: .75rem; border: 1px solid rgba(214,160,121,.6); background: rgba(214,160,121,.15); color: #fff; }

/* 6. Content & Typography Helpers */
.content { padding: 1rem; }

/* 7. Buttons & Links (interactive states) */
a, button, .btn, .cta { cursor: pointer; color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Button variants */
.btn { display: inline-block; padding: .75rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: linear-gradient(135deg, rgba(47,229,138,.95), rgba(214,114,83,.85)); color: #041b0e; font-weight: 700; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47,229,138,.8); }
.btn--outline { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.45); color: var(--text); }
.cta { display: inline-block; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(214,160,121,.6); background: rgba(214,160,121,.18); color: #fff; }

/* 8. Image Frame (additional rules) already defined under 4 */

/* 9. Layout Utilities */
.aside { display: none; } /* reserved for future layout */

.footer-note { color: var(--muted); }

/* 10. Responsiveness & Accessibility */
@media (max-width: 640px) {
  nav { gap: .5rem; }
  .image-frame { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  body { color: #000; background: #fff; }
  a { color: #00f; text-decoration: underline; }
}