@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

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

:root {
  /* Paleta de colores mejorada */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #8b5cf6;
  --secondary: #06b6d4;
  --secondary-dark: #0891b2;
  --secondary-light: #67e8f9;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Neutrales mejorados */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --black: #020617;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  --gradient-dark: linear-gradient(135deg, var(--gray-900) 0%, var(--black) 100%);
  --gradient-bg: radial-gradient(ellipse at top, var(--gray-900) 0%, var(--black) 100%);
  
  /* Cristal y transparencias */
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --dark-glass: rgba(0, 0, 0, 0.3);
  
  /* Sombras mejoradas */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 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.07), 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-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  --shadow-glow-accent: 0 0 20px rgba(245, 158, 11, 0.3);
  
  /* Espaciado responsivo */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;
  --space-5xl: 6rem;
  
  /* Tamaños de fuente responsivos */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 2rem + 1.2vw, 3.5rem);
  --text-5xl: clamp(3rem, 2.5rem + 2vw, 4.5rem);
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transiciones */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-bg);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fondo animado mejorado */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, var(--primary) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, var(--secondary) 0%, transparent 60%),
    radial-gradient(circle at 40% 40%, var(--accent) 0%, transparent 60%);
  opacity: 0.03;
  z-index: -2;
  animation: breathe 12s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, var(--primary) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, var(--secondary) 1px, transparent 1px),
    radial-gradient(circle at 50% 10%, var(--accent) 1px, transparent 1px);
  background-size: 300px 300px, 400px 400px, 350px 350px;
  opacity: 0.15;
  z-index: -1;
  animation: float 25s linear infinite;
}

@keyframes breathe {
  0% { 
    opacity: 0.03; 
    transform: scale(1) rotate(0deg); 
  }
  100% { 
    opacity: 0.08; 
    transform: scale(1.1) rotate(5deg); 
  }
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(90deg); }
  50% { transform: translate(0, -60px) rotate(180deg); }
  75% { transform: translate(-30px, -30px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* Navegación mejorada */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: var(--transition-slow);
}

nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--primary);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
}

.logo h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
  animation: logoGlow 4s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3)); }
  100% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5)); }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  color: var(--gray-300);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-sm);
  transition: var(--transition);
  position: relative;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  opacity: 0.15;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  transform: translateY(-2px);
}

/* Menu hamburguesa mejorado */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius);
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--glass);
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gradient-primary);
  margin: 2px 0;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero section mejorado */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5xl) var(--space-lg) var(--space-3xl);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.08;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.08; 
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.2); 
    opacity: 0.15; 
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-content h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-5xl);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--white), var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 4s ease-in-out infinite alternate;
  line-height: 1.1;
}

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4)); }
  100% { filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.6)); }
}

.hero-content h2 {
  font-size: var(--text-2xl);
  color: var(--gray-300);
  margin-bottom: var(--space-sm);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-content p {
  font-size: var(--text-lg);
  color: var(--gray-400);
  margin-bottom: var(--space-3xl);
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats mejorados */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-4xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  backdrop-filter: blur(20px);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: rotate(45deg);
  transition: var(--transition-slow);
  opacity: 0;
}

.stat:hover::before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.3));
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--gray-300);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Container responsivo */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Secciones */
section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--white), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.section-description {
  font-size: var(--text-lg);
  color: var(--gray-400);
  line-height: 1.6;
}

/* Tarjetas de cristal mejoradas */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  backdrop-filter: blur(20px);
  margin-bottom: var(--space-xl);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.8s ease;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.glass-card h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xl);
  color: var(--primary);
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

.glass-card p {
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

/* Tags de tecnología */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.tech-tag {
  background: var(--gradient-primary);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.tech-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.tech-tag:hover::before {
  left: 100%;
}

.tech-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* Tabs mejorados */
.tabs {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--gray-300);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: var(--text-sm);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.tab-btn.active::before,
.tab-btn:hover::before {
  opacity: 1;
}

.tab-btn span {
  position: relative;
  z-index: 1;
}

.tab-btn.active,
.tab-btn:hover {
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Grids responsivos */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Módulos mejorados */
.module {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

.module::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
}

.module::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.03;
  transition: var(--transition-slow);
}

.module:hover::after {
  opacity: 0.08;
  transform: scale(1.2);
}

.module:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--secondary);
}

.module-number {
  background: var(--gradient-accent);
  color: var(--black);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  display: inline-block;
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}

.module h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

.module p {
  color: var(--gray-300);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.module ul {
  list-style: none;
  margin: var(--space-lg) 0;
}

.module li {
  padding: var(--space-sm) 0;
  color: var(--gray-300);
  position: relative;
  padding-left: var(--space-xl);
  transition: var(--transition);
}

.module li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.module li:hover {
  color: var(--secondary);
  transform: translateX(5px);
}

/* Tarjetas de trabajo mejoradas */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.job-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

.job-card:hover::before {
  opacity: 0.05;
}

.job-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.job-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 0 10px var(--primary));
}

.job-card span {
  font-size: var(--text-base);
  font-weight: 500;
  position: relative;
  z-index: 1;
  color: var(--white);
}

/* Footer mejorado */
footer {
  background: var(--gradient-dark);
  border-top: 1px solid var(--primary);
  padding: var(--space-4xl) 0 var(--space-xl);
  margin-top: var(--space-5xl);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, var(--primary) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--secondary) 0%, transparent 50%);
  opacity: 0.03;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.footer-section h4 {
  color: var(--accent);
  margin-bottom: var(--space-lg);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: var(--text-lg);
}

