/* ============================================
   VARIABLES — paleta y tipografía de esta página
   (este archivo es autocontenido: no depende de
   las variables de style.css, que no se carga aquí)
   ============================================ */
:root {
  --rosa:         #000000;
  --rosa-700:     #1b1a1a;
  --rosa-50:      #FFE9ED;  /* rosa muy claro, para fondos sutiles */
  --tinta:        #15151A;  /* casi negro — texto principal */
  --tinta-suave:  #6B6B76;  /* gris — texto secundario */
  --blanco:       #f5e7e7;
  --borde:        #ECECF1;
  --amarillo:     #FFC93C;
  --morado:       #8B5CF6;
  --verde:        #2DD4BF;
  --azul:         #5B8DEF;
  --fuente-titulo: 'Syne', sans-serif;
  --fuente-mono:   'Space Mono', monospace;
}
.color{
  color: red;
}
.idioma{

    margin:20px 0 30px;

    display:flex;

    justify-content:center;

}

#btnIdioma{

    width:140px;

    padding:12px;

    border:none;

    border-radius:50px;

    background:rgba(255,255,255,.18);

    color: #ffffff;

    font-family:var(--fuente-mono);

    cursor:pointer;

    transition:.3s;

    font-size:.8rem;

    backdrop-filter:blur(10px);

}

#btnIdioma:hover{

    background:  #000000;
    color:  #c8f165;
    transform: translateY(-2px);

}
.descargar-cv{

    display:flex;

    justify-content:center;

    margin-top:15px;

    margin-bottom:20px;

}

.btn-descargar{

    width:150px;

    text-align:center;

    padding:12px 18px;

    background:rgba(255,255,255,.18);

    color:var(--blanco);

    border-radius:90px;

    text-decoration:none;

    font-family:var(--fuente-mono);

    font-size:.8rem;

    font-weight:700;

    transition:.3s;

    box-shadow:0 8px 20px rgba(0,0,0,.15);

}

.btn-descargar:hover{

    background:var(--rosa-700);

    color:  #c8f165;
}
/* ============================================
   RESET Y BASE
   ============================================ */
.pagina-perfil, .pagina-perfil *, .pagina-perfil *::before, .pagina-perfil *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.pagina-perfil {
  display: flex;
  min-height: 100vh;
  background-color: var(--blanco);
  color: var(--tinta);
  font-family: var(--fuente-mono);
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================
   BARRA LATERAL
   ============================================ */
.sidebar {
  width: 350px;
  flex-shrink: 0;
  background: linear-gradient(165deg, var(--rosa) 0%, var(--rosa-700) 100%);
  display: flex;
  flex-direction: column;
  padding: 2.8rem 1.6rem 2.2rem;
  position: fixed; /* se queda quieta mientras el contenido hace scroll */
  top: 0;
  left: 0;
  height: 100vh;
  color: var(--blanco);
  z-index: 30;
}

.sidebar-cabecera {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Círculo con iniciales — reemplazalo por una <img> cuando tengas foto */
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--blanco);
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.sidebar-nombre {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.15;
}

.sidebar-rol {
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 0.4rem;
}

/* Botón hamburguesa — solo aparece en pantallas chicas */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  margin-top: 2.4rem;
  min-height: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-family: var(--fuente-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-icono {
  font-size: 0.9rem;
  width: 1.1rem;
  text-align: center;
}

.sidebar-nav a:hover {
  color: var(--blanco);
  background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-nav a.activo {
  background-color: var(--blanco);
  color: var(--rosa-700);
  font-weight: 700;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.35);
}

.sidebar-pie {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding-top: 2rem;
}

.sidebar-redes {
  display: flex;
  gap: 0.8rem;
}

.sidebar-redes a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-family: var(--fuente-mono);
  font-size: 0.65rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-redes a:hover {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: var(--blanco);
}

.sidebar-volver {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.sidebar-volver:hover {
  color: var(--blanco);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.contenido-perfil {
  margin-left: 360px; /* deja espacio para la barra lateral fija */
  width: 100%;
}

.etiqueta-seccion {
  font-family: var(--fuente-mono);
  color: var(--rosa);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.6rem;
}

/* ============================================
   HERO / INICIO — foto circular + formas flotantes
   ============================================ */
.hero-perfil {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 5rem 2.5rem 3rem;
}

.hero-perfil-badge {
  position: absolute;
  top: 2.2rem;
  right: 2.8rem;
  font-family: var(--fuente-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--rosa-700);
  background-color: var(--rosa-50);
  border: 1px solid var(--rosa);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  z-index: 2;
}

.hero-perfil-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.hero-perfil-texto {
  max-width: 460px;
}

.hero-perfil-titulo {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--tinta);
  margin: 0.6rem 0 1.2rem;
}

.hero-perfil-titulo span {
  color: var(--rosa);
}

.hero-perfil-sub {
  color: var(--tinta-suave);
  font-size: 0.92rem;
  max-width: 380px;
  margin-bottom: 1.8rem;
}

.hero-perfil-foto {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
}

.hero-perfil-anillo {
  position: absolute;
  inset: -16px;
  border: 2px dashed var(--rosa);
  border-radius: 50%;
  opacity: 0.45;
}

.hero-perfil-circulo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rosa), var(--rosa-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 3rem;
  color: var(--blanco);
  box-shadow: 0 25px 50px -12px rgba(224, 49, 74, 0.45);
}

/* Formas decorativas flotantes */
.hero-perfil-formas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.forma {
  position: absolute;
  animation: flotar 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .forma {
    animation: none;
  }
}

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.forma-triangulo {
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 22px solid var(--azul);
  transform: rotate(-12deg);
}

.forma-rombo {
  width: 20px;
  height: 20px;
  background-color: var(--amarillo);
  border-radius: 4px;
  transform: rotate(45deg);
}

.forma-anillo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--verde);
}

