*,
*::before,
*::after {
    box-sizing: border-box;
}

@font-face {
    font-family: Jost;
    src: url("./fonts/Jost-Regular.ttf");
}

@font-face {
    font-family: Garamond;
    src: url("./fonts/CormorantGaramond-Medium.ttf");
}

body {
    background-color: black;
    font-family: Jost, "Arial", sans-serif;
    /* font-family: Arial, Helvetica, sans-serif; */
    /* font-family: Garamond, serif; */
    color: white;
}

/* Header rules */


.header {
    display: flex;
    align-items: center;
    height: 9dvh;
    justify-content: center;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-links {
    display: flex;
    gap: 2em;
    /* margin-left: auto; */
    font-size: 1.2rem;
    list-style-type: none;
    justify-content: center;
    align-items: center;
}

.header-link {
    text-decoration: none;
    color: white;
    background-image: linear-gradient(white, white);
    background-size: 0% 0.1em;
    background-position-y: 100%;
    background-position-x: 0%;
    background-repeat: no-repeat;
    transition: background-size 0.2s ease-in-out;
}

.header-link:hover,
.header-link:focus,
.header-link:active {
    background-size: 100% 0.1em;
}


/* Main content rules */

.main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2em;
    height: 91dvh;
    margin-bottom: 1.5em;
}

.main-title {
    font-size: 2.5rem;
    text-align: center;
}

.main-text {
    text-align: center;
    font-size: 1.2rem;
    margin-top: -.5em;
}

.touch-button {
    padding: 1em 4.2em;
    background-color: red;
    color: white;
    margin-top: .5em;
}

/* Projects rules */

.projects-container {
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    gap: 4em;
    margin-bottom: 3em;
}

.projects-title {
    font-size: 2.5rem;
    margin-top: 1.5em;
    margin: 1.5em 0 -.5em;

}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.project-title {
    font-size: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5em;
}

.project-description {
    font-size: 1.2rem;
    margin-top: -.5em;
    line-height: 1.5;
}

.project-technologies {
    margin: 0;
    padding: 0 1em;
}

.project-technologies li {
    margin-top: .5em;
}

.project-link-and-icon {
    display: flex;
    align-items: center;
    gap: 2em;
    margin-top: 1em;
}

.project-github-link img {
    width: 30px;
    height: auto;
    margin-top: 1.8em;
}


.project-site-link {
    padding: .25em .5em;
    background-color: #C51E3A;
    color: white;
    margin-top: 1.5em;
    display: inline-block;
    text-decoration: none;
    background-image: linear-gradient(white, white);
    background-size: 0% 0.1em;
    background-position-y: 100%;
    background-position-x: 0%;
    background-repeat: no-repeat;
    transition: background-size 0.2s ease-in-out;
}

.project-site-link:hover,
.project-site-link:focus,
.project-site-link:active {
    background-size: 100% 0.1em;
}


/* About me rules */

.about-container {
    margin-top: 2em;
    margin-bottom: 4em;
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.about-title {
    font-size: 2.5rem;
}

/* .about-text,
.about-text-two {
    margin-top: .5em;
    line-height: 1.5;
} */

.about-sub-container {
    line-height: 1.5;
}

.resume-link {
    padding: 1em 4.2em;
    background-color: #C51E3A;
    color: white;
    margin-top: 1.5em;
    display: inline-block;
    text-decoration: none;
    background-image: linear-gradient(white, white);
    background-size: 0% 0.1em;
    background-position-y: 100%;
    background-position-x: 0%;
    background-repeat: no-repeat;
    transition: background-size 0.2s ease-in-out;
}

.resume-link:hover,
.resume-link:focus,
.resume-link:active {
    background-size: 100% 0.1em;
}


/* Back to top button rues */

#back-to-top-button {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: #C51E3A;
    color: white;
    border: none;
    outline: none;
    padding: 15px 20px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease-in-out;
}

#back-to-top-button:hover {
    background-color: #0056b3;
}

/* Footer rules */

.footer-container {
    margin-top: 1em;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5em;
    gap: 2.5em;
}

.footer-container img {
    width: 36px;
    height: auto;
}

@media (min-width: 768px) {
    body {
        padding: 0 4em;
    }

}

@media (min-width: 1024px) {
    html {
        font-size: 18px;
    }

    body {
        padding: 0 4em;
    }

    .header {
        justify-content: flex-end;
        margin-right: 5em;
        gap: 12em;
    }

    .main-content {
        align-items: flex-start;
    }

    .projects-container {
        padding: 2em;
    }

    .project-card {
        display: grid;
        grid-template-columns: 1fr 20px 1fr;
        grid-template-areas:
            "title . ."
            "description . image"
            "technologies . image"
            "link . .";
    }

    .project-image {
        grid-area: image;
        width: 100%;
        height: auto;
        align-self: center;
    }

    .project-description {
        grid-area: description;
        font-size: 1.2rem;
    }

    .project-technologies {
        grid-area: technologies;
        margin: 0;
        padding: 0 1em;
        font-size: 1rem;
    }

    .project-title {
        grid-area: title;
        font-size: 1.5rem;
    }

    .project-link-and-icon {
        grid-area: link;
        display: flex;
        align-items: center;
        gap: 2em;
        margin-top: 1em;
    }

    .project-site-link {
        font-size: 1rem;
    }

    .about-image {
        width: 100%;
        height: auto;
        border-radius: 10px;
        align-self: center;
        justify-self: center;
        margin-top: 2em;
    }

    .about-container {
        display: grid;
        grid-template-columns: 1fr 150px 1fr;
        grid-template-areas:
            "title title title"
            "image . details";
    }

    .about-title {
        grid-area: title;
    }

    .about-sub-container {
        grid-area: details;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        align-self: center;
    }
}

@media (min-width: 1440px) {
    html {
        font-size: 22px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 50px;
    }

    .about-sub-container {
        font-size: .8rem;
    }
}