body {
      font-family: 'Sora', sans-serif;
      background-color: var(--primary-white);
}

html {
  scroll-behavior: smooth;
}

.section-container{
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-40) var(--spacing-16);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-32);
}

.outline{
    background: var(--gradient-100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.section-title{
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--spacing-8);
}

/* === HEADER === */

.header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-16);
    border-bottom: 1px var(--zinc-300) solid;
    max-width: var(--max-width);
    margin: 0 auto;
    z-index: 100;
    position: relative;
} 


/* 2. Estilos del Menú Móvil (Oculto por defecto) */
.header__nav {
    text-align: center;
    position: absolute;
    top: 100%; /* Lo posiciona exactamente debajo de la barra del header */
    left: 0;
    width: 100%;
    background-color: var(--primary-white); /* Reemplaza por tu variable de color de fondo, ej: var(--bg-color) */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Una sombra suave para separarlo del contenido */
    
    /* EL TRUCO DE ANIMACIÓN CON GRID */
    display: grid;
    grid-template-rows: 0fr; /* Altura 0 */
    transition: grid-template-rows 0.4s ease-in-out; /* Velocidad y suavidad de la animación */
}

/* 3. El contenedor de los links (Debe ocultar el contenido cuando la altura es 0) */
.header__nav ul {
    overflow: hidden; /* Esto es clave para que los links no se escapen cuando está cerrado */
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

/* 4. Estilo de los links en móvil para que parezcan una lista */
.header__nav li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #f0f0f0; /* Una línea separadora opcional */
}

.header__nav a {
    display: block;
    padding: var(--spacing-24); /* Espacio cómodo para tocar con el dedo (Touch target) */
    text-decoration: none;
    color: inherit;
}

/* 5. LA CLASE MÁGICA (La que agrega Javascript) */
.header__nav.is-active {
    grid-template-rows: 1fr; /* Se expande suavemente hasta el alto total de sus links */
}

/* --- ESTILOS PARA ESCRITORIO --- */
@media (min-width: 768px) {
    /* Reseteamos los estilos para pantallas grandes */
    .header__nav {
        position: static; 
        box-shadow: none;
        display: block; /* Rompemos el grid de móvil */

    }
    
    .header__nav ul {
        overflow: visible;
        flex-direction: row; /* Links uno al lado del otro */
        gap: 1.6rem; /* Separación entre links en PC */
        border: none;
        align-items: center;
        justify-content: center;
    }

    .header__nav li {
        width: auto;
        border-bottom: none;
    }

    .header__nav a {
        padding: 0;
    }

    /* Ocultamos el botón de la hamburguesa */
    .header__toggle {
        display: none;
    }
}


.header__brand{
    display: flex;
    align-items: center;
    gap: var(--spacing-12);
}

.header__title{
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-black);
}

.header__nav,
.header__cta{
    display: none;
}

.header__nav.is-active {
    display: block; 
    background-color: var(--primary-white);
    /* Aquí pondrías el position: absolute, background, etc., para tu menú desplegable */
}

/* === header queeries === */

@media (min-width:1024px){
    .header__title{
        z-index: 10000;
    }
    .header__nav, .header__cta{
        display: block;
    }
    .header__toggle{
        display: none;
    }
    .header__nav ul{
        display: flex;
        align-items: center;
        gap: var(--spacing-40);
        font-size: 16px;
        font-weight: 600;
        background-color: transparent;
    }

    .header__cta{
        background-color: var(--primary-black);
        color: var(--primary-white);
        border-radius:4px;
        padding: var(--spacing-16) var(--spacing-24);
    }

}


/* === HERO === */

.hero{
    padding: var(--spacing-40) var(--spacing-16);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-32);
    border-bottom: 1px var(--zinc-300) solid;
    margin: 0 auto;
}

.hero__content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-32);
}

.hero__title{
font-size: clamp(1.5rem, 4vw, 2.5rem);
font-weight: 400;
color: var(--primary-black);
}

.hero__title strong{
    font-weight: 800;
}

.hero__description{
    font-size: 12px;
    font-weight: 400;
    color: var(--zinc-500);
    line-height: 1.5;
}

.hero__image{
    width: 100%;
    height: auto;
    max-width: 50vh;
    border-radius: 4px;
    padding: 0;
    margin: 0;
}


.hero__social{
    display: flex;
    gap: var(--spacing-24);
    margin-top: var(--spacing-32); 
}

.social__link{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: 8px;
    background-color: var(--gradient-100);
    transition: all 0.5s ease;
    color: var(--primary-black);
    padding:var(--spacing-8)
}

.social__link :hover{
    background-color: var(--primary-black);
    color: var(--primary-white);
    transition:all 0.5s ease;
    padding: var(--spacing-8);
    border-radius: 8px;
}

.social__link:hover img{
    filter: invert(1);
        transition:all 0.5s ease;
}

.social__link img{
    width: 24px;
    height: 24px;
}

/* === hero queeries === */

@media (min-width:768px){

    .hero{
      flex-direction: row-reverse;
    }

    .hero__content{
        max-width: 50%;
    }
    .hero__description{
        max-width: 80%;
    }

}



/* === SKILLS === */

.skill-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    aspect-ratio: 1/1;

    padding: var(--spacing-24);
    border-radius: 4px;

    background-color: var(--primary-white);
    border: 2px solid var(--primary-black);

    transition: transform 0.15s ease;

    cursor: pointer;
    text-align: center;
}



.skill-card:hover{
    color: var(--primary-white);
    background-color: var(--primary-black);
    transform: translateY(-3px);
}

.skill-card:hover .skill-card__icon img{
    filter: invert(1);
    color: var(--primary-white);
}

