/* ==========================================================================
   SISTEMA DE DISEÑO - REGAL MODERNIST (Réyiman Bio Hub Premium)
   ========================================================================== */

:root {
  /* Paleta de Colores Cinemática */
  --bg-color-left: #050d18;      /* Azul oscuro profundo */
  --bg-color-right: #200814;     /* Rojizo místico del logo */
  --bg-color-base: #0a0e14;      /* Fondo base neutro */
  
  --on-surface: #dce3f0;
  --on-surface-variant: #b9c7e6; /* Azul claro suave */
  
  --color-primary: #e9c176;       /* Oro Réyiman */
  --color-primary-glow: rgba(233, 193, 118, 0.4);
  --color-secondary: #b9c7e6;     /* Azul de soporte */
  
  --color-accent-red: #c71d3d;    /* Rojo místico del logo */
  --color-accent-blue: #091c3d;   /* Azul místico del logo */

  /* Tipografía Editorial */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Sora", system-ui, -apple-system, sans-serif;

  /* Bordes Redondeados */
  --rounded-sm: 0.25rem;
  --rounded-default: 0.5rem;
  --rounded-md: 0.75rem;
  --rounded-lg: 1rem;
  --rounded-xl: 1.5rem;
  --rounded-full: 9999px;
}

/* Reset de Estilos Básicos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  /* Fondo Degradado de Lujo: Azul profundo a la izquierda, rojo místico a la derecha */
  background: linear-gradient(135deg, var(--bg-color-left) 0%, var(--bg-color-base) 45%, var(--bg-color-right) 100%);
  background-attachment: fixed;
  color: var(--on-surface);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* ==========================================================================
   ELEMENTOS DE AMBIENTACIÓN (Efectos Visuales Premium)
   ========================================================================== */

/* Canvas del Polvo Estelar (Completamente transparente para dejar ver el fondo) */
#stardust-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background-color: transparent;
}

/* Blobs de Luz Ambiental para Intensificar el Color */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: screen;
}

.glow-1 {
  width: 60vw;
  height: 60vw;
  top: -20vw;
  left: -15vw;
  background: radial-gradient(circle, rgba(9, 28, 61, 0.4) 0%, rgba(0,0,0,0) 70%);
}

.glow-2 {
  width: 65vw;
  height: 65vw;
  bottom: -15vw;
  right: -15vw;
  background: radial-gradient(circle, rgba(199, 29, 61, 0.28) 0%, rgba(233, 193, 118, 0.04) 50%, rgba(0,0,0,0) 85%);
}

/* ==========================================================================
   CONTENEDOR DE PERFIL
   ========================================================================== */

.profile-container {
  width: 100%;
  max-width: 440px; /* Ancho optimizado editorial */
  margin: 0 auto;
  padding: 64px 24px 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  animation: fadeInContainer 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Cabecera del Perfil */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 36px;
}

/* Avatar de Lujo con Destello Blanco Brillante (Halo Glow) */
.avatar-wrapper {
  position: relative;
  width: 124px;
  height: 124px;
  border-radius: var(--rounded-full);
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, var(--color-primary) 50%, rgba(199, 29, 61, 0.4) 100%);
  padding: 2.5px; /* Borde fino premium */
  /* Doble efecto de halo de luz blanca brillante y aura dorada */
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.35), 
              0 0 50px rgba(233, 193, 118, 0.2), 
              inset 0 0 10px rgba(255, 255, 255, 0.3);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.55), 
              0 0 65px rgba(233, 193, 118, 0.35);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--rounded-full);
  border: 2px solid #070c14; /* Separador oscuro */
}

/* Nombre con Efecto Blanco Brillante / Resplandeciente */
.profile-name {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.1;
  /* Efecto resplandeciente blanco y dorado */
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8),
               0 0 30px rgba(255, 255, 255, 0.4),
               0 0 45px rgba(233, 193, 118, 0.2),
               0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Biografía refinada */
.profile-bio {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--on-surface-variant);
  max-width: 320px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  opacity: 0.9;
}

/* ==========================================================================
   TARJETA DESTACADA ("Obras Destacadas")
   ========================================================================== */

.featured-section {
  width: 100%;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.featured-card {
  display: block;
  text-decoration: none;
  width: 100%;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(233, 193, 118, 0.22);
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.5) 0%, rgba(5, 8, 12, 0.9) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Borde dorado reflectivo superior */
.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(233, 193, 118, 0.2), var(--color-primary), rgba(233, 193, 118, 0.2));
  z-index: 2;
}

/* Imagen Cinemática Horizontal Completa */
.featured-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('featured_card_bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  mix-blend-mode: screen;
  z-index: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.featured-card-content {
  position: relative;
  z-index: 1;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  min-height: 210px;
}

/* Etiqueta superior del card */
.featured-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(233, 193, 118, 0.35);
}

.icon-label {
  color: var(--color-primary);
  filter: drop-shadow(0 0 5px rgba(233, 193, 118, 0.3));
}

/* Título de Historias */
.featured-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8),
               0 0 15px rgba(255, 255, 255, 0.1);
}

