/* ===========================================
   PLAN DE MEJORAS ESTÉTICAS - PROFESIONAL
   ===========================================

   OBJETIVOS:
   ✅ Mejorar estética completa
   ✅ Implementar modo oscuro
   ✅ Agregar animaciones avanzadas
   ✅ Quitar banner pero mantener info
   ✅ Agregar foto profesional
   ✅ Crear experiencia premium

   =========================================== */

:root {
  /* ===========================================
     PALETA DE COLORES MEJORADA - ALTO CONTRASTE
     =========================================== */

  /* Tema Claro (Default) */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #f59e0b;
  --accent: #7c3aed;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Colores de superficie */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;

  /* Texto - MEJORADO PARA ALTO CONTRASTE */
  --text-primary: #0f172a;      /* Negro casi puro */
  --text-secondary: #334155;    /* Gris oscuro legible */
  --text-muted: #64748b;        /* Gris medio para elementos secundarios */
  --text-inverse: #ffffff;      /* Blanco puro */

  /* Bordes y sombras */
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  /* Gradientes MEJORADOS - Más claros para mejor contraste */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --gradient-hero: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);

  /* NUEVOS GRADIENTES PARA SECCIONES OSCURAS - Más claros */
  --gradient-dark-primary: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  --gradient-dark-secondary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-dark-accent: linear-gradient(135deg, #1e293b 0%, #2d3748 50%, #4a5568 100%);

  /* Espaciado */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Transiciones */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 400ms ease-out;

  /* Tema Oscuro MEJORADO */
  --dark-primary: #60a5fa;       /* Azul más claro para mejor contraste */
  --dark-primary-dark: #3b82f6;  /* Azul vibrante */
  --dark-secondary: #fbbf24;     /* Amarillo vibrante */
  --dark-accent: #a78bfa;        /* Púrpura más claro */
  --dark-bg-primary: #0f172a;    /* Fondo oscuro pero no negro puro */
  --dark-bg-secondary: #1e293b;  /* Gris oscuro medio */
  --dark-bg-tertiary: #334155;   /* Gris oscuro claro */
  --dark-surface: #1e293b;       /* Superficie oscura */
  --dark-surface-hover: #334155; /* Hover más claro */
  --dark-text-primary: #f8fafc;  /* Blanco casi puro */
  --dark-text-secondary: #cbd5e1; /* Gris claro muy legible */
  --dark-text-muted: #94a3b8;    /* Gris medio legible */
  --dark-border: #334155;        /* Bordes oscuros */
  --dark-border-hover: #475569;  /* Bordes hover más claros */

  /* NUEVAS VARIABLES PARA ELEMENTOS DECORATIVOS */
  --decoration-primary: rgba(96, 165, 250, 0.15);    /* Azul decorativo más visible */
  --decoration-secondary: rgba(167, 139, 250, 0.12); /* Púrpura decorativo */
  --decoration-accent: rgba(52, 211, 153, 0.1);      /* Verde decorativo */

  /* OPACIDADES MEJORADAS PARA MEJOR VISIBILIDAD */
  --glass-bg-light: rgba(255, 255, 255, 0.12);  /* Vidrio claro más visible */
  --glass-bg-dark: rgba(248, 250, 252, 0.15);   /* Vidrio oscuro más visible */
  --overlay-light: rgba(255, 255, 255, 0.08);   /* Overlay claro */
  --overlay-dark: rgba(15, 23, 42, 0.12);       /* Overlay oscuro */
}

/* ===========================================
   MODO OSCURO - IMPLEMENTACIÓN COMPLETA
   =========================================== */

[data-theme="dark"] {
  --primary: var(--dark-primary);
  --primary-dark: var(--dark-primary-dark);
  --secondary: var(--dark-secondary);
  --accent: var(--dark-accent);
  --bg-primary: var(--dark-bg-primary);
  --bg-secondary: var(--dark-bg-secondary);
  --bg-tertiary: var(--dark-bg-tertiary);
  --surface: var(--dark-surface);
  --surface-hover: var(--dark-surface-hover);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --border: var(--dark-border);
  --border-hover: var(--dark-border-hover);
}

