@font-face {
    font-family: 'Myfont';
    src: url('../font/Comfortaa-VariableFont_wght.ttf') format('truetype');
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Myfont';
    scroll-behavior: smooth;
}

/* navbar */
header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(20px);
}

/* Logo */
header .logo{
    position: relative;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 2em;
}

/* menu navbar */
header ul{
    position: relative;
    display: flex;
    gap: 40px;
}

header ul li{
    list-style: none;
}

header ul li a{
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 1.25em;
}

header ul li.activo a{
    color: #00A2FF;
}
header ul li:hover a{
    color: #00A2FF;
}

/* Home */
#home{
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 100px;
}

/* Titulo y descripcion */
#home .content{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 650px;
    z-index: 10;
}

#home .content h2{
    position: relative;
    font-size: 4.5em;
    color: #00A2FF;
}

#home .content p{
    position: relative;
    color: #fff;
    font-size: 1.2em;
    line-height: 1.6em;
}

/* Contáctame */
.btn{
    position: relative;
    display: inline-block;
    font-size: 1.25em;
    max-width: 200px;
    background: linear-gradient(315deg, #00ccff, #d400dc);
    color: #fff;
    text-align: center;
    padding: 18px 30px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-top: 10px;
    border-radius: 20px;
    transition: 0.5s;
}

.btn:hover{
    letter-spacing: 2px;
}

/* Img home */
#home .imgPerfil{
    position: absolute;
    bottom: 15px;
    right: 100px;
    max-height: 90vh;
    border-radius: 100%;
}

/* Habilidades */
#habilidades{
    position: relative;
    background-color: #34353a;
    min-height: 100vh;
    padding: 120px 100px;
}

/* Titulo y descripcion */
.txt{
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 40px;
}

.txt h2{
    font-size: 3em;
    color: #fff;
}

.txt p{
    max-width: 700px;
    text-align: center;
    color: #aaa;
    font-size: 1.1em;
}

/* Card Habilidad */
.containerHabilidadCard{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.containerHabilidadCard .cardHabilidad{
    position: relative;
    width: 200px;
    height: 250px;
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    border-radius: 20%;
    justify-content: center;
}

/* Porcentaje + color + punto del circulo */
.containerHabilidadCard .cardHabilidad .porcentage{
    position: relative;
    width: 150px;
    height: 150px;
}

.containerHabilidadCard .cardHabilidad .porcentage svg{
    position: relative;
    width: 150px;
    height: 150px;
    transform: rotate(270deg);
}

.containerHabilidadCard .cardHabilidad .porcentage svg circle{
    position: relative;
    width: 100%;
    height: 100%;
    fill: transparent;
    stroke-width: 2;
    stroke: #191919;
    transform: translate(5px,5px);
}

/* animacion */
.containerHabilidadCard .cardHabilidad .porcentage svg circle:nth-child(2){
    stroke: var(--clr);
    stroke-dasharray: 440;
    stroke-dashoffset: calc(440 - (440 * var(--num)) / 100);
    opacity: 0;
    animation: fadeIn 1s linear forwards;
    animation-delay: 2.5s;
}

@keyframes fadeIn{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

.punto{
    position: absolute;
    inset: 5px;
    z-index: 10;
    transform: rotate(calc(3.6deg * var(--num)));
    animation: animatePunto 2s linear forwards;
}

@keyframes animatePunto{
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(calc(3.6deg * var(--num)));
    }
}

.punto::before{
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--clr);
    border-radius: 50%;
}

/* Text card habilidad */
.numero{
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    animation: fadeIn 1s linear forwards;
    animation-delay: 2.5s;
}

.numero h2{
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 2em
}

.numero h2 span{
    font-weight: 300;
    color: #fff;
    font-size: 0.6em;
}

.numero p{
    font-weight: 300;
    font-size: 0.75em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

/* Proyectos */
#proyectos{
    position: relative;
    background-color: #2a2a2a;
    min-height: 100vh;
    padding: 120px 100px;
}

/* Card proyecto */
.containerProyectoCard{
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 40px;
        flex-wrap: wrap;
}

