/* Global styles */
*,
*::after,
*::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Assistant';
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

h1,
h2,
h3 {
    font-weight: 700;
}

.button-flex {
    white-space: nowrap;
    gap: 3%;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    margin: 10px 0;
}

.button-flex>a>button {
    width: 100%;
}


/* Site Header and Navbar */
.page-header {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    align-items: center;
    box-shadow: 0px 2px 20px #121212;
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: white;
}

.page-header>nav ul {
    display: none;
    gap: 0.5rem;
    padding: 5px;
}

.page-header li {
    list-style: none;
}

.page-header li:hover {
    filter: brightness(0.95);
}

.page-header>.name {
    font-family: 'Kaushan Script';
    margin-left: auto;
    align-self: flex-start;
    margin-top: 15px;
}


.page-header>img {
    width: 50px;
    border-radius: 50%;
    align-self: flex-start;
}

.page-header ul li a {
    text-decoration: none;
    color: #343434;
    transition: color 1s transform 1s;
}

.page-header ul li:hover a {
    color: #2ce0ea;
    transform: scale(1.1);
}

/* Hamburger */

#toggle-hamburger:checked~ul {
    display: flex;
    flex-direction: column;
}

#toggle-hamburger {
    opacity: 0;
    position: absolute;
    z-index: 99;
}


nav span {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;

    background: #cdcdcd;
    border-radius: 3px;

    z-index: 1;

    transform-origin: 4px 0px;

    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        opacity 0.55s ease;
}

nav span:first-child {
    transform-origin: 0% 0%;
}

nav span:nth-last-child(2) {
    transform-origin: 0% 100%;
}

nav input:checked~span {
    opacity: 1;
    transform: rotate(45deg) translate(-2px, -1px);
    background: #232323;
}

nav input:checked~span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

nav input:checked~span:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
}

/* main content header */

.main-header,
.contact {
    aspect-ratio: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url("../images/bg.jpeg");
    background-size: 100% 100%;
    background-color: #B3F3F7;
    background-blend-mode: multiply;
}


.main-header h1,
.main-header p {
    z-index: 1;
    text-align: center;
}

/* Technologies */
.technologies {
    display: flex;
    justify-content: center;
    box-shadow: 0px 0px 6px #B6B6B6;
}

.technologies ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}

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

.technologies img {
    border-radius: 50%;
    width: 3rem;
    transition: width, 1s;
    background-color: transparent;
}

/* About me */
.about-me {
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-me>div {
    text-align: center;
    padding: 0 10px;
}

.about img {
    width: 60%;
}

/* Download CV */
.cv {
    background-color: #2e2e2e;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.cv>img {
    width: 30%;
    transform: scale(0.8) rotateZ(-20deg);
}

.cv-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cv-inner>p {
    margin-top: 0;
    text-align: center;
}

.cv-inner>a {
    border-radius: 20px;
    color: #2e2e2e;
    text-decoration: none;
}

#download-cv {
    border-radius: 20px;
    border: none;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    background-color: #2ce0ea;
    cursor: pointer;
}

#download-cv:hover {
    background-color: #26c0c8;
}

#download-cv:active {
    transform: scale(0.95);
}

#download-cv>img {
    max-width: 32px;
    display: inline-block;
}

/* Gallery of jobs */

.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f3f3f3;
    padding: 20px 0;
}

.gallery-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}


/* cards */
.card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: clamp(300px, 65%, 340px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 10px 10px 10px #e0e0e0;
    padding-bottom: 10px;
    transition: box-shadow 1s;
    min-height: 355px;
}

.card:hover {
    box-shadow: 0 0 40px hsl(0 0% 0% / 0.4);
}

.card>img {
    width: 100%;
}

.card>p {
    text-align: center;
    margin: 10px;
}

.card button,
.modal .button-flex button,
.page-header>button {
    background-color: #2ce0ea;
    border-radius: 20px;
    border: none;
    box-shadow: 2px 2px 5px #252525;
    line-height: 2rem;
    padding: 0 20px;
    cursor: pointer;
}

:is(.card, .modal .button-flex, .page-header) button:hover {
    background-color: #26c0c8;
}

:is(.card, .modal .button-flex, .page-header) button:active {
    transform: scale(0.95);
    box-shadow: 0px 0px 5px #252525;
}

/* Contact */

.contact {
    text-align: center;
    padding: 20px 5px;
}

