:root {
  --bg-blur: blur(20px);
  --card-bg: rgba(255, 255, 255, 0.15);
  --card-hover-bg: rgba(255, 255, 255, 0.25);
  --text-primary: white;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --font-main: 'Tipografia2', Arial, sans-serif;
  --accent-color: #3b82f6;
}

* {
  box-sizing: border-box;
  /* Asegura que el padding no expanda el ancho total */
  cursor: default !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* Desactiva el menú contextual en iOS (copiar/guardar imagen) */
}

img {
  -webkit-user-drag: none;
  /* Evita que las imágenes se puedan arrastrar */
}

html {
  background-color: #000;
  scroll-behavior: smooth;
  /* Mantiene el fondo oscuro bajo la barra de scroll */
}

body {
  background-color: transparent;
  /* Permite que el carrusel con z-index: -1 sea visible */
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0px;
  letter-spacing: 0.05em;
}

/* Barra de Scroll Estilo Card Personalizada */
body::-webkit-scrollbar {
  width: 14px;
  /* Un poco más ancha para apreciar el estilo */
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  /* Opacidad similar a tus cards */
  border: 3px solid transparent;
  /* Espacio alrededor de la barra para que parezca que flota */
  background-clip: padding-box;
  /* Hace que el color no toque el borde del track */
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  /* Efecto de borde fino de la card */
  transition: background 0.3s ease;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--card-hover-bg);
  /* Color de hover de tus cards */
  background-clip: padding-box;
}





/*Carrusel*/
.carrusel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
  /* Optimización para GPU en móviles */
  z-index: -2;
}








/* Negrita */
.negrita {
  font-weight: bold;
}









