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

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

:root {
    --papel: #fff3e2;
    --papel-escuro: #f3e6cc;
    --tinta: #1a1730;
    --tinta-suave: rgba(26, 23, 48, 0.72);
    --azul: #2a5bff;
    --rosa: #ff3da6;
    --girassol: #ffd100;
    --roxo-sobra: #7a3bff;
    --linha: rgba(26, 23, 48, 0.16);
    --grao-opacidade: 0.05;
    --display: 'Archivo Black', 'Archivo', system-ui, sans-serif;
    --texto: 'Archivo', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--papel);
    color: var(--tinta);
    font-family: var(--texto);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--papel);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255, 61, 166, 0.10) 0, transparent 38%),
        radial-gradient(circle at 88% 82%, rgba(42, 91, 255, 0.10) 0, transparent 38%),
        radial-gradient(rgba(26, 23, 48, 0.16) 1px, transparent 1px);
    background-size: auto, auto, 3px 3px;
}

section {
    margin: 0;
}

h1, h2, h3 {
    font-family: var(--display);
    letter-spacing: -0.01em;
    text-wrap: balance;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Photo frame: real color, no tint */
.duotone {
    position: relative;
    overflow: hidden;
    background: var(--papel-escuro);
}

.duotone img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Navigation ---------- */

.navegacao {
    /* Centered via left:0/right:0/margin:auto rather than left:50% +
       transform:translateX(-50%): a `transform` on this element would make
       it the containing block for any position:fixed descendant (like the
       mobile .menu panel below), so that panel's own left/width offsets
       would resolve against this pill's narrower box instead of the real
       viewport — leaving a visible sliver at the edge. This approach centers
       identically without ever establishing that new containing block. */
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: calc(100% - 2.5rem);
    max-width: 1180px;
    z-index: 100;
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 999px;
    box-shadow: 4px 4px 0 var(--azul);
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

.menu-link {
    text-decoration: none;
    color: var(--tinta);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0.2rem;
}

.menu-link::after {
    content: "";
    width: 100%;
    height: 3px;
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--azul);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-link:hover::after,
.menu-link:focus-visible::after {
    transform: scaleX(1);
}

.idioma-seletor {
    position: relative;
}

.idioma-btn {
    background: var(--tinta);
    color: var(--papel);
    border: 2px solid var(--tinta);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.idioma-dropdown {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--papel);
    min-width: 150px;
    border: 2px solid var(--tinta);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--azul);
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(-8px);
    z-index: 1000;
    overflow: hidden;
}

.idioma-dropdown.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.idioma-dropdown a {
    color: var(--tinta);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.idioma-dropdown a:hover {
    background: var(--girassol);
}

/* ---------- Hero ---------- */

.cabecalho {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 9rem 2rem 4rem;
    max-width: 1240px;
    margin: 0 auto;
}

.cabecalho-grade {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.cabecalho-sub-titulo {
    font-family: var(--display);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    color: var(--azul);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    min-height: 1.6rem;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--azul);
    animation: piscar 0.8s infinite;
}

@keyframes piscar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.anim-nome {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: var(--tinta);
    line-height: 0.98;
    margin-bottom: 1.25rem;
    text-shadow: 4px 4px 0 var(--azul);
}

.cabecalho-tese {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    max-width: 34ch;
    color: var(--tinta-suave);
    font-weight: 600;
    margin-bottom: 2.25rem;
}

.botoes-hero {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.btn-hero {
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--texto);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid var(--tinta);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primario {
    background: var(--azul);
    color: var(--papel);
    box-shadow: 4px 4px 0 var(--tinta);
    padding: 1.1rem 2.25rem;
    font-size: 1.05rem;
}

.btn-primario:hover,
.btn-primario:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--tinta);
    color: var(--papel);
}

.dropdown-cv {
    position: relative;
    display: inline-block;
}

.btn-secundario {
    background: var(--papel);
    color: var(--tinta);
    box-shadow: 4px 4px 0 var(--girassol);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-secundario:hover,
.btn-secundario:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--azul);
    background: var(--girassol);
}

