/* Section: Palette & Global Glass Rules */
:root {
  --bg: #0a0b12;
  --bg-2: #141522;
  --text: #f5f7fb;
  --muted: #c8c2cc;
  --accent: #8b1e2d;
  --accent-2: #e03a58;
  --surface: rgba(15, 18, 28, 0.40);
  --surface-2: rgba(18, 22, 32, 0.52);
  --glass: rgba(18, 22, 32, 0.28);
  --glass-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --radius-sm: 10px;
}

/* Section: Base & Layout Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
:focus-visible { outline: none; }

/* Section: Mobile-first global styles */
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(135deg, #0a0f14 0%, #141522 60%, #0a0f14 100%), 
              linear-gradient(to bottom right, rgba(120,0,0,0.08), rgba(0,0,0,0.08));
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Subtle cross-hatch scanline pattern */
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Section: Structural selectors (targeted in prompt) */
html, body, header, nav, main, article, footer, aside {
  position: relative;
  z-index: 1;
}
header, nav, main, article, footer, aside {
  padding: 0;
}
a, button, .btn, .cta {
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 86vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(139, 0, 0, 0.28);
  color: #ffdede;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Section: Hero & glass panels */
header {
  padding: 1rem 0;
}
header .glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header .glass { background: rgba(18,22,32,0.72); border-color: rgba(255,255,255,0.25); }
}
h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 0 8px rgba(139,0,0,0.75);
}
p.lead {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}
nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  background: rgba(12, 12, 18, 0.6);
  transition: transform 0.2s ease, background 0.2s ease;
}
nav a:hover { transform: translateY(-1px); background: rgba(12,12,18,0.8); }

/* Section: Image frame styling */
.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Section: Glass panels for content blocks */
.content {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .content { background: rgba(18, 22, 32, 0.82); }
}

/* Section: Interactive controls (buttons/links) */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(139,0,0,0.95), rgba(120,0,0,0.85));
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(139,0,0,0.6);
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn:focus-visible, .cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(225, 58, 88, 0.55);
  outline-offset: 2px;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.5);
}
a.btn, a.cta { text-decoration: none; }

/* Section: Accessibility & focus for links */
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* Section: Typography micro-helpers */
.subtle { color: var(--muted); font-size: 0.9rem; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
 
/* Section: Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}