/*
 * Arquivo:   styles.css
 * Projeto:   Portfólio Rodolpho Rapôso
 * Paleta:    Bordeaux #8B2E3C | Petróleo #264653 | Bege #F5F0E6 | Grafite #1B1B1E
 */


/* =============================================
   VARIÁVEIS DE TEMA
   ============================================= */

/* Tema escuro (padrão / dark) */
:root,
[data-theme="dark"] {
    --cor-primaria:     #8B2E3C;   /* bordeaux */
    --cor-secundaria:   #3d96af;   /* petróleo clareado — legível em fundo escuro */
    --cor-texto:        #F5F0E6;   /* bege claro */
    --cor-fundo:        #1B1B1E;   /* grafite */
    --cor-fundo-claro:  #222226;
    --cor-card:         #2a2a2e;
    --cor-borda:        rgba(245, 240, 230, 0.08);
    --cor-sombra:       rgba(0, 0, 0, 0.32);
    --cor-texto-muted:  rgba(245, 240, 230, 0.62);
    /* Nav */
    --nav-bg:           #1B1B1E;
    --nav-borda:        rgba(245, 240, 230, 0.08);
    /* Header */
    --cabecalho-bg:     rgba(27, 27, 30, 0.94);
    /* Controles (tema/idioma) */
    --controle-bg:      rgba(245, 240, 230, 0.05);
    --btn-ctrl-hover:   rgba(245, 240, 230, 0.1);
    /* Formulário */
    --form-bg:          rgba(245, 240, 230, 0.04);
    --input-bg:         rgba(245, 240, 230, 0.04);
}

/* Tema claro */
[data-theme="light"] {
    --cor-primaria:     #8B2E3C;   /* bordeaux */
    --cor-secundaria:   #264653;   /* petróleo */
    --cor-texto:        #1B1B1E;   /* grafite */
    --cor-fundo:        #F5F0E6;   /* bege claro */
    --cor-fundo-claro:  #EBE6DC;
    --cor-card:         #FFFFFF;
    --cor-borda:        rgba(27, 27, 30, 0.1);
    --cor-sombra:       rgba(27, 27, 30, 0.1);
    --cor-texto-muted:  rgba(27, 27, 30, 0.62);
    /* Nav */
    --nav-bg:           #FFFFFF;
    --nav-borda:        rgba(27, 27, 30, 0.12);
    /* Header */
    --cabecalho-bg:     rgba(245, 240, 230, 0.97);
    /* Controles */
    --controle-bg:      rgba(27, 27, 30, 0.05);
    --btn-ctrl-hover:   rgba(27, 27, 30, 0.08);
    /* Formulário */
    --form-bg:          rgba(27, 27, 30, 0.02);
    --input-bg:         rgba(27, 27, 30, 0.03);
}


/* =============================================
   RESET & BASE
   ============================================= */

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--cor-primaria);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cor-secundaria);
}

.destaque {
    color: var(--cor-primaria);
}


/* =============================================
   BOTÕES
   ============================================= */

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.btn-primario {
    background-color: var(--cor-primaria);
    color: #F5F0E6;
    border-color: var(--cor-primaria);
}

.btn-primario:hover {
    background-color: #a33347;
    border-color: #a33347;
    color: #F5F0E6;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--cor-sombra);
}

.btn-secundario {
    background-color: transparent;
    color: var(--cor-texto);
    border-color: var(--cor-primaria);
}

.btn-secundario:hover {
    background-color: var(--cor-primaria);
    color: #F5F0E6;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--cor-sombra);
}

.btn-ver-projeto {
    background-color: var(--cor-primaria);
    color: #F5F0E6;
    border: 2px solid var(--cor-primaria);
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
}

.btn-ver-projeto:hover {
    background-color: #a33347;
    border-color: #a33347;
    color: #F5F0E6;
    transform: translateY(-2px);
}

.btn-ver-codigo {
    background-color: transparent;
    color: var(--cor-texto);
    border: 2px solid var(--cor-borda);
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
}

.btn-ver-codigo:hover {
    background-color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: #F5F0E6;
    transform: translateY(-2px);
}


/* =============================================
   CABEÇALHO
   ============================================= */

.cabecalho {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease,
                box-shadow 0.4s ease;
}