.footer-section p {
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.footer-section a {
  color: var(--gray-300);
  text-decoration: none;
  display: block;
  padding: var(--space-sm) 0;
  transition: var(--transition);
  position: relative;
}

.footer-section a::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: var(--transition);
}

.footer-section a:hover::before {
  width: 100%;
}

.footer-section a:hover {
  color: var(--secondary);
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--glass-border);
  color: var(--gray-400);
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
}

/* Botones mejorados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--glass);
  color: var(--white);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--glass-strong);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--black);
}

.btn-accent:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-glow-accent);
}

/* Estados de carga */
.loading {
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alertas y notificaciones */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border: 1px solid transparent;
  font-size: var(--text-sm);
}

.alert-info {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--secondary);
  color: var(--secondary-light);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--accent-light);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

/* Formularios mejorados */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--gray-300);
  font-weight: 500;
  font-size: var(--text-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: var(--text-base);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-500);
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-800);
  color: var(--white);
  border-radius: var(--radius);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 1000;
}

.tooltip::after {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gray-800);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
}

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

::-webkit-scrollbar-track {
  background: var(--gray-900);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
}

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

::-webkit-scrollbar-corner {
  background: var(--gray-900);
}

/* Utilidades responsivas */
.hidden {
  display: none !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;
}

/* Media queries mejoradas */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    padding: 0 var(--space-md);
  }
  
  .nav-container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3rem;
    --space-5xl: 4rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);
    flex-direction: column;
    padding: var(--space-xl) 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    gap: var(--space-md);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: var(--space-4xl) var(--space-md) var(--space-2xl);
    min-height: 80vh;
  }

  .hero::before {
    width: min(400px, 90vw);
    height: min(400px, 90vw);
  }

  .stats {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .tab-btn {
    width: 100%;
    justify-content: center;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .job-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  section {
    padding: var(--space-3xl) 0;
  }

  .glass-card,
  .module {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .nav-container {
    padding: 0 var(--space-sm);
  }

  .hero {
    padding: var(--space-3xl) var(--space-sm) var(--space-xl);
  }

  .hero::before {
    width: min(300px, 85vw);
    height: min(300px, 85vw);
  }

  .stats {
    margin-top: var(--space-2xl);
  }

  .stat {
    padding: var(--space-lg) var(--space-md);
  }

  .glass-card,
  .module {
    padding: var(--space-md);
  }

  .job-grid {
    grid-template-columns: 1fr;
  }

  .tech-tags {
    justify-content: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .hero-content h1 {
    font-size: var(--text-3xl);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .stat-number {
    font-size: var(--text-2xl);
  }
}

/* Modo alto contraste */
@media (forced-colors: active) {
  :root {
    --primary: #ffffff;
    --secondary: #ffffff;
    --accent: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
  }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Modo oscuro del sistema */
@media (prefers-color-scheme: light) {
  :root {
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f8fafc;
    --gray-900: #0f172a;
  }
}

/* Impresión */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  nav,
  .menu-toggle,
  footer {
    display: none;
  }
  
  .hero {
    page-break-after: always;
  }
  
  .glass-card,
  .module {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
/* particulas */
.particulasmax,
#canvas-particulas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Detrás del contenido */
  background: #0a0a0a; /* Fondo oscuro */
}

/* Contenedor fijo en esquina inferior derecha */
.boton-flotante-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

/* Botón futurista */
.boton-flotante {
  width: 65px;
  height: 65px;
  background: linear-gradient(145deg, #00cfff, #001f3f);
  color: #ffd700;
  font-size: 2rem;
  border-radius: 50%;
  text-align: center;
  line-height: 65px;
  cursor: pointer;
  box-shadow: 0 0 20px #00cfff, 0 0 10px #001f3f inset;
  transition: all 0.3s ease;
  user-select: none;
  animation: parpadeoBoton 1.2s infinite;
}

/* Detener animación al hacer clic */
#menu-toggle:checked + .boton-flotante {
  animation: none;
}

/* Animación del botón */
@keyframes parpadeoBoton {
  0%, 100% {
    box-shadow: 0 0 20px #00cfff, 0 0 10px #001f3f inset;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 30px #ffd700, 0 0 15px #00cfff inset;
    transform: scale(1.08);
  }
}

/* Menú oculto por defecto */
.menu-opciones {
  position: absolute;
  bottom: 80px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

/* Opciones del menú */
.menu-opciones .opcion {
  background: #001f3f;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 15px;
  margin-top: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px #00cfff;
  font-weight: bold;
  transition: background 0.3s;
  white-space: nowrap;
}

.menu-opciones .opcion:hover {
  background: #00cfff;
  color: #001f3f;
}

/* Mostrar menú al activar */
#menu-toggle:checked ~ .menu-opciones {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* === RESPONSIVE: para pantallas menores a 480px === */
@media (max-width: 480px) {
  .boton-flotante-container {
    bottom: 20px;
    right: 20px;
  }

  .boton-flotante {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    line-height: 50px;
  }

  .menu-opciones .opcion {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

/*  flecha  */
.contenedor-boton {
  position: relative;
  display: inline-block;
  margin: 100px auto;
}

/* Flecha apuntando desde arriba */
.flecha-apuntadora {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #ffd700;
  animation: moverFlecha 1s infinite alternate ease-in-out;
}

/* Animación */
@keyframes moverFlecha {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(5px); }
}
