@media screen and (max-width: 499px) {

    html,
    body {
        width: 100%;
    }

    /* .navegacao {
        padding: 0.5rem;
    } */

    .menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg,
                rgba(13, 13, 13, .92),
                rgba(26, 26, 26, .92));
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        transform: translateX(100%);
        transition: transform .3s ease-in-out 1s;
        /* 1s ≈ 0.6s (maior delay dos links) + 0.38s (duração) */
        will-change: transform;
        z-index: 1000;
        gap: 2rem;
    }

    .menu.ativo {
        transform: translateX(0);
        transition: transform .4s ease-in-out 0s;
    }

    /* estado base (fechado/exited) */
    .menu a {
        opacity: 0;
        transform: translateX(40px) scale(.95);
        transition: opacity .38s ease, transform .38s cubic-bezier(.22, .9, .35, 1);
    }

    /* estado aberto */
    .menu.ativo a {
        opacity: 1;
        transform: translateX(0) scale(1);
        will-change: transform, opacity;
    }

    /* DELAYS PARA SAÍDA (quando .menu.ativo é removido estes são usados) */
    .menu li:nth-child(1) a {
        transition-delay: 0.3s;
    }

    .menu li:nth-child(2) a {
        transition-delay: 0.4s;
    }

    .menu li:nth-child(3) a {
        transition-delay: 0.5s;
    }

    .menu li:nth-child(4) a {
        transition-delay: 0.6s;
    }

    /* DELAYS PARA ENTRADA (quando .menu.ativo está presente estes sobrescrevem) */
    .menu.ativo li:nth-child(1) a {
        transition-delay: 0.3s;
    }

    .menu.ativo li:nth-child(2) a {
        transition-delay: 0.4s;
    }

    .menu.ativo li:nth-child(3) a {
        transition-delay: 0.5s;
    }

    .menu.ativo li:nth-child(4) a {
        transition-delay: 0.6s;
    }

    #toggle-tema {
        position: fixed;
        top: 0.8rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        z-index: 1100;
    }

    .menu-link {
        position: relative;
        font-size: 1.5rem;
        color: var(--texto-contraste);
        text-decoration: none;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .menu-link::after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--cor-primaria);
        transition: width .3s ease, left .3s ease;
    }

    .menu-link:hover {
        color: var(--cor-primaria);
        transform: scale(1.1);
        text-shadow: 0 0 12px var(--cor-secundaria);
    }

    .menu-link:hover::after {
        width: 100%;
        left: 0;
    }

    /* ===== BOTÃO HAMBÚRGUER ===== */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        cursor: pointer;
        z-index: 1101;
        /* acima do menu */
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--cor-primaria);
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    /* Animação para virar "X" */
    .menu-toggle.ativo span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.ativo span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.ativo span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .foto-perfil {
        width: 400px;
        height: 400px;
    }

    h1 {
        font-size: clamp(2.8rem, 4vw, 3rem);
        /* mínimo, relativo e máximo */
        text-align: center;
        line-height: 1.2;
        white-space: normal;
        /* permite quebra de linha */
        word-break: break-word;
        /* evita estouro */
    }

    .cabecalho {
        padding-top: 5rem;
        margin-bottom: 2.5rem;
    }

    .cabecalho-sub-titulo {
        font-size: 1.5rem;
    }

    .icons ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .icons ul li a {
        width: 45px;
        height: 45px;
        line-height: 40px;
        font-size: 1px;
    }

    .sobre {
        padding: 1rem 1rem;
        margin: 0.2rem;
    }

    .sobre-caixa {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .sobre-caixa:hover .sobre-paragrafo {
        transform: scale(1.01);
    }

    .sobre-titulo {
        font-size: 1.8rem;
        margin-bottom: 50px;
        /* margin-bottom: 20 - 25; */
    }

    .sobre-paragrafo {
        line-height: 1.25rem;
        font-size: 0.9rem;
    }

    .projetos {
        padding: 2rem 1rem;
    }

    .projetos-titulo {
        font-size: 1.8rem;
        margin-bottom: 50px;
        /* margin-bottom: 20 - 25; */
    }

    .projetos-caixa {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        /* grid-template-columns: repeat(1, 1fr); */
        /* sempre 2 colunas */
        gap: 0.7rem;
        max-width: auto;
        /* ✅ Correção */
        margin: 0.2rem;
    }

    .projetos-imagem {
        height: 235px;
        width: 100%;
    }

    .paragrafo-projetos {
        line-height: 1.20rem;
        font-size: 0.8rem;
    }

    .projetos-card:hover .paragrafo-projetos {
        font-size: 0.8rem;
    }

    .projetos-card:hover {
        transform: translateX(-1px) scale(1.03);
        min-height: 570px;
    }

    .btn-projeto {
        width: 21rem;
    }


    .infor-projetos {
        font-size: 1rem;
    }

    .icons-fab-projetos {
        display: flex;
        left: 65%;
        top: 48.5%;
        gap: 0.5rem;
        font-size: 1.1rem;
    }

    .caixa-textos-projeto {
        padding: 1.2rem;
    }

    .contatos {
        padding: 1rem;
    }

    .contatos-titulo {
        font-size: 1.8rem;
        margin-bottom: 50px;
        /* margin-bottom: 20 - 25; */
    }

    .formulario-contato {
        padding: 0.7rem;
        margin: 0.1rem auto;
        position: relative;
        overflow: hidden;
    }



    .brilho-seguidor,
    .brilho-seguidor.neon-vibrante,
    .brilho-seguidor.extra {
        position: absolute;
        top: 0;
        left: 0;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        animation: moverBrilhoMobile 8s linear infinite, pulseNeon 2s ease-in-out infinite;
        pointer-events: none;
        opacity: 1;
        background: radial-gradient(circle, var(--cor-primaria), transparent 80%);
        z-index: 0;
        filter: blur(20px);
    }

    .campo-form,
    .grupo-form {
        margin-bottom: 0.5rem;
    }

    .botao-form {
        padding: 20px 16px;
        margin: 0.1rem;
    }

    /* Força todas as variações no tema light dentro do menu hamburguer */
    body.light .menu .menu-link,
    body.light .menu .menu-link:link,
    body.light .menu .menu-link:visited,
    body.light .menu .menu-link:focus,
    body.light .menu .menu-link:active {
        color: var(--texto-contraste) !important;
        /* branco SEMPRE no fundo escuro */
    }

    body.light .menu .menu-link:hover {
        color: var(--texto-contraste) !important;
        text-shadow: 0 0 12px var(--texto-contraste);
    }

    body.light .menu-link::after {
        background: linear-gradient(90deg, var(--texto-contraste), var(--texto-contraste));
    }

}


@media screen and (min-width: 500px) {
    .projetos {
        padding: 2rem 2rem;
        margin: 0 auto;
    }


}