.cabecalho.scrolled {
    background-color: var(--cabecalho-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 2px 20px var(--cor-sombra);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--cor-texto);
    text-decoration: none;
    flex-shrink: 0;
}

.icone-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.texto-logo {
    font-size: 1.05rem;
    color: var(--cor-texto);
    white-space: nowrap;
}

/* ---- Controles do cabeçalho ---- */

.controles-cabecalho {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.seletor-idioma,
.seletor-tema {
    display: flex;
    gap: 2px;
    background: var(--controle-bg);
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    padding: 3px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-idioma {
    background: transparent;
    border: none;
    color: var(--cor-texto);
    cursor: pointer;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
    opacity: 0.45;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-idioma:hover  { opacity: 0.75; background: var(--btn-ctrl-hover); }
.btn-idioma.ativo  { background: var(--cor-primaria); color: #F5F0E6; opacity: 1; }

.btn-tema {
    background: transparent;
    border: none;
    color: var(--cor-texto);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.82rem;
    opacity: 0.45;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-tema:hover  { opacity: 0.75; background: var(--btn-ctrl-hover); }
.btn-tema.ativo  { background: var(--cor-primaria); color: #F5F0E6; opacity: 1; }

.navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;          /* 6 itens × 70 px */
    height: 70px;
    background: var(--nav-bg);
    border-radius: 35px;   /* pílula arredondada */
    z-index: 999;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    display: flex;
    justify-content: center;
    overflow: visible;     /* o círculo pode ultrapassar a borda superior */
    transition: background-color 0.3s ease;
}

.navigation ul {
    display: flex;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    overflow: visible;
}

.navigation ul li {
    position: relative;
    list-style: none;
    width: 70px;
    height: 70px;
    z-index: 1;
    overflow: visible;  /* label não é cortada */
}

.navigation ul li.active {
    z-index: 10;         /* texto/ícone ativo fica acima do indicador */
}

.navigation ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
    color: inherit;
    border: none;
    outline: none;
}

/* ---- Ícone ---- */
.navigation ul li a .icon {
    position: relative;
    display: block;
    line-height: 70px;
    font-size: 1.45em;
    text-align: center;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity   0.45s ease,
                color     0.3s ease;
    color: var(--cor-texto);
    opacity: 0.4;
    z-index: 1;
}

.navigation ul li.active a .icon {
    opacity: 1;
    color: var(--cor-primaria);
    transform: translateY(-13px);
}

.navigation ul li a .text {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    font-size: 0.6em;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    color: var(--cor-primaria);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.navigation ul li.active a .text {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Indicador: SOMENTE container de posição ---- */
.indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    background: transparent;   /* nenhuma cor aqui */
    border: none;              /* nenhuma borda aqui */
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 4;
}

/* ---- Círculo visual: único elemento visível do indicador ---- */
.indicator span {
    position: absolute;
    top: -8px;         /* pop 8px acima da borda superior da nav */
    left: 5px;
    width: 60px;
    height: 60px;
    background: var(--nav-bg);            /* funde com a nav */
    border: 3px solid var(--cor-primaria); /* anel bordeaux */
    border-radius: 50%;
    /* sombra apenas para cima, cria profundidade sem artefatos laterais */
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.14);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ---- Posição do indicador via CSS puro ---- */
.navigation ul li:nth-child(1).active ~ .indicator { transform: translateX(0px);   }
.navigation ul li:nth-child(2).active ~ .indicator { transform: translateX(70px);  }
.navigation ul li:nth-child(3).active ~ .indicator { transform: translateX(140px); }
.navigation ul li:nth-child(4).active ~ .indicator { transform: translateX(210px); }
.navigation ul li:nth-child(5).active ~ .indicator { transform: translateX(280px); }
.navigation ul li:nth-child(6).active ~ .indicator { transform: translateX(350px); }


/* =============================================
   HERO
   ============================================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.conteudo-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.texto-hero {
    flex: 1;
    min-width: 300px;
    text-align: left;
    animation: fadeInSlideRight 1s ease-out forwards;
}

.intro-hero {
    font-size: 1.2rem;
    color: var(--cor-primaria);
    margin-bottom: 0.5rem;
}

.titulo-hero {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.nome-hero {
    color: var(--cor-secundaria);
}

.descricao-hero {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--cor-texto-muted);
    min-height: 2.5em;
}

.botoes-hero .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.imagem-hero {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    animation: fadeInSlideLeft 1s ease-out forwards;
}

/* Glow suave atrás da foto — opacidade baixa para não criar halo aparente */
.fundo-imagem-hero {
    position: absolute;
    width: 70%;
    height: 70%;
    background-color: var(--cor-primaria);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.18;
    z-index: 0;
    transition: transform 0.5s ease-out;
}

.imagem-hero:hover .fundo-imagem-hero {
    transform: scale(1.1);
}

/* Foto sem glow bordeaux — shadow neutra */
.foto-hero {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 50%;
    border: 2px solid var(--cor-borda);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);   /* neutro, sem cor da marca */
    position: relative;
    z-index: 1;
    object-fit: cover;
    transition: transform 0.5s ease-out;
    display: block;
}

.imagem-hero:hover .foto-hero {
    transform: scale(1.03) rotate(2deg);
}

.estatisticas-hero {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    animation: fadeInUp 1s ease-out 0.45s forwards;
    opacity: 0;
}

.item-estatistica {
    text-align: center;
    min-width: 150px;
}

.numero-estatistica {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cor-secundaria);
    margin-bottom: 0.4rem;
}

.texto-estatistica {
    font-size: 1rem;
    color: var(--cor-texto-muted);
}


/* =============================================
   SEÇÕES GERAIS
   ============================================= */

.secao {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.secao.bg-claro {
    background-color: var(--cor-fundo-claro);
}

.cabecalho-secao {
    text-align: center;
    margin-bottom: 3rem;
}

.tag-secao {
    display: inline-block;
    background-color: var(--cor-primaria);
    color: #F5F0E6;
    padding: 0.3rem 0.9rem;
    border-radius: 5px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.cabecalho-secao h2 {
    font-size: 3rem;
    color: var(--cor-texto);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cabecalho-secao .destaque {
    color: var(--cor-primaria);
}

.subtitulo-secao {
    font-size: 1.1rem;
    color: var(--cor-texto-muted);
    max-width: 700px;
    margin: 0 auto;
}


/* =============================================
   SOBRE
   ============================================= */

.conteudo-sobre {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    justify-content: center;
}

.imagem-sobre {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    text-align: center;
}

/* Imagem sem sombra colorida */
.imagem-sobre img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    display: block;
}

.texto-sobre {
    flex: 2;
    min-width: 300px;
}

.texto-sobre p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--cor-texto-muted);
}

.botoes-sobre .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
}


/* =============================================
   HABILIDADES
   ============================================= */

.grid-habilidades {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.categoria-habilidade {
    background-color: var(--cor-card);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 4px 18px var(--cor-sombra);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--cor-borda);
}

.categoria-habilidade:hover {
    transform: translateY(-10px);
    box-shadow: 0 14px 28px var(--cor-sombra);
    border-color: var(--cor-primaria);
}

.categoria-habilidade h3 {
    font-size: 1.6rem;
    color: var(--cor-primaria);
    margin-bottom: 1.5rem;
    position: relative;
}

.categoria-habilidade h3::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background-color: var(--cor-secundaria);
    margin: 10px auto 0;
    border-radius: 2px;
}

.itens-habilidade {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.item-habilidade {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.92rem;
    color: var(--cor-texto);
}

.icone-habilidade {
    font-size: 2.4rem;
    color: var(--cor-secundaria);
    margin-bottom: 0.4rem;
}


/* =============================================
   PROJETOS
   ============================================= */

.grid-projetos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.item-projeto {
    background-color: var(--cor-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--cor-sombra);
    transition: all 0.3s ease;
    border: 1px solid var(--cor-borda);
    display: flex;
    flex-direction: column;
}

.item-projeto:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px var(--cor-sombra);
    border-color: var(--cor-primaria);
}

/* Imagem do projeto: sem sombras extras ou filtros */
.item-projeto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.item-projeto:hover img {
    transform: scale(1.04);
}

.item-projeto h3 {
    font-size: 1.3rem;
    color: var(--cor-primaria);
    margin: 1.1rem 1.6rem 0.4rem;
}

.item-projeto p {
    font-size: 0.93rem;
    color: var(--cor-texto-muted);
    margin-bottom: 0.8rem;
    flex-grow: 1;
    padding: 0 1.6rem;
    line-height: 1.65;
}

.botoes-projeto {
    padding: 0.8rem 1.6rem 1.4rem;
    display: flex;
    gap: 0.7rem;
    margin-top: auto;
    flex-wrap: wrap;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-todos-projetos {
    text-align: center;
    margin-top: 3rem;
}

.item-projeto.oculto {
    display: none;
}


/* =============================================
   EXPERIÊNCIA
   ============================================= */

.linha-do-tempo {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    padding-left: 25px;
    border-left: 2px solid var(--cor-borda);
}

.item-linha-do-tempo {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 30px;
}

.item-linha-do-tempo:last-child {
    margin-bottom: 0;
}

.item-linha-do-tempo::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--cor-primaria);
    border-radius: 50%;
    border: 3px solid var(--cor-fundo);
    z-index: 1;
}

