:root {
  /* TOKENS: olive/forest green palette for cyberpunk vibe */
  --bg: #0b100b;
  --bg-2: #132a12;
  --surface: rgba(10, 25, 12, 0.25);

  --text: #e9fbe9;
  --muted: #a6d6a6;

  --accent: #2f7a2f;        /* forest green base */
  --accent-2: #6ab56a;       /* vibrant accent for highlights */

  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.25);

  --shadow-1: 0 6px 18px rgba(0,0,0,.28);
  --shadow-2: 0 2px 8px rgba(0,0,0,.25);
  --ring: 2px solid rgba(255,255,255,.75);
  --radius: 14px;
}

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

html, body { height: 100%; }

html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

/* LAYERS: gradient + subtle noise/scanline (pure CSS) */
html, body {
  background: linear-gradient(135deg, #0b1a0b 0%, #132a12 60%, #0b1a0b 100%);
  /* subtle overlay for olive glow */
  background-blend-mode: normal;
  color-scheme: dark;
}

body {
  margin: 0;
  color: var(--text);
  background-image:
    linear-gradient(135deg, rgba(20, 60, 20, 0.6) 0%, rgba(6, 18, 8, 0.6) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-size: cover;
  min-inline-size: 0;
  padding: 1rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

/* GLASS PANELS: backdrop-filter with graceful fallback via @supports */
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .glass {
    background: rgba(10, 25, 12, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
@supports not ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .glass {
    background: rgba(10, 25, 12, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
}

body > header,
body > main,
body > footer,
aside {
  background: transparent;
  border-radius: var(--radius);
  padding: 1rem;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  box-shadow: var(--shadow-1);
}

header { align-self: start; }

main { display: block; }

footer { align-self: end; }

/* STRUCTURE: container + grid utilities */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: 0.5rem;
}

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

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

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  background: rgba(47, 122, 47, 0.25);
  color: #eaffea;
  border: 1px solid rgba(255,255,255,0.25);
}

/* IMAGE FRAME: aspect-ratio, object-fit, glow */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 0 8px rgba(0,0,0,.15);
  background: #0b0f0b;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: saturate(1.02);
}

/* CONTENT / TYPOGRAPHY */
content, .content { /* alias for potential wrappers */ }

h1, h2, h3, h4 { color: var(--text); margin: 0.25em 0 0.4em; font-weight: 700; line-height: 1.15; }

h1 { font-size: clamp(2rem, 5vw + 1rem, 4rem); letter-spacing: .2px; }

h2 { font-size: clamp(1.25rem, 2vw + 1rem, 2.25rem); margin-top: 0.5rem; }

h3 { font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.5rem); }

h4 { font-size: clamp(0.95rem, 1vw + 0.5rem, 1.15rem); }

/* readable paragraph text with fluid sizing */
p { font-size: clamp(0.95rem, 0.8vw + 0.8rem, 1.15rem); line-height: 1.6; color: var(--text); margin: 0.5rem 0 1rem; }

/* lists */
ul, li { color: var(--text); margin: 0.5rem 0; padding: 0; }
ul { padding-left: 1.25rem; }
ol { padding-left: 1.25rem; }

/* LINKS & BUTTONS */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); outline: none; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }

/* BUTTONS: solid and outline variants with accessible focus */
.btn, button, .cta {
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041b04;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,.25); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.cta {
  padding: 0.65rem 1rem;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.cta:hover { background: rgba(255,255,255,0.14); }
.cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* FORM ELEMENTS (if present) */
input, textarea, select {
  font: inherit;
  padding: 0.6em 0.75em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.15);
  color: var(--text);
  width: 100%;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* FOCUSED STATES for accessibility on interactive elements */
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

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

/* SECTIONING: glass panels for semantic blocks */
header.glass, main.glass, footer.glass, aside.glass, article.glass {
  background: rgba(10, 25, 12, 0.25);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* REUSABLE LAYOUT PATTERNS */
.centered { text-align: center; }

/* PRINT-STYLES: basic readability */
@media print {
  body { color: #000; background: #fff; padding: 0.5in; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #000; }
}

/* MOTION PREFERENCE */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  header h1 { animation: none; opacity: 1; transform: none; }
}

/* ANIMATION: subtle, GPU-friendly (used on page load for h1) */
header h1 {
  opacity: 0;
  transform: translateY(-8px);
  animation: intro-fade 600ms ease-out forwards;
}
@keyframes intro-fade {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  header h1 { animation: none; opacity: 1; transform: none; }
}