.contact>form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact>form>.form-control {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact>form label {
    align-self: flex-start;
}

.contact>form input,
.contact>form textarea {
    border-radius: none;
    border: none;
    border-bottom: 2px solid #34343486;
    max-width: 400px;
}

.contact>form>button {
    align-self: flex-start;
    padding: 5px 15px;
    border: none;
    background-color: #2ce0ea;
    font-weight: 600;
}

/* ref links */

.reflinks {
    background-color: #383838;
}

.eng {
    direction: ltr;
}

.reflinks>nav {
    padding: 30px 0;
}

.reflinks>nav ul>li {
    text-align: center;
    list-style: none;
    min-width: 45%;
    max-width: 80px;
    flex-basis: 50%;
    margin-bottom: 25px;
}


.reflinks>nav ul {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    margin: 0;
}


.reflinks>nav ul>li>a {
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-overflow: ellipsis;
}

.reflinks>nav ul>li>a>div>span {
    display: block;
}

.reflinks>nav ul>li>a img {
    margin-bottom: 20px;
    width: fit-content;
}

/* credits */

.credits {
    background-color: #252525;
    color: white;
    display: flex;
    align-items: center;
    flex-direction: column;
}



/* Media query */
@media only screen and (min-width:400px) {
    .button-flex {
        flex-direction: unset;
    }
}

@media only screen and (min-width:450px) {

    .page-header>nav :is(input, span) {
        display: none;
    }

    .page-header>nav :is(ul, #toggle-hamburger:checked~ul) {
        display: flex;
        flex-direction: row;
    }

    .reflinks>nav ul>li>a>div>span {
        display: unset;
    }

    .reflinks>nav ul>li {
        flex-basis: 33%;
        min-width: 33%;
    }
}

@media only screen and (min-width:550px) {

    /* main-header */
    .main-header>h1 {
        font-size: 4rem;
    }

    .main-header>p {
        font-size: 1.5rem;
    }

    /* Technologies size */
    .technologies ul li img {
        width: 86px;
    }

    /* About me rearange */
    .about-me {
        flex-direction: row;
        align-items: flex-start;
        margin-top: 20px;
        padding: 0 20px;
    }

    .about-me img {
        width: 30%;
        max-width: 290px;
        align-self: flex-start;
    }

    .about-me>div {
        text-align: start;
    }

    .about-me>div>h2 {
        margin: 0;
        margin-top: auto;
    }

    /* CV Rearrange */
    .cv {
        flex-direction: row-reverse;
        justify-content: space-around;
    }

    .cv-inner {
        align-items: flex-start;
    }

    .cv-inner>p {
        text-align: start;
    }

    .cv>img {
        width: 20%;
        max-width: 150px;
    }

    /* Gallery */

    .gallery-cards {
        flex-wrap: wrap;
        flex-direction: row;
        justify-content: center;
        max-width: 1000px;
        gap: 30px;
    }

    .card {
        width: max(40%, 340px);
        max-width: 290px;
    }

    /* Contact */
    .contact {
        padding: 2% 15%;
        align-items: flex-start;
    }

    .contact>p {
        text-align: start;
    }



    /* Credits */

    .credits {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media only screen and (min-width:750px) {

    /* Reflinks */
    .reflinks>nav ul>li {
        flex-basis: auto;
        min-width: 0;
        margin-bottom: 0;
    }
}

/* Eng side */
.side-eng>.page-header>.name {
    margin-left: auto;
}

/* Modal */
.modal {
    display: none;
    user-select: none;
}

.modal-content {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: fit-content;
    height: 70vh;
    background-color: rgb(106, 106, 106);
    z-index: 10;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 5px 5px 5px hsl(0 0% 0% / 0.4);
}

.modal .project-image {
    aspect-ratio: 5/3;
    width: 100%;
    max-width: 600px;
    object-fit: cover;
    height: 50%;
    border-radius: 0 5px 5px 0;
}



.modal-close {
    position: fixed;
    width: 2rem;
    line-height: 2rem;
    color: white;
    aspect-ratio: 1;
    border-radius: 5px;
    right: 10px;
    z-index: 11;
    background-color: #2ce0ea;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    align-self: normal;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9;
    background-color: #25252525;
    backdrop-filter: blur(2px);
}

.modal-body {
    padding: 15px;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    background-color: #bebebe;
    border-radius: 5px 0 0 5px;
}

.modal .technologies>img {
    zoom: 150%;
}