/* ==========================================================================
   BASE & GLOBAL STYLES
   ========================================================================== */

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

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

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Background canvas for particle effects */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-canvas);
  pointer-events: none;
}

/* Background Radial Glow Blobs */
.bg-glow-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  transition: opacity var(--transition-slow);
}

.blob-primary {
  top: -150px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-cyan {
  top: 40%;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.blob-pink {
  bottom: -100px;
  right: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* Selection Highlight */
::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #ffffff;
}

/* Custom Cursor Effects */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-light);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 0 10px var(--primary);
}

.cursor-outline {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, transform 0.15s ease-out;
}

.cursor-hover .cursor-outline {
  width: 56px;
  height: 56px;
  border-color: var(--secondary);
  background-color: rgba(6, 182, 212, 0.08);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-outline {
    display: none;
  }
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: var(--z-base);
}

.section {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
  position: relative;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

code, pre {
  font-family: var(--font-mono);
}

img, svg {
  max-width: 100%;
  display: block;
}

/* Gradient Text Classes */
.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-emerald {
  background: var(--grad-emerald);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Header Utility */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-3xl);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(8px);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* 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-width: 0;
}