/* Fondo */
.containerProyectoCard .cardProyecto{
    position: relative;
    width: 300px;
    height: 400px;
    background: linear-gradient(315deg, #00ccff, #d400dc);
    margin: 10px;
    border-radius: 20px;
    overflow: hidden;
}

/* img de la card */
.containerProyectoCard .cardProyecto .imgBox{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.5s;
    z-index: 1000;
    border-radius: 20px;
    overflow: hidden;
    transform-origin: top;
}

.containerProyectoCard .cardProyecto:hover .imgBox{
    transform: translateY(30px) scale(0.5);
}

.containerProyectoCard .cardProyecto .imgBox img{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.containerProyectoCard .cardProyecto .contenidoTarjetaProyecto{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 30px;
    transform: translateY(100%);
    transition: 0.5s;
}

.containerProyectoCard .cardProyecto:hover .contenidoTarjetaProyecto{
    transform: translateY(0);
}

/* Text de la tarjeta */
.containerProyectoCard .cardProyecto .contenidoTarjetaProyecto .detalles{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.containerProyectoCard .cardProyecto .contenidoTarjetaProyecto .detalles h2{
    color: #fff;
    font-size: 1.5em;
    font-weight: 700;
}

.containerProyectoCard .cardProyecto .contenidoTarjetaProyecto .detalles span{
    color: #000 ;
    font-size: 0.9em;
    font-weight: 700;
}

/* enlaces de la tarjeta */
.enlaces{
    position: relative;
    display: flex;
    margin-top: 5px;
}

.enlaces li{
    list-style: none;
    margin: 4px;
}

.enlaces li a{
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.5em;
    text-decoration: none;
    transition: 0.5s;
}

.enlaces li a:hover{
    transform: rotate(360deg);
}

.iconoProyecto{
    width: 80%;
    height: 80%;
}

/* Contacto */
#contacto{
    position: relative;
    background-color: #34353a;
    min-height: 100vh;
    padding: 120px 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* contenedor */
.perfil{
    position: relative;
    width: 500px;
    height: 500px;
    background: #191919;
    border-radius: 50%;
    overflow: hidden;
}

/* animacion color*/
.perfil::before{
    content: '';
    position: absolute;
    inset: -10px 140px;
    background: linear-gradient(315deg, #00ccff, #d400dc);
    transition: 0.5s;
    animation: animate 4s linear infinite;
}

.perfil:hover::before{
    inset: -20px 0px;
}

@keyframes animate {
    0%{
        transform: rotate(0deg);
    }
    0%{
        transform: rotate(360deg);
    }
}

.perfil::after{
    content: '';
    position: absolute;
    inset: 6px;
    background: #191919;
    border-radius: 50%;
    z-index: 1;
}

/* Nombre + enlaces + img */
.infoPerfil{
    position: absolute;
    inset: 20px;
    border: 6px solid #191919;
    z-index: 3;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* img del contacto */
.infoPerfil img{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    pointer-events: none;
    z-index: 3;
}

.perfil:hover .infoPerfil img{
    opacity: 0;
}

/* titulo */
.infoPerfil h2{
    position: relative;
    font-size: 1.5em;
    text-align: center;
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.infoPerfil p{
    font-weight: 300;
    color: #aaa;
    margin-bottom: 20px;
}

/* enlaces */
.infoPerfil a{
    position: relative;
    padding: 10px 20px;
    background: #fff;
    color: #191919;
    border-radius: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.enlacesPerfil{
    gap: 10px;
    display: flex;
}

.enlacesPerfil a:hover{
    transition: 0.5s;
    letter-spacing: 3px;
    background: #00A2FF;
}

/* modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modalContent {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 30%;
    height: 50%;
    border-radius: 20px;
}

/* Titulo modal */
.modalContent h2{
    position: relative;
    font-size: 2em;
    text-align: center;
    color: #191919;
    font-weight: 700;
    width: 95%;
    margin-bottom: 10px;
}

.modalContent p{
    text-align: center;
    font-weight: 500;
    color: #191919;
}

/* Contenedor enlaces */
.gridSocial{
    margin-top: 40px;
    gap: 10px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* enlaces */
.social{
    display: flex;
    justify-content:center;
    align-items: center;
}

.enlacesModal{
    position: relative;
    display: flex;
    margin-top: 0px;
}


.enlacesModal li{
    list-style: none;
    margin: 4px;
}

.enlacesModal li a{
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.5em;
    text-decoration: none;
}

/* icono enlace */
.iconoRedes{
    width: 80%;
    height: 80%;
}

/* boton de cerrar modal */
.close {
    position: relative;
    color: #aaa;
    float:right;
    font-size: 3em;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Parte responsive de la web */

/* Responsive 900px */
@media (max-width: 900px){
    header{
        padding: 20px 50px;
    }
    /* Home */
    #home{
        padding: 150px 50px;
        flex-direction: column;
        padding-bottom: 0;
    }
    #home .content h2{
        font-size: 4em;
    }
    .btn{
        max-width: 160px;
        padding: 10px 20px;
        font-size: 1em;
    }
    #home .imgPerfil{
        position: absolute;
        height: 50vh;
        right: 50;
    }
    .txt{
        margin-bottom: 0;
        gap: 20px;
    }
    .txt h2{
        font-size: 2em;
    }
    /* Habilidades */
    #habilidades{
        padding: 100px 50px;
        grid-template-columns: repeat(2,1fr);
    }
    .containerHabilidadCard{
        padding: 100px 50px;
    }
    #proyectos{
        padding: 100px 50px;
        grid-template-columns: repeat(2,1fr);
    }
    .containerProyectoCard{
        margin-top: 20px;
    }
    /* Contactos */
    #contacto{
        padding: 100px 50px;
        grid-template-columns: repeat(2,1fr);
    }
    .modalContent{
    width: 50%;
    height: 50%;
    margin-top: 25%;
    }
    /* Navbar */
    .menuNavbar{
        position: relative;
        width: 30px;
        height: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
    .menuNavbar::before{
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: #fff;
        transform: translateY(-10px);
        transition: 0.5s;
        box-shadow: 0 10px #fff;
    }
    .menuNavbar::after{
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: #fff;
        transform: translateY(10px);
        transition: 0.5s;
    }
    header.active .menuNavbar::before{
        transform: translateY(-10px) rotate(45deg);
        box-shadow: 0 0px #fff;
    }
    header.active .menuNavbar::after{
        transform: translateY(-10px) rotate(315deg);
    }
    header ul{
        display: none;
    }
    header.active .menuNavbar{
        margin-top: 10px;
    }
    header.active ul{
        position: fixed;
        left: 0;
        top: 84px;
        width: 100%;
        height: calc(100vh - 84px);
        background: rgba(50,50,50,0.95);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        z-index: 10000;
        gap: 20px;
    }
    header.active ul li a{
        font-size: 2em;
    }
}

/* Responsive 700px */
@media (max-width: 700px){
    #home .content h2{
        font-size: 3em;
    }
    #habilidades{
        padding: 100px 50px;
    }
    #proyectos{
        padding: 100px 50px;
    }
    .containerProyectoCard .cardProyecto{
        width: 300px;
        height: 400px;        
    }
    #contacto{
        padding: 100px 50px;
    }
    .modalContent{
    margin-top: 25%;
    width: 50%;
    height: 50%;
    }
}