.skill-card__icon img{
    width: clamp(48px, 4vw, 5rem);
    height: auto;
    margin-bottom: var(--spacing-16);
}

.skill-card__label{
    font-size: clamp(1rem, 1vw, 1.15rem);
    font-weight: 600;
}



.skills__grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-24);
    border-bottom: 1px var(--zinc-300) solid;
}


.skill-card:nth-child(n + 7){
    display: none;
}

@media(min-width:768px){
.skills__grid{
    gap: var(--spacing-32);
}
.skill-card:nth-child(n + 7){
    display: flex;
    }

.skill-card:nth-child(n + 9){
    display: none;
    }
    }


@media(min-width:1024px){

    .skills__grid{
        grid-template-columns: repeat(5,1fr);
    }

.skill-card:nth-child(n + 9){
    display: flex;
    }
}


/*
.skills__grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-8);
}


@media(min-width:768px){
    .skills{
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-24);
    }

    .skills__grid{
        grid-template-columns: repeat(4,1fr);
        gap: var(--spacing-32);
    }
}

@media(min-width:1024px){

    .skills__grid{
        grid-template-columns: repeat(5,1fr);
        gap: var(--spacing-40);
    }
}
    */

 SECTION --- */
.about__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-40);
}

.about__image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.about__image {
  width: 100%;
  height: auto;
border-radius: 8px;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  width: 100%;
}

.about__title {
  text-align: left;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  font-size: 16px;
  line-height: 1.5;
  color: var(--zinc-500);
}

@media (min-width: 768px) {
  .about__container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-40);
  }

  .about__image {
    width: 100%;
    max-width:60vh;
  }

  .about__image-wrapper {
    flex: 1;
    justify-content: center;
  }

  .about__content {
    flex: 1;
  }
}

/* EXPERIENCE SECTION */


.experience{
    background-color: var(--primary-black);
    color: var(--primary-white);
}


.experience-card{
    padding: var(--spacing-32) var(--spacing-24);
    border: 1px solid var(--zinc-500);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    align-items: center;

    display: grid;
    grid-template-columns: 32px 1fr;
    gap: var(--spacing-32);

    grid-template-areas: 'logo role' 'date date' 'description description';
}



.experience-card:hover{
    background-color: var(--zinc-800);
}



.experience-card__logo{
    grid-area: logo;
    width: 100%;
}

.experience-card__role{
    grid-area: role;
    font-size: 1.25rem;
    font-weight: 600;
    align-self: end;
}



.experience-card__date{
color: var(--zinc-300);
font-size: 1rem;
font-weight: 600;
grid-area: date;
}

.experience-card__description{
grid-area: description;
line-height: 1.5;
color: var(--zinc-300);
}

@media(min-width:768px){

    .experience-card{
        grid-template-columns: 32px 1fr auto;
        grid-template-areas:'logo role date' 'description description description';
    }

}



/* PROJECTS */ 

.projects{
    background-color: var(--primary-black);
    color: var(--primary-white);
}

.projects__title{
    color: var(--primary-white);
    margin-bottom: var(--spacing-32);
}

.project-card{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
    margin-bottom: var(--spacing-32);
}

.project-card__image-wrapper{
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.project-card__image{
    width: 100%;
    height: auto;
    display: block;
}

.project-card__content{
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
    justify-content: center;
}

.project-card__number{
    font-size: clamp(1.5rem, 3vw, 2rem );
    font-weight: 800;
    line-height: 1;
}

.project-card__title{
    font-size: clamp(1.25rem, 2.75vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
}

.project-card__description{
    color: var(--zinc-300);
    line-height: 1.5;
}

.project-card__link{
    display: inline-block;
    margin-top: var(--spacing-8);
}

@media(min-width:768px){
   
.project-card{
    flex-direction: row;
}

.project-card:nth-child(even){
    flex-direction: row-reverse;
}

.project-card__content{
    max-width: 50%;
}

    }




/* CONTACTO */

/* ===========================
   CONTACT SECTION
   =========================== */

.contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-56);
}

.contact__form-wrapper {
  width: 100%;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-20);
}

.contact__label {
  display: block;
  margin-bottom: var(--spacing-8);
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-black);
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: var(--spacing-16);
  border: 1px solid var(--primary-black);
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.contact__input:focus,
.contact__textarea:focus {
  border-color: var(--primary-black);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.contact__input:focus-visible,
.contact__textarea:focus-visible {
  outline: 2px solid var(--primary-black);
  outline-offset: 2px;
}

.contact__input::placeholder,
.contact__textarea::placeholder {
  color: var(--zinc-500);
}

.contact__textarea {
  min-height: 120px;
  resize: vertical;
}

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
  align-items: flex-start;
}

.contact__button {
  background: var(--primary-black);
  color: var(--primary-white);
  padding: var(--spacing-16) var(--spacing-32);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.contact__button:hover {
  opacity: 0.9;
}

.contact__socials {
  display: flex;
  gap: var(--spacing-24);
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-24);
}

.contact__title {
  text-align: center;
}

.contact__description {
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.5;
  color: var(--zinc-500);
  text-align: center;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  align-items: center;
}

.contact__email{
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--primary-black);
}

.contact__phone {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--primary-black);
}

@media (min-width: 768px) {
  .contact .container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-60); /* More space on desktop */
  }

  .contact__form-wrapper {
    flex: 1;
    order: 1; /* Form on the left if needed, or default order */
  }

  .contact__info {
    flex: 1;
    order: 2;
  }

  .contact__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .contact .section-container {
    flex-direction: row;
    align-items: center;
  }
}