/* ═══════════════════════════════════════════════════════════════════════════
   BASE.CSS — Reset, Global Typography & Surface Standards
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Modern CSS Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Accessible Focus States ── */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── Selection ── */
::selection {
  background-color: var(--accent-primary);
  color: #ffffff;
}

/* ── Typography Scale & Fluid Hierarchy ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--accent-primary-dk);
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ── Sleek Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-secondary);
}

/* ── Scientific Background Patterns ── */
.dot-grid-bg {
  position: relative;
}

.dot-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid-line-color) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 100%);
}

.circuit-grid-bg {
  position: relative;
}

.circuit-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 40%, black 35%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black 35%, transparent 95%);
}

/* ── Monospace Eyebrow Pill ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-primary);
  background: var(--accent-primary-lt);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
  margin-bottom: 1rem;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ── Section Header Block ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-2xl) auto;
  position: relative;
  z-index: 1;
}

.section-header .section-title {
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-header .section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}
