/* =========================================================================
   BASE STYLES & RESET
   bclarkcodes.dev — Dark Circuit Architecture (BclarkCodes Logo Alignment)
   ========================================================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Authentic Circuit Board & Ambient Glow Backdrop (Directly Matched to Logo) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(ellipse 90% 55% at 50% -12%, rgba(129, 140, 248, 0.22) 0%, transparent 65%),
    radial-gradient(circle at 90% 75%, rgba(162, 158, 193, 0.08) 0%, transparent 45%),
    linear-gradient(rgba(162, 158, 193, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(162, 158, 193, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  pointer-events: none;
  z-index: -1;
}

/* Typography Standards: Oversized Confident Sans-Serif (Logo Typography Match) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p, li, blockquote {
  color: var(--text-secondary);
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Common Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  position: relative;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header.centered {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-primary-light);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  letter-spacing: -0.035em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Fast-Loading / Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