.forma-punto {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--rosa-700);
}

.forma-blob {
  width: 32px;
  height: 26px;
  background-color: var(--morado);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
}

.forma-1 { top: 8%;  left: 16%; animation-delay: 0s; }
.forma-2 { top: 18%; left: 38%; animation-delay: 0.6s; }
.forma-3 { bottom: 14%; left: 22%; animation-delay: 1.2s; }
.forma-4 { top: 14%;  right: 18%; animation-delay: 0.3s; background-color: var(--rosa-700); }
.forma-5 { bottom: 10%; right: 30%; animation-delay: 0.9s; }
.forma-6 { top: 48%; right: 6%; animation-delay: 1.5s; background-color: var(--azul); }

/* ============================================
   SECCIONES GENERALES DEL PERFIL
   ============================================ */
.seccion-perfil {
  max-width: 800px;
  padding: 0 2.5rem 5rem;
}

.seccion-perfil h2 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--tinta);
}

.seccion-perfil > p {
  color: var(--tinta-suave);
  font-size: 0.92rem;
  max-width: 600px;
}

/* ============================================
   BOTÓN PRINCIPAL
   ============================================ */
.boton-principal {
  display: inline-block;
  background-color: var(--rosa);
  color: var(--blanco);
  font-family: var(--fuente-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 14px 28px -10px rgba(255, 77, 109, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boton-principal:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -10px rgba(255, 77, 109, 0.65);
}

/* ============================================
   GRID DE HABILIDADES
   ============================================ */
.grid-habilidades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.tarjeta-habilidad {
  background-color: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 10px 26px -16px rgba(20, 20, 30, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-habilidad:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -14px rgba(20, 20, 30, 0.22);
}

.icono-habilidad {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--blanco);
  margin-bottom: 1rem;
  background-color: var(--rosa);
}

.tarjeta-habilidad:nth-child(2) .icono-habilidad { background-color: var(--azul); }
.tarjeta-habilidad:nth-child(3) .icono-habilidad { background-color: var(--amarillo); color: var(--tinta); }

.tarjeta-habilidad h3 {
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--tinta);
}

.tarjeta-habilidad p {
  color: var(--tinta-suave);
  font-size: 0.85rem;
}

/* ============================================
   LÍNEA DE TIEMPO (sección Educación)
   ============================================ */
.linea-tiempo {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.item-tiempo {
  position: relative;
  border-left: 2px solid var(--borde);
  padding-left: 1.5rem;
}

.item-tiempo::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--rosa);
  border: 2px solid var(--blanco);
  box-shadow: 0 0 0 2px var(--rosa);
}

.item-tiempo::before {
  background-color: black;
  box-shadow: 0 0 0 2px green;
}

