* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body * {
    font-family: "Poppins", serif;
    font-weight: 500;
    font-style: normal;
    color: white;
}

body {
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100vw;
}

.animated-background {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000000, #000000, #000000, #1a414c, #000000, #0c0000);
    background-size: 300% 300%;
    animation: gradientAnimation 20s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#menu {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.419);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15.5px);
    -webkit-backdrop-filter: blur(15.5px);
    z-index: 10;
    overflow: hidden;
}

#menu a {
    text-decoration: none;
    font-weight: 300;
    padding: 15px 8px;
    position: relative;
    z-index: 2;
    color: white;
    font-size: 16px;
    transition: color 0.3s ease;
}

#one {
    margin-left: 20px;
}

#four {
    margin-right: 15px;
}


#hover-bg {
    position: absolute;
    top: 15;
    left: 0;
    width: 110px;
    height: 55.5px;
    border-radius: 30px;
    transition: transform 0.3s ease, background 0.5s ease;
    z-index: 1;
}

.hover-color {
    background: rgba(255, 255, 255, 0.118);
}

#presentation {
    width: 100vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#me {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    overflow-y: hidden;
    height: 100px;
    margin-bottom: -10px;

    h1 {
        font-size: 23px;
        font-weight: 600;
        text-align: end;
        margin-bottom: -7px;
    }

    p {
        font-weight: 400;
        font-size: 12px;
    }
}

#photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 1px solid white;
    transition: transform 0.5s;
    cursor: pointer;
}

#based {
    display: flex;
    align-items: center;
    gap: 4px;
}

#name-title {
    font-size: 23px;
    font-weight: 600;
    text-align: end;
    margin-bottom: -7px;
}

#br-icon {
    transition: transform 0.5s;
}

.icon {
    transition: transform 0.5s;
}

#music-title {
    transition: transform 0.5s;
}

#photo {
    position: relative;
}

#photo.clicked {
    animation: rotateImage 5s infinite linear;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.icon.clicked {
    transform: rotate(180deg);
    /* Invertendo o ícone */
}

#music-title.clicked {
    animation: slideText 10s infinite linear;
}

@keyframes slideText {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

#br-icon {
    display: block;
}

#play-icon {
    display: none;
}



h2 {
    font-size: 90px;
    font-weight: 600;
    margin-bottom: -50px;
    transform: scaleY(1.1);
}

h3 {
    font-size: 90px;
    font-weight: 600;
}

#dev {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-right: 10px;
}

#contact {
    text-decoration: none;
    border: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    width: 140px;
    height: 40px;
    border-radius: 50px;
    gap: 5px;
    transition: transform 0.5s ease;
}

#contact:hover {
    transform: scale(1.1);
}

#contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.493), transparent);
    transition: left 0.7s ease;
}

#contact:hover::before {
    left: 100%;
    /* Quando passar o mouse, o brilho vai do lado direito para o esquerdo */
}

#contact span {
    position: relative;
    z-index: 2;
    /* Fica acima do brilho */
}

#socials {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
    margin-top: -10px;

    a {
        height: 60px;
        width: 52px;
        padding-top: 5px;
        padding-left: 3px;
        padding-right: 2px;
    }
}

.icon {
    border: 1px solid white;
    width: 45px;
    height: 45px;
    font-size: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.7s ease;
    position: relative;
    overflow: hidden;
}

.icon:hover {
    transform: scale(1.1) rotate(-12deg);
}

.icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.493), transparent);
    transition: left 0.3s ease;
    z-index: 1;
    /* Fica por cima do botão */
}

.icon:hover::before {
    left: -40px;
    /* Quando passar o mouse, o brilho vai do lado direito para o esquerdo */
}

.icon span {
    position: relative;
    z-index: 2;
    /* Fica acima do brilho */
}

/* Icon arrow down */

