/* ============================================
   Blog Comunicación - Diseño Atrapante
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Paleta sofisticada - tonos cálidos y profundos */
  --bg-base: #faf9f7;
  --panel: #ffffff;
  --panel-alt: #fefaf6;
  
  /* Colores principales */
  --primary: #2d3436;
  --primary-light: #636e72;
  --accent: #e17055;
  --accent-2: #fdcb6e;
  --accent-3: #00b894;
  --accent-4: #6c5ce7;
  
  /* Gradientes */
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-ocean: linear-gradient(135deg, #2af598 0%, #009efd 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  --gradient-cta: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Sombras refinadas */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 8px 32px rgba(102, 126, 234, 0.25);
  --shadow-accent: 0 8px 24px rgba(225, 112, 85, 0.3);
  
  /* Bordes */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  /* Transiciones */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Fondo decorativo con formas geométricas */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(240, 147, 251, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Animaciones de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-4);
}

/* Tipografía */
h1, h2, h3, h4 {
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.3;
}

h1 { 
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 { 
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  text-align: center;
}

h3 { 
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  text-align: left;
}

.section-title i {
  color: var(--accent);
  margin-right: 8px;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  margin: 16px auto 0;
  height: 4px;
  background: var(--gradient-warm);
  border-radius: 999px;
}

p {
  color: var(--primary-light);
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
  font-weight: 300;
}

/* ============================================
   HEADER - Glassmorphism Premium
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  gap: 20px;
  transition: var(--transition);
}

.header-left h1 {
  font-size: 1.25rem;
  margin: 0;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.header-left h1 i {
  margin-right: 8px;
  -webkit-text-fill-color: #667eea;
}

.menu-icon {
  font-size: 28px;
  cursor: pointer;
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.menu-icon:hover {
  background: rgba(102, 126, 234, 0.1);
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  position: relative;
  padding: 10px 14px;
  font-weight: 500;
  color: var(--primary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0;
  border-radius: inherit;
  transition: var(--transition);
  z-index: -1;
}

nav a:hover::before {
  opacity: 0.1;
}

nav a:hover {
  color: #667eea;
}

nav a i {
  margin-right: 6px;
  transition: var(--transition);
}

nav a:hover i {
  transform: scale(1.15);
}

/* ============================================
   BARRA DE BÚSQUEDA
   ============================================ */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 380px;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  transition: var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  border-color: #667eea;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-cta);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 1001;
  border: 1px solid #e2e8f0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-item i {
  color: #667eea;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.search-result-item .result-text {
  flex: 1;
}

.search-result-item .result-text h4 {
  font-size: 0.95rem;
  margin: 0 0 2px;
  text-align: left;
  color: var(--primary);
}

.search-result-item .result-text p {
  font-size: 0.82rem;
  margin: 0;
  color: var(--primary-light);
}

.search-no-results {
  padding: 24px 18px;
  text-align: center;
  color: var(--primary-light);
}

.search-no-results i {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}

/* ============================================
   HERO SECTION - Impactante y limpio
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 70vh;
  padding: 80px 40px;
  margin-bottom: 80px;
  position: relative;
  animation: fadeIn 1s ease-out;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-badge i {
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--primary-light);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
  font-weight: 300;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-actions .btn {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
  filter: brightness(1.1);
}

/* Visual del hero - círculos decorativos */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.hero-circle--1 {
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.15));
  animation: float 8s ease-in-out infinite;
}

.hero-circle--2 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(245, 87, 108, 0.1));
  top: 20%;
  right: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-circle--3 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(250, 112, 154, 0.15), rgba(254, 225, 64, 0.1));
  bottom: 10%;
  left: 15%;
  animation: float 12s ease-in-out infinite;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

section {
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out both;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   CARDS - Con glassmorphism y efectos
   ============================================ */
.section-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
  opacity: 0;
  transition: var(--transition);
}

.section-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.section-card:hover::before {
  opacity: 1;
}