/* Ponto da timeline nas seções bg-claro */
.secao.bg-claro .item-linha-do-tempo::before {
    border-color: var(--cor-fundo-claro);
}

.item-linha-do-tempo .periodo {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cor-secundaria);
    margin-bottom: 0.4rem;
}

.item-linha-do-tempo h3 {
    font-size: 1.3rem;
    color: var(--cor-texto);
    margin-bottom: 0.35rem;
}

.item-linha-do-tempo .empresa {
    font-size: 1rem;
    color: var(--cor-texto-muted);
    margin-bottom: 0.7rem;
    font-style: italic;
}

.item-linha-do-tempo .descricao {
    font-size: 0.98rem;
    color: var(--cor-texto-muted);
    line-height: 1.7;
}


/* =============================================
   CONTATO
   ============================================= */

.conteudo-contato {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: flex-start;
}

@media (min-width: 992px) {
    .conteudo-contato {
        grid-template-columns: 0.7fr 1.3fr;
    }
}

.informacoes-contato {
    background-color: var(--cor-card);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 18px var(--cor-sombra);
    border: 1px solid var(--cor-borda);
}

.item-info-contato {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--cor-texto);
}

.item-info-contato:last-child { margin-bottom: 0; }

.item-info-contato i {
    font-size: 1.3rem;
    color: var(--cor-primaria);
    margin-right: 1rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.item-info-contato p { font-size: 1rem; margin: 0; }

.formulario-contato {
    background-color: var(--form-bg);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 18px var(--cor-sombra);
    border: 1px solid var(--cor-borda);
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--cor-texto);
    font-size: 0.93rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.78rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--cor-borda);
    border-radius: 5px;
    color: var(--cor-texto);
    font-family: 'Inter', sans-serif;
    font-size: 0.97rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--cor-primaria);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 46, 60, 0.16);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.formulario-contato .btn {
    align-self: flex-start;
}


