@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(135deg, #0d0d0d, #1a1a1a, #b74b4b);
  background-attachment: fixed;
  background-size: cover;
  color: white;
}

/* Header fijo */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 9%;
  background-color: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  margin-top: 20px;
}

.logo {
  font-size: 3rem;
  color: #b74b4b;
  font-weight: 800;
  cursor: pointer;
  transition: 0.5s ease;
}

.logo:hover {
  transform: scale(1.1);
}

nav a {
  font-size: 1.8rem;
  color: white;
  margin-left: 4rem;
  font-weight: 500;
  transition: 0.3s ease;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  color: #b74b4b;
  border-bottom: 3px solid #b74b4b;
}

/* Secciones */
section {
  scroll-margin-top: 120px; /* Ajuste para el header fijo */
  padding: 10rem 9%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: none; /* Evita fondo duplicado */
}

section h2 {
  font-size: 4rem;
  color: #b74b4b;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

section p {
  font-size: 1.8rem;
  max-width: 800px;
  line-height: 1.6;
  color: #ccc;
}

/* HOME usa el fondo general ahora */
.home {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  background: none;
}

.home .home-content h1 {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1.3;
}

span {
  color: #b74b4b;
}

.home-content h3 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.home-content p {
  font-size: 1.6rem;
}

.home-img img {
  width: 32vw;
  border-radius: 50%;
  box-shadow: 0 0 25px solid #b74b4b;
  cursor: pointer;
  transition: 0.2s linear;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  border: 0.2rem solid #b74b4b;
  font-size: 2rem;
  border-radius: 50%;
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.3s ease;
  color: #b74b4b;
  background-color: transparent;
}

.social-icons a:hover {
  color: black;
  transform: scale(1.3) translateY(-5px);
  background-color: #b74b4b;
  box-shadow: 0 0 25px #b74b4b;
}
.typing-text{
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
}

.typing-text span{
  position: relative;
}

.typing-text span::before {
  content: "Software Developer";
  color: #b74b4b;
  animation: words 30s infinite;
}

.typing-text span::after {
  content: "";
  position: absolute;
  width: 3px; /* solo el cursor */
  height: 100%;
  background-color: #b74b4b; /* color del cursor */
  right: -5px;
  animation: cursor 0.6s infinite;
}

@keyframes cursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}


@keyframes words{
  0%, 20%{
      content: "Administrador de sistemas";
  }
  21%, 40%{
      content: "Administrador de Bases de datos";
  }
  41%, 60%{
      content: "Estudiante de Ciberseguridad";
  }
  61%, 80%{
      content: "Administrador de Redes";
  }
  81%, 100%{
      content: "Consultor ASIR";
  }
}
.timeline {
  position: relative;
  margin: 2rem auto;
  padding-left: 3rem;
  border-left: 3px solid #b74b4b;
  max-width: 700px;
  width: 90%;
  text-align: left;
  color: #e0e0e0;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}


.timeline-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 2.8rem;
  color: #b74b4b;
  font-weight: 700;
}

.timeline-content h4 {
  margin: 0 0 0.7rem 0;
  font-weight: 400;
  color: #ccc;
  font-style: italic;
  font-size: 1.8rem;
}

.timeline-date {
  font-size: 1.6rem;
  color: #999;
  display: block;
  margin-bottom: 1rem;
  font-weight: 300;
}

.timeline-content ul {
  margin-left: 2rem;
  color: #ddd;
  font-size: 1.8rem;
  list-style-type: disc;
  line-height: 1.5;
}

.timeline-content p {
  margin-top: 1rem;
  font-weight: 600;
  color: #ccc;
  font-size: 1.8rem;
}
/* CONTACTO */

#contact {
  text-align: center;
  padding: 8rem 9%;
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.contact-info {
  font-size: 1.6rem;
  color: #ccc;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info i {
  color: #b74b4b;
  margin-right: 1rem;
}

.contact-info a {
  color: #b74b4b;
  text-decoration: none;
  transition: 0.3s ease;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-form input,
.contact-form textarea {
  background-color: #1f1f1f;
  border: 1px solid #444;
  padding: 1.2rem 1.6rem;
  font-size: 1.6rem;
  color: white;
  border-radius: 0.5rem;
  transition: border 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border: 1px solid #b74b4b;
  outline: none;
}

.contact-form button {
  background-color: #b74b4b;
  color: white;
  border: none;
  padding: 1.2rem;
  font-size: 1.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: 600;
}

.contact-form button:hover {
  background-color: white;
  color: #b74b4b;
  transform: scale(1.03);
}
/* --- Código base (tu CSS original) --- */
/* ... aquí va TODO tu CSS original sin cambios ... */

/* --- Ajustes responsivos --- */
@media (max-width: 768px) {
  html {
    font-size: 50%; /* reduce tamaño base para móviles */
  }

  header {
    padding: 1rem 4%;
    flex-wrap: wrap;
    margin-top: 10px;
  }

  .logo {
    font-size: 2.4rem;
    flex: 1 1 100%;
    margin-bottom: 10px;
  }

  nav {
    flex: 1 1 100%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 1.4rem;
    margin-left: 1rem;
    margin-bottom: 10px;
    flex: 1 1 auto;
    text-align: center;
  }

  section {
    padding: 6rem 5%;
  }

  section h2 {
    font-size: 3rem;
  }

  section p {
    font-size: 1.4rem;
    max-width: 100%;
  }

  .home .home-content h1 {
    font-size: 3.8rem;
  }

  .home-content h3 {
    font-size: 2rem;
  }

  .home-content p {
    font-size: 1.4rem;
  }

  .home-img img {
    width: 50vw; /* ocupa la mitad del ancho */
    max-width: 200px; /* no demasiado grande */
    border-radius: 50%;
    box-shadow: 0 0 15px solid #b74b4b;
  }

  .social-icons a {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.6rem;
    margin-right: 1rem;
  }

  .typing-text {
    font-size: 18px;
    min-width: auto;
  }

  .timeline {
    max-width: 100%;
    padding-left: 1rem;
    margin: 2rem 0;
  }

  .timeline-content h3 {
    font-size: 2rem;
  }

  .timeline-content h4 {
    font-size: 1.4rem;
  }

  .timeline-date {
    font-size: 1.2rem;
  }

  .timeline-content ul {
    font-size: 1.4rem;
    margin-left: 1rem;
  }

  #contact {
    padding: 4rem 5%;
  }

  .contact-container {
    max-width: 100%;
    gap: 2rem;
  }

  .contact-info {
    font-size: 1.2rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1.2rem;
  }

  .contact-form button {
    font-size: 1.2rem;
    padding: 1rem;
  }
}
/* Ocultar botón y mostrar menú en desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #b74b4b;
  font-size: 2.5rem;
  cursor: pointer;
}

/* En móvil */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #1a1a1a;
    position: absolute;
    top: 70px; /* ajusta según el alto de tu header */
    left: 0;
    padding: 1rem 0;
    border-top: 2px solid #b74b4b;
    z-index: 99;
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 1rem 0;
    font-size: 1.6rem;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  header {
    position: relative; /* necesario para el nav absoluto */
  }
}