#arrow_down {
    margin-top: -30px;

    .icon {
        border: none;
    }

    .icon:before {
        display: none;
    }

    .icon:hover {
        transform: none;
    }

    padding-bottom: 60px;
}

/* Corpo do Portifólio */

#portifolio {
    width: 750px;
}

h4 {
    font-size: 26px;
    font-weight: 200;
    padding-bottom: 20px;
    padding-top: 50px;
}

#button {
    width: 100%;
    display: flex;
    flex-direction: row;
    height: 32px;
    margin-bottom: 15px;

    button {
        all: unset;
        cursor: pointer;
        font-weight: 400;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50%;
        height: 100%;
        border-radius: 6px;
        background-color: rgba(0, 0, 0, 0.134);
        color: white;
    }

    .active {
        background-color: white;
        color: black;
    }
}

#experienceTable {
    display: flex;
    flex-direction: row;
    position: relative;
}

#line {
    width: 7%;
    border: 1.5px solid white;
    border-radius: 6px 0 0 6px;
}

#container {
    border: 1.5px solid white;
    width: 93%;
    border-radius: 0 6px 6px 0;
    padding-inline: 20px;
    padding-block: 25px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

#work {
    display: flex;
    flex-direction: row;
    gap: 20px;

    img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: 2px solid white;
        position: absolute;
        left: calc(7% - 30.5px);
    }

    #workText {
        margin-left: 35px;
    }

    .t1 {
        font-size: 18px;
    }

    .t2 {
        font-size: 15px;
        font-weight: 300;
        color: rgb(169, 169, 169);
    }

    p {
        word-wrap: break-word;
        word-break: break-word;
        font-size: 15px;
        font-weight: 400;
    }
}

/* TeckStack */

#techIcons {
    display: flex;
    align-items: center;
    justify-content: baseline;
    flex-wrap: wrap;
    padding-top: 10px;
    gap: 10px;
    margin-top: -35px;

    .techIcons {
        display: flex;
        transition: transform 0.3s ease;
        align-items: center;
        background-color: #00000042;
        border-radius: 15px;
        flex-direction: row;
        padding: 5px;
        padding-right: 20px;
        padding-left: 15px;
        gap: 10px;

        p {
            font-weight: 300;
        }

        .icon {
            border: none;
            border-radius: 0;
            width: 35px;
            height: 35px;
            font-size: 35px;
        }

        .icon:before {
            display: none;
        }

        .icon:hover {
            transform: none;
        }
    }

    .techIcons:hover {
        transform: translateY(-10px);
    }
}

#projectContainer {
    width: 100%;
    height: calc();
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 30px;
    padding-top: 10px;
    margin-bottom: 90px;

    .projectBox {
        transition: transform 0.3s ease;
        width: 48%;
        border: 1.5px solid white;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        cursor: pointer;

        /* pointer ao passar o mouse */
        img {
            width: 100%;
        }

        .projectText {
            margin: 10px;

            .t1 {
                font-size: 20px;
                margin-bottom: 15px;
            }

            .t2 {
                font-size: 14px;
                font-weight: 300;
                color: rgb(169, 169, 169);
                margin-bottom: 15px;
            }

            .languagues {
                height: 25px;
                display: flex;
                align-items: end;
                gap: 10px
            }

            p {
                background-color: white;
                border-radius: 6px;
                color: black;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 12px;
                font-weight: 400;
                padding: 2px;
                padding-inline: 7px;
            }
        }
    }

    .projectBox:hover {
        transform: translateY(-10px);
    }

    /* Aumenta tamanho do popup/modal para visual maior */
    .modal-content {
        width: 960px;
        /* maior para acomodar 3 colunas */
        max-width: 96vw;
    }

    .modal-gallery img {
        max-height: 520px;
    }

    /* grid interno do modal: 3 colunas (info | gallery-col1 | gallery-col2) */
    .modal-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 18px;
        align-items: start;
    }

    .modal-col {
        display: block;
    }

    .modal-col--info {
        padding-right: 6px
    }

    .modal-col--gallery {
        grid-column: 2 / 4;
        /* ocupa colunas 2 e 3 */
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .gallery-main {
        width: 100%;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        min-height: 320px
    }

    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 6px
    }

    .gallery-thumbs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .gallery-thumbs img {
        width: 100%;
        height: 90px;
        object-fit: cover;
        border-radius: 6px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: transform .15s ease, border-color .15s ease
    }

    .gallery-thumbs img:hover {
        transform: scale(1.02);
    }

    .gallery-thumbs img.selected {
        border-color: white
    }

    /* Responsivo: em telas pequenas, empilhar colunas */
    @media (max-width: 900px) {
        .modal-grid {
            grid-template-columns: 1fr;
        }

        .modal-col--gallery {
            grid-column: auto
        }

        .gallery-thumbs {
            grid-template-columns: repeat(3, 1fr);
        }

        .gallery-main {
            min-height: 200px
        }
    }
}