.btn-terciario {
    background: transparent;
    color: var(--tinta);
    border: none;
    box-shadow: none;
    padding: 0.95rem 0.25rem;
    text-decoration: underline;
    text-decoration-color: var(--girassol);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.btn-terciario:hover,
.btn-terciario:focus-visible {
    transform: none;
    box-shadow: none;
    color: var(--azul);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background: var(--papel);
    min-width: 180px;
    border: 2px solid var(--tinta);
    border-radius: 12px;
    box-shadow: 3px 3px 0 var(--azul);
    z-index: 1;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.dropdown-content.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: var(--tinta);
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-weight: 600;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background: var(--girassol);
}

.sociais-hero {
    display: flex;
    gap: 1.25rem;
    padding: 0.85rem 1.5rem;
    background: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 999px;
    width: fit-content;
}

.social-icon {
    color: var(--tinta);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover,
.social-icon:focus-visible {
    color: var(--rosa);
    transform: translateY(-3px);
}

.cabecalho-retrato {
    position: relative;
    justify-self: center;
}

.retrato-marca {
    position: absolute;
    top: -2.5rem;
    right: -2rem;
    width: 9rem;
    height: 9rem;
    z-index: -1;
}

.retrato-marca::before,
.retrato-marca::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
}

.retrato-marca::before {
    width: 6.5rem;
    height: 6.5rem;
    background: var(--girassol);
    top: 0;
    right: 1.5rem;
}

.retrato-marca::after {
    width: 5rem;
    height: 5rem;
    background: var(--azul);
    top: 3.5rem;
    right: 0;
}

.perfil-container {
    width: min(360px, 100%);
    aspect-ratio: 4 / 5;
    border: 3px solid var(--tinta);
    border-radius: 18px;
    box-shadow: 8px 8px 0 var(--azul);
}

.foto-perfil {
    width: 100%;
    height: 100%;
}

/* ---------- Sobre ---------- */

.sobre {
    padding: 7rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.sobre-titulo {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--tinta);
    margin-bottom: 2rem;
    text-shadow: 3px 3px 0 var(--girassol);
}

.sobre-caixa {
    max-width: 72ch;
    margin: 0 auto;
}

.sobre-paragrafo {
    text-align: left;
    font-size: 1.15rem;
    color: var(--tinta);
    line-height: 1.7;
}

.sobre-paragrafo p {
    margin-bottom: 1.25rem;
}

.sobre-paragrafo p:last-child {
    margin-bottom: 0;
}

.sobre-paragrafo strong {
    color: var(--azul);
    font-weight: 700;
}

/* ---------- Atividades ---------- */

.atividades {
    padding: 6rem 2rem 7rem;
    max-width: 1100px;
    margin: 0 auto;
}

.atividades-titulo {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--tinta);
    margin-bottom: 3rem;
    text-shadow: 3px 3px 0 var(--azul);
}

.atividades-caixa {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.atividade-item {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    background: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 5px 5px 0 var(--girassol);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.atividade-item:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--girassol);
}

.atividade-item--vencedora {
    box-shadow: 6px 6px 0 var(--roxo-sobra);
    border-color: var(--roxo-sobra);
}

.atividade-item--vencedora:hover {
    box-shadow: 9px 9px 0 var(--roxo-sobra);
}

.atividade-imagem-caixa {
    width: 260px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    flex-shrink: 0;
}

.atividade-texto {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    justify-content: center;
}

.selo-vencedor {
    display: inline-flex;
    align-self: flex-start;
    background: var(--roxo-sobra);
    color: var(--papel);
    font-family: var(--display);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.info-atividades {
    font-size: 1.3rem;
    color: var(--tinta);
}

.paragrafos-atividades {
    text-align: left;
    color: var(--tinta-suave);
    line-height: 1.6;
    max-width: 62ch;
}

@media (max-width: 768px) {
    .atividade-item {
        flex-direction: column;
    }

    .atividade-imagem-caixa {
        width: 100%;
    }
}

/* ---------- Projetos ---------- */

.projetos {
    padding: 6rem 2rem 7rem;
}

.projetos-titulo {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--tinta);
    margin-bottom: 3rem;
    text-shadow: 3px 3px 0 var(--girassol);
}

.projetos-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.projetos-caixa {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 0.5rem 0 1.5rem;
    scrollbar-width: none;
}

.projetos-caixa::-webkit-scrollbar {
    display: none;
}

.projetos-card {
    min-width: 100%;
    flex: 0 0 auto;
    scroll-snap-align: center;
    display: flex;
    align-items: stretch;
    background: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--azul);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* No hover lift/shadow-grow here on purpose: these cards aren't clickable
   yet (no public demo/repo links to send visitors to), and that feedback
   vocabulary is reserved for real interactive elements (buttons, real
   links) elsewhere in the system. */