/* =============================================
   RODAPÉ
   ============================================= */

.rodape {
    background-color: var(--cor-fundo-claro);
    color: var(--cor-texto);
    padding: 2.5rem 0 8rem;  /* bottom maior: nav flutuante não cobre o rodapé */
    text-align: center;
    transition: background-color 0.3s ease;
}

.conteudo-rodape {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.rodape p {
    font-size: 0.88rem;
    color: var(--cor-texto-muted);
}

.links-sociais { display: flex; gap: 1.1rem; }

.links-sociais a {
    color: var(--cor-texto-muted);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.links-sociais a:hover {
    color: var(--cor-primaria);
    transform: translateY(-3px);
}


/* =============================================
   ANIMAÇÕES
   ============================================= */

@keyframes fadeInSlideRight {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInSlideLeft {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.revelar {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.revelar.ativo {
    opacity: 1;
    transform: translateY(0);
}


/* =============================================
   RESPONSIVIDADE — até 992 px
   ============================================= */

@media (max-width: 992px) {
    .hero { text-align: center; padding-top: 6rem; }

    .conteudo-hero { flex-direction: column-reverse; gap: 2rem; }

    .texto-hero { text-align: center; }

    .titulo-hero { font-size: 2.5rem; }

    .descricao-hero { font-size: 1rem; }

    .botoes-hero { display: flex; flex-direction: column; align-items: center; }

    .botoes-hero .btn { margin-right: 0; width: 80%; max-width: 300px; }

    .imagem-hero { padding: 0; }

    .foto-hero { max-width: 250px; }

    .estatisticas-hero { margin-top: 3rem; gap: 1.5rem; }

    .item-estatistica { min-width: unset; width: 45%; }

    .numero-estatistica { font-size: 2rem; }

    .secao { padding: 4.5rem 0; }

    .cabecalho-secao h2 { font-size: 2.2rem; }

    .conteudo-sobre { flex-direction: column; text-align: center; }

    .imagem-sobre { max-width: 360px; }

    .botoes-sobre { display: flex; flex-direction: column; align-items: center; }

    .botoes-sobre .btn { margin: 0; width: 100%; }

    .grid-habilidades,
    .grid-projetos { grid-template-columns: 1fr; gap: 2rem; }

    .categoria-habilidade { padding: 2rem; }

    .categoria-habilidade h3 { font-size: 1.4rem; }

    .linha-do-tempo { padding-left: 20px; }

    .item-linha-do-tempo { padding-left: 25px; }

    .item-linha-do-tempo::before { left: -8px; width: 16px; height: 16px; }

    .item-linha-do-tempo h3 { font-size: 1.2rem; }

    .conteudo-contato { grid-template-columns: 1fr; gap: 2rem; }

    .informacoes-contato,
    .formulario-contato { padding: 1.5rem; }

    .formulario-contato .btn { width: 100%; text-align: center; }
}


/* =============================================
   RESPONSIVIDADE — Navigation em mobile
   Usa scale() para encolher a nav sem quebrar
   os translateX() do indicador (valores em px).
   ============================================= */

@media (max-width: 460px) {
    .navigation {
        transform: translateX(-50%) scale(0.86);
        bottom: 10px;
    }
    .rodape { padding-bottom: 7rem; }
}

@media (max-width: 380px) {
    .navigation {
        transform: translateX(-50%) scale(0.74);
        bottom: 6px;
    }
    .rodape { padding-bottom: 6rem; }
}


/* =============================================
   RESPONSIVIDADE — Controles do cabeçalho
   ============================================= */

@media (max-width: 500px) {
    .texto-logo { display: none; }
    .controles-cabecalho { gap: 0.4rem; }
    .btn-idioma { padding: 4px 7px; font-size: 0.68rem; }
    .btn-tema   { padding: 4px 7px; font-size: 0.78rem; }
}


/* =============================================
   RESPONSIVIDADE — 320 px (telas mínimas)
   ============================================= */

@media (max-width: 320px) {
    body { font-size: 13px; }

    .container { padding: 0 0.8rem; }

    .hero { padding-top: 5rem; padding-bottom: 3rem; }

    .intro-hero { font-size: 1rem; }

    .titulo-hero { font-size: 1.9rem; }

    .descricao-hero { font-size: 0.88rem; min-height: unset; }

    .foto-hero { max-width: 190px; }

    .estatisticas-hero { margin-top: 2rem; gap: 0.8rem; }

    .item-estatistica { width: 45%; min-width: unset; }

    .numero-estatistica { font-size: 1.7rem; }

    .secao { padding: 2.5rem 0; }

    .cabecalho-secao h2 { font-size: 1.5rem; }

    .tag-secao { font-size: 0.72rem; }

    .item-projeto img { height: 140px; }

    .rodape { padding: 1.5rem 0 5rem; }
}

.btn-idioma img{
    width: 22px;
    height: 16px;
    border-radius: 2px;
    display: block;
}

.btn-idioma{
    padding:6px;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* =============================================
   CARROSSEL 3D VIDRO — SEÇÃO PROJETOS
   Escopo exclusivo: #projetos  |  prefixos: .cpv-  .card-vidro  .cv-
   Não afeta nenhuma outra seção do portfólio.
   ============================================= */

/* ---- Wrapper externo ---- */
#projetos .cpv-wrapper {
    position: relative;
    width: 100%;
    padding: 0.5rem 0 4.5rem;
    -webkit-user-select: none;
    user-select: none;
}

/* ---- Palco 3D (perspectiva) ---- */
#projetos .cpv-palco {
    position: relative;
    width: 100%;
    height: 560px;
    perspective: 1200px;
    perspective-origin: 50% 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Luz de cena ao fundo */
#projetos .cpv-palco::before {
    content: '';
    position: absolute;
    top: -8%;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    height: 80%;
    background: radial-gradient(
        ellipse at 50% 25%,
        rgba(245, 240, 230, 0.045) 0%,
        transparent 68%
    );
    pointer-events: none;
    z-index: 0;
}

/*
 * Fade de chão — z-index 9.
 * CORRIGIDO: era 25 e cobria o botão "Ver Projeto".
 * Agora fica abaixo do card ativo (z-index 10), cobrindo
 * apenas os cards inativos (z-index ≤ 8) nas bordas.
 */
#projetos .cpv-palco::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent 0%, var(--cor-fundo) 100%);
    pointer-events: none;
    z-index: 9;
}

[data-theme="light"] #projetos .cpv-palco::after {
    background: linear-gradient(to bottom, transparent 0%, var(--cor-fundo) 100%);
}

/* ---- Container dos cards (âncora de perspectiva) ---- */
#projetos .cpv-cards {
    position: relative;
    width: 360px;
    height: 480px;
    flex-shrink: 0;
}

/* ========================================
   CARD DE VIDRO
   ======================================== */

#projetos .card-vidro {
    position: absolute;
    top: 0;
    left: 0;
    width: 360px;
    height: 480px;
    border-radius: 22px;
    overflow: hidden;
    padding: 0; /* CORRIGIDO: sem padding externo — evita gaps na imagem */

    /* Glass — dark mode */
    background: linear-gradient(
        158deg,
        rgba(255, 255, 255, 0.13) 0%,
        rgba(255, 255, 255, 0.045) 48%,
        rgba(255, 255, 255, 0.09) 100%
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    /*
     * CORRIGIDO: borda grossa estilo vidro.
     * Semi-transparente para efeito de vidro real.
     * Era: border: 3px solid rgba(187, 46, 60, 1)  ← opaca, sem efeito vidro.
     * Agora: 5px, semi-transparente + reflexos internos.
     */
    border: 5px solid rgba(139, 46, 60, 0.58);

    box-shadow:
        /* Brilho externo da borda — simula espessura de vidro */
        0 0 0 1px  rgba(255, 255, 255, 0.10),
        /* Sombras de profundidade */
        0 4px 10px  rgba(0, 0, 0, 0.30),
        0 14px 42px rgba(0, 0, 0, 0.38),
        0 28px 72px rgba(0, 0, 0, 0.24),
        /* Reflexos internos da borda de vidro */
        inset 0  2px 0 rgba(255, 255, 255, 0.28),
        inset 0 -2px 0 rgba(0,   0,   0,   0.18),
        inset 2px  0 0 rgba(255, 255, 255, 0.12),
        inset -2px 0 0 rgba(0,   0,   0,   0.10);

    transition:
        transform    0.68s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity      0.68s ease,
        filter       0.68s ease,
        box-shadow   0.32s ease,
        border-color 0.32s ease;
    will-change: transform, opacity, filter;

    display: flex;
    flex-direction: column;
    cursor: pointer;

    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Brilho superior (efeito vidro premium) */
#projetos .card-vidro::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 17px; /* levemente menor para compensar a borda 5px */
    background: linear-gradient(
        162deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.02) 38%,
        transparent 65%
    );
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Linha de luz topo (borda interna superior) */
#projetos .card-vidro::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.45) 30%,
        rgba(255, 255, 255, 0.45) 70%,
        transparent
    );
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
}