.section-title {
  margin-bottom: 24px;
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* ============================================
   TARJETAS DE TEMAS - Diseño moderno
   ============================================ */
.card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card h3 {
  margin: 0 0 14px;
  font-weight: 600;
  transition: var(--transition);
}

.card h3 i {
  color: var(--accent);
  margin-right: 10px;
  font-size: 1.1em;
  transition: var(--transition);
}

.card:hover h3 i {
  transform: rotate(-10deg) scale(1.2);
  color: var(--accent-4);
}

.card .text {
  color: var(--primary-light);
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.7;
}

.card .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--gradient-cta);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-accent);
  transition: var(--transition);
  align-self: flex-start;
}

.card .cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
  filter: brightness(1.1);
}

.card .cta i {
  transition: var(--transition);
}

.card .cta:hover i {
  transform: translateX(4px);
}

/* ============================================
   PROFILE CARDS - Estilo premium
   ============================================ */
.profile-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.profile-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  transition: var(--transition-slow);
}

.profile-card:hover::after {
  transform: scale(1.2);
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.profile-card img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
  border: 4px solid transparent;
  background: var(--gradient-hero) border-box;
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  position: relative;
  z-index: 1;
}

.profile-card:hover img {
  transform: scale(1.08) rotate(3deg);
  box-shadow: var(--shadow-glow);
}

.profile-card .info {
  position: relative;
  z-index: 1;
}

.profile-card .info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-card .info .role {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.profile-card .info p {
  color: var(--primary-light);
  margin: 0 0 16px;
  line-height: 1.8;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  margin-top: 16px;
  padding: 12px 28px;
  background: var(--gradient-cta);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-accent);
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}

/* ============================================
   PERFIL HERO (páginas de perfil)
   ============================================ */
.profile-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
  min-height: 60vh;
  padding: 60px 40px;
  margin-bottom: 60px;
  animation: fadeIn 0.8s ease-out;
}

.profile-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-hero-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid transparent;
  background: var(--gradient-hero) border-box;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  transition: var(--transition-slow);
}

.profile-hero-img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.profile-hero-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border: 2px dashed rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  animation: spin 20s linear infinite;
  z-index: 1;
}

.profile-hero-ring.ring--2 {
  width: 300px;
  height: 300px;
  border-color: rgba(240, 147, 251, 0.2);
  animation-direction: reverse;
  animation-duration: 30s;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-hero-content .hero-badge {
  margin-bottom: 16px;
}

.profile-hero-content .hero-title {
  margin-bottom: 16px;
}

.profile-hero-content .hero-subtitle {
  margin-bottom: 28px;
}

.profile-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--gradient-card);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-pill:hover {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
  transform: translateY(-2px);
}

.stat-pill i {
  color: #667eea;
}

/* ============================================
   SKILLS GRID
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.skill-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition-slow);
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.skill-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
  border-radius: 50%;
  font-size: 1.6rem;
  color: #667eea;
  transition: var(--transition);
}

.skill-card:hover .skill-icon {
  transform: scale(1.15) rotate(-5deg);
  background: var(--gradient-cta);
  color: #fff;
}

.skill-card h3 {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.skill-card .text {
  text-align: center;
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* ============================================
   REFLEXIÓN QUOTE
   ============================================ */
.reflection-quote {
  margin-top: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), rgba(240, 147, 251, 0.04));
  border-left: 4px solid #667eea;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.reflection-quote i {
  color: #667eea;
  font-size: 1.4rem;
  margin-bottom: 10px;
  display: block;
}

.reflection-quote blockquote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary);
  margin: 0;
  line-height: 1.7;
}

/* ============================================
   LEARNING LIST
   ============================================ */
.learning-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.learning-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  font-size: 0.95rem;
  color: var(--primary);
}

.learning-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(102, 126, 234, 0.3);
}

.learning-item i {
  color: #00b894;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ============================================
   FUTURE GOALS
   ============================================ */
.future-goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.goal-card {
  background: var(--gradient-card);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}

.goal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.goal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
  border-radius: 50%;
  font-size: 1.3rem;
  color: #667eea;
  transition: var(--transition);
}

