* {
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Montserrat';
    src: url(../font/Montserrat-Regular.ttf);
}

@font-face {
    font-family: 'Montserrat bold';
    src: url(../font/Montserrat-Bold.ttf);
}

@font-face {
    font-family: 'Montserrat medium';
    src: url(../font/Montserrat-Medium.ttf);
}

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: 18px;
    overflow-x: hidden;
}

nav {
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    height: 50px;
    color: #005FAF;
    align-items: center;
    padding: 0 20px;
    padding-bottom: 80px;
}

nav ul {
    display: flex;
    list-style: none;
    width: 40%;
    justify-content: flex-end;
}

nav ul li a {
    color: #005FAF;
    text-decoration: none;
    margin-right: 20px;
}

nav .logo {
    font-family: 'Montserrat Medium';
    text-transform: uppercase;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    height: 18px;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 99;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #005FAF;
    border-radius: 5px;
    transition: all 0.8s;
}

.menu-toggle span:nth-child(2) {
    transform-origin: 0 0;
}

.menu-toggle span:nth-child(3) {
    transform-origin: 0 0;
    width: 18px;
}

.menu-toggle span:nth-child(4) {
    width: 12px;
    transform-origin: 0 100%;

}

.menu-toggle input {
    width: 28px;
    height: 20px;
    position: absolute;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.menu-toggle input:checked~span:nth-child(2) {
    transform: rotate(45deg) translate(-1px, -1px);
    background-color: white;
}

.menu-toggle input:checked~span:nth-child(3) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle input:checked~span:nth-child(4) {
    transform: rotate(-45deg) translate(-1px, 0);
    width: 25px;
    background-color: white;
}

/* Header */
.container {
    width: 80%;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: center;
    justify-items: end;
}

img {
    display: block;
    width: 60%;
}

.main h5 {
    color: #005FAF;
    font-size: 1em;
    margin-bottom: 5px;
}

.main h1 {
    color: #005FAF;
    font-size: 2.5em;
}

.main p {
    font-size: 0.8em;
    margin: 25px 0 35px 0;
}

.main .button-hire {
    background-color: #005FAF;
    color: white;
    text-decoration: none;
    padding: 13px 33px;
    font-size: 0.7em;
    border-radius: 20px;
    text-transform: uppercase;
    margin-right: 10px;
    transition: ease-in-out 0.5s;
}

.main .button-hire:hover {
    background-color: white;
    border: 0.5px solid #005FAF;
    color: #005FAF;
    transform: scale(2);
}

.main .cv {
    font-size: 0.7em;
    color: #005FAF;
    text-decoration: none;
}

/* Service */
.container-service {
    width: 80%;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    align-items: center;
    justify-items: center;
}

h2 span {
    color: #333;
}

.item {
    text-align: center;
}

.item img {
    width: 350px;
    align-items: center;
    margin-bottom: 20px;
}

.item h2 {
    margin: 100px;
}

.item span {
    font-size: 0.8em;
}

.item:nth-child(2) {
    margin-top: 200px;
}

.item:nth-child(3) {
    margin-left: 300px;
}


/* Gallery */
h2 {
    margin: 20px 0;
    padding: 50px 0 0 0;
    text-align: center;
    color: #005FAF;
    font-size: 1.9em;
}


hr {
    width: 150px;
    height: 3px;
    border: none;
    margin: 0 auto;
    background-color: #E6B53E;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
}

.container ul li {
    list-style: none;
}

.container ul li img {
    width: 100%;
}

.gallery li {
    position: relative;
    overflow: hidden;
}

.gallery li span {
    display: block;
    position: absolute;
    top: 0;
    background-color: rgba(230, 181, 62, 0.8);
    font-family: 'Montserrat Bold';
    text-transform: uppercase;
    color: white;
    opacity: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    line-height: 300px;
    transform: scale(0);
}

.gallery li:hover span {
    opacity: 1;
    transform: scale(1);
    transition: 0.3s;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: .5s;
}

.overlay:target .card {
    border-radius: 14px;
    width: 35%;
    height: 55%;
    background-color: #fff;
    margin: 70px auto;
    display: grid;
    justify-items: center;
    padding-top: 10px;
    grid-template-rows: 2fr, 1fr;
    position: relative;
}

.overlay:target {
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

.overlay:target .card {
    animation: zoomfade .5s;
}

.overlay img {
    display: none;
}

.overlay .button-visit {
    display: none;
}

.overlay .button-github {
    display: none;
}

.overlay:target img {
    display: block;
}

.overlay:target .button-visit {
    display: inline-block;
}

.overlay:target .button-github {
    display: inline-block;
}

.overlay:target img {
    width: 80%;
    margin-top: 50px;
    border-radius: 5px;
    box-shadow: 0 0 5px #888;
}

.overlay:target .card .button-visit {
    background-color: #005FAF;
    height: 15px;
    padding: 4px 10px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.7em;
}

.overlay:target .card .button-github {
    background-color: #E6B53E;
    height: 15px;
    padding: 4px 10px;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.7em;
    text-align: center;
}

.card div {
    position: absolute;
    bottom: 10%;
}


/* Skill */
.section-skill {
    background-color: #E7F4FF;
    box-sizing: border-box;
    text-align: center;
    padding-bottom: 5px;
}

.section-skill span {
    font-size: 1.3em;
    font-family: 'Montserrat Medium', Arial, Helvetica, sans-serif;
}

.section-skill .text-2 {
    color: #005FAF;
}

.skill {
    width: 80%;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10px, 175px));
    justify-items: center;
}

/* Footer */
footer {
    background-color: #005295;
    text-align: center;
    padding: 15px 0;
    font-size: 0.7em;
}

footer span {
    color: rgb(192, 192, 192);
}

footer .made {
    color: #E6B53E;
    font-family: 'Montserrat Medium';
}

/* Animation */
@keyframes zoomfade {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* responsive */
@media screen and (max-width: 1024px) {
    nav ul {
        width: 50%;
    }

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

    img {
        order: -1;
        width: 50%;
        margin-bottom: 50px;
    }

    .container {
        justify-items: center;
    }

    .gallery li span {
        bottom: 50px;
    }

    .overlay:target .card {
        width: 90%;
        height: 40%;
    }
}

@media (max-width: 900px) {
    .section-service .service {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-service .service .card {
        width: 80%;
    }

    .section-service .service .card .title {
        margin: 0 0 10px 0;
    }
}

@media screen and (max-width: 578px) {
    nav ul {
        position: absolute;
        flex-direction: column;
        right: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        align-items: center;
        justify-content: space-evenly;
        background-color: #005FAF;
        z-index: 1;
        transform: translatey(-100%);
        transition: all 0.8s;
        opacity: 0;
        position: fixed;
    }

    nav ul li a {
        color: white;
    }

    nav ul.slide {
        opacity: 1;
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .main h1 {
        font-size: 2.2em;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0px;
    }

    .skill {
        grid-template-columns: repeat(auto-fit, minmax(10px, 143px));
    }
}