/* hint para seção de projetos */
/* header da seção de projetos (texto + ícone à esquerda, título à direita) */
.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.project-hint-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 20px;
    padding-top: 50px;
}

.project-hint-text {
    color: rgb(169, 169, 169);
    font-weight: 300;
    font-size: 14px
}

.project-hint-icon-inline {
    font-size: 300px;
    color: white;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.project-hint-icon-inline:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

/* força tamanho menor para o ícone e SVG interno */
.project-hint-icon-inline {
    font-size: 14px;
    padding: 6px;
    width: auto;
    height: auto
}

.project-hint-icon-inline iconify-icon,
.project-hint-icon-inline svg {
    width: 16px !important;
    height: 16px !important;
    display: block
}

/* Footer (Até que enfim) */

#footerBox {
    border: 1.5px solid white;
    padding: 20px;
    height: 200px;
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;

    .footerName {
        display: flex;
        justify-content: end;
        align-items: baseline;
        flex-direction: column;
        font-size: 60px;
        margin-bottom: -15px;

        div {
            margin-top: -30px;
            font-weight: 600;
        }
    }

    #footerText {
        display: flex;
        justify-content: center;
        gap: 20px;

        .footerElement {
            display: flex;
            align-items: baseline;
            flex-direction: column;
            width: 140px;

            h6 {
                font-size: 20px;
                font-weight: 500;
            }

            a {
                font-size: 17px;
                font-weight: 300;
                color: rgb(169, 169, 169);
                text-decoration: none;
            }
        }
    }
}

#footerSignature {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    margin-top: 10px;
    margin-bottom: 90px;

    p {
        font-size: 18px;
        font-weight: 300;
        color: rgb(169, 169, 169);
    }
}

@media (max-width: 1030px) {
    h2 {
        font-size: 60px;
        margin-bottom: -35px;
    }

    h3 {
        font-size: 60px;
    }

}

