* {
    box-sizing: border-box;
 }

 html, body {
    margin: 0;
    padding: 0;
    background: var(--AZUL1);
    background-image: url('BG3_.webp');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    background-attachment: fixed; 
    font-family: "Figtree", sans-serif;
    font-size: 17px;
    font-weight: 400;
    font-style: normal;
    color: #ffffff;
    --AZUL1:#0070FF;
    --NARANJA1:#FF8000;
    --BLANCO: #f6f6f6;
    overflow-x: hidden;
}
  


nav {
    width: 100%;
    height: 100px;
    top: 0;
    left: 0;
    font-size: 15px;
    font-weight: 700;
    color:var(--AZUL1);
    z-index:1;
 }

 nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80%;
    margin: 0;
    padding: 0;
    gap: 35px;
 }
 
 nav ul li {
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 150px;
    list-style: none;
    margin-left: 0;
    transition: color 0.3s cubic-bezier(.21,-0.01,.03,.99);
    transition: scale 0.3s cubic-bezier(.21,-0.01,.03,.99);
        }      

 nav ul li:hover {
     color:#FF8000;
     scale: 105%;
        }

/* Normalize link styles in nav */
nav ul li a {
    color: inherit;
    text-decoration: none;
}
nav ul li a:visited {
    color: inherit;
}


nav ul li.active {
    list-style: none;
     margin-left: 0;
     font-weight: 500;
     background-color: var(--AZUL1);
     color:#ffffff;
        }    

nav ul li.active:hover{
    background-color:var(--NARANJA1);
}
 
 
 section{
     display:flex;
     position: relative;
     width:100%;
 }
 
 section.HEADER {
     align-items: center;
     justify-content: center;
}
section.HEADER video:hover {
    scale:102%;
    transition: scale 0.6s cubic-bezier(0,.66,0,1);
}

section.HEADER video {
    height: 17.5vh;
    width: auto;
}

section.HEADER img:hover {
    scale:102%;
    transition: scale 0.6s cubic-bezier(0,.66,0,1);
}

section.HEADER img {
    height: 17.5vh;
    width: auto;
}

/*anim logo*/

#LOGO-STATIC{
    position: absolute;
}
#LOGO-STATIC:hover {
    opacity: 0;
}

#LOGO-GIF{
    opacity: 0;
}

#LOGO-GIF:hover{
    opacity:1;
}



/*content grid animacion y proyectos*/

section.CONTENTGRID {
    text-decoration: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 15px;
    align-items:start;
    max-width: 1100px;
    margin-left: auto;
    margin-top: 15px;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}
