:root {
    --color-light-50: #F0EDEE;
    --color-light-100: #F0EDEE98;
    --color-dark-800: #0A090C;
    --color-green-50: #07393CE6;
    --color-green-100: #07393C;
    --color-gradient: linear-gradient(90deg, #0A090C, #07393C, #0A090C);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

*::-webkit-scrollbar {
    width: 20px;
    background-color: var(--color-dark-800);
}

*::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background-color: var(--color-light-50);
}

*::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-light-100);
}

*::-webkit-scrollbar-thumb:active {
    background-color: var(--color-light-100);
}

a {
    text-decoration: none;
}

a::selection, img::selection, h2::selection, h1::selection, button::selection, p::selection, h3::selection {
    color: var(--color-light-50);
    background-color: var(--color-dark-800);
}

body {
    background: var(--color-gradient);
}

body header {
    position: fixed;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100vw;
    height: 10vh;
    padding: 20px;
    z-index: 10;
    background-color: var(--color-dark-800);
}

body header nav #btn-close {
    display: none;
}

body header nav .menu {
    position: fixed;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    text-align: center;
    width: 100vw;
    height: 0;
    overflow: hidden;
    top: 15vh;
    right: 0;
    margin-top: -50px;
    transition: height 0.4s ease;
    background-color: var(--color-dark-800);
}

body header nav .menu li {
    list-style: none;
    max-width: 60vw;
    font-size: 1.3em;
}

body header nav .menu li a, body main #home div h1, body main #contact section div a, body main #contact .back a, body footer p, .content-title {
    color: var(--color-light-50);
}

body main #home {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: justify;
}

body main #home .home-img {
    width: 100vw;
    height: 48vh;
    margin-top: 12vh;
    animation: scale-up-center 2s;
}

body main #home div {
    width: 60vw;
}

body main #home div h2 {
    color: var(--color-light-100);
}

body main #home div h1, body main #home div h2 {
    animation: appear 2s;
    font-size: 1.5em;
}

body main #home div h1 {
    text-align: center;
}

body main #home section {
    padding: 1vh 0 0 0;
}

body main #about, body main #knowledge, body main #contact {
    margin-top: 16vh;
}

.content-title {
    margin-bottom: 1vh;
}

body main #about, body main #about section {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-direction: column;
    text-align: center;
}

body main #about section p {
    width: 80%;
    font-size: 1em;
    font-weight: lighter;
    text-align: center;
    color: var(--color-light-50);
}

body main #about section div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

body main #about section a  {
    font-weight: normal;
    text-decoration: underline;
    color: var(--color-light-50);
}

body main #about section a:active {
    color: var(--color-dark-800);
    background-color: var(--color-light-100);
}

body main #knowledge {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

body main #knowledge .knowledge-title {
    width: 250px;
    margin: auto;
    color: var(--color-light-50);
    font-weight: lighter;
    letter-spacing: 5px;
    padding: 5px 0;
    margin-bottom: 10px;
    border-radius: 20px;
    background-color: var(--color-dark-800);
}

body main #knowledge .knowledge-item {
    margin-bottom: 50px;
}

body main #knowledge .knowledge-item p {
    text-align: center;
    color: var(--color-light-50);
}

body main #knowledge .knowledge-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

body main #knowledge .description {
    font-size: 0.9em;
    color: var(--color-light-100) !important;
    margin: 5px 0;
}

body main #projects .content-title {
    text-align: center;
}

body main #projects .galery-pai {
    display: flex;
    justify-content: center;
    padding: 20px;
}

body main #projects .galery-pai .galery-filho {
    width: 80%;
    max-width: 700px;
}

body main #projects .galery-pai .galery-filho .galery-neto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image {
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 10px;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image:hover {
    transform: scale(1.05);
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-light-50);
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    background-color: rgba(7, 57, 60, 0.85);
    padding: 8px 12px;
    border-radius: 5px;
    opacity: 1;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image .btns-projects {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image:hover .btns-projects {
    opacity: 1;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image .btns-projects button {
    background-color: var(--color-dark-800);
    color: var(--color-light-50);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

body main #projects .galery-pai .galery-filho .galery-neto .galery-image .btns-projects button:hover {
    color: var(--color-dark-800);
    background-color: var(--color-light-100);
}

body main .modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 9, 12, 0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
}

body main .modal.active {
    opacity: 1;
    visibility: visible;
}

body main .modal .modal-content {
    background-color: var(--color-green-100);
    padding: 35px;
    border-radius: 10px;
    max-width: 90%;
    text-align: center;
    color: var(--color-light-50);
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

body main .modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

body main .modal .modal-content img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid var(--color-dark-800);
}

body main .modal .modal-content h2 {
    margin: 10px 0;
}

body main .modal .modal-content p {
    font-size: 1rem;
    color: var(--color-light-100);
}

#modal-languages {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--color-light-100);
}