/* ---- Card ATIVO (pos 0) ---- */
#projetos .card-vidro[data-pos="0"] {
    cursor: default;
    border-color: rgba(139, 46, 60, 0.85);
    box-shadow:
        0  0  0  1px  rgba(139, 46, 60, 0.28),
        0  0  0  2px  rgba(255, 255, 255, 0.06),
        0  14px 52px  rgba(0, 0, 0, 0.48),
        0  36px 88px  rgba(0, 0, 0, 0.30),
        0  0  110px   rgba(139, 46, 60, 0.12),
        inset 0  2px 0 rgba(255, 255, 255, 0.30),
        inset 0 -2px 0 rgba(0,   0,   0,   0.18),
        inset 2px  0 0 rgba(255, 255, 255, 0.14),
        inset -2px 0 0 rgba(0,   0,   0,   0.10);
}

#projetos .card-vidro[data-pos="0"]:hover {
    box-shadow:
        0  0  0  1px  rgba(139, 46, 60, 0.38),
        0  0  0  2px  rgba(255, 255, 255, 0.08),
        0  18px 60px  rgba(0, 0, 0, 0.52),
        0  42px 96px  rgba(0, 0, 0, 0.32),
        0  0  125px   rgba(139, 46, 60, 0.16),
        inset 0  2px 0 rgba(255, 255, 255, 0.34),
        inset 0 -2px 0 rgba(0,   0,   0,   0.20),
        inset 2px  0 0 rgba(255, 255, 255, 0.16),
        inset -2px 0 0 rgba(0,   0,   0,   0.10);
}

