/* ==================== ESTILO GENERAL ==================== */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
}

/* ==================== CABECERA ==================== */
header {
  background-image: url('banner.jpg');
  background-size: cover;
  background-position: center;
  padding: 5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-pic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #0d1117;
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  object-fit: cover;
  z-index: 1;
}

header h1 {
  margin-top: 7.5rem;
  font-size: 2.2rem;
  z-index: 1;
  position: relative;
}

header p {
  color: #8b949e;
  margin: 0.3rem 0;
  z-index: 1;
  position: relative;
}

/* ==================== FONDO BINARIO ==================== */
.binary-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  opacity: 0.08;
  pointer-events: none;
}

.binary-background span {
  position: absolute;
  white-space: nowrap;
  font-size: 2rem;
  color: #00ffd5;
  animation: scrollBinary linear infinite;
}

.binary-background span:nth-child(1) {
  left: 0%;
  animation-duration: 14s;
}

.binary-background span:nth-child(2) {
  left: 15%;
  animation-duration: 5s;
}
.binary-background span:nth-child(3) {
  left: 25%;
  animation-duration: 12s;
}
.binary-background span:nth-child(4) {
  left: 5%;
  animation-duration: 8s;
}
.binary-background span:nth-child(5) {
  left: 0%;
  animation-duration: 6s;
}
.binary-background span:nth-child(6) {
  left: 60%;
  animation-duration: 7s;
}
.binary-background span:nth-child(7) {
  left: 75%;
  animation-duration: 4s;
}
.binary-background span:nth-child(8) {
  left: 50%;
  animation-duration: 3s;
}

.binary-background span::before {
  content: '0101010100111010101001011010100101010111010010101010010100101011';
}

@keyframes scrollBinary {
  0% {
    top: -100%;
  }
  100% {
    top: 200%;
  }
}

/* ==================== SECCIONES ==================== */
.section {
  padding: 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* ==================== BARRA LATERAL INTERACTIVA ==================== */
.action-bar {
  position: fixed;
  top: 50%;
  left: -135px;
  transform: translateY(-50%);
  width: 140px;
  background-color: #0d1117;
  padding: 1rem 0.6rem;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 255, 213, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.3s ease;
  z-index: 1000;
}

.action-bar:hover {
  left: 0;
}

.action-bar a {
  color: #58a6ff;
  margin: 1rem 0;
  font-size: 1.6rem;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.action-bar a:hover {
  transform: scale(1.2);
  color: #00ffd5;
}

.action-bar i {
  pointer-events: none;
}

/* BOTÓN FLOTANTE PARA MÓVILES */
.floating-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #0d1117;
  color: #00ffd5;
  font-size: 1.6rem;
  padding: 0.8rem 1rem;
  border-radius: 50px;
  box-shadow: 2px 2px 10px rgba(0,255,213,0.3);
  cursor: pointer;
  z-index: 1001;
  display: none;
  transition: background 0.3s ease;
}

.floating-toggle:hover {
  background-color: #161b22;
  color: #00ffd5;
}

@media screen and (max-width: 768px) {
  .action-bar {
    left: -140px;
  }
  .floating-toggle {
    display: block;
  }
}


/* ==================== CARRUSEL DE CERTIFICADOS ==================== */
.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1.5rem;
  padding: 1rem 0;
}

.slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 320px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  text-align: center;
  background-color: #161b22;
  padding: 0.5rem;
}

.slide img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.slide img:hover {
  transform: scale(1.05);
}

.slide span {
  display: block;
  margin: 0.5rem 0;
  color: #c9d1d9;
  font-weight: 600;
  font-size: 1rem;
}

/* ==================== PROYECTOS Y LABORATORIOS ==================== */
.proyectos ul {
  list-style: none;
  padding: 0;
}

.proyectos li {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161b22;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
}

.proyectos li:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.proyectos li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #c9d1d9;
  width: 100%;
}

.proyectos li a span {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}

.proyectos li a img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  margin-left: 1rem;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.proyectos li a:hover img {
  transform: scale(1.05);
}

/* ==================== REDES SOCIALES FOOTER ==================== */
.redes-sociales-footer {
  text-align: center;
  padding: 1rem;
  background-color: #161b22;
  color: #c9d1d9;
}

.redes-sociales-footer h2 {
  margin-bottom: 1rem;
  color: #58a6ff;
}

.redes-iconos {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.redes-iconos a {
  font-size: 1.9rem;
  color: #58a6ff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.redes-iconos a:hover {
  transform: scale(1.2);
  color: #00ffd5;
}

/* ==================== EXPERIENCIA PROFESIONAL ==================== */
.experiencia {
  background-image: url('img/ciberseguridad.jpg');
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 5rem 2rem;
  color: #c9d1d9;
  position: relative;
  z-index: 0;
}

.texto-experiencia {
  max-width: 800px;
  margin: auto;
  background-color: rgba(0, 0, 0, 0.903);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.634);
  z-index: 1;
  position: relative;
}

.texto-experiencia h2 {
  color: #58a6ff;
  margin-bottom: 1.5rem;
}

/* ==================== PIE DE PÁGINA ==================== */
footer {
  text-align: center;
  padding: 1.5rem;
  color: #8b949e;
  background: #161b22;
  font-size: 0.9rem;
}