.item-tiempo-fecha {
  display: block;
  font-size: 0.75rem;
  color: var(--rosa-700);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.item-tiempo h3 {
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--tinta);
}

.item-tiempo p {
  color: var(--tinta-suave);
  font-size: 0.85rem;
}

/* ============================================
   GRID DE PROYECTOS
   ============================================ */
.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.tarjeta-proyecto {
  background-color: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 10px 26px -16px rgba(20, 20, 30, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tarjeta-proyecto:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -14px rgba(20, 20, 30, 0.22);
}

.proyecto-numero {
  font-family: var(--fuente-mono);
  color: var(--rosa);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.tarjeta-proyecto h3 {
  font-family: var(--fuente-titulo);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--tinta);
}

.tarjeta-proyecto p {
  color: var(--tinta-suave);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.proyecto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.proyecto-tags span {
  background-color: var(--rosa-50);
  color: var(--rosa-700);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-family: var(--fuente-mono);
}

.enlace-proyecto {
  color: var(--tinta);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--rosa);
  font-size: 0.85rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.enlace-proyecto:hover {
  color: var(--rosa-700);
}

/* ============================================
   PIE DE PÁGINA
   ============================================ */
.footer-perfil {
  border-top: 1px solid var(--borde);
  margin: 0 2.5rem;
  padding: 2rem 0;
  font-size: 0.75rem;
  color: var(--tinta-suave);
  letter-spacing: 0.08em;
}

/* ============================================
   RESPONSIVE — la barra lateral pasa a ser
   una franja horizontal arriba en pantallas chicas
   ============================================ */
@media (max-width: 900px) {
  .pagina-perfil {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1.1rem 1.4rem;
  }

  .sidebar-cabecera {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.9rem;
  }

  .avatar {
    width: 46px;
    height: 46px;
    font-size: 1rem;
    margin-bottom: 0;
  }

  .sidebar-id {
    flex: 1;
  }

  .sidebar-nombre {
    font-size: 1rem;
  }

  .sidebar-rol {
    font-size: 0.65rem;
  }

  .menu-toggle {
    display: flex;
  }

  .sidebar-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0;
    background-color: var(--rosa-700);
    padding: 1.2rem 1.4rem 1.6rem;
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.35);
  }

  .sidebar.abierto .sidebar-panel {
    display: flex;
  }

  .sidebar.abierto .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .sidebar.abierto .menu-toggle span:nth-child(2) { opacity: 0; }
  .sidebar.abierto .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .contenido-perfil {
    margin-left: 0;
  }

  .hero-perfil {
    min-height: auto;
    padding: 3rem 1.5rem 3rem;
  }

  .hero-perfil-badge {
    position: static;
    display: inline-block;
    margin-bottom: 1.6rem;
  }

  .hero-perfil-grid {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2.4rem;
  }

  .hero-perfil-texto {
    max-width: 100%;
  }

  .hero-perfil-sub {
    margin: 0 auto 1.8rem;
  }

  .hero-perfil-foto {
    width: 200px;
    height: 200px;
  }

  .hero-perfil-circulo {
    font-size: 2.2rem;
  }

  .seccion-perfil,
  .footer-perfil {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-left: 0;
    margin-right: 0;
  }
}

/* La barra lateral se integra al flujo en móvil para no tapar el contenido. */
html { scroll-padding-top: 24px; }
body { overflow-wrap: anywhere; }
.sidebar { overflow-y: auto; }
.sidebar > br { display: none; }
.sidebar { gap: 16px; }
.sidebar .idioma, .sidebar .descargar-cv { margin: 0; }
.contenido-perfil { min-width: 0; }
@media (max-width: 900px) {
  .sidebar { position: relative; height: auto; padding: 24px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .sidebar-nav a { width: auto; }
  .sidebar-rol { max-width: 420px; font-size: .8rem; }
}

/* Keep the sidebar and its initials aligned at every width. */
.avatar { line-height: 1; white-space: nowrap; overflow-wrap: normal; }
.contenido-perfil { width: auto; flex: 1; }
.grid-habilidades { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid-proyectos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.sidebar-nav a { min-height: 44px; }
@media (max-width: 900px) {
  .sidebar { align-items: center; text-align: center; }
  .sidebar .avatar { margin-inline: auto; }
  .sidebar-nombre { font-size: 1.4rem; }
}