section.CONTENTGRID img, video {
    padding: 0px;
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.CONTENTGRID video:hover, img:hover {
    scale: 105%;
}



section.COLUMNAS {
    text-decoration: none;
    display: flex;
    gap: 15px;
    align-items:start;
    max-width: 1100px;
    margin-left: auto;
    margin-top: 15px;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

section.COLUMNAS div {
    display: flex;
    justify-content: center;
    align-items: center;
}
section.COLUMNAS img {
   max-width: 100%;
  
    padding: 0px;
    display: block;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.COLUMNAS video {
    padding: 0px;
    display: block;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.COLUMNAS video:hover, img:hover {
    scale: 105%;
}



section.CONTENTGRID-nomargin {
    text-decoration: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(500px, 1fr));
    gap: 15px;
    justify-content: center;
    align-items: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}
section.CONTENTGRID-nomargin iframe {
    width: 100%;
    margin-bottom: 15px;
    display: block;
    cursor: pointer;
}

section.CONTENTGRID-nomargin video {
    width: 100%;
    margin-bottom: 15px;
padding:0px;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.CONTENTGRID-nomargin video:hover {
   scale:105%
}

section.CONTENTGRID-2 {
    text-decoration: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 15px;
    align-items:start;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 12px;
    margin-bottom: 12px;
    padding-left: 16px;
    padding-right: 16px;
}


    section.CONTENTGRID-2 video {
        width: 100%;
        height: auto;
        display: block;
        padding: 0px;
        cursor: pointer;
        transition: scale 0.7s cubic-bezier(0,.91,0,.99);
    }

    section.CONTENTGRID-2 img {
        width: 100%;
        height: auto;
        display: block;
        padding: 0px;
        cursor: pointer;
        transition: scale 0.7s cubic-bezier(0,.91,0,.99);
    }


section.CONTENTGRID-2 video:hover{
        scale: 105%;
    }

    section.CONTENTGRID-2 img:hover{
        scale: 105%;
    }

section.CONTENTGRID-2-VIMEO {
    text-decoration: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(500px, 1fr));
    gap: 15px;
    justify-content: center;
    max-width: 1100px;
    margin-left: auto;
    margin-top: -12px;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}



section.CONTENTGRID-2-VIMEO iframe {
    width: 100%;
    height: 300px;
    margin-bottom: 15px;
    padding: 0px;
    display: block;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.CONTENT {
    display: flex;
    flex-direction: column;
    gap:10px;
    margin-top:auto;
    margin-bottom: 12px;
}

section.CONTENT video, img {
    display: flex;
    cursor:pointer;
    margin-left: auto;
    margin-right: auto;
    padding-right: 16px;
    padding-left: 16px;
    max-width: 1100px;
    justify-content: center;
    align-items: start;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}


section.CONTENT video:hover {
    scale:105%;
}

#nohover:hover {
    scale:100%;
    cursor:default;
}

section.CONTENT iframe {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    width: 1100px;
    height:600px;
    padding-left: 16px;
    padding-right: 16px;
    justify-content: center;
    align-items: start;
}



/* Shared container to align with grid margins */
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.TITULO-PROYECTO {
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 1100px;
        margin-left: auto;
        gap:40px;
        margin-right: auto;
        padding-left: 16px;
        padding-right: 16px;
}

/*content grid illustration*/

section.CONTENTGRID-ILLUSTRATION {
    display: flex;            /* three columns side-by-side */
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;                /* space between columns */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;          /* keep previous margins */
}

/* Columns inside the grid */
section.CONTENTGRID-ILLUSTRATION .columna1,
section.CONTENTGRID-ILLUSTRATION .columna2,
section.CONTENTGRID-ILLUSTRATION .columna3 {
    flex: 1 1 0;              /* equal width columns */
    min-width: 0;
    display: flex;            /* stack items vertically */
    flex-direction: column;
    gap: 15px;                /* space between items in a column */
}

/* Remove old per-column margins/widths */
/* Images fill column width, keep aspect ratio */


section.CONTENTGRID-ILLUSTRATION img, video {
    width: 100%;
    padding: 0px;
    height: auto;
    display: block;
    cursor: pointer;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
}

section.CONTENTGRID-ILLUSTRATION img:hover {
    scale: 105%;
}

/* Group two small tiles side-by-side within a column */
section.CONTENTGRID-ILLUSTRATION .tile-row {
    display: flex;
    flex-direction: row;
    gap: 15px;                 /* match column/item spacing */
}

section.CONTENTGRID-ILLUSTRATION .tile.small {
    display: flex;
    width: 50%;
}

/* Small tiles take half of the row width */
section.CONTENTGRID-ILLUSTRATION .tile-row .tile.small {
    flex: 1 1 0;
}


/* Shared container to align with grid margins */
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/*content grid proyectos*/
div.tile-project:hover{
    scale: 105%;
}

div.tile-project {
    text-decoration: none;
    background-color: #ffffff;
    transition: scale 0.7s cubic-bezier(0,.91,0,.99);
    padding-bottom: 5px;
    border-radius: 2%;
}

/* Remove underline on links wrapping project tiles */
section.CONTENTGRID > a,
section.CONTENTGRID > a:visited,
section.CONTENTGRID > a:hover,
section.CONTENTGRID > a:active {
    text-decoration: none;
    color: inherit;
    display: block;
}



/* Ensure links inside project tiles are not underlined and inherit color */
div.tile-project a,
div.tile-project a:visited,
div.tile-project a:hover,
div.tile-project a:active {
    text-decoration: none;
    color: inherit;
}




/*estilos textos*/

#h1 {
    margin-left:10px;
    margin-right:10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--AZUL1);
}

#h2{
    margin-top: -12px;
    margin-left:10px;
    margin-right:10px;
    font-size: 14px;
    color: var(--NARANJA1);
}

