/* ============================================================
   TARJETA DIGITAL PROFESIONAL - ESTILOS VISUALES
   Diseño optimizado para pantallas de teléfonos móviles (Mobile-first).
   Aplica efectos de cristal oscuro (Glassmorphism), gradientes sutiles
   y botones táctiles de gran tamaño para facilitar la pulsación.
   Conecta con: index.html
   ============================================================ */

:root {
  --bg-dark: #0a0e17;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 16px;
  position: relative;
  overflow-x: hidden;
}

/* Brillo ambiental de fondo con gradientes suaves */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
  z-index: 0;
}

/* Contenedor central tipo teléfono inteligente */
.card-container {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================================
   ENCABEZADO Y FOTO DE PERFIL
   ============================================================ */
.profile-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrapper {
  position: relative;
  width: 108px;
  height: 108px;
  margin-bottom: 16px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Indicador verde de disponible */
.status-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background-color: #10b981;
  border-radius: 50%;
  border: 2.5px solid #0f172a;
  box-shadow: 0 0 8px #10b981;
}

.profile-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 6px;
}

.profile-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 340px;
  margin-bottom: 12px;
}

.location-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ============================================================
   BOTONES PRINCIPALES (PORTAFOLIO vs CV)
   ============================================================ */
.main-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Botón 1: Portafolio (Brillo violeta) */
.btn-portfolio {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.btn-portfolio:hover,
.btn-portfolio:active {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.3);
}

/* Botón 2: Curriculum Vitae (Brillo esmeralda / cian) */
.btn-cv {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.btn-cv:hover,
.btn-cv:active {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.25);
}

.btn-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  transition: transform var(--transition-fast);
}

.btn-portfolio .btn-icon-box {
  color: #818cf8;
}

.btn-cv .btn-icon-box {
  color: #38bdf8;
}

.btn-action:hover .btn-icon-box {
  transform: scale(1.08);
}

.btn-text-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: left;
}

.btn-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.btn-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-arrow {
  color: #64748b;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.btn-action:hover .btn-arrow {
  color: #ffffff;
  transform: translateX(3px);
}

/* ============================================================
   CONTACTO RÁPIDO & UTILIDADES
   ============================================================ */
.quick-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Botón guardar en contactos (.vcf) */
.btn-contact-save {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-contact-save:hover,
.btn-contact-save:active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Fila de 3 iconos: WhatsApp, LinkedIn, QR */
.icon-buttons-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover,
.icon-btn:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Pie de página */
.card-footer {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-text {
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   MODAL DEL CÓDIGO QR
   ============================================================ */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.qr-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.qr-modal-content {
  position: relative;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-modal.active .qr-modal-content {
  transform: scale(1);
}

.qr-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.qr-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.qr-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.qr-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.4;
}

.qr-frame {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qr-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-download-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.btn-download-qr:hover {
  background: var(--primary-hover);
}

.btn-download-qr-vector {
  color: #94a3b8;
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 4px;
  transition: color var(--transition-fast);
}

.btn-download-qr-vector:hover {
  color: #e2e8f0;
}

