* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1d3a 100%);
  color: #ffffff;
  min-height: 100vh;
  padding: 20px;
}

/* Navegación */
/* Navegación con efecto Glass (Glassmorphism) */
.barra-navegacion {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  padding: 12px 20px;
  z-index: 1000;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.barra-navegacion:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.enlaces-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.enlaces-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  letter-spacing: 0.3px;
  z-index: 1;
}

.enlaces-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1;
}

/* Background gradient that follows the mouse on the hovered button */
.enlaces-nav a:hover::before {
  background: radial-gradient(
    40px circle at var(--mouse-x, 50%) 50%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  opacity: 1;
  transform: scale(1);
}

.enlaces-nav a:hover {
  color: #ffffff;
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.enlaces-nav a.activo {
  color: #ffffff;
  background: radial-gradient(
    var(--glow-size, 35px) circle at var(--mouse-x, -5px) 50%,
    rgba(255, 255, 255, var(--glow-opacity, 0.15)) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 255, 255, 0.2);
}

.enlaces-nav a.activo:hover {
  --glow-size: 50px;
  --glow-opacity: 0.35;
}

/* Efecto al hacer scroll - navbar más compacta */
.barra-navegacion.scroll-activo {
  top: 20px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
}

.barra-navegacion.scroll-activo .enlaces-nav a {
  padding: 8px 18px;
  font-size: 14px;
}

/* Responsive para el menú */
@media (max-width: 768px) {
  .barra-navegacion {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 15px;
    max-width: calc(100% - 40px);
  }

  .enlaces-nav {
    gap: 5px;
  }

  .enlaces-nav a {
    padding: 10px 15px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .barra-navegacion {
    bottom: 15px;
    padding: 8px 12px;
  }

  .enlaces-nav {
    gap: 4px;
  }

  .enlaces-nav a {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* Animación suave al cargar */
@keyframes aparecer-navbar {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.barra-navegacion {
  animation: aparecer-navbar 0.6s ease forwards;
}

/* Contenedor Principal */
.contenedor-portafolio {
  max-width: 1400px;
  margin: 100px auto 0;
  padding: 0 20px;
}

.titulo-principal {
  font-size: 64px;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 700;
}

.resaltado-azul {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.resaltado-morado {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitulo {
  text-align: center;
  color: #9ca3af;
  font-size: 16px;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 20px;
}

.subtitulo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

/* Cuadrícula del Portafolio */
.cuadricula-portafolio {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
}

/* Cuadrícula de Resumen (3 Tarjetas Separadas) - MODIFICADO */
.cuadricula-resumen {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 30px;
}

/* Estilo base de las tarjetas de datos */
.tarjeta-dato {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-dato:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tarjeta Valor */
.tarjeta-valor {
    position: relative;
    overflow: hidden;
}

.tarjeta-valor h3 {
    text-align: left; /* Alineación izquierda */
    margin-bottom: 15px;
    font-size: 18px;
    color: #e2e8f0;
}

.header-valor {
    text-align: left; /* Todo el contenido a la izquierda */
}

.header-valor .etiqueta-valor {
    color: #94a3b8;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.header-valor .valor-total {
    font-size: 56px;
    font-weight: 800;
    margin: 10px 0 20px;
    background: linear-gradient(90deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.header-valor .rendimiento {
   display: inline-flex;
}

.grafico-linea-mini {
    height: 80px;
    width: 100%;
    margin-top: 20px;
    opacity: 0.8;
}

/* Tarjeta Distribución */
.tarjeta-distribucion h3 {
    margin-bottom: 30px;
    font-size: 18px;
    color: #e2e8f0;
    text-align: left; /* Cambiado de center a left */
}

/* Responsive para el resumen */
@media (max-width: 900px) {
    .cuadricula-resumen {
        grid-template-columns: 1fr;
        gap: 20px;
        justify-content: stretch; /* En móvil ocupan todo el ancho */
    }
    
    .header-valor .valor-total {
        font-size: 48px;
    }
}

.contenedor-donut {
  display: flex;
  align-items: center;
  gap: 40px;
}

.grafico-donut {
  width: 140px;
  height: 140px;
  position: relative;
}

.donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.centro-donut {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
}

.segmento {
  transition: stroke-dasharray 0.5s ease;
}

.leyenda-donut {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.item-leyenda {
  display: flex;
  align-items: center;
  gap: 12px;
}

.punto {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.punto.azul {
  background-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.punto.morado {
  background-color: #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
.punto.rosa {
  background-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.item-leyenda div {
  display: flex;
  flex-direction: column;
}

.nombre-activo {
  font-size: 13px;
  color: #94a3b8;
}

.porcentaje-activo {
  font-weight: 600;
  font-size: 15px;
}

/* Lista de Posiciones Moderna */
.contenedor-posiciones {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px;
  margin-bottom: 50px;
}

.cabecera-seccion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.cabecera-seccion h3 {
  font-size: 20px;
  font-weight: 600;
}

.filtros-tipo {
  display: flex;
  background: rgba(15, 23, 42, 0.5);
  padding: 4px;
  border-radius: 12px;
}

.btn-filtro {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Toggle Vista de Operaciones */
.tarjeta-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.tarjeta-toggle h3 {
    margin-bottom: 25px;
    font-size: 18px;
    color: #cbd5e1;
}

.contenedor-toggle-vista {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.btn-toggle-vista {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.btn-toggle-vista:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    transform: translateY(-2px);
}

.btn-toggle-vista.activo {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(96, 165, 250, 0.3);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.btn-toggle-vista.activo svg {
    stroke: #60a5fa;
}

.btn-filtro:hover {
  color: #cbd5e1;
}

.btn-filtro.activo {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.lista-posiciones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lista-posiciones-cerradas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Updated grid: Removed "Action" column */
/* Columns: Icon/Name (200px) | Graph+Price (1fr) | Balance (150px) | Change (100px) */
.fila-posicion {
  display: grid;
  grid-template-columns: 200px 1fr 150px 100px;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.fila-posicion:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.col-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icono-ticker {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.icono-ticker img,
.icono-ticker svg {
  width: 24px;
  height: 24px;
}

.ticker {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.nombre-empresa {
  font-size: 13px;
  color: #64748b;
}

.col-grafico-precio {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.precio-grafico {
  font-weight: 600;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  min-width: 100px;
}

.sparkline {
  width: 100%;
  max-width: 150px;
  height: 30px;
  overflow: visible;
}

.col-balance {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.valor-actual {
  font-weight: 600;
  font-size: 16px;
  color: #e2e8f0;
}

.cantidad {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.col-cambio {
  display: flex;
  justify-content: flex-end;
}

.badge-cambio {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
}

.badge-cambio.positivo {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-cambio.negativo {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Responsive */
@media (max-width: 1024px) {
  /* Hide graph on tablet/mobile if needed, or adjust columns */
  .col-grafico-precio {
    flex-direction: column;
    gap: 10px;
  }

  .sparkline {
    max-width: 100px;
  }

  /* Adjusted grid without graph */
  .fila-posicion {
    grid-template-columns: 1fr 100px 120px 80px;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .fila-posicion {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "info balance"
      "precio cambio";
    gap: 15px;
    padding: 15px;
  }

  .col-info {
    grid-area: info;
  }
  .col-balance {
    grid-area: balance;
  }
  .col-grafico-precio {
    grid-area: precio;
    text-align: left;
    font-size: 14px;
    color: #94a3b8;
  }
  .col-cambio {
    grid-area: cambio;
  }

  .contenedor-donut {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .leyenda-donut {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Footer - Aviso de bloqueadores */
footer {
  text-align: center;
  padding: 40px 20px 60px;
  margin: 0 auto;
  max-width: 800px;
}

footer p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.7;
  margin-top: -50px;
}


/* PROYECTOS */

/* Sección Proyectos */
.contenedor-proyectos {
  max-width: 1400px;
  margin: 100px auto 0;
  padding: 0 20px;
}

.cuadricula-proyectos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 50px;
}

/* Si solo hay un proyecto, centrarlo */
.cuadricula-proyectos:has(.tarjeta-proyecto:only-child) {
  grid-template-columns: 1fr;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Si hay un número impar de proyectos, centrar el último */
.tarjeta-proyecto:nth-child(odd):last-child {
  grid-column: 1 / -1;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Tarjetas de Proyecto */
.tarjeta-proyecto {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.tarjeta-proyecto:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Cursor pointer para tarjetas con enlace */
.tarjeta-proyecto[data-link] {
  cursor: pointer;
}

/* Imagen del Proyecto */
.imagen-proyecto {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.imagen-proyecto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tarjeta-proyecto:hover .imagen-proyecto img {
  transform: scale(1.05);
}

.overlay-proyecto {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 14, 39, 0.8) 100%
  );
}

/* Contenido del Proyecto */
.contenido-proyecto {
  padding: 25px 30px 30px;
}

.encabezado-proyecto {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.icono-proyecto {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.encabezado-proyecto h3 {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.acciones-proyecto {
  display: flex;
  gap: 10px;
}

.boton-icono {
  width: 36px;
  height: 36px;
  background: rgba(55, 65, 81, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
}

.boton-icono:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
  color: #60a5fa;
  transform: translateY(-2px);
}

/* Descripción del Proyecto */
.descripcion-proyecto {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 40px;
}

/* Tecnologías */
.tecnologias-proyecto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.etiqueta-tech {
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  font-size: 12px;
  color: #60a5fa;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tarjeta-proyecto:hover .etiqueta-tech {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Responsive para Proyectos */
@media (max-width: 1200px) {
  .cuadricula-proyectos {
    grid-template-columns: repeat(2, 1fr);
  }

  .cuadricula-proyectos:has(.tarjeta-proyecto:only-child) {
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .cuadricula-proyectos {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .cuadricula-proyectos:has(.tarjeta-proyecto:only-child) {
    max-width: 100%;
  }

  /* En móvil, desactivar el centrado del último elemento */
  .tarjeta-proyecto:nth-child(odd):last-child {
    grid-column: auto;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .imagen-proyecto {
    height: 220px;
  }

  .contenido-proyecto {
    padding: 20px;
  }

  .encabezado-proyecto {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .acciones-proyecto {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .encabezado-proyecto h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .tecnologias-proyecto {
    gap: 6px;
  }

  .etiqueta-tech {
    padding: 5px 12px;
    font-size: 11px;
  }
}

/* FORMACION */

.contenedor-formacion {
  max-width: 1000px;
  margin: 100px auto 0;
  padding: 0 20px 80px;
}

/* Timeline */
.timeline-formacion {
  position: relative;
  margin-top: 80px;
  padding-left: 60px;
}

.linea-timeline {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    #3b82f6 0%,
    #8b5cf6 50%,
    transparent 100%
  );
}

/* Items del Timeline */
.item-formacion {
  position: relative;
  margin-bottom: 50px;
  animation: aparecerFormacion 0.6s ease forwards;
  opacity: 0;
}

@keyframes aparecerFormacion {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-formacion:nth-child(2) {
  animation-delay: 0.1s;
}
.item-formacion:nth-child(3) {
  animation-delay: 0.2s;
}
.item-formacion:nth-child(4) {
  animation-delay: 0.3s;
}
.item-formacion:nth-child(5) {
  animation-delay: 0.4s;
}
.item-formacion:nth-child(6) {
  animation-delay: 0.5s;
}

/* Punto del Timeline */
.punto-timeline {
  position: absolute;
  left: -67px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  border: 3px solid #0a0e27;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  z-index: 2;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Efecto hoover en el punto de timeline al pasar por encima de la formación asociada */
.item-formacion:hover .punto-timeline {
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.3);
}

/* Tarjeta de Formación */
.tarjeta-formacion {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px 35px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 25px;
}

.tarjeta-formacion:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateX(5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Iconos de Formación */
.icono-formacion {
  min-width: 70px;
  height: 70px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.icono-formacion.azul {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.icono-formacion.morado {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.icono-formacion.verde {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.icono-formacion.naranja {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.icono-formacion.cyan {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

/* Contenido de Formación */
.contenido-formacion {
  flex: 1;
}

.fecha-formacion {
  display: inline-block;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.contenido-formacion h3 {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.institucion {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 500;
}

.descripcion-formacion {
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Etiquetas de Materias */
.etiquetas-formacion {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.etiqueta-materia {
  padding: 5px 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  font-size: 12px;
  color: #93c5fd;
  font-weight: 500;
  transition: all 0.3s ease;
}

.etiqueta-materia:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

/* Responsive para Formación */
@media (max-width: 768px) {
  .timeline-formacion {
    padding-left: 40px;
  }

  .punto-timeline {
    left: -40px;
  }

  .tarjeta-formacion {
    flex-direction: column;
    gap: 20px;
    padding: 25px;
  }

  .icono-formacion {
    width: 60px;
    height: 60px;
    min-width: 60px;
  }

  .contenido-formacion h3 {
    font-size: 18px;
  }

  .tarjeta-formacion:hover {
    transform: translateX(3px);
  }

  .item-formacion {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .contenedor-formacion {
    margin-top: 80px;
  }

  .timeline-formacion {
    padding-left: 30px;
  }

  .punto-timeline {
    left: -30px;
    width: 14px;
    height: 14px;
  }

  .tarjeta-formacion {
    padding: 20px;
  }

  .icono-formacion {
    width: 50px;
    height: 50px;
    min-width: 50px;
  }

  .contenido-formacion h3 {
    font-size: 16px;
  }

  .descripcion-formacion {
    font-size: 13px;
  }

  .etiquetas-formacion {
    gap: 6px;
  }

  .etiqueta-materia {
    padding: 4px 10px;
    font-size: 11px;
  }

  .item-formacion {
    margin-bottom: 35px;
  }
}

/* DETALLE FORACION */
/* Página de Detalle Formación */
.contenedor-detalle {
  max-width: 1100px;
  margin: 120px auto 80px;
  padding: 0 20px;
}

.boton-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 30px;
}

.boton-volver:hover {
  background: rgba(30, 41, 59, 0.7);
  color: #60a5fa;
  transform: translateX(-5px);
}

/* Cabecera del Detalle */
.cabecera-detalle {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 30px;
  align-items: center;
  margin-bottom: 40px;
}

.icono-detalle {
  min-width: 100px;
  height: 100px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.icono-detalle.azul {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.icono-detalle.morado {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.info-cabecera {
  flex: 1;
}

.fecha-cabecera {
  display: inline-block;
  color: #60a5fa;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.cabecera-detalle h1 {
  font-size: 36px;
  color: #ffffff;
  margin-bottom: 8px;
}

.institucion-cabecera {
  color: #9ca3af;
  font-size: 18px;
}

/* Secciones del Contenido */
.seccion-detalle {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 35px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 30px;
}

.seccion-detalle > *:last-child {
  margin-bottom: 0;
}

.seccion-detalle h2 {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.seccion-detalle h3 {
  font-size: 20px;
  color: #60a5fa;
  margin: 25px 0 15px;
}

.seccion-detalle p {
  color: #d1d5db;
  line-height: 1.8;
  margin-bottom: 15px;
}

.seccion-detalle ul {
  list-style: none;
  padding: 0;
}

.seccion-detalle li {
  color: #d1d5db;
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
}

.seccion-detalle li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #60a5fa;
  font-size: 20px;
}

/* Tarjetas de Materia */
.tarjeta-materia {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
}

.cabecera-materia {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cabecera-materia h4 {
  color: #60a5fa;
  font-size: 18px;
}

.info-materia {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #9ca3af;
}

.tarjeta-materia p {
  color: #d1d5db;
  margin-bottom: 15px;
}

/* Proyectos dentro de materias */
.proyecto-materia {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 15px;
}

.proyecto-materia h5 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 8px;
}

.proyecto-materia p {
  font-size: 14px;
  margin-bottom: 12px;
}

.tecnologias-proyecto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tecnologias-proyecto span {
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  font-size: 12px;
  color: #93c5fd;
}

/* Enlaces y Archivos */
.enlaces-proyecto {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.enlace-abrir,
.enlace-descargar,
.enlace-github,
.enlace-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.enlace-abrir,
.enlace-descargar,
.enlace-github,
.enlace-demo {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.enlace-abrir:hover,
.enlace-descargar:hover,
.enlace-github:hover,
.enlace-demo:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Proyecto Final Destacado */
.proyecto-final {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  padding: 30px;
}

.proyecto-final h3 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 15px;
}

.nota-proyecto {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #34d399;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Logros */
.lista-logros {
  display: grid;
  gap: 15px;
}

.logro-item {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #60a5fa;
  border-radius: 12px;
  padding: 20px;
}

.logro-item h4 {
  color: #60a5fa;
  font-size: 16px;
  margin-bottom: 8px;
}

.logro-item .fecha-logro {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 8px;
  display: block;
}

.logro-item p {
  font-size: 14px;
  margin: 0;
}

/* Galería de Imágenes */
.galeria-imagenes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.imagen-galeria {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.imagen-galeria:hover {
  transform: scale(1.05);
}

.imagen-galeria img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.imagen-galeria .descripcion-imagen {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .cabecera-detalle {
    flex-direction: column;
    text-align: center;
    padding: 30px 25px;
  }

  .cabecera-detalle h1 {
    font-size: 28px;
  }

  .seccion-detalle {
    padding: 25px 20px;
  }

  .cabecera-materia {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .galeria-imagenes {
    grid-template-columns: 1fr;
  }
}

/* INDEX */

/* Sección Sobre mí */
.contenedor-sobre-mi {
  max-width: 900px;
  margin: 100px auto 0;
  padding: 0 20px 80px;
}

/* Hero Section */
.hero-sobre-mi {
  text-align: center;
  margin-top: 60px;
}

/* Avatar */
.contenedor-avatar {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 30px;
}

.avatar-brillo {
  position: absolute;
  inset: -20px;
  background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #3b82f6);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(30px);
  animation: rotarBrillo 4s linear infinite;
}

@keyframes rotarBrillo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.avatar-circulo {
  position: relative;
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #0a0e27;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.3);
  overflow: hidden;
}

.foto-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Nombre */
.nombre-completo {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Info Principal */
.info-principal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-bottom: 40px;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ca3af;
  font-size: 16px;
}

.item-info svg {
  color: #60a5fa;
}

/* Recuadro principal con descripción - NUEVO */
.recuadro-sobre-mi {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 35px 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 40px;
  transition: all 0.3s ease;
}

.recuadro-sobre-mi:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(96, 165, 250, 0.3);
}

.recuadro-sobre-mi p {
  color: #d1d5db;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 25px;
  text-align: center;
}

.texto-resaltado {
  color: #60a5fa;
  font-weight: 600;
}

/* Tecnologías dentro del recuadro */
.tecnologias-principales {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}

.tag-tech {
  padding: 8px 18px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  font-size: 14px;
  color: #60a5fa;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag-tech:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

/* Badge Disponible */
.badge-disponible {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 16px;
  color: #22d3ee;
}

.badge-disponible svg {
  color: #22d3ee;
}

.badge-disponible .estado {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.badge-disponible .subtexto {
  display: block;
  font-size: 13px;
  color: #67e8f9;
}

/* Sección de Acciones */
.seccion-acciones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* Botón Descargar CV */
.boton-descargar-cv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.boton-descargar-cv:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.boton-descargar-cv:active {
  transform: translateY(-1px);
}

/* Redes Sociales */
.redes-sociales {
  display: flex;
  gap: 15px;
}

.boton-red-social {
  width: 56px;
  height: 56px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all 0.3s ease;
  text-decoration: none;
}

.boton-red-social:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  transform: translateY(-3px);
}

/* Responsive Sobre mí */
@media (max-width: 768px) {
  .nombre-completo {
    font-size: 36px;
  }

  .contenedor-avatar {
    width: 150px;
    height: 150px;
  }

  .avatar-circulo {
    width: 150px;
    height: 150px;
  }

  .iniciales-avatar {
    font-size: 52px;
  }

  .recuadro-sobre-mi {
    padding: 30px 25px;
  }

  .recuadro-sobre-mi p {
    font-size: 15px;
  }

  .cuadricula-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .nombre-completo {
    font-size: 28px;
  }

  .contenedor-avatar {
    width: 120px;
    height: 120px;
  }

  .avatar-circulo {
    width: 120px;
    height: 120px;
  }

  .iniciales-avatar {
    font-size: 42px;
  }

  .recuadro-sobre-mi {
    padding: 25px 20px;
  }

  .cuadricula-info {
    grid-template-columns: 1fr;
  }

  .item-info {
    font-size: 14px;
  }

  .boton-descargar-cv {
    padding: 14px 28px;
    font-size: 15px;
  }

  .boton-red-social {
    width: 50px;
    height: 50px;
  }

  .redes-sociales {
    gap: 12px;
  }
}

/* Certificado Preview */
.certificado-contenedor {
  margin-top: 1.5rem;
  width: 100%;
}

.certificado-preview-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.certificado-preview-wrapper {
  height: 500px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.certificado-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-scroll-blocker {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% - 20px);
  height: 100%;
  z-index: 10;
  cursor: default;
}

.certificado-preview-footer {
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.certificado-preview-footer h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: #e2e8f0;
  font-weight: 500;
}

.btn-ver-completo {
  text-decoration: none;
  font-size: 0.85rem;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-ver-completo:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.enlace-certificado-simple {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  text-decoration: none;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.5);
  font-weight: 500;
  transition: all 0.3s ease;
}

.enlace-certificado-simple:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255,255,255,0.2);
}
