:root {
    --primary: #1a237e;
    --primary-dark: #0e1452;
    --accent: #ffca28;
    --dark: #1f2328;
    --light: #f7f8fa;
    --gray: #4b5563;
    --border: #e5e7eb;
    --success: #1f9d55;
    --danger: #d64545;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    min-width: 320px;
    width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    background: var(--primary);
    line-height: 1.6;
    padding-top: var(--header-height);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icone i {
    font-size: 18px;
    line-height: 1;
}

.link-salto {
    position: absolute;
    left: -999px;
    top: 12px;
    background: var(--dark);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    z-index: 9999;
}

.link-salto:focus {
    left: 16px;
}

.caixa {
    width: 100%;
    max-width: 1100px;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 auto;
}

main {
    display: block;
    width: 100%;
    overflow-x: hidden;
    background: #ffffff;
}

.secao {
    padding: clamp(3rem, 5vw, 4.5rem) 0;
    width: 100%;
    overflow-x: hidden;
}

.secao.fundo-claro {
    background: var(--light);
}

.secao:nth-of-type(even):not(.fundo-claro) {
    background: #ffffff;
}

.cabecalho-secao {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 100%;
}

.cabecalho-secao p {
    margin-top: 0.5rem;
}

.titulo-secao {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.subtitulo-secao {
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.linha-secao {
    width: 70px;
    height: 3px;
    background: var(--accent);
    margin: 1rem auto 1.5rem;
    border-radius: 999px;
}

.descricao-secao {
    color: var(--gray);
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1rem;
}

.texto-destaque {
    color: var(--accent);
}

.texto-primario {
    color: var(--primary);
}

.barra-navegacao {
    position: fixed;
    inset: 0 0 auto 0;
    background: var(--primary);
    color: #fff;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    width: 100%;
    min-height: var(--header-height);
}

.barra-navegacao-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-height);
    padding: 0;
    width: 100%;
}

.logo-texto {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-inicial {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.botao-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-principal {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--primary);
    border-radius: 0 0 12px 12px;
}

.menu-principal.is-open {
    max-height: 500px;
    padding: 0.5rem 0 1rem;
}

.link-menu {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    white-space: nowrap;
}

.menu-item {
    position: relative;
    width: 100%;
}

.link-menu-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.submenu-projetos {
    list-style: none;
    display: block;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.6rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease;
    width: 100%;
}

.menu-item:hover .submenu-projetos,
.menu-item:focus-within .submenu-projetos {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.link-submenu {
    display: block;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-submenu:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.link-menu.active,
.link-menu:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.destaque-redes {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-weight: 600;
}

.destaque-redes a {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.destaque-redes a:hover {
    color: #fff;
}

.destaque {
    padding: clamp(4rem, 8vw, 6rem) 0 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    width: 100%;
    overflow-x: hidden;
}

.grade-destaque {
    display: grid;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.destaque-titulo {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.destaque-subtitulo {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.destaque-descricao {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.destaque-localizacao {
    margin-top: 1rem;
    font-weight: 600;
}

.destaque-botoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.foto-perfil {
    width: min(280px, 70vw);
    max-width: 100%;
    border-radius: 999px;
    border: 6px solid #fff;
    box-shadow: var(--shadow);
    margin: 0 auto;
}

.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.botao:focus-visible,
.botao-menu:focus-visible,
.link-menu:focus-visible,
.link-rede:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.botao-primario {
    background: var(--accent);
    color: var(--primary);
}

.botao-contorno {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: transparent;
}

.botao:hover {
    transform: translateY(-2px);
}

.cartao {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.cartao:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.titulo-cartao,
.titulo-habilidade,
.titulo-projeto {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.texto-cartao,
.descricao-projeto {
    color: var(--gray);
}

.lista-sobre {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}
.grade-projetos {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grade-sobre,
.grade-habilidades,
.grade-projetos,
.grade-contato,
.grade-rodape {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.grade-contato {
    align-items: start;
}

.cartao-habilidade .cabecalho-habilidade {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.icone-habilidade {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.item-habilidade {
    margin-bottom: 0.75rem;
    width: 100%;
}

.barra-habilidade {
    background: var(--border);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.nivel-habilidade {
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 0.8s ease;
}
.cartao-projeto {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.cartao-projeto:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.cartao-projeto .conteudo-projeto {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
}

.cartao-projeto .titulo-projeto {
    margin-bottom: 0;
    line-height: 1.3;
    min-height: 3.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cartao-projeto .links-projeto {
    margin-top: auto;
}

.tecnologias-projeto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    min-height: 2.25rem;
}

.tag-tecnologia {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    font-weight: 500;
}

.status-projeto {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(255, 202, 40, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 202, 40, 0.3);
    min-height: 1.9rem;
    white-space: nowrap;
}

.imagem-projeto {
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef1f7, #f8f9fc);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0; /* Impede que a imagem encolha */
}


.imagem-projeto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.icone-projeto {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.icone-projeto i {
    font-size: 30px;
    line-height: 1;
}
.links-projeto {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: auto; /* Empurra os botões para o final */
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.links-projeto .botao {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.links-projeto .botao:only-child {
    grid-column: 1 / 2;
}

.descricao-projeto {
    margin: 0;
    line-height: 1.55;
    line-clamp: 5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.info-contato {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.item-contato {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}


.link-contato {
    color: var(--primary);
    font-weight: 600;
    word-wrap: break-word;
}

.grade-redes {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.link-rede {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.link-rede:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.formulario-contato {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.formulario-contato label {
    font-weight: 600;
    color: var(--dark);
}

.campo-formulario {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem;
    font-size: 1rem;
    width: 100%;
    max-width: 100%;
}

.campo-formulario:focus {
    outline: 2px solid rgba(26, 35, 126, 0.2);
    border-color: var(--primary);
}

.campo-formulario.is-invalid {
    border-color: var(--danger);
}

.campo-formulario.is-valid {
    border-color: var(--success);
}

.status-formulario {
    font-weight: 600;
}

.status-formulario.is-error {
    color: var(--danger);
}

.status-formulario.is-success {
    color: var(--success);
}

.rodape {
    background: var(--dark);
    color: #fff;
    padding: 3rem 0 2rem;
    width: 100%;
    overflow-x: hidden;
}

.whatsapp-flutuante {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    background: #25d366;
    color: #fff;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: calc(100% - 3rem);
    white-space: nowrap;
}

.whatsapp-flutuante:hover {
    transform: translateY(-2px);
}

[data-revelar] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-revelar].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 768px) {
    .grade-projetos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grade-projetos {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Versão para mobile */
@media (max-width: 767px) {
    .descricao-projeto {
        display: block;
    }
    
    .links-projeto {
        display: flex;
        flex-direction: column;
    }
    
    .links-projeto .botao {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-revelar] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .botao:hover,
    .cartao:hover,
    .whatsapp-flutuante:hover {
        transform: none;
    }
}

.links-rodape {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.links-rodape a {
    color: rgba(255, 255, 255, 0.8);
}

.redes-rodape {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.redes-rodape a {
    color: rgba(255, 255, 255, 0.85);
}

.redes-rodape a:hover {
    color: #fff;
}

.base-rodape {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
    .caixa {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .destaque-botoes .botao {
        white-space: normal;
        word-break: break-word;
        text-align: center;
    }
    
    .link-rede {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }
    
    .icone i {
        font-size: 16px;
    }
    
    .whatsapp-flutuante span:last-child {
        display: inline;
    }
    
    .grade-redes {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tecnologias-projeto {
        overflow-x: auto;
        padding-bottom: 0.25rem;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tag-tecnologia {
        white-space: nowrap;
    }
}

@media (min-width: 768px) {
    .barra-navegacao .caixa {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }

    .botao-menu {
        display: none;
    }

    .menu-principal {
        max-height: none;
        flex-direction: row;
        width: auto;
        padding: 0;
        margin-left: auto;
        overflow: visible;
        background: transparent;
    }

    .submenu-projetos {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 220px;
        margin-top: 0;
        background: #ffffff;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .link-submenu {
        color: var(--dark);
    }

    .link-submenu:hover {
        background: var(--light);
        color: var(--primary);
    }

    .grade-destaque {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grade-sobre,
    .grade-habilidades,
    .grade-projetos,
    .grade-contato,
    .grade-rodape {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grade-habilidades,
    .grade-projetos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grade-rodape {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
    }
}

@media (max-width: 350px) {
    .whatsapp-flutuante span:last-child {
        display: none;
    }
    
    .destaque-botoes {
        flex-direction: column;
    }
    
    .destaque-botoes .botao {
        width: 100%;
    }
}