@media (max-width: 770px) {
    #presentation {
        height: 90vh;
    }

    h2 {
        font-size: 45px;
        margin-bottom: -20px;
    }

    h3 {
        font-size: 36px;
    }

    #me {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
        gap: 20px;
        margin-bottom: 0;

        img {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 1px solid white;
        }
    }


    #dev {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    #contact {
        text-decoration: none;
        border: 1px solid white;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        width: 90px;
        height: 30px;
        border-radius: 50px;
        gap: 5px;
    }

    #hover-bg {
        width: 90px;
    }

    #one {
        margin-left: 15px;
    }

    #four {
        margin-right: 8px;
    }

    #socials {
        width: 100vw;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        gap: 0px;
        margin-top: 0px;
    }

    .icon {
        border: 1px solid white;
        width: 32px;
        height: 32px;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    #menu {
        width: 95vw;
        position: fixed;
        left: 50vw;

        a {
            font-size: 14px;
        }

        gap: 0;
        justify-content: space-between;
    }

    #portifolio {
        width: 95vw;
    }

    #line {
        width: 10%;
    }

    #container {
        width: 90%;
    }

    #work {
        img {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 2px solid white;
            position: absolute;
            left: calc(7% - 12px);
        }
    }

    #projectContainer {
        .projectBox {
            width: 100%;
        }
    }

    #footerBox {
        border: 1.5px solid white;
        padding: 20px;
        height: 350px;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        justify-content: baseline;

        .footerName {
            display: flex;
            justify-content: end;
            align-items: baseline;
            flex-direction: column;
            font-size: 60px;
            margin-bottom: -15px;
            padding-top: 30px;

            div {
                margin-top: -30px;
                font-weight: 600;
            }
        }

        #footerText {
            display: flex;
            gap: 20px;

            .footerElement {
                display: flex;
                align-items: baseline;
                flex-direction: column;
                width: 140px;

                h6 {
                    font-size: 20px;
                    font-weight: 500;
                }

                a {
                    font-size: 17px;
                    font-weight: 300;
                    color: rgb(169, 169, 169);
                    text-decoration: none;
                }
            }
        }
    }


}

/* Modal de projeto */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-content {
    width: 760px;
    max-width: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(6, 6, 6, 0.98));
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    float: right;
    cursor: pointer;
}

#modalProjectName {
    margin-top: 6px;
    font-size: 22px;
}

.modal-tech {
    display: flex;
    gap: 8px;
    margin: 10px 0 14px 0;
    flex-wrap: wrap
}

.modal-tech p {
    background: white;
    color: black;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.modal-description {
    color: rgb(200, 200, 200);
    line-height: 1.4;
    margin-bottom: 14px
}

.modal-gallery-wrapper {
    display: flex;
    align-items: center;
    gap: 10px
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer
}

.modal-gallery {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-gallery img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 6px;
    display: none
}

.modal-gallery img.active {
    display: block
}

@media (max-width: 600px) {
    .modal-content {
        padding: 14px
    }

    .modal-gallery img {
        max-height: 220px
    }
}

/* ===== Modal: força estilos top-level (corrige regras aninhadas que não eram aplicadas) ===== */
.modal-content {
    width: 960px !important;
    max-width: 96vw !important;
    color: white;
    position: relative;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.modal-col {
    display: block
}

.modal-col--info {
    grid-column: 1 / 2;
    padding-right: 12px;
}

.modal-col--info h2 {
    font-size: 26px;
    margin-bottom: 8px
}

.modal-description {
    color: rgb(200, 200, 200);
    margin-bottom: 12px
}

.modal-tech {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap
}

.modal-tech p {
    background: white;
    color: black;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px
}

.modal-col--gallery {
    grid-column: 2 / 4;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.gallery-main {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 380px
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px
}

.gallery-thumbs img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s ease, border-color .15s ease
}

.gallery-thumbs img:hover {
    transform: scale(1.02);
}

.gallery-thumbs img.selected {
    border-color: white
}

/* arrows and dots for new gallery */
.gallery-main {
    position: relative
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.gallery-arrow.left {
    left: 10px
}

.gallery-arrow.right {
    right: 10px
}

.gallery-image-wrap {
    width: 100%;
    max-height: 520px;
    overflow: hidden;
}

.gallery-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px
}

.gallery-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px
}

.gallery-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background .15s ease, transform .12s ease
}

.gallery-dots .dot.active {
    background: white;
    transform: scale(1.15)
}

@media (max-width: 900px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-col--gallery {
        grid-column: auto
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-main {
        min-height: 200px
    }
}
/* Blur background when modal open and prevent body scroll */
#portifolio.blurred {
    filter: blur(6px) saturate(0.95);
    pointer-events: none;
    user-select: none;
}

body.no-scroll {
    overflow: hidden;
    touch-action: none;
    height: 100%;
}