* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
      font-family: 'Poppins', sans-serif;
      margin: 0;
      background: #f4faff;
      color: #232946;
      /*overflow-x: hidden;*/
}
  
/*header */
header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* capa de imagen central */
    .hero-image {
      width: 100%;
      height: clamp(200px, 40vh, 400px); /* Altura adaptativa entre 200–400px */
      background: url('../assets/images/imghero.jpg');
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      /* margin-left: calc(-1 * (100vw - 100%) / 2);
      height: 320px;
      background: url('../assets/images/imghero.jpg') center/cover no-repeat;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      */
    }
    .hero-image::after {
      content: '';
      position: absolute;
      left: 0; top: 0; right: 0; bottom: 0;
      background: linear-gradient(90deg, rgba(35,41,70,0.5) 0%, rgba(232,187,195,0.15) 100%);
    }
    .hero-title {
      position: relative;
      color: #fff;
      font-size: 2.5rem;
      font-weight: 700;
      letter-spacing: 2px;
      z-index: 2;
      text-shadow: 0 2px 8px rgba(35,41,70,0.2);
    }
    .main-sections {
      max-width: 1100px;
      margin: 2.5rem auto;
      display: flex;
      flex-wrap: wrap;
      gap: 2rem;
      justify-content: space-between;
    }
    .section {
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(35,41,70,0.07);
      flex: 1 1 300px;
      min-width: 280px;
      padding: 2rem 1.5rem;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
    .section h2 {
      margin: 0 0 0.5rem 0;
      color: #232946;
      font-size: 1.4rem;
    }

.box-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.box-links a:hover {
    color: #3498db;
}

/* footer */
.footer-container {
    max-width: auto;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    background: #f9f9f9;
}

.footer-section {
    /*
    margin-bottom: 2rem;
    padding-left:4rem;
    border: 1px solid black;
    */
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;   /* ⬅️ Esto centra horizontalmente */
    text-align: left;    /* ⬅️ Esto centra el texto */
    padding: 1rem;
}

.footer-section h3 {
    color: black;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: black;
}

.footer-projects{
    text-align:left;
}

#select_project_tag{
    font-weight: bold;
}

.about-me a{
    font-size:0.9rem;
}

#nav-photo{
    width: 150px;
    height: 150px;
    border-radius: 50%; /* más claro que 180px */
    overflow: hidden;   /* Esto es crucial para que se recorte la imagen */
}

#nav-photo img{
	width: 100%;
    height: 100%;
    object-fit: cover;  /* 🔥 Esto hace que la imagen se escale y recorte manteniendo proporción */
    display: block;
}


/* Contacto */
.contacto {
    padding: 4rem 1rem;
    text-align: center;
    background: #f9f9f9;
}

.contact-info {
    margin-top: 2rem;
}

@media (max-width: 900px) {
      .main-sections {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
      }
      .section {
        width: 95%;
        min-width: unset;
      }
      .hero-image {
        height: 180px;
        background-size: contain !important;
        height: clamp(60px, 20vh, 180px); /* 🔥 Se adapta entre 180px y 400px según altura de pantalla */
        background-color: #f9f9f9; /* por ejemplo, similar al tono de la imagen */
      }
      /* Si quito esto, se verá la imagen pero quedara franjas arriba y abajo*/
      .hero-image::after {
        content: '';
        position: absolute;
        left: 0; top: 0; right: 0; bottom: 0;
        /*background: linear-gradient(90deg, rgba(35,41,70,0.5) 0%, rgba(232,187,195,0.15) 100%);*/
        background-color: #f9f9f9;
      }

      .hero-title {
        font-size: 1rem;
      }

      .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 25px;
        height: 3px;
        background: #2c3e50;
        transition: 0.3s;
    }

    .hero h2 {
        font-size: 2rem;
    }

}