/* Tipografías */
@font-face {
  font-family: 'Titulo';
  src: url('fuentes/tipografia1.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Tipografia2';
  src: url('fuentes/tipografia2.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Tipografia3';
  src: url('fuentes/tipografia3.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Tooltip';
  src: url('fuentes/tooltip.woff2') format('woff2');
  font-display: swap;
}










/* Contenedores */
.contenedor {
  width: calc(100% - 80px);
  margin: 10px auto;
  padding: clamp(20px, 5vw, 40px);
  /* Padding dinámico según el tamaño de pantalla */
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: var(--bg-blur);
  /* Aumentado para efecto premium */
  -webkit-backdrop-filter: var(--bg-blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .contenedor {
    width: calc(100% - 30px);
    padding: 20px;
  }
}

.contenedor:hover {
  background: var(--card-hover-bg);
}









/* ===================== */
/*         Header        */
/* ===================== */


/* Añade solo lo necesario para el header */
.contenedor.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

@media (max-width: 768px) {
  .contenedor.header {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }
}

/* Título dentro del header */
.contenedor.header h1 {
  font-family: 'Titulo';
  margin: 0;
  font-size: 2.2rem;
}

/* Enlace del logo para que no parezca un link tradicional */
.logo-link {
  text-decoration: none;
  color: inherit;
}

/* Estilo para el grupo de botones dentro del header */
.contenedor.header .botones {
  display: flex;
  gap: 40px;
  margin: 0;
  font-size: 1.2rem;
  font-family: 'Tipografia2';
}

@media (max-width: 768px) {
  .contenedor.header .botones {
    gap: 20px;
  }
}

/* Estilo para cada botón dentro del header */
.contenedor.header .boton {
  text-decoration: none;
  color: rgb(255, 255, 255);
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Estilo para cada botón cuando pasa el ratón (hover) */
.contenedor.header .boton:hover {
  color: rgb(214, 214, 214);
}















/* ============================== */
/*    Presentación Encapsulada    */
/* ============================== */




.presentacion .contenedor h2 {
  font-family: 'Tipografia2';
  margin: 0 0 15px 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.presentacion .contenedor h4 {
  font-family: 'Tipografia2';
  margin: 0 0 30px 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  line-height: 1.5;
}


/* Estilos para los botones */
.presentacion .contenedor-botones {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  /* Permite que los botones bajen si no caben */
  gap: 10px;
  margin: 20px 0;
}

.presentacion .boton {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  flex: 1;
  min-width: 200px;
  /* Asegura que no se encojan demasiado antes de saltar de línea */
  text-align: center;
  margin: 0;
  box-sizing: border-box;
  /* Ajustes para <button> y Accesibilidad */
  border: none;
  background: transparent;
  color: white;
  font-family: inherit;
}

.presentacion .boton:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.presentacion .boton h2 {
  margin: 0;
  padding: 0;
  font-family: 'Tipografia2';
  font-size: clamp(16px, 2vw, 22px);
  /* Texto más pequeño en móvil */
  color: white;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.1em;
  /* Sin espaciado extra en los botones de tab */
}

.presentacion .boton:hover {
  transform: translateY(-3px);
}

.presentacion .boton.activo {
  background: rgba(255, 255, 255, 0.3);
}

.presentacion .boton.activo:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}


/* Estilos para el contenido desplegable */
.presentacion .desplegable {
  display: none;
  margin-top: 45px;
  /* Baja los iconos SVG para separar el tooltip de los botones */
  padding: 10px 10px 0 10px;
  color: white;
  border-radius: 5px;
}

.presentacion .desplegable.activo {
  display: block;
}


/* LOGOS */
.presentacion .iconos-lenguajes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(15px, 4vw, 30px);
  margin-bottom: 0;
  padding: 10px 0;
}

.presentacion .iconos-lenguajes img {
  width: clamp(50px, 8vw, 70px);
  /* Iconos más pequeños en móvil */
  height: auto;
  filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
  user-select: none;
  pointer-events: auto;
}

.presentacion .iconos-lenguajes img:hover {
  transform: scale(1.05);
}


/* Tooltip */
.presentacion .tooltip {
  position: relative;
  display: inline-block;
}

.presentacion .tooltip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.presentacion .tooltip .tooltip-text {
  width: max-content;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 12.5px 20px;
  position: absolute;
  z-index: 1000;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.4s ease;
  font-family: 'Tooltip';
}

.presentacion .tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
  pointer-events: auto;
}


/* INFO */
.presentacion .info-linea {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0px 0;
}

.presentacion .info-linea img {
  width: 40px;
  height: 30px;
  object-fit: contain;
  display: block;
  margin-top: 0px;
}

.presentacion .info-linea h4 {
  margin: 0px;
  padding: 10px;
  font-size: 15px;
  line-height: 1.2;
  display: inline-block;
  margin-left: -5px;
}













/* ============================= */
/*   Sobre mi    //    Discord   */
/* ============================= */

#sobremi-discord-wrapper {
  margin: 0;
}



#sobremi-discord-wrapper .info-linea {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
}

#sobremi-discord-wrapper .info-linea img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

#sobremi-discord-wrapper .info-linea h4 {
  margin: 0;
  padding: 0;
  font-size: 1.1rem;
  font-family: 'Tipografia2';
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

#sobremi-discord-wrapper .contenedor-fila {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: calc(100% - 80px);
  margin: 10px auto;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  #sobremi-discord-wrapper .contenedor-fila {
    width: calc(100% - 30px);
  }
}

/* Cada columna */
#sobremi-discord-wrapper .contenedor-fila .contenedor {
  flex: 1;
  min-width: 300px;
  width: auto;
  /* Evita que herede el calc(100% - 80px) y se rompa el layout */
  margin: 0;
  padding: 40px;
}

#sobremi-discord-wrapper .contenedor-fila .contenedor h2 {
  font-family: 'Tipografia2';
  margin: 0 0 25px 0;
  font-size: 2.2rem;
}

#sobremi-discord-wrapper .contenido-carta {
  padding-bottom: 20px;
}

