/* ===============================
   VARIABLES CSS Y CONFIGURACIÓN BASE
   =============================== */

:root {
  /* Colores principales */
  --primary-color: #00d4ff;
  --secondary-color: #ff6b6b;
  --accent-color: #4ecdc4;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  
  /* Colores de fondo */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
  
  /* Colores de texto */
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --text-accent: #00d4ff;
  
  /* Neón y efectos */
  --neon-blue: #00d4ff;
  --neon-pink: #ff2f87;
  --neon-green: #39ff14;
  --neon-purple: #bc13fe;
  
  /* Tipografía */
  --font-primary: 'Roboto', sans-serif;
  --font-accent: 'Orbitron', monospace;
  
  /* Tamaños de fuente */
  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 1.875rem;
  --font-4xl: 2.25rem;
  --font-5xl: 3rem;
  --font-6xl: 3.75rem;
  
  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-base: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;
  
  /* Bordes y radius */
  --border-radius-sm: 0.25rem;
  --border-radius-base: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --border-radius-full: 9999px;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
  --shadow-neon: 0 0 20px rgba(0, 212, 255, 0.3);
  --shadow-neon-hover: 0 0 30px rgba(0, 212, 255, 0.5);
  
  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ===============================
   RESET Y ESTILOS BASE
   =============================== */

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ===============================
   TIPOGRAFÍA
   =============================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-accent);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-base);
  color: var(--text-primary);
}

h1 {
  font-size: var(--font-6xl);
  font-weight: 900;
}

h2 {
  font-size: var(--font-5xl);
}

h3 {
  font-size: var(--font-4xl);
}

h4 {
  font-size: var(--font-3xl);
}

h5 {
  font-size: var(--font-2xl);
}

h6 {
  font-size: var(--font-xl);
}

p {
  margin-bottom: var(--spacing-base);
  color: var(--text-secondary);
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: all var(--transition-base);
}

a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-color);
}

/* ===============================
   CLASES UTILITARIAS
   =============================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.gradient-text {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.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;
}

/* ===============================
   NAVEGACIÓN
   =============================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    min-height: 70px;
}

.navbar.scrolled {
    background: rgba(10, 10, 20, 0.98);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.1);
    border-bottom-color: rgba(0, 255, 255, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.nav-toggle:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.2);
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 212, 255, 0.3);
}

/* ===============================
   SECCIONES PRINCIPALES
   =============================== */

.section {
  padding: var(--spacing-4xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-4xl);
}

.section-title {
  font-size: var(--font-5xl);
  margin-bottom: var(--spacing-base);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  border-radius: var(--border-radius-full);
}

.section-subtitle {
  font-size: var(--font-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===============================
   SCROLL SMOOTH Y UTILIDADES
   =============================== */

.smooth-scroll {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
}

/* ===============================
   RESPONSIVE HELPERS
   =============================== */

@media (max-width: 768px) {
  :root {
    --font-6xl: 2.5rem;
    --font-5xl: 2rem;
    --font-4xl: 1.75rem;
    --font-3xl: 1.5rem;
    --spacing-4xl: 3rem;
    --spacing-3xl: 2rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .section {
    padding: var(--spacing-3xl) 0;
  }
  
  .section-header {
    margin-bottom: var(--spacing-3xl);
  }
}

/* ===============================
   SECCIONES SIN ANIMACIONES DE FONDO
   =============================== */

.section:not(.hero) {
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

/* Asegurar que las secciones tengan fondo sólido */
.technologies,
.portfolio,
.community,
.contact {
  background: var(--bg-primary);
  position: relative;
}

/* ===============================
   ANIMACIONES CONTENIDAS AL HERO
   =============================== */

/* Solo el hero debe tener efectos de paralaje */
.hero .floating-shapes .shape {
  will-change: transform;
}

/* Desactivar cualquier efecto de paralaje fuera del hero */
.section:not(.hero) * {
  transform: none !important;
}
