@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: rgb(173, 48, 48);
    --grey: #414141;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    background: white;
}

section {
    padding-top: 100px;
    text-align: center;
    background: white;
}

ul {
    padding: 10px;
}

a {
    text-decoration: none;
    color: black;
}

hr {
    border: 1px solid var(--grey);
    margin: 30px 50% 30px 0;
}

.nav-logo {
    padding: 10px;
    display: flex;
    align-items: center;
}

.nav-bar {
    position: fixed;
    background: transparent;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    height: 60px;
    width: 100%;
    z-index: 5;
    font-size: 18px;
}

.container {
    width: 90%;
    display: inherit;
    max-width: 1200px;
    justify-content: inherit;
    margin: 0 auto;
    padding: 10px 20px;
}


.nav-menu {
    display: none;
    align-items: center;
    font-size: 25px;
    color: #f5f5f5;
}

.ul-links {
    align-items: center;
}

.ul-links li {
    display: inline;
    padding: 10px;
}



.container a {
    color: #f5f5f5;
}

.text-hover-red:hover {
    transition: 0.2s;
    color: var(--red);
}

.nav-title::before {
    content: "<";
    color: var(--red);
}

.nav-title::after {
    content: "/>";
    color: var(--red)
}

.nav-title {
    font-size: 24px;
}

.inicio {
    min-height: 100vh;
    display: flex;
    padding: 30px;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    position: relative;
}

.inicio-bg {
    background-color: #8e8e8e;
    background-image: url(./Assets/bg2.webp);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: -1;
}

.inicio-perfil {
    height: 500px;
    border-radius: 10%;
    margin-right: 40px;
    transition: filter 3s;
}

.inicio-titulo {
    font-size: 60px;
    text-shadow: 1px 1px black;
    color: var(--red);
    margin-bottom: 30px;
}

.inicio-titulo-secundario {
    font-size: 45px;
    color: #f5f5f5;
    text-shadow: 1px 1px black;
}

.inicio-contacto-item {
    font-size: 64px;
    padding: 5px;
    transition: all 0.3s;

    & * {
        color: #f5f5f5;
    }
}

.seccion-titulo {
    color: var(--grey);
    font-size: 48px;
    margin-bottom: 30px;
    text-align: left;
}

.seccion-subtitulo {
    color: var(--grey);
    text-align: start;
    margin-bottom: 20px;
}


.sobremi-descripcion {
    text-align: left;
    color: var(--grey);
    line-height: 1.5;
    font-size: 1.2em;
    width: 80%;

    & * {
        margin-bottom: 20px;
    }
}


.download-cv {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 50px;
}

.button-cv,
.nav-button-cv {
    background-color: var(--red);
    color: #f5f5f5;
    border-radius: 5px;
}

.button-cv {
    padding: 15px 5em;
}

.nav-button-cv {
    padding: 10px;
}


.button-cv:hover,
.nav-button-cv:hover {
    background-color: rgb(101, 29, 29);
    transform: scale(1.1);
}


.habilidad-titulo {
    color: var(--grey);
    text-align: left;
    margin-bottom: 40px;
}

.habilidad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.habilidad-item {
    border: 1px solid rgb(110, 110, 110);
    background-color: #f5f5f5;
    border-radius: 20px;

    width: 95%;

    & h2 {
        padding-top: 20px;
    }

    & hr {
        margin: 20px 25%;
    }
}

.icon-grid {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    min-height: 50%;
    gap: 10px;
    padding-bottom: 50px;
}

/* PORTFOLIO */

.card-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background-color: #f5f5f5;
    overflow:   hidden;
    
    display: flex;
    flex-direction: column;
    width: 300px;

    border: 1px solid grey;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);

    transition: transform 0.3s;
}

.card-header {
    position: relative;

    & img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-radius: 15px 15px 0 0;
        opacity: 0.8;
    }
}

.card-header-title, .card-header-skills p{
    text-shadow: black 1px 1px 5px ;
    color: rgb(255, 255, 255);
}
.card-header-title {
    width: 100%;
    position: absolute;
    left: 20px;
    bottom: 50px;

    text-align: left;
    font-size: 26px;
}