/* ---- Cards laterais pos ±1: cursor indica clicabilidade ---- */
#projetos .card-vidro[data-pos="1"]:hover,
#projetos .card-vidro[data-pos="-1"]:hover {
    border-color: rgba(139, 46, 60, 0.42);
    cursor: pointer;
}

/* ---- Light mode ---- */
[data-theme="light"] #projetos .card-vidro {
    background: linear-gradient(
        158deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(255, 255, 255, 0.80) 50%,
        rgba(255, 255, 255, 0.90) 100%
    );
    border-color: rgba(139, 46, 60, 0.42);
    box-shadow:
        0 0 0 1px  rgba(255, 255, 255, 0.70),
        0 4px 22px  rgba(0, 0, 0, 0.10),
        0 18px 55px rgba(0, 0, 0, 0.13),
        inset 0  2px 0 rgba(255, 255, 255, 1),
        inset 0 -2px 0 rgba(0,   0,   0,   0.06),
        inset 2px  0 0 rgba(255, 255, 255, 0.85),
        inset -2px 0 0 rgba(0,   0,   0,   0.04);
}

[data-theme="light"] #projetos .card-vidro[data-pos="0"] {
    border-color: rgba(139, 46, 60, 0.12);
    box-shadow:
        0  0  0  1px  rgba(139, 46, 60, 0.18),
        0  0  0  2px  rgba(255, 255, 255, 0.60),
        0  16px 52px  rgba(0, 0, 0, 0.16),
        0  0  88px    rgba(139, 46, 60, 0.09),
        inset 0  2px 0 rgba(255, 255, 255, 1),
        inset 0 -2px 0 rgba(0,   0,   0,   0.06),
        inset 2px  0 0 rgba(255, 255, 255, 0.90),
        inset -2px 0 0 rgba(0,   0,   0,   0.03);
}