.goal-card:hover .goal-icon {
  transform: scale(1.15) rotate(-5deg);
  background: var(--gradient-cta);
  color: #fff;
}

.goal-card h4 {
  text-align: center;
  font-size: 1rem;
  margin: 0 0 8px;
}

.goal-card .text {
  text-align: center;
  margin: 0;
  font-size: 0.88rem;
}

/* ============================================
   DARK MODE - Profile pages
   ============================================ */
body.dark-mode .profile-hero-img {
  border-color: #334155;
}

body.dark-mode .profile-hero-ring {
  border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .profile-hero-ring.ring--2 {
  border-color: rgba(240, 147, 251, 0.12);
}

body.dark-mode .stat-pill {
  background: #1e293b;
  border-color: #334155;
  color: var(--primary);
}

body.dark-mode .skill-card {
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .reflection-quote {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(240, 147, 251, 0.05));
}

body.dark-mode .reflection-quote blockquote {
  color: var(--primary);
}

body.dark-mode .learning-item {
  background: #1e293b;
  border-color: #334155;
  color: var(--primary);
}

body.dark-mode .goal-card {
  border-color: rgba(51, 65, 85, 0.5);
}

/* ============================================
   MODO OSCURO
   ============================================ */
body.dark-mode {
  --bg-base: #0f172a;
  --panel: #1e293b;
  --panel-alt: #1e293b;
  --primary: #e2e8f0;
  --primary-light: #94a3b8;
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

body.dark-mode header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom-color: rgba(30, 41, 59, 0.5);
}

body.dark-mode .highlight-card {
  background: linear-gradient(145deg, #1a2744 0%, #1e293b 100%);
  border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .highlight-badge {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

body.dark-mode .info-item {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .info-icon {
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

body.dark-mode .stat-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .stat-number {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .card-tag {
  background: rgba(102, 126, 234, 0.2);
  color: #93b4f5;
}

body.dark-mode .text-center {
  color: var(--primary-light);
}

body.dark-mode .video-wrapper {
  background: #0f172a;
}

body.dark-mode .video-card h3 {
  color: var(--primary);
}

body.dark-mode .video-card .text {
  color: var(--primary-light);
}

body.dark-mode .search-input {
  background: rgba(30, 41, 59, 0.7);
  border-color: #334155;
  color: var(--primary);
}

body.dark-mode .search-input:focus {
  background: #1e293b;
  border-color: #667eea;
}

body.dark-mode .search-results {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .search-result-item {
  border-bottom-color: #334155;
}

body.dark-mode .search-result-item:hover {
  background: #334155;
}

body.dark-mode .search-result-item .result-text h4 {
  color: var(--primary);
}

body.dark-mode .filter-btn {
  background: #1e293b;
  border-color: #334155;
  color: var(--primary-light);
}

body.dark-mode .filter-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

body.dark-mode .card {
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .section-card {
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .profile-card {
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .gallery-item {
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .gallery-thumb {
  background: linear-gradient(135deg, #667eea33, #764ba233);
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background: #1e293b;
  border-color: #334155;
  color: var(--primary);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
  border-color: #667eea;
}

body.dark-mode .modal-content {
  background: #1e293b;
}

body.dark-mode .modal-header {
  background: #0f172a;
  border-bottom-color: #334155;
}

body.dark-mode nav {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode nav a {
  border-bottom-color: #334155;
  color: var(--primary);
}

body.dark-mode .menu-overlay {
  background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .menu-icon:hover {
  background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .carousel-card {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(51, 65, 85, 0.5);
}

body.dark-mode .carousel-card blockquote {
  color: var(--primary);
}

body.dark-mode .carousel-card cite {
  color: var(--primary-light);
}

body.dark-mode .carousel-btn {
  background: rgba(30, 41, 59, 0.9);
  color: var(--primary);
  border-color: #334155;
}

body.dark-mode .carousel-dot {
  background: #334155;
}

body.dark-mode .carousel-dot.active {
  background: #667eea;
}

body.dark-mode .back-to-top {
  background: var(--gradient-cta);
  color: #fff;
}

body.dark-mode ::selection {
  background: rgba(102, 126, 234, 0.35);
}

body.dark-mode .hero-badge {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  border-color: rgba(102, 126, 234, 0.3);
}

body.dark-mode .profile-card img {
  border-color: #334155;
}

body.dark-mode .char-count {
  color: var(--primary-light);
}

body.dark-mode .search-no-results {
  color: var(--primary-light);
}

body.dark-mode .search-no-results i {
  color: #475569;
}

/* ============================================
   TOGGLE DE TEMA
   ============================================ */
.theme-toggle {
  background: none;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  border-color: #667eea;
  color: #667eea;
  background: rgba(102, 126, 234, 0.08);
  transform: rotate(15deg);
}

body.dark-mode .theme-toggle {
  border-color: #475569;
  color: #fbbf24;
}

body.dark-mode .theme-toggle:hover {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   BARRA DE PROGRESO DE SCROLL
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-warm);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================
   BOTÓN VOLVER ARRIBA
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.45);
}

/* ============================================
   CARRUSEL
   ============================================ */
.carousel-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 60px;
}

.carousel-track {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-slide {
  display: none;
  animation: carouselFadeIn 0.5s ease-out;
}

.carousel-slide.active {
  display: block;
}

@keyframes carouselFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.carousel-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition-slow);
}

.carousel-icon {
  font-size: 2.8rem;
  color: #667eea;
  margin-bottom: 24px;
  transition: var(--transition);
}

.carousel-card blockquote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--primary);
  line-height: 1.7;
  margin: 0 0 20px;
  font-weight: 400;
}

.carousel-card cite {
  color: var(--primary-light);
  font-size: 0.95rem;
  font-weight: 500;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--gradient-cta);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn--prev {
  left: 0;
}

.carousel-btn--next {
  right: 0;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.carousel-dot:hover {
  background: #94a3b8;
}

.carousel-dot.active {
  background: #667eea;
  transform: scale(1.3);
}

/* ============================================
   TARJETAS DESTACADAS (Highlight)
   ============================================ */
.highlight-card {
  background: linear-gradient(145deg, #f0f4ff 0%, #faf9f7 100%);
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 87, 108, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 20px;
}

.highlight-badge i {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   GRID DE INFORMACIÓN (Elementos de comunicación)
   ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #e2e8f0;
}

.info-item {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}

.info-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(102, 126, 234, 0.3);
}

.info-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
  border-radius: 50%;
  font-size: 1.3rem;
  color: #667eea;
  transition: var(--transition);
}

.info-item:hover .info-icon {
  transform: scale(1.15) rotate(-5deg);
  background: var(--gradient-cta);
  color: #fff;
}

.info-item h4 {
  font-size: 0.95rem;
  margin: 0 0 6px;
  text-align: center;
  color: var(--primary);
  font-weight: 600;
}

.info-item p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--primary-light);
  line-height: 1.5;
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: var(--transition-slow);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 0.92rem;
  color: var(--primary-light);
  line-height: 1.5;
}

/* ============================================
   CARD TAG
   ============================================ */
.card-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card {
  position: relative;
}

/* ============================================
   TEXTO CENTRADO
   ============================================ */
.text-center {
  text-align: center;
  color: var(--primary-light);
  max-width: 600px;
  margin: -16px auto 32px;
}

/* ============================================
   VIDEO CAROUSEL
   ============================================ */
.video-carousel {
  max-width: 800px;
}

.video-card {
  padding: 0;
  overflow: hidden;
}

.video-card h3 {
  padding: 24px 32px 0;
  text-align: center;
  font-size: 1.3rem;
}

.video-card h3 i {
  color: #667eea;
  margin-right: 8px;
}

.video-card .text {
  padding: 10px 32px 28px;
  text-align: center;
  margin-bottom: 0;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #0f172a;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video carousel buttons */
.vcarousel-btn--prev {
  left: -24px;
}

.vcarousel-btn--next {
  right: -24px;
}

/* ============================================
   FILTROS POR CATEGORÍA
   ============================================ */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-light);
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.filter-btn.active {
  background: var(--gradient-cta);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.filter-btn i {
  font-size: 0.9em;
}

/* Animación al filtrar */
.card.hidden-card {
  display: none;
}

.card.fade-in-card {
  animation: fadeInUp 0.4s ease-out both;
}

/* ============================================
   MENSAJE SIN RESULTADOS
   ============================================ */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--primary-light);
}

.no-results i {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.no-results p {
  font-size: 1.1rem;
  margin: 0;
}

/* ============================================
   GALERÍA DE EVIDENCIAS
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.gallery-item {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-slow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.gallery-item.hidden-gallery {
  display: none;
}

.gallery-thumb {
  height: 140px;
  background: linear-gradient(135deg, #667eea22, #764ba222);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea11, #f093fb11);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-thumb::before {
  opacity: 1;
}

.gallery-thumb i {
  font-size: 3.5rem;
  color: #667eea;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.gallery-item:hover .gallery-thumb i {
  transform: scale(1.15) rotate(-5deg);
}

/* ============================================
   ICONOS TEMÁTICOS POR PDF
   ============================================ */

/* Función Referencial — diana */
.gallery-thumb--referencial {
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.gallery-thumb--referencial i {
  color: rgba(255, 255, 255, 0.9);
}

/* Sapa Caramelo / Máscaras — teatro */
.gallery-thumb--masks {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}
.gallery-thumb--masks i {
  color: rgba(255, 255, 255, 0.9);
}

/* Microexpresiones — cara sonriente */
.gallery-thumb--micro {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}
.gallery-thumb--micro i {
  color: rgba(0, 0, 0, 0.65);
}

/* Tipos de Comunicación — conversación */
.gallery-thumb--tipos {
  background: linear-gradient(135deg, #fa709a, #fee140);
}
.gallery-thumb--tipos i {
  color: rgba(255, 255, 255, 0.9);
}

/* Funciones del Lenguaje — idioma */
.gallery-thumb--lenguaje {
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}
.gallery-thumb--lenguaje i {
  color: rgba(255, 255, 255, 0.9);
}

.gallery-info {
  padding: 18px 20px;
}

.gallery-info h4 {
  font-size: 1.05rem;
  margin: 0 0 6px;
  text-align: left;
  color: var(--primary);
  font-weight: 600;
}

.gallery-author {
  font-size: 0.85rem;
  color: var(--primary-light);
  display: block;
  margin-bottom: 14px;
}

.gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.gallery-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.gallery-btn i {
  font-size: 0.85em;
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */
.contact-card {
  max-width: 720px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i {
  color: #667eea;
  font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--primary);
  background: #fff;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-group input.valido,
.form-group select.valido,
.form-group textarea.valido {
  border-color: #00b894;
  box-shadow: 0 0 0 4px rgba(0, 184, 148, 0.1);
}

.form-error {
  font-size: 0.82rem;
  color: #e74c3c;
  min-height: 18px;
}

.char-count {
  font-size: 0.82rem;
  color: var(--primary-light);
  text-align: right;
}

.form-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-actions .btn {
  flex: 1;
  min-width: 180px;
}

.form-status {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  background: rgba(0, 184, 148, 0.1);
  color: #00b894;
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.form-status.error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* ============================================
   MODAL PDF
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

/* El atributo hidden debe prevalecer sobre display: flex */
.modal[hidden] {
  display: none !important;
}

.modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.modal-header h3 {
  margin: 0;
  text-align: left;
  font-size: 1.15rem;
  color: var(--primary);
}

.modal-header h3 i {
  color: #e74c3c;
  margin-right: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--primary-light);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.modal-close:hover {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-body iframe {
  width: 100%;
  flex: 1;
  min-height: 500px;
  border: none;
}

.modal-fallback {
  padding: 20px 28px;
  text-align: center;
  color: var(--primary-light);
  font-size: 0.95rem;
}

.modal-fallback a {
  color: #667eea;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 780px) {
  header {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .header-left h1 {
    font-size: 1.1rem;
  }

  .search-container {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
    margin-top: 4px;
  }
  
  main {
    padding: 40px 20px 80px;
  }
  
  section {
    margin-bottom: 60px;
  }
  
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 60px 24px;
    text-align: center;
    gap: 40px;
  }
  
  .hero-subtitle {
    max-width: 100%;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    height: 250px;
  }
  
  .hero-circle--1 {
    width: 180px;
    height: 180px;
  }
  
  .hero-circle--2 {
    width: 130px;
    height: 130px;
  }
  
  .hero-circle--3 {
    width: 100px;
    height: 100px;
  }
  
  .section-card {
    padding: 28px 24px;
  }
  
  .card {
    padding: 24px 20px;
  }
  
  .profile-card { 
    grid-template-columns: 1fr; 
    text-align: center; 
  }
  
  .profile-card .info { 
    text-align: center; 
  }
  
  .profile-card img {
    width: 110px;
    height: 110px;
  }

  .menu-icon { 
    display: block; 
  }

  nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 0;
    width: auto;
    max-width: none;
    display: none;
    z-index: 1000;
    padding: 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
    text-align: center;
  }

  nav a:last-child {
    border-bottom: none;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 900;
  }

  /* Responsive galería */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Responsive formulario */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    min-width: auto;
  }

  /* Responsive modal */
  .modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .modal-body iframe {
    min-height: 350px;
  }

  /* Responsive carrusel */
  .carousel-container {
    padding: 0 48px;
  }

  .carousel-card {
    padding: 36px 24px;
  }

  .carousel-card blockquote {
    font-size: 1.05rem;
  }

  .carousel-icon {
    font-size: 2.2rem;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* Responsive botón volver arriba */
  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
  }

  /* Responsive info grid */
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Responsive stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 28px 20px;
  }

  /* Responsive highlight */
  .highlight-card {
    padding: 28px 24px;
  }

  /* Responsive video carousel */
  .video-carousel {
    padding: 0 48px;
  }

  .video-card h3 {
    padding: 20px 20px 0;
    font-size: 1.15rem;
  }

  .video-card .text {
    padding: 8px 20px 24px;
    font-size: 0.92rem;
  }

  .vcourse-btn--prev {
    left: -18px;
  }

  .vcourse-btn--next {
    right: -18px;
  }

  /* Responsive perfil hero */
  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
    padding: 40px 20px;
    min-height: auto;
  }

  .profile-hero-visual {
    order: -1;
  }

  .profile-hero-img {
    width: 170px;
    height: 170px;
  }

  .profile-hero-ring {
    width: 210px;
    height: 210px;
  }

  .profile-hero-ring.ring--2 {
    width: 250px;
    height: 250px;
  }

  .profile-hero-content .hero-badge,
  .profile-hero-content .hero-title,
  .profile-hero-content .hero-subtitle {
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

  /* Responsive skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Responsive future goals */
  .future-goals {
    grid-template-columns: 1fr;
  }

  /* Responsive reflection quote */
  .reflection-quote {
    padding: 20px 22px;
  }

  .reflection-quote blockquote {
    font-size: 1rem;
  }
}

/* ============================================
   EFECTOS ADICIONALES
   ============================================ */

/* Scroll suave para navegación interna */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* Selección de texto personalizada */
::selection {
  background: rgba(102, 126, 234, 0.2);
  color: var(--primary);
}

/* Focus visible para accesibilidad */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Loading state para imágenes */
img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img[src] {
  animation: none;
  background: none;
}