#text{
    font-size: 13px;
    margin-left:10px;
    margin-right:10px;
    margin-top: -5px;
    color: var(--AZUL1);
}

#h1:hover{
    font-weight: 700;
}
#h2:hover{
font-weight: 500;
}

#text:hover{
    font-weight:500;
}



#h1-2 {
    margin-top: 0px;
    color: inherit;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    margin-left: 0;
    font-weight: 500;
    background-color: var(--AZUL1);
    color:#ffffff;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 150px;
       }    

      #h1-2:hover{
        background-color:var(--NARANJA1);
        scale: 105%;
        transition: color 0.3s cubic-bezier(.21,-0.01,.03,.99);
        transition: scale 0.3s cubic-bezier(.21,-0.01,.03,.99);
        
    }


#h2-2{
    margin-top: 20px;
    font-size: 16px;
    color: var(--NARANJA1);
}


#text-2{
    font-size: 15px;
    margin-top: 10px;
    color: var(--AZUL1);
}

#text-2-white{
    font-size: 15px;
    color: var(--BLANCO);
}



div.TEXTO1 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items:center;
    margin-top: 50px;
    margin-left: auto;
    margin: 0;
    margin-bottom: 20px;
    justify-content:center;
}



/*ABOUT ME*/

section.ABOUT {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items:center;
    margin-top: 50px;
}
 div.ABOUTMETEXTO p{
    margin: 0;
    margin-bottom: 35px;
    justify-content: center;
}
 div.ABOUTMEANIMVISUAL img{
    justify-content: center;
    height: 50vh;
    width: auto;
}




/*BOTONES*/

section.BOTONESBOTTOM{
    display:flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 85px;
}
section.BOTONESBOTTOM .Mail {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 150px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
section.BOTONESBOTTOM .Mail a {
    color: var(--NARANJA1);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

section.BOTONESBOTTOM .Mail a:hover{
color:var(--AZUL1);
}

section.BOTONESBOTTOM .Mail:hover,
section.BOTONESBOTTOM .IG:hover,
section.BOTONESBOTTOM .LinkedIn:hover {
    transform: translateY(-2px);
}

section.BOTONESBOTTOM .IG {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 7px;
    padding-left: 9px;
    padding-right: 9px;
    border-radius: 150px;
    margin-left: 15px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}


section.BOTONESBOTTOM .LinkedIn {
    background-color: #ffffff;
    padding-top: 9px;
    padding-bottom: 7px;
    padding-left: 9px;
    padding-right: 9px;
    border-radius: 150px;
    margin-left: 15px;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Swap PNGs on hover (match current HTML classes) */

section.BOTONESBOTTOM img {
    width: 20px;
    height: auto;
    padding: 0px;
    padding-bottom: 3px;

}
section.BOTONESBOTTOM .IG a img {
    content: url('../img/buttons/buttonIG.webp');
}

section.BOTONESBOTTOM .IG a:hover img {
    content: url('../img/buttons/buttonIG_hover.webp');
}
section.BOTONESBOTTOM .LinkedIn a img {
    content: url('../img/buttons/buttonLINKEDIN.webp');
}
section.BOTONESBOTTOM .LinkedIn a:hover img {
    content: url('../img/buttons/buttonLINKEDIN_hover.webp');
}

#ending-symbol {
    text-decoration: none;
    color:#f6f6f6;
    font-size: 18px;
    font-weight: 800;
    transition: all 0.7s cubic-bezier(0,.91,0,.99);
}

#ending-symbol:hover {
    color:var(--NARANJA1);
}


div.totop:hover {
    scale:110%;
}

div.totop {
    margin-top:40px;
    animation-name:flotar;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-direction:alternate-reverse;
    animation-timing-fuction:cubic-bezier(.57,-0.01,.46,.99);
    transition: all 0.7s cubic-bezier(0,.91,0,.99);
}

@keyframes flotar{
        0% {
            translate: 0 -3px;
        }
        100% {
            translate: 0 3px;
        }
    }


#nextproject-symbol {
    text-decoration: none;
    color:var(--AZUL1);
    font-size: 30px;
    font-weight: 300;
    transition: all 0.7s cubic-bezier(0,.91,0,.99);
}