.carrossel-btn {
    background: var(--tinta);
    color: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrossel-btn.prev {
    left: -24px;
}

.carrossel-btn.next {
    right: -24px;
}

.carrossel-btn:hover {
    transform: translateY(-50%) scale(1.08);
    background: var(--azul);
}

.projeto-imagem-caixa {
    width: 42%;
    max-width: 380px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}

.caixa-texo-projeto {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-projetos {
    margin-bottom: 6px;
    font-size: 1.25rem;
}

.paragrafos-projetos {
    color: var(--tinta-suave);
    line-height: 1.5;
}

.selo-sem-demo {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0.65rem;
    border: 2px solid var(--tinta);
    border-radius: 999px;
    font-family: var(--display);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tinta-suave);
}

.carrossel-indicador {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.indicador-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--tinta);
    background: var(--papel);
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.indicador-dot.ativo {
    background: var(--azul);
    transform: scale(1.2);
}

/* ---------- Contato ---------- */

.contatos {
    padding: 6rem 2rem 8rem;
}

.contato-titulo {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 3rem;
    text-shadow: 3px 3px 0 var(--girassol);
}

.formulario-contato {
    max-width: 560px;
    margin: 0 auto;
    background: var(--papel);
    border: 2px solid var(--tinta);
    border-radius: 18px;
    box-shadow: 7px 7px 0 var(--azul);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rotulo-form {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.campo-form {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: var(--papel);
    color: var(--tinta);
    border: 2px solid var(--tinta);
    outline: none;
    font-family: var(--texto);
    font-size: 1rem;
}

.campo-form::placeholder {
    color: rgba(26, 23, 48, 0.68);
}

.campo-form:focus-visible {
    border-color: var(--azul);
    box-shadow: 3px 3px 0 var(--azul);
}

.campo-form[aria-invalid="true"] {
    border-color: var(--rosa);
}

.grupo-form {
    margin-bottom: 1.25rem;
}

.erro-form {
    color: #b3005c;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.4rem;
    min-height: 1.1rem;
}

.status-form {
    text-align: center;
    font-weight: 700;
    min-height: 1.2rem;
    margin-top: 0.25rem;
}

.botao-form {
    color: var(--papel);
    background: var(--azul);
    padding: 1rem 2rem;
    border: 2px solid var(--tinta);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: var(--texto);
    width: 100%;
    box-shadow: 5px 5px 0 var(--tinta);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.botao-form:hover,
.botao-form:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--tinta);
}

.contato-alternativo {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: var(--tinta-suave);
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contato-alternativo a {
    color: var(--azul);
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- Mobile nav ---------- */

.hamburguer {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 24px;
    height: 3px;
    margin: 5px auto;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    background-color: var(--tinta);
}

@media (max-width: 900px) {
    .cabecalho-grade {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .cabecalho-texto {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cabecalho-tese {
        max-width: 40ch;
    }

    .botoes-hero,
    .sociais-hero {
        justify-content: center;
    }

    .cabecalho-retrato {
        order: -1;
    }
}

@media (max-width: 768px) {
    .navegacao {
        padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    }

    .idioma-seletor {
        z-index: 102;
    }

    .hamburguer {
        display: block;
        z-index: 101;
    }

    .hamburguer.ativo .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburguer.ativo .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburguer.ativo .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .menu {
        /* vw/vh keep this panel sized and positioned against the real
           viewport regardless of ancestor layout. */
        position: fixed;
        left: -100vw;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--papel);
        width: 100vw;
        height: 100vh;
        text-align: center;
        transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        justify-content: center;
    }

    .menu.ativo {
        left: 0;
    }

    .menu-link {
        margin: 16px 0;
        display: block;
        font-size: 1.5rem;
    }

    .cabecalho {
        padding: 8rem 1.25rem 3rem;
    }

    .perfil-container {
        width: min(260px, 70vw);
    }

    .botoes-hero {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

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

    .dropdown-cv {
        width: 100%;
    }

    .dropdown-content {
        width: 100%;
        min-width: unset;
    }

    .sobre,
    .atividades,
    .projetos,
    .contatos {
        padding: 4rem 1.25rem;
    }

    .projetos-caixa {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        overflow-x: visible;
        padding: 0;
    }

    .projetos-card {
        flex-direction: column;
    }

    .projeto-imagem-caixa {
        width: 100%;
        max-width: none;
        aspect-ratio: 16 / 10;
    }

    .carrossel-btn,
    .carrossel-indicador {
        display: none;
    }

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

/* ---------- Reveal / motion ---------- */

/* Visible by default: content must never depend on JS to become visible.
   Only once JS confirms it's running (html.js-motion-ready) do reveal
   targets arm their hidden starting state; the IntersectionObserver then
   adds .active to animate them in. If JS never runs, everything stays
   visible from first paint. */
.reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-motion-ready .reveal:not(.active) {
    opacity: 0;
    transform: translateY(40px);
}

html.js-motion-ready .reveal-left:not(.active) {
    opacity: 0;
    transform: translateX(-40px);
}

html.js-motion-ready .reveal-right:not(.active) {
    opacity: 0;
    transform: translateX(40px) rotate(2deg);
}

.reveal.active, .reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
}

.delay-100 { transition-delay: 120ms; }
.delay-200 { transition-delay: 240ms; }
.delay-300 { transition-delay: 360ms; }
.delay-400 { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal, .reveal-left, .reveal-right {
        transition: opacity 0.4s ease;
        transform: none;
    }

    .cursor {
        animation: none;
        opacity: 1;
    }

    .atividade-item, .projetos-card, .btn-hero, .botao-form,
    .atividade-item:hover, .projetos-card:hover {
        transition: none;
    }
}
