/* general */
:root {
    --text-color: rgb(51, 51, 51);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Nunito", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    color: var(--text-color);
    margin: 0;
    background-color: white;
}

body.menu-open { /* for mobile menu */
    overflow: hidden;
}

@media screen and (min-width: 800px) {
    body { /* for mobile menu */
        overflow: auto !important;
    }
}

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

/* navigation */
#navigation {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 300px;
}

#nav-list {
    display: none;
    width: 100%;
    height: 100vh;
    background-color: white;
    padding: 0;
    list-style: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#nav-list.active {
    display: flex;
}

#navigation li {
    cursor: pointer;
    margin-bottom: 30px;
    display: block;
    position: relative;
    width: fit-content;
}

.nav-text {
    font-size: 1.2rem;
}

.nav-text>::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-color);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-text :hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-social {
    padding: 5px;
    transform: scale(1);
    transition: transform 0.4s;
}

.nav-social:hover {
    position: relative;
    transform: scale(1.3);
    transition: transform 0.4s;
}

.nav-social-icon {
    width: 2rem;
    height: 2rem;
    transform: translateY(8px);
}

.nav-button {
    position: absolute;
    right: 0;
    top: 0;
    margin: 25px;
    height: 2.7rem;
    width: 2.7rem;
    color: inherit;

    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    appearance: none;
}

#open-button {
    display: block;
}

#open-button.is-open {
    display: none;
}

#close-button {
    display: none;
}

#close-button.is-open {
    display: block;
}

@media screen and (min-width: 800px) {
    #navigation {
        align-items: end;
    }

    #nav-list {
        width: fit-content;
        margin-top: 10px;
        margin-right: 10px;
        display: inline !important;
        height: min-content;
    }

    #navigation li {
        margin-bottom: 0;
        display: inline-block;
    }

    .nav-text {
        margin-right: 15px;
    }

    .nav-button {
        display: none !important;
    }
}

/* header */
header {
    width: calc(100% - 30px);
    min-width: 270px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    overflow: hidden;
}

h1 {
    font-size: 3.9rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1.1;
}

@media screen and (max-width: 350px) {
    h1 {
        font-size: 3.3rem;
    }
}

/* about */
#about {
    width: max(300px, 100%);
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    scroll-margin-top: 70px;
}

#about-text {
    width: clamp(270px, 75vw, 400px);
    margin: auto;
    margin-top: 20px;
    flex-direction: column;
    align-content: center;
    padding: 0;
    padding-top: 20px;
}

#about-image {
    width: clamp(270px, 75vw, 400px);
    margin: auto;
    position: relative;
}

#about-image img {
    border-radius: 20px;
    width: 100%;
    margin: 0;
    aspect-ratio: 1;
}

#about-text h3 {
    color: var(--text-color);
    font-size: 2.2rem;
    line-height: 2.2rem;
    padding: 0;
    margin: 0;
    font-weight: 400;
}

#about-wrapper {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

#about-dynamic-wrapper {
    overflow: hidden;
    height: 2.2rem;
}

#about-dynamic-inner {
    display: flex;
    flex-direction: column;
    animation: rotate 16s infinite;
}

#about-dynamic-inner h3 {
    color: rgb(54, 82, 118);
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 2.2rem;
}

@keyframes rotate {
    0% {
        transform: translateY(0);
    }

    12% {
        transform: translateY(0);
    }

    16% {
        transform: translateY(-2.2rem);
    }

    28% {
        transform: translateY(-2.2rem);
    }

    32% {
        transform: translateY(-4.4rem);
    }

    44% {
        transform: translateY(-4.4rem);
    }

    48% {
        transform: translateY(-6.6rem);
    }

    60% {
        transform: translateY(-6.6rem);
    }

    64% {
        transform: translateY(-8.8rem);
    }

    76% {
        transform: translateY(-8.8rem);
    }

    80% {
        transform: translateY(-11.0rem);
    }

    92% {
        transform: translateY(-11.0rem);
    }

    96% {
        transform: translateY(-13.2rem);
    }

    100% {
        transform: translateY(-13.2rem);
    }

}

@media screen and (min-width: 870px) {
    #about {
        flex-direction: row;
    }

    #about-text {
        width: 40%;
        padding: 50px 5%;
        margin: 0;
    }

    #about-image {
        width: 50%;
        margin: 0;
    }

    #about-image img {
        width: 70%;
        margin: 0 20% 0 10%;
    }
}

/* projects */
#projects {
    width: calc(100vw - clamp(30px, 10vw, 100px));
    min-width: 270px;
    padding: 150px clamp(15px, 5vw, 50px);
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    scroll-margin-top: -100px;
}

#projects h2 {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 600;
    margin: 0;
}

#project-cards-section {
    position: relative;
    margin-top: 50px;
    max-width: 100%;
    width: fit-content;
    display: grid;
    gap: 50px;
    grid-template-columns: repeat(auto-fill, clamp(270px, calc(100vw - clamp(30px, 10vw, 100px)), 500px));
}

.project-card {
    box-shadow: 3px 3px 8px 0px #c3c3c3;
    -webkit-box-shadow: 3px 3px 8px 0px #969696;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
    height: 100%;
}

.project-card-text {
    width: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 30px 40px 30px;
}

.project-card-text h3 {
    margin: 15px 0 10px 0;
    font-weight: 700;
    font-size: 1.6rem;
}

.project-card-text p {
    font-size: 1.1rem;
    margin: 0;
}

.project-card-image {
    aspect-ratio: 25/17;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-card-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

/* footer */
#footer {
    width: 100%;
    min-width: 300px;
    color: rgb(146, 146, 146);
}

#footer-social {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: fit-content;
    margin: 0 auto 70px auto;
    font-size: 1.2rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
}

.footer-social-icon {
    margin-right: 10px;
    width: 2.2rem;
    height: 2.2rem;
}

.footer-social-link:hover * {
    color: var(--text-color);
}

.footer-social-link p {
    margin: 0;
}

#footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#footer-copyright p {
    margin-bottom: 10px;
    font-size: 0.8rem;
}

@media screen and (min-width: 900px) {
    #footer-social {
        flex-direction: row;
        gap: 100px;
    }
}