[data-theme="light"] #projetos .card-vidro::before {
    background: linear-gradient(
        162deg,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.08) 38%,
        transparent 65%
    );
}

#projetos .cv-img {
    width: 100%;
    height: 320px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: rgba(14, 14, 17, 0.60);
}

[data-theme="light"] #projetos .cv-img {
    background: rgba(210, 205, 196, 0.55);
}

#projetos .cv-img img {
    width: 100%;
    height: 100%;
    border-radius: 0 10px 10px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    pointer-events: none;
}

#projetos .card-vidro[data-pos="0"] .cv-img img:hover {
    transform: scale(1.04);
}

#projetos .cv-body {
    padding: 1.3rem 1.6rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 11;
}

#projetos .cv-body h3 {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--cor-primaria);
    margin-bottom: 0.6rem;
    line-height: 1.25;
    text-align: center;
}

#projetos .cv-body .botoes-projeto {
    padding: 0;
    margin-top: auto;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========================================
   BOTÕES DE NAVEGAÇÃO
   ======================================== */

#projetos .cpv-btn {
    position: absolute;
    top: calc(50% - 50px);
    transform: translateY(-50%);
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 24, 0.72);
    color: #F5F0E6;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.26s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

#projetos .cpv-btn:hover {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 6px 22px rgba(139, 46, 60, 0.45);
}

#projetos .cpv-btn:active {
    transform: translateY(-50%) scale(0.97);
}

#projetos .cpv-btn-prev { left: 6px;  }
#projetos .cpv-btn-next { right: 6px; }

[data-theme="light"] #projetos .cpv-btn {
    background: rgba(245, 240, 230, 0.88);
    border-color: rgba(27, 27, 30, 0.14);
    color: var(--cor-texto);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] #projetos .cpv-btn:hover {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: #F5F0E6;
}

/* ========================================
   DOTS INDICADORES
   ======================================== */

#projetos .cpv-dots {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
    align-items: center;
    z-index: 40;
}

#projetos .cpv-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(245, 240, 230, 0.22);
    cursor: pointer;
    transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    flex-shrink: 0;
}

#projetos .cpv-dot:hover {
    background: rgba(245, 240, 230, 0.50);
    transform: scale(1.25);
}