#perfil {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* Permite que el contenido baje si no hay espacio */
  justify-content: flex-start;
  gap: 30px;
  /* Reducido de 50px para mejor adaptabilidad */
  margin: 20px 0 0 0;
  padding-left: 30px;
}

.avatar-container {
  width: 140px;
  /* Aumentado de 120px */
  height: 140px;
  /* Aumentado de 120px */
  position: relative;
  flex-shrink: 0;
}

#fotoPerfil {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

#fotoPerfil:active {
  transform: scale(0.95);
}

.animacion-pop {
  animation: pop 0.3s ease-out;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.info-derecha {
  display: flex;
  flex-direction: column;
}

.nombres {
  display: flex;
  align-items: flex-end;
  /* Alineamiento inferior de la base del texto */
  gap: 8px;
}

.icono-dispositivo {
  width: 32px;
  /* Aumentado de 24px */
  height: 32px;
  /* Aumentado de 24px */
  fill: #b5bac1;
  /* Color gris más claro acorde a Discord */
  margin-left: 8px;
  margin-bottom: 4px;
}

.nombre-usuario {
  margin: 0;
  font-size: 1.8rem;
  /* Aumentado */
  font-weight: bold;
  color: white;
  font-family: 'Tipografia2', Arial, sans-serif;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  /* Sombra para legibilidad */
}

.nombre-completo {
  font-size: 1.3rem;
  color: #b5bac1;
  /* Gris claro para el nick pequeño */
  font-family: sans-serif;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.estado-linea {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Incremento para mejor balance visual */
  margin-top: 6px;
}

.estado-circulo {
  width: 22px;
  /* Aumentado, más grande que la fuente de texto visualmente */
  height: 22px;
  border-radius: 50%;
  background-color: #23a559;
  transition: background-color 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  /* Decoración profunda 3D */
}

.estado-texto {
  font-size: 1.15rem;
  /* Aumentado, pero menos ancho del circulo que son 22px */
  font-weight: bold;
  color: #23a559;
  font-family: sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Actividad Contenedor Rich Presence completo */
.actividad-contenedor {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  /* Esto hace que el texto baje de la imagen en pantallas medianas */
  gap: 15px;
  margin-top: 15px;
  background: transparent;
  /* Eliminado el fondo tipo card */
  padding: 0;
  /* Eliminado el padding */
  border-radius: 0;
}

.actividad-imagen {
  width: 90px;
  height: 125px;
  border-radius: 12px;
  object-fit: cover;
  display: none;
}

.actividad-textos {
  display: flex;
  flex-direction: column;
}

.actividad-texto-principal {
  margin: 0;
  font-weight: bold;
  font-size: 1.3rem;
  /* Aumentado de 1.15rem */
  color: #ffffff;
  font-family: sans-serif;
}

.actividad-secundario {
  margin: 4px 0 0 0;
  font-size: 1.1rem;
  /* Aumentado de 1rem */
  color: #dddddd;
  font-family: sans-serif;
  display: none;
}

.actividad-tiempo {
  margin: 4px 0 0 0;
  font-size: 1rem;
  /* Aumentado de 0.95rem */
  color: #bbbbbb;
  font-family: sans-serif;
  display: none;
}

/* Mejora de respuesta para móviles en la tarjeta de Discord */
@media (max-width: 768px) {
  #perfil {
    flex-direction: column;
    gap: 20px;
    padding-left: 0;
    text-align: center;
    justify-content: center;
  }

  .nombres,
  .estado-linea {
    justify-content: center;
  }

  .actividad-contenedor {
    flex-direction: column;
    text-align: center;
  }
}













/* ======================= */
/*        Proyectos        */
/* ======================= */


#proyectos {
  margin-top: auto;
  /* Empuja el footer al final si el contenido es corto */
  width: 100%;
  margin: 0;
}

#proyectos .contenedor h2 {
  font-family: 'Tipografia2';
  margin: 0 0 15px 0;
  font-size: 2.5rem;
}