/* Descripción */
.featured-description {
  font-size: 14px;
  color: #c4d0e6;
  font-weight: 300;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Animaciones Hover */
.featured-card:hover {
  transform: translateY(-5px);
  border-color: rgba(233, 193, 118, 0.45);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(233, 193, 118, 0.08);
}

.featured-card:hover .featured-card-overlay {
  transform: scale(1.04);
  opacity: 0.75;
}

/* Botón Barra de Spotify (Formato rectangular compacto) */
.spotify-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center; /* Centrar contenido horizontalmente */
  width: 100%;
  height: 68px;
  padding: 0 24px;
  margin-bottom: 36px; /* Aumentamos el margen inferior para definir su espacio */
  text-decoration: none;
  border-radius: var(--rounded-md);
  background: linear-gradient(135deg, rgba(9, 28, 61, 0.4) 0%, rgba(199, 29, 61, 0.2) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(233, 193, 118, 0.16);
  color: #ffffff;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.spotify-bar-icon {
  color: var(--on-surface-variant);
  transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
  flex-shrink: 0;
  will-change: transform;
}

.spotify-bar-text {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrar textos verticalmente */
  margin-left: 14px;
  text-align: center;
}

.spotify-bar-label {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 2px;
  text-shadow: 0 0 5px rgba(233, 193, 118, 0.25);
}

.spotify-bar-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface);
  letter-spacing: 0.01em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover de la Barra de Spotify */
.spotify-bar-btn:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(12, 38, 80, 0.6) 0%, rgba(220, 38, 71, 0.35) 100%);
  border-color: rgba(233, 193, 118, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35),
              0 0 15px rgba(233, 193, 118, 0.15),
              0 0 15px rgba(199, 29, 61, 0.12);
}

.spotify-bar-btn:hover .spotify-bar-icon {
  color: #1db954; /* Color verde de Spotify sutil en hover */
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(29, 185, 84, 0.4));
}

.spotify-bar-btn:hover .spotify-bar-title {
  color: #ffffff;
  letter-spacing: 0.02em;
}

.spotify-bar-btn:active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(9, 28, 61, 0.5) 0%, rgba(199, 29, 61, 0.3) 100%);
  border-color: rgba(233, 193, 118, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   BOTONES DE REDES SOCIALES (Glassmorphism de Doble Tono)
   ========================================================================== */

.links-navigation {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

/* Botón Social Glassmorphic con degradado Azul-Rojo */
.social-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 16px 24px;
  text-decoration: none;
  border-radius: var(--rounded-md);
  /* Degradado sutil azul-rojo traslúcido a tono con el logo y fondo */
  background: linear-gradient(135deg, rgba(9, 28, 61, 0.45) 0%, rgba(199, 29, 61, 0.25) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(233, 193, 118, 0.16);
  color: #ffffff;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Reflejo de luz interna al pasar el cursor */
.social-link-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

/* Icono Social con glow */
.social-icon {
  margin-right: 12px;
  color: var(--on-surface-variant);
  transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
  will-change: transform;
}

/* Texto de Botón Luxury (Estilo sofisticado) */
.btn-text {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-surface);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover de Botón: Aumento de luz, elevación y glow bicolor */
.social-link-btn:hover {
  transform: translateY(-3px);
  /* Degradado más vivo en hover */
  background: linear-gradient(135deg, rgba(12, 38, 80, 0.65) 0%, rgba(220, 38, 71, 0.4) 100%);
  border-color: rgba(233, 193, 118, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35),
              0 0 18px rgba(233, 193, 118, 0.18),
              0 0 20px rgba(199, 29, 61, 0.15);
}

.social-link-btn:hover::before {
  transform: translateX(100%);
}

.social-link-btn:hover .social-icon {
  color: var(--color-primary);
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.social-link-btn:hover .btn-text {
  color: #ffffff;
  letter-spacing: 0.11em;
}

/* Estado de clicks */
.social-link-btn:active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(9, 28, 61, 0.55) 0%, rgba(199, 29, 61, 0.35) 100%);
  border-color: rgba(233, 193, 118, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */

.profile-footer {
  text-align: center;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}

.profile-footer:hover {
  opacity: 0.8;
}

.footer-text {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA
   ========================================================================== */

@keyframes fadeInContainer {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Demoras secuenciales */
.social-link-btn:nth-child(1) { animation-delay: 0.1s; }
.social-link-btn:nth-child(2) { animation-delay: 0.2s; }
.social-link-btn:nth-child(3) { animation-delay: 0.3s; }
.social-link-btn:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================================================
   DISEÑO RESPONSIVO & ACCESIBILIDAD
   ========================================================================== */

@media (max-width: 360px) {
  .profile-container {
    padding: 48px 16px 36px 16px;
  }
  .profile-name {
    font-size: 38px;
  }
  .featured-title {
    font-size: 28px;
  }
  .social-link-btn {
    padding: 14px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
  .featured-card:hover .featured-card-overlay {
    transform: none !important;
  }
  .social-link-btn:hover {
    transform: none !important;
  }
  .avatar-wrapper:hover {
    transform: none !important;
  }
}