/* ===========================================
   ANIMACIONES AVANZADAS
   =========================================== */

/* Animación de entrada suave */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animación de pulso suave */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
  }
}

/* Animación de flotación */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animación de escritura */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ===========================================
   COMPONENTES MEJORADOS CON ALTO CONTRASTE
   =========================================== */

/* Header mejorado */
.header-enhanced {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition-normal);
}

[data-theme="dark"] .header-enhanced {
  background: rgba(15, 23, 42, 0.9);
}

/* Hero section mejorado con gradiente más claro */
.hero-modern {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

/* NUEVAS CLASES PARA SECCIONES OSCURAS CON MEJOR CONTRASTE */
.section-dark-primary {
  background: var(--gradient-dark-primary);
  color: var(--dark-text-primary);
}

.section-dark-secondary {
  background: var(--gradient-dark-secondary);
  color: var(--dark-text-primary);
}

.section-dark-accent {
  background: var(--gradient-dark-accent);
  color: var(--dark-text-primary);
}

/* ELEMENTOS DECORATIVOS MEJORADOS */
.decoration-primary {
  background: var(--decoration-primary);
}

.decoration-secondary {
  background: var(--decoration-secondary);
}

.decoration-accent {
  background: var(--decoration-accent);
}

/* COMPONENTES DE VIDRIO MEJORADOS */
.glass-light {
  background: var(--glass-bg-light);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: var(--glass-bg-dark);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(248, 250, 252, 0.3);
}

/* OVERLAYS MEJORADOS */
.overlay-light {
  background: var(--overlay-light);
}

.overlay-dark {
  background: var(--overlay-dark);
}

/* TEXTO CON ALTO CONTRASTE */
.text-contrast-high {
  color: var(--text-primary);
}

.text-contrast-medium {
  color: var(--text-secondary);
}

.text-contrast-low {
  color: var(--text-muted);
}

/* En modo oscuro */
[data-theme="dark"] .text-contrast-high {
  color: var(--dark-text-primary);
}

[data-theme="dark"] .text-contrast-medium {
  color: var(--dark-text-secondary);
}

[data-theme="dark"] .text-contrast-low {
  color: var(--dark-text-muted);
}

/* Foto profesional */
.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
  position: relative;
}

.profile-photo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.profile-photo:hover::after {
  opacity: 0.3;
}

/* Cards mejoradas */
.card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-hover);
}

.card-premium:hover::before {
  transform: scaleX(1);
}

/* Botones premium */
.btn-premium {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-premium::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 var(--transition-slow);
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Toggle de modo oscuro */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* ===========================================
   UTILIDADES Y HELPERS
   =========================================== */

/* Clases de animación */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Estados de carga */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Responsive utilities */
@media (max-width: 768px) {
  .hero-modern {
    padding: 4rem 1rem;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

/* ===========================================
   ACCESIBILIDAD Y PREFERENCIAS
   =========================================== */

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

@media (prefers-color-scheme: dark) {
  :root {
    --primary: var(--dark-primary);
    --bg-primary: var(--dark-bg-primary);
    --text-primary: var(--dark-text-primary);
  }
}

/* Focus visible para navegación por teclado */
.focus-visible:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ===========================================
   LOGO MEJORADO CON EFECTOS DE LUZ
   =========================================== */

/* Logo con efectos de luz premium */
.logo-premium {
  position: relative;
  display: inline-block;
}

.logo-premium::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  animation: gradient-shift 3s ease-in-out infinite;
  filter: blur(8px);
  opacity: 0.7;
}

.logo-premium:hover::before {
  opacity: 1;
  filter: blur(12px);
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Efectos de luz para el logo */
.logo-light-effect {
  position: relative;
  overflow: hidden;
}

.logo-light-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.logo-light-effect:hover::after {
  opacity: 1;
  animation: light-sweep 1.5s ease-in-out;
}

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

/* Nombre con gradiente animado */
.name-gradient {
  background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #ec4899, #06b6d4);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 3s ease-in-out infinite;
}

@keyframes gradient-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Efecto de brillo para el texto */
.text-glow {
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  transition: text-shadow 0.3s ease;
}

.text-glow:hover {
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(139, 92, 246, 0.6);
}