#proyectos .contenedor h4 {
  font-family: 'Tipografia2';
  margin: 0 0 30px 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

#proyectos .contenedor h3 {
  font-family: 'Tipografia2';
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: rgb(177, 177, 177);
  font-weight: 300;
}

#proyectos #contenedor-proyectos {
  width: 100%;
  margin: 0;
  padding: 0;
  margin-bottom: 35px;
}

#proyectos .contenedor-proyectos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}

#proyectos .proyecto:nth-child(1),
#proyectos .proyecto:nth-child(2) {
  grid-column: span 3;
}

@media (max-width: 900px) {
  #proyectos .contenedor-proyectos {
    grid-template-columns: repeat(2, 1fr);
  }

  #proyectos .proyecto:nth-child(1),
  #proyectos .proyecto:nth-child(2) {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  #proyectos .contenedor-proyectos {
    grid-template-columns: 1fr;
  }

  #proyectos .proyecto:nth-child(1),
  #proyectos .proyecto:nth-child(2) {
    grid-column: span 1;
  }
}

/* PROYECTO - ANIMACIÓN SUAVE DE COLOR AL HOVER */
#proyectos .proyecto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 15px 20px;
  border-radius: 12px;
  gap: 20px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

#proyectos .proyecto:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

#proyectos .imagen-proyecto {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
  user-drag: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  pointer-events: auto;
}

#proyectos .imagen-proyecto:hover {
  transform: scale(1.05);
}

#proyectos .contenido-proyecto {
  flex-grow: 1;
  text-align: left;
}

#proyectos .contenido-proyecto h4 {
  margin: 0 0 5px 0;
  font-size: 1.3rem;
  color: #fff;
  font-family: 'Tipografia2';
}

#proyectos .contenido-proyecto p {
  font-family: 'Tipografia2';
  font-weight: 300;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
}

#proyectos .icono-github {
  width: 45px;
  height: 45px;
  object-fit: contain;
  opacity: 0.5;
  transition: all 0.2s ease;
  user-drag: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  pointer-events: auto;
  cursor: default;
}

#proyectos .icono-github:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Tooltip */
#proyectos .tooltip {
  position: relative;
  display: flex;
  align-items: center;
}

#proyectos .tooltip .tooltip-text {
  width: max-content;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 15px;
  position: absolute;
  z-index: 1000;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: 'Tipografia2';
  font-size: 0.8rem;
}

#proyectos .tooltip:hover .tooltip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
  pointer-events: auto;
}

.presentacion .info-linea h4 {
  margin: 0;
  padding: 10px;
  font-size: 1.1rem;
  line-height: 1.2;
  font-family: 'Tipografia2';
  font-weight: 300;
}

/* ================= */
/*        Pie        */
/* ================= */



#pie .contenedor h6 {
  font-family: 'Tipografia2';
  font-size: 0.9rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  text-align: left;
}






/* Secciones SPA: Blog y Cursos ocupan el ancho total y crecen verticalmente */
#blog-seccion,
#cursos-seccion {
  flex: 1;
  display: flex;
  flex-direction: column;
}


.desarrollo {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.desarrollo .contenedor {
  flex: 1;
  /* Esto hace que la tarjeta se estire verticalmente */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Esto centra el texto dentro de la tarjeta estirada */
}



.desarrollo .contenedor h1 {
  display: block;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
  padding: 5px 20px;
  transition: transform 0.5s ease;
  font-family: 'Tipografia2';
}

.desarrollo .contenedor h1:hover {
  transform: translateY(-5px);
}

.desarrollo .contenedor h4 {
  text-align: center;
  font-family: 'Tipografia2';
}

.desarrollo .contenedor .boton {
  display: block;
  width: fit-content;
  margin: 20px auto;
  color: white;
  text-align: center;
  text-decoration: underline;
  font-family: 'Tipografia2';
  transition: color 0.2s ease;
}

.desarrollo .contenedor .boton:hover {
  color: rgb(220, 220, 220);
}