#nextproject-symbol:hover {
    color:var(--NARANJA1);
}

div.next-project:hover {
    scale:110%;
    transform: translateX(5px);
}

div.next-project {
    transition: all 0.7s cubic-bezier(0,.91,0,.99);
}

div.previous-project:hover {
    scale:110%;
    transform: translateX(-5px);
}

div.previous-project {
    transition: all 0.7s cubic-bezier(0,.91,0,.99);
}



/* Lightbox overlay */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.lightbox.open {
    display: flex;
}



.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

#lightbox-video-player {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

@media (max-width: 1024px) {
    section.CONTENTGRID {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    section.CONTENTGRID-ILLUSTRATION .columna1,
    section.CONTENTGRID-ILLUSTRATION .columna2,
    section.CONTENTGRID-ILLUSTRATION .columna3 {
        flex: 1 1 1 calc(33.33% - 5px);   /* 2 columns on medium screens */
    }

    section.CONTENTGRID-nomargin {
        
        grid-template-columns: repeat(3, minmax(10px, 1fr));
        max-width: 1000px;
    }
        

    
    section.CONTENTGRID-2-VIMEO {
        
        grid-template-columns: repeat(2, minmax(300px, 1fr));
        max-width: 1000px;
       
    }
    
    section.CONTENTGRID-2-VIMEO iframe {
        height: 200px;
     
    }
    
    section.CONTENT img {
        max-width: 100%;
    }

    section.CONTENT iframe {
          width: 800px;
          height:430px;
    }

    
    
}
@media (max-width: 640px) {

    html,body {
        background-size: 400% 80%;
    }
    section.HEADER img {
        height: 10.5vh;
        width: auto;
    }
    section.CONTENTGRID {
        gap:5px;
   padding: 5px;
        flex-wrap: wrap;
    }
    section.CONTENTGRID .columna1,
    section.CONTENTGRID .columna2,
    section.CONTENTGRID .columna3 {
        flex: 1 1 calc(25% - 7.5px);  
    }

    

    section.CONTENTGRID-2 {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        gap: 3px;
    }

    section.CONTENTGRID-ILLUSTRATION {
        flex-wrap: wrap;
        gap:3px;
    }
    section.CONTENTGRID-ILLUSTRATION .columna1,
    section.CONTENTGRID-ILLUSTRATION .columna2,
    section.CONTENTGRID-ILLUSTRATION .columna3 {
        flex: 1 1 calc(25% - 7.5px); 
        gap:3px; 
    }

    section.CONTENT iframe {
        width:390px;
        height:200px;
  }

    nav {
        font-size: 12px;
     }

    nav ul {
        gap: 0px;
     }
     
     nav ul li {
        padding-left: 10px;
        padding-right: 10px;
     }

     section.ABOUTME div.ABOUTMETEXTO p{
        font-size: 15px;
    }

     section.ABOUTME .ABOUTMEANIMVISUAL img{
        justify-content: center;
        height: 40vh;
        width: auto;
    }

    section.BOTONESBOTTOM{
       
        scale: 0.9;
    }
    #h1-2 {
        font-size: 15px;
     }    
    
    #h2-2{
        font-size: 12px;
    }
    
    #text-2{
        font-size: 14px;
    }
    
    #text-2-white{
        font-size: 14px; 
    }

    #nextproject-symbol {
        font-size: 25px;
    }
    
    section.CONTENTGRID-nomargin {
        
        grid-template-columns: repeat(1, minmax(10px, 1fr));
        max-width: 1000px;
        gap:5px;
        height:100%;
        margin-bottom:5px;
    }
    section.CONTENTGRID-nomargin iframe, video {
        width: 100%;
        margin-bottom: 0px;
        height:100%;
    }

    section.CONTENTGRID-2-VIMEO { 
        grid-template-columns: repeat(1, minmax(300px, 1fr));       
    }
    
    section.CONTENTGRID-2-VIMEO iframe {
        height: 200px;
 }

 section.COLUMNAS {
    gap: 3px;
    max-width: 1100px;
    margin-left: auto;
    margin-top: 15px;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

.TITULO-PROYECTO {
    gap: 20px;
    margin-top: -20px;
}
    }
  