@charset "UTF-8";

/*
 * Responsividade — breakpoints e boas práticas
 * Breakpoints: 320, 480, 600, 768, 900, 992, 1024, 1200
 * Touch target mínimo: 44px (WCAG)
 */

/* ========== HEADER E MENU MOBILE ========== */

.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    padding: 12px;
    margin: -12px 0 -12px 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    align-items: center;
}

.menu-btn span {
    display: block;
    height: 3px;
    width: 22px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 85vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: max(80px, calc(var(--safe-top) + 60px)) 24px 24px;
    padding-left: max(24px, var(--safe-left));
    background-color: var(--background-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu a {
    display: block;
    padding: 14px 0;
    min-height: var(--touch-target);
    line-height: 1.2;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
    color: var(--primary-color);
}

#dark-mode-toggle {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    padding: 10px;
}

/* Esconde menu desktop, mostra hambúrguer */
@media (max-width: 900px) {
    header nav ul {
        display: none;
    }

    .menu-btn {
        display: flex;
    }
}

@media (max-width: 600px) {
    header {
        padding-left: max(16px, var(--safe-left));
        padding-right: max(16px, var(--safe-right));
    }

    header h2,
    header .logo {
        font-size: 1.4rem;
    }
}

/* ========== HOME / APRESENTAÇÃO ========== */

@media (max-width: 1024px) {
    #apresentacao {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        text-align: center;
        padding: 0 1.25rem;
        margin-top: 4rem;
    }

    #apresentacao figure {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #texto-apresentacao {
        font-size: 1.2rem;
        text-align: center;
    }

    #texto-apresentacao .linha-nome {
        font-size: 1.5rem;
    }

    #texto-apresentacao #ola-principal {
        font-size: clamp(2rem, 8vw, 2.75rem);
    }
}

@media (max-width: 600px) {
    #apresentacao {
        margin-top: 3.5rem;
        gap: 2rem;
        padding: 0 1rem;
        align-items: center;
    }

    #apresentacao figure {
        width: 100%;
        justify-content: center;
    }

    #foto-notion {
        max-width: min(320px, 100%);
        width: auto;
        display: block;
        margin: 0 auto;
    }

    #texto-apresentacao {
        font-size: 1rem;
    }

    #texto-apresentacao .linha-nome {
        font-size: 1.25rem;
    }

    #texto-apresentacao #ola-principal {
        font-size: clamp(1.75rem, 10vw, 2rem);
        letter-spacing: 2px;
    }

    #texto-apresentacao a.btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
        min-height: var(--touch-target);
    }

    .btns-apresentacao {
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 380px) {
    #texto-apresentacao #ola-principal {
        font-size: 1.5rem;
    }
}

/* ========== STACKS ========== */

@media (max-width: 768px) {
    #stacks {
        padding: 2rem 1rem;
        margin: 2rem auto;
    }

    #icones-stacks {
        gap: 1.5rem;
    }

    .stack-item img {
        max-width: 48px;
    }
}

@media (max-width: 480px) {
    #stacks {
        padding: 1.5rem 0.75rem;
    }

    .stack-item img {
        max-width: 40px;
    }

    #icones-stacks {
        gap: 1rem;
    }
}

/* ========== SOBRE MIM ========== */

@media (max-width: 992px) {
    #sobre {
        padding: 4rem 1.25rem 2rem;
    }

    #sobre-mim {
        padding: 2rem 1.75rem;
        width: 100%;
    }

    #dados-sobre {
        justify-content: center;
        text-align: center;
    }

    #dados-sobre p {
        font-size: 0.95rem;
    }

    #foto-sobre img {
        max-width: min(200px, 100%);
    }
}

@media (max-width: 576px) {
    #sobre {
        padding: 3.5rem 1rem 1.5rem;
        gap: 2rem;
    }

    #sobre h3 {
        font-size: clamp(1.5rem, 6vw, 1.75rem);
    }

    #sobre-mim {
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
    }

    #texto-sobre {
        font-size: 0.95rem;
        text-align: left;
    }

    /* Redes sociais: mantém uma única linha, ícones menores em mobile */
    #redes-sociais {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 8px;
    }

    #redes-sociais a {
        min-width: var(--touch-target);
        min-height: var(--touch-target);
    }

    #redes-sociais img {
        width: 28px;
        height: 28px;
    }
}

/* ========== SERVIÇOS / CARROSSEL ========== */

@media (max-width: 1024px) {
    #servicos {
        padding: 4rem 1rem;
        gap: 2rem;
    }

    #servicos h3 {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
    }

    #carrossel-servicos {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .servico {
        flex: 0 0 calc(50% - 16px);
        min-width: min(280px, 85vw);
    }
}

@media (max-width: 768px) {
    #carrossel-servicos > button {
        min-width: var(--touch-target);
        min-height: var(--touch-target);
        padding: 12px;
    }

    .servico {
        flex: 0 0 min(320px, 92vw);
        min-width: min(280px, 92vw);
        min-height: 420px;
    }
}

@media (max-width: 600px) {
    #servicos {
        padding: 3.5rem 0.75rem;
    }

    #carrossel-servicos {
        margin-top: 1rem;
    }

    #carrossel-servicos > button {
        flex-shrink: 0;
    }

    .servico {
        flex: 0 0 min(300px, 88vw);
        min-width: min(260px, 88vw);
        min-height: 400px;
        padding: 1.25rem 1rem;
    }

    .servico h4 {
        font-size: 1.1rem;
    }

    .servico p {
        font-size: 0.9rem;
    }

    .servico > button {
        min-height: var(--touch-target);
        padding: 12px 20px;
    }
}

/* Telas muito estreitas: só scroll por toque, sem setas */
@media (max-width: 480px) {
    #carrossel-servicos > button {
        display: none;
    }

    #lista-servicos {
        padding-left: var(--safe-left);
        padding-right: var(--safe-right);
    }
}

/* ========== MODAL (mobile) ========== */

@media (max-width: 600px) {
    .container-modal {
        margin: 0 1rem;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .modal {
        padding: 1.5rem 1.25rem;
        max-width: 100%;
        max-height: 90vh;
        font-size: 0.95rem;
    }

    .modal h4 {
        font-size: 1.1rem;
    }

    .botoes-modal {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .botoes-modal .btn-modal-link,
    .botoes-modal button {
        width: 100%;
        min-height: var(--touch-target);
        justify-content: center;
        margin: 0;
    }
}

/* ========== PROJETOS ========== */

@media (max-width: 992px) {
    #projetos {
        padding: 4rem 1.25rem;
        gap: 2rem;
    }

    .projeto {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .projeto img {
        max-width: 100%;
        width: 100%;
    }

    .infos-projeto {
        align-items: center;
    }

    .infos-projeto p {
        text-align: center;
    }
}

@media (max-width: 576px) {
    #projetos {
        padding: 3.5rem 1rem;
    }

    #projetos h3,
    .titulo-secao {
        font-size: clamp(1.4rem, 5vw, 1.75rem);
    }

    .projeto {
        padding: 1.25rem 1rem;
        gap: 1.25rem;
    }

    #projetos .infos-projeto h3,
    .infos-projeto h3,
    .infos-projeto h4 {
        font-size: 1.15rem;
    }

    .infos-projeto p {
        font-size: 0.9rem;
    }

    .infos-projeto a {
        width: 100%;
        text-align: center;
        min-height: var(--touch-target);
        padding: 12px 20px;
    }

    #btn-pagprojeto {
        width: 100%;
        min-height: var(--touch-target);
        text-align: center;
    }
}

/* ========== CONTATO / FOOTER ========== */

@media (max-width: 992px) {
    #contato {
        padding: 4rem 1.25rem;
        gap: 2.5rem;
        padding-bottom: max(2rem, var(--safe-bottom));
    }

    #info-contato {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    #contato {
        padding: 3.5rem 1rem;
    }

    #contato h3 {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
    }

    #info-contato {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    #info-contato section {
        min-width: 0;
        width: 100%;
        max-width: 320px;
    }

    .links-contato {
        min-height: var(--touch-target);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
    }

    #btn-email {
        min-height: var(--touch-target);
    }
}

@media (max-width: 480px) {
    #copy p {
        font-size: 0.8rem;
        text-align: center;
        line-height: 1.5;
    }
}

/* ========== BOTÃO VOLTAR AO TOPO ========== */

@media (max-width: 600px) {
    #btn-topo {
        bottom: max(16px, var(--safe-bottom));
        right: max(16px, var(--safe-right));
    }
}

/* ========== PÁGINA PROJETOS.HTML (seção única) ========== */

.pagina-projetos #projetos {
    padding-top: max(5rem, calc(60px + var(--safe-top)));
}

@media (max-width: 600px) {
    .pagina-projetos #projetos {
        padding-top: max(4.5rem, calc(56px + var(--safe-top)));
    }
}