#projetos .cpv-dot.ativo {
    background: var(--cor-primaria);
    transform: scale(1.45);
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(139, 46, 60, 0.55);
}

[data-theme="light"] #projetos .cpv-dot {
    background: rgba(27, 27, 30, 0.18);
}

[data-theme="light"] #projetos .cpv-dot:hover {
    background: rgba(27, 27, 30, 0.42);
}

[data-theme="light"] #projetos .cpv-dot.ativo {
    background: var(--cor-primaria);
    box-shadow: 0 0 10px rgba(139, 46, 60, 0.35);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* overflow: hidden no palco para cortar cards fora dos limites */
#projetos .cpv-palco {
    overflow: hidden;
}

/* ---- ≤ 1100 px — desktop médio ---- */
@media (max-width: 1100px) {
    #projetos .cpv-palco  { height: 530px; perspective: 1050px; }

    #projetos .cpv-cards,
    #projetos .card-vidro { width: 336px; height: 462px; }

    #projetos .cv-img     { height: 320px; border-radius: 0 10px 10px;}
}

/* ---- ≤ 900 px — tablet landscape ---- */
@media (max-width: 900px) {
    #projetos .cpv-palco  { height: 505px; perspective: 900px; }

    #projetos .cpv-cards,
    #projetos .card-vidro { width: 305px; height: 444px; }

    #projetos .cv-img     { height: 320px; border-radius: 0 10px 10px;}

    #projetos .cv-body h3 { font-size: 1.08rem; }

    #projetos .cpv-btn    { width: 44px; height: 44px; }
    #projetos .cpv-btn-prev { left: 4px; }
    #projetos .cpv-btn-next { right: 4px; }
}

/* ---- ≤ 680 px — tablet retrato / phablet ---- */
@media (max-width: 680px) {
    #projetos .cpv-wrapper { padding-bottom: 4rem; }

    #projetos .cpv-palco  { height: 474px; perspective: 780px; }

    #projetos .cpv-cards,
    #projetos .card-vidro { width: 300px; height: 420px; }

    #projetos .cv-img     { height: 300px; border-radius: 0 10px 10px;}
    #projetos .cv-img img {
    object-fit: cover; }

    #projetos .cv-body    { padding: 1.05rem 1.25rem 1rem; }
    #projetos .cv-body h3 { font-size: 1rem; }

    #projetos .cpv-btn    { width: 40px; height: 40px; font-size: 0.86rem; }
    #projetos .cpv-btn-prev { left: 2px; }
    #projetos .cpv-btn-next { right: 2px; }
}

/* ---- ≤ 540 px — smartphones grandes ---- */
@media (max-width: 540px) {
    #projetos .cpv-palco  { height: 440px; perspective: 680px; }

    #projetos .cpv-cards,
    #projetos .card-vidro { width: 280px; height: 390px; }

    #projetos .cv-img     { height: 280px; border-radius: 0 10px 10px;}

    #projetos .cv-body    { padding: 0.95rem 1.1rem 0.9rem; }
    #projetos .cv-body h3 { font-size: 0.95rem; }

    #projetos .cv-body .botoes-projeto .btn {
        padding: 0.42rem 0.82rem;
        font-size: 0.78rem;
    }

    #projetos .cpv-btn    { width: 38px; height: 38px; font-size: 0.82rem; }
    #projetos .cpv-dot.ativo { width: 20px; }
}

/* ---- ≤ 400 px — smartphones compactos ---- */
@media (max-width: 400px) {
    #projetos .cpv-wrapper { padding-bottom: 3.2rem; }

    #projetos .cpv-palco  { height: 408px; perspective: 580px; }

    #projetos .cpv-cards,
    #projetos .card-vidro { width: 250px; height: 362px; }

    #projetos .cv-img     { height: 260px; }

    #projetos .cv-body    { padding: 0.85rem 1rem 0.85rem; }
    #projetos .cv-body h3 { font-size: 0.88rem; }

    #projetos .cv-body .botoes-projeto .btn {
        padding: 0.38rem 0.7rem;
        font-size: 0.74rem;
    }

    #projetos .cpv-btn { width: 34px; height: 34px; font-size: 0.78rem; }
    #projetos .cpv-dot { width: 7px; height: 7px; }
    #projetos .cpv-dot.ativo { width: 16px; }
}