.alert-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 9, 12, 0.8);
    justify-content: center;
    align-items: center;
}

.alert-content {
    background-color: var(--color-green-100);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    color: var(--color-light-50);
}

.alert-content button {
    margin-top: 10px;
    background-color: var(--color-green-50);
    border: none;
    color: var(--color-light-50);
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.alert-content button:hover {
    background-color: var(--color-green-100);
}

body main .modal .modal-content .modal-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

body main .modal .modal-content .modal-links a {
    background-color: var(--color-dark-800);
    padding: 10px 15px;
    border-radius: 5px;
    color: var(--color-light-50);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

body main .modal .modal-content .modal-links a:hover {
    color: var(--color-dark-800);
    background-color: var(--color-light-100);
}

body main .modal .modal-content .close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-light-50);
    cursor: pointer;
}

body main #contact, body main #contact section, body main #contact section div {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

body main #contact {
    padding: 20px;
    background-color: var(--color-dark-800);
}

body main #contact section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 5px;
}

body main #contact section p a {
    color: #00ACFF;
}

body main #contact section div {
    gap: 30px;
    padding: 20px;
    flex-direction: row;
}

body main #contact p {
    font-size: 1.2em;
    color: var(--color-light-50);
}

body main #contact .back a {
    font-size: 0.9em;
    font-style: italic;
    box-shadow: 0 2px var(--color-light-100);
}

body footer {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 1vh;
    font-size: 0.7em;
    background-color: var(--color-dark-800);
}

@media only screen and (min-width: 768px) {
    #btn-menu, #btn-close {
        display: none;
    }

    body {
        background: var(--color-gradient);
    }

    body header {
        height: 10vh !important;
        background-color: var(--color-dark-800);
    }

    body header.ativo, body header nav .menu.ativo {
        height: 5vh !important;
    }

    body header nav .menu {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        flex-direction: row;
        width: 100vw;
        height: 10vh !important;
        top: 0;
        margin-top: 0;
        transition: 0.4s;
    }

    body header nav .menu li a, body main #home section a svg, body main #contact .back a {
        transition: 0.3s;
    }

    body header nav .menu li a:hover, body main #contact .back a:hover {
        color: var(--color-light-100);
        box-shadow: 0 2px var(--color-light-100);
    }

    body main #home {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        flex-direction: column;
    }
    
    body main #home .home-img {
        width: 98vw;
        margin-top: 16vh;
    }

    body main #home section {
        margin-top: 4vh;
    }

    body main #home section a {
        padding: 0 2vw;
    }
    
    body main #home section a svg {
        width: 60px;
        height: 60px;
    }

    body main #home section a svg:hover {
        fill: var(--color-light-100);
        transform: scale(1.2);
    }

    body main #about section p {
        width: 60%;
        font-size: 1.4em;
    }

    body main #about section a {
        transition: 0.3s;
    }

    body main #about section a:hover {
        cursor: pointer;
        color: var(--color-dark-800);
        background-color: var(--color-light-100);
    }

    body main #knowledge section {
        max-width: 85vw;
        flex-direction: row;
        flex-wrap: wrap;
    }

    body main #knowledge .knowledge-title {
        margin-bottom: 20px;
    }

    body main #knowledge .knowledge-grid {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        max-width: 60vw;
        gap: 60px;
        margin-bottom: 80px;
    }

    body main #knowledge .knowledge-item {
        margin-bottom: 0;
    }

    body main .modal .modal-content {
        max-width: 1000px;
        width: 100%;
        padding: 40px;
    }
}

@media only screen and (min-width: 1300px) {
    body main #projects .galery-pai .galery-filho {
        width: 100%;
        max-width: 900px;
    }
}

@media only screen and (min-width: 1600px) {
    body main #knowledge .knowledge-grid {
        max-width: 50vw;
    }

    body main #projects .galery-pai .galery-filho {
        width: 100%;
        max-width: 1200px;
    }
}

@media (prefers-reduced-motion: no-preference) {
   html {
       scroll-behavior: smooth;
   }
   
   :target {
       scroll-margin-top: .8em;
   }
}

@-webkit-keyframes scale-up-center {
   0% {
        -webkit-transform: scale(0.5);
                transform: scale(0.5);
   }
       
   100% {
        -webkit-transform: scale(1);
                transform: scale(1);
   }
}

@keyframes scale-up-center {
   0% {
        -webkit-transform: scale(0.5);
                transform: scale(0.5);
   }
       
   100% {
        -webkit-transform: scale(1);
                transform: scale(1);
   }
}

@keyframes appear {
   0% {
       opacity: 0;
   }

   100% {
       opacity: 100;
   }
}