/* Reset y configuración general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica', sans-serif;
  background-color: white;
  color: #111;
}

/* ---------------- Header ---------------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: white;
}

/* Logo */
.logo {
  width: 80%;
  max-width: 150px;
  height: auto;
  display: block;
}

/* ---------------- Navbar ---------------- */
.navbar {
  background-color: #fff;
  padding: 10px 20px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: #000;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -3px;
  background-color: #007BFF;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Aplica a todos los links del nav */
nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: black;
  font-weight: 500;
}

/* ---------------- Intro ---------------- */
.intro {
  text-align: left;
  padding-left: 3rem;
}

.intro h1 {
  font-size: 3rem;
}

.intro span {
  font-weight: bold;
}

/* ---------------- Projects ---------------- */
.projects {
    background-color: #f0eada;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; /* Esto hace que en móvil se acomoden uno debajo del otro */
  padding: 2rem;
}

.project-card {
  width: 300px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: scale(1.05);
}

.project-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}


.thumbnail img {
  width: 60px;
  cursor: pointer;
  border-radius: 8px;
}

/* ---------------- Modal ---------------- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 500px;
  width: 80%;
  animation: popUp 0.3s ease-in-out;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-content .close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

@keyframes popUp {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------------- About ---------------- */
.about {
  padding: 3rem;
  text-align: left;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 20px;
}

.about-text {
  flex: 1;
  min-width: 250px;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #007BFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------- Botón ---------------- */
.btn {
  display: inline-block;
  background-color: #007bff;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
  box-shadow: 0 6px 12px rgba(0, 86, 179, 0.5);
}

/* ---------------- Footer ---------------- */
footer {
  text-align: center;
  padding: 2rem;
  background: white;
}

.social-icon a {
  margin: 0 0.5rem;
  text-decoration: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #6c6c6c;
  background: #fff;
  border-top: 1px solid #ddd;
}

.footer-left {
  flex: 1;
}

.footer-right {
  flex: 1;
  text-align: right;
}

.footer-right .icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  margin-left: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #6c6c6c;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  user-select: none;
}

.footer-right .icon:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ---------------- Menú Hamburguesa ---------------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  transition: all 0.3s ease;
}

/* Mostrar menú hamburguesa activo */
#nav-menu.show {
  display: flex;
}

/* ---------------- Responsive Design ---------------- */

/* Tablets y móviles */
@media (max-width: 768px) {
  
  header {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .navbar {
    width: 100%;
    padding: 0;
    margin-top: 0.5rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 1.1rem;
  }

  .intro {
    padding-left: 1rem;
    text-align: center;
  }

  .intro h1 {
    font-size: 2.5rem;
  }

  .projects {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    max-width: 90%;
    margin-bottom: 2rem;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 20px;
  }

  .about-text {
    min-width: 100%;
    text-align: center;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }

  footer {
    padding: 1rem;
    font-size: 14px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-right {
    text-align: center;
    margin-top: 1rem;
  }

  .footer-right .icon {
    margin-left: 8px;
    width: 28px;
    height: 28px;
    line-height: 28px;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }

  nav.active {
    transform: translateY(0);
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    margin-bottom: 15px;
  }

  nav ul li a {
    margin-left: 0;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .intro h1 {
    font-size: 2rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .profile-img {
    width: 100px;
    height: 100px;
  }
}