.card-header-skills {
    width: 100%;
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

.skill-html,
.skill-css,
.skill-js,
.skill-handlebars,
.skill-react,
.skill-bootstrap,
.skill-nodejs {
    margin-right: 5px;
    color: white;
    font-weight: 900;
}
.skill-liner {
    height: 5px;
    border-radius: 5px;
}

.skill-html {
    & .skill-liner {
        background-color: darkorange;
    }
}

.skill-css {
    & .skill-liner {
        background-color: lightblue;
    }
}

.skill-js {
    & .skill-liner {
        background-color: yellow;
    }
}

.skill-handlebars {
    & .skill-liner {
        background-color: rgb(255, 100, 0);
    }
}
.skill-react {
    & .skill-liner {
        background-color: blue;
    }
}
.skill-bootstrap {
    & .skill-liner {
        background-color: purple;
    }
}
.skill-nodejs {
    & .skill-liner {
        background-color: darkgreen;
    }
}
.card-body {
    padding: 20px;
    text-align: left;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 20px;

    & a {
        color: black;
        font-size: 20px;
        text-decoration: none;
    }
}

.card-footer-link {
    overflow: hidden;
    position: relative;
    height: 30px;
}

.card-footer-link:hover {
    & .skill-liner {
        animation: loading 2s linear infinite;
    }
}

.card-footer .skill-liner {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: var(--red);
    z-index: 1;
}

.card:hover {
    transition: transform 0.3s;
    transform: scale(1.03);
    & img{
        opacity: 1;
    }
}


@keyframes loading {
    0% {
        left: 0;
    }
    25% {
        left: 100%;
    }
    50%{
        left: 0;
    }
    75% {
        left: -100%;
    }
    100% {
        left: 0;
    }
}

/* CONTACTO */

.contacto-grid,
.inicio-contacto-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 0 4px;
}

.contacto-item i img,
.habilidad-item i img {
    max-height: 100px;
    max-width: 100px;
}


.contacto-item,
.inicio-contacto-item {
    -ms-flex: 33%;
    flex: 33%;
    max-width: 33%;
    padding: 0 4px;
    padding: 40px 0;
}

.contacto-item i:hover,
.inicio-contacto-grid i:hover {
    color: rgb(173, 48, 48);
}


.contacto-item i,
.contacto-item p {
    color: var(--grey);
    padding: 5px;
    transition: all 0.3s;
}

/* Pie de página */

footer {
    background-color: #222;
    color: #fff;
    padding: 10px;
    text-align: center;
}

footer p {
    font-size: 1.2em;
    margin: 0;
}


@media screen and (max-width: 991px) {
    .nav-menu {
        display: flex;
    }

    .ul-links {
        position: absolute;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        font-size: 32px;
        z-index: 1;
        transform: translateX(100%);
        opacity: 0;
        transition: all 0.5s;
        display: flex;
        justify-content: space-around;
        padding-bottom: 50vh;
    }

    .visible {
        display: flex;
        transform: translateX(0);
        opacity: 1;
        transition: all 0.5s;
    }

    .inicio {
        flex-direction: column;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .inicio-perfil {

        margin: -40px 0px 20px auto;
        height: 300px;
    }

    .inicio-titulo {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .inicio-titulo-secundario {
        font-size: 30px;
    }

    .nav-title {
        font-size: 20px;
    }

    .inicio-contacto-item {
        font-size: 48px;
    }

    .habilidad-grid {
        grid-template-columns: 1fr 1fr;
        margin: 0 auto;
        place-items: center;
    }

    .habilidad-item {
        margin: 8px 0;
    }

    .contacto-item {
        -ms-flex: 50%;
        flex: 50%;
        max-width: 50%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width:600px) {
    .contacto-item {
        -ms-flex: 100%;
        flex: 100%;
        max-width: 100%;
    }

    .download-cv {
        flex-wrap: wrap;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-links {
        gap: 10px;
    }
}

@media screen and (max-width:450px) {
    .habilidad-grid {
        grid-template-columns: 1fr;
    }
}


@keyframes showText {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}