/* Responsive 550px */
@media (max-width: 550px){
    /* home */
    #home .content h2{
        font-size: 2em;
    }
    #home .content p{
        font-size: 0.7em;
    }
    /* habilidades */
    #habilidades{
        padding: 100px 50px;
    }
    #habilidades .txt h2{
        font-size: 1.8em;
    }
    #habilidades .txt p{
        font-size: 0.8em;
    }
    .containerHabilidadCard{
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
        margin-top: -80px;
    }
    .containerHabilidadCard .cardHabilidad{
        position: relative;
        width: 150px;
        height: 180px;
    }
    /* proyectos */
    #proyectos{
        padding: 100px 50px;
    }
    #proyectos .txt h2{
        font-size: 1.8em;
    }
    #proyectos .txt h2 p{
        font-size: 0.8em;
    }
    .containerProyectoCard .cardProyecto{
        width: 300px;
        height: 400px;        
    }
    /* contacto */
    #contacto{
        padding: 100px 50px;
    }
    .perfil{
        width: 300px;
        height: 300px;
    }
    .perfil::before{
        position: absolute;
        inset: -10px 120px;
    }
    .infoPerfil h2{
        font-size: 2em;
    }
    .infoPerfil p{
        font-size: 0.8em;
    }
    .enlacesPerfil a{
        width: 55px;
        font-size: 0.7em;
        font-weight: 700;
    }
    .modalContent{
    margin-top: 25%;
    width: 65%;
    height: 60%;
    }
    .modalContent h2 {
    font-size: 1.8em;
    width: 5%;
    }
    .iconoRedes {
    width: 50%;
    height: 50%;
}
}