/* Base do portfólio: tokens, tipografia e componentes usados em todas as páginas.
   Cada página soma o seu próprio arquivo (home.css, projetos.css, curriculo.css). */

:root {
    color-scheme: dark;

    /* Mesma base slate do MenteDev; aqui o destaque é o azul do portfólio. */
    --accent: #629feb;
    --accent-hover: #8ab8f2;
    --accent-ink: #071a30;

    --bg: #1a202b;
    --bg-gradient: linear-gradient(120deg, #08141e, 5%, #1a202b, 95%, #01233f);
    --surface: #1d2535;
    --surface-hover: #232d40;
    --surface-glass: rgba(29, 37, 53, 0.9);

    /* Textos */
    --text: #f1f5f7;
    --muted: #a5b3ce;
    --soft: #7c8aa8;

    /* Linhas finas e translúcidas */
    --line: rgba(165, 179, 206, 0.16);
    --line-strong: rgba(165, 179, 206, 0.34);

    /* Tipografia: Comfortaa nos títulos (a letra do V da logo), Manrope no texto
       e JetBrains Mono para datas, endereços e tecnologias. */
    --display: "Comfortaa", "Manrope", sans-serif;
    --sans: "Manrope", "Segoe UI", Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

    /* Estrutura */
    --content: 1160px;
    --gutter: clamp(20px, 5vw, 40px);
    --radius: 18px;
    --header-height: 72px;
    --shadow: 0 24px 48px rgba(4, 10, 18, 0.4);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    /* A meia-lua da logo, usada como marcador (via mask, para herdar a cor do texto). */
    --moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M104 8A92 92 0 1 1 20 146A84 84 0 1 0 104 8Z'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--bg) var(--bg-gradient);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
}

p {
    margin: 0;
}

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

img,
svg {
    display: block;
    max-width: 100%;
}

/* Componentes com display próprio continuam respeitando o atributo hidden. */
[hidden] {
    display: none !important;
}

/* SVG que só carrega definições (filtros) não ocupa espaço. */
.defs {
    position: absolute;
}

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

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* Blocos reutilizáveis */

.container {
    width: min(100% - 2 * var(--gutter), var(--content));
    margin-inline: auto;
}

.section {
    padding-block: clamp(48px, 6.5vw, 80px);
}

.section-head {
    max-width: 680px;
    margin-bottom: clamp(32px, 5vw, 52px);
}

.section-head h2 {
    margin-top: 18px;
}

.section-head .lead {
    margin-top: 18px;
}

/* Marcador de seção: a meia-lua da logo */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: var(--moon) center / contain no-repeat;
    mask: var(--moon) center / contain no-repeat;
}

.soft {
    color: var(--soft);
}

/* Em títulos, o trecho suave sempre começa em uma linha própria. */
h1 .soft,
h2 .soft {
    display: block;
}

.lead {
    max-width: 36em;
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.button-primary:hover {
    background: var(--accent-hover);
}

.button-ghost {
    border-color: var(--line-strong);
}

.button-ghost:hover {
    border-color: var(--text);
}

.button .icon {
    width: 18px;
    height: 18px;
}

.text-link {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--text);
    font-weight: 600;
    transition: border-color 0.2s ease;
}

.text-link:hover {
    border-color: var(--accent);
}

.text-link span {
    color: var(--accent);
}

/* Duas colunas: título fixo à esquerda, conteúdo à direita */
.split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 7vw, 96px);
    align-items: start;
}

.split .section-head {
    position: sticky;
    top: calc(var(--header-height) + 40px);
    margin-bottom: 0;
}

/* Lista com a meia-lua como marcador */
.moon-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 0.92rem;
    font-weight: 500;
    list-style: none;
}

.moon-list li {
    display: flex;
    gap: 10px;
}

.moon-list li::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: 0.52em;
    background: var(--accent);
    -webkit-mask: var(--moon) center / contain no-repeat;
    mask: var(--moon) center / contain no-repeat;
}

/* Tecnologias: etiquetas em fonte mono */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 3px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.74rem;
    line-height: 1.7;
    white-space: nowrap;
}

/* Ícones: símbolos de images/icons.svg */
.icon {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* A logo desenhada em SVG. O V herda a cor do texto; a meia-lua usa o destaque. */
.mark-moon {
    fill: var(--accent);
}

.mark-bristle {
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
}

.mark-v {
    fill: none;
    stroke: var(--text);
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Máscara que revela a meia-lua como uma pincelada. Parada, mostra tudo. */
.mark-sweep {
    fill: none;
    stroke: #fff;
    stroke-width: 20;
}

/* Cabeçalho */

.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(17, 24, 35, 0.82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.brand svg {
    width: 34px;
    height: 34px;
}

.brand .mark-v {
    stroke-width: 15;
}

.brand b {
    color: var(--accent);
    font-weight: inherit;
}

.site-nav {
    display: flex;
    gap: 32px;
    margin-left: auto;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.site-nav a {
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--text);
}

/* Troca de idioma: leva para a mesma página na outra língua */
.lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding-inline: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lang:hover {
    border-color: var(--text);
    color: var(--text);
}

.lang .icon {
    width: 15px;
    height: 15px;
}

.menu {
    display: none;
}

/* Screenshot de produto, com o endereço real no lugar da barra do navegador */

.shot {
    margin: 0;
    overflow: hidden;
}

.shot figcaption {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding-inline: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
}

.shot figcaption::before {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    background: currentColor;
    -webkit-mask: var(--moon) center / contain no-repeat;
    mask: var(--moon) center / contain no-repeat;
}

.shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 1280 / 616;
    object-fit: cover;
    object-position: left top;
    transform-origin: center bottom;
    transition: transform 0.6s var(--ease-out);
}

/* Card de projeto */

.project {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.25s ease;
}

.project:hover {
    border-color: var(--line-strong);
}

.project:hover .shot img {
    transform: scale(1.03);
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(22px, 3vw, 34px);
}

.project-kind {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project h3 {
    margin-top: 12px;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
}

.project-summary {
    max-width: 34em;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.98rem;
}

.project .moon-list {
    margin-top: 20px;
}

.project .chips {
    margin-block: 22px 26px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin-top: auto;
    font-size: 0.95rem;
    font-weight: 600;
}

.project-links a span {
    display: inline-block;
    margin-left: 4px;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.project-links a:hover span {
    transform: translateX(3px);
}

.project .shot {
    order: -1;
    border-bottom: 1px solid var(--line);
}

/* Variante larga: texto de um lado, screenshot do outro */
.project-featured {
    flex-direction: row;
}

.project-featured .project-body {
    flex: 0 0 42%;
    justify-content: center;
}

.project-featured .project-links {
    margin-top: 0;
}

.project-featured .shot {
    display: flex;
    flex: 1;
    flex-direction: column;
    order: 0;
    min-width: 0;
    border-bottom: 0;
    border-left: 1px solid var(--line);
}

.project-featured .shot img {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
}

/* Fases: uma sequência em que a lua enche a cada etapa (usada no fluxo do Rock in Rio) */

.phases {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.phases li {
    position: relative;
    padding-right: 22px;
}

/* Linha que liga uma fase à seguinte */
.phases li::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 10px;
    left: 40px;
    height: 1px;
    background: var(--line-strong);
}

.phases li:last-child::before {
    display: none;
}

.phase-moon {
    width: 29px;
    height: 29px;
}

.phase-moon circle {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1.2;
}

.phase-moon path {
    fill: var(--accent);
}

.phases h3 {
    margin-top: 16px;
    font-size: 1.05rem;
}

.phases p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* Números de um projeto */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px 32px;
    margin: 0;
}

.stats dt {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.stats dd {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: clamp(1.7rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* dt vem depois do dd no HTML, para o número aparecer em cima do rótulo */
.stats div {
    display: flex;
    flex-direction: column;
}

/* Painel ilustrativo: a tela de acompanhamento do refeitório, com dados fictícios */

.panel {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 700;
}

.panel-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.panel-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 20px 20px 16px;
}

.panel-totals div {
    display: flex;
    flex-direction: column-reverse;
}

.panel-totals dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.panel-totals dd {
    margin: 0;
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.panel-meter {
    height: 6px;
    margin-inline: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.panel-meter span {
    display: block;
    width: var(--p);
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.panel-log {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.84rem;
}

.panel-log li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 11px 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.panel-log code {
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.78rem;
}

.panel-log em {
    margin-left: auto;
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
}

.panel-log .is-used em {
    color: var(--soft);
}

.panel-note {
    padding: 10px 20px 12px;
    border-top: 1px solid var(--line);
    color: var(--soft);
    font-size: 0.74rem;
}

/* Caso em destaque: texto de um lado, painel do outro; depois o fluxo e os números */

.case {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.case h2 {
    margin-top: 18px;
}

.case .lead {
    margin-top: 18px;
}

.case .chips {
    margin-top: 26px;
}

.case .text-link {
    display: inline-block;
    margin-top: 30px;
}

.case-flow {
    margin-top: clamp(40px, 5vw, 64px);
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--line);
}

.case-stats {
    margin-top: clamp(36px, 5vw, 56px);
    padding-top: clamp(28px, 4vw, 40px);
    border-top: 1px solid var(--line);
}

/* Grade de projetos. Cada página define quantas colunas usa. */

.projects {
    display: grid;
    gap: 24px;
}

.projects .project-featured {
    grid-column: 1 / -1;
}

.projects-more {
    margin-top: 36px;
}

/* Chamada de contato */

.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 80px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(90% 130% at 50% 0%, rgba(1, 56, 99, 0.55), transparent 70%),
        var(--surface);
    text-align: center;
}

.contact h2 {
    max-width: 17em;
    margin-top: 18px;
}

.contact .lead {
    margin-top: 18px;
}

.contact .actions {
    justify-content: center;
    margin-top: 36px;
}

.social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    font-size: 0.92rem;
    font-weight: 500;
}

.social a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.social a:hover {
    color: var(--text);
}

.social .icon {
    width: 18px;
    height: 18px;
}

/* Rodapé */

.site-footer {
    margin-top: clamp(32px, 5vw, 56px);
    padding-block: 36px 44px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px 40px;
}

.site-footer .brand {
    justify-self: start;
    color: var(--text);
    font-size: 1.1rem;
}

.site-footer .brand svg {
    width: 30px;
    height: 30px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-weight: 500;
}

.site-footer nav a {
    transition: color 0.2s ease;
}

.site-footer nav a:hover {
    color: var(--text);
}

/* Entrada ao rolar. Só vale quando o site.js marca o <html> com .has-motion;
   sem JS, ou com movimento reduzido, o conteúdo fica visível desde o início. */

.has-motion [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease-out), border-color 0.25s ease;
    transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s;
}

.has-motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Responsivo */

@media (max-width: 900px) {
    .site-nav {
        display: none;
    }

    .header-inner {
        gap: 12px;
    }

    .lang {
        margin-left: auto;
    }

    .menu {
        position: relative;
        display: block;
    }

    .menu summary {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        padding-inline: 16px;
        border: 1px solid var(--line-strong);
        border-radius: 999px;
        font-size: 0.88rem;
        font-weight: 600;
        cursor: pointer;
        list-style: none;
    }

    .menu summary::-webkit-details-marker {
        display: none;
    }

    .menu nav {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        display: grid;
        width: min(260px, 82vw);
        padding: 10px;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .menu nav a {
        padding: 12px 14px;
        border-radius: 10px;
        font-weight: 500;
    }

    .menu nav a:hover {
        background: var(--surface-hover);
    }

    .split {
        grid-template-columns: 1fr;
    }

    .case {
        grid-template-columns: 1fr;
    }

    .split .section-head {
        position: static;
    }

    .project-featured {
        flex-direction: column;
    }

    .project-featured .project-body {
        flex: 1;
    }

    .project-featured .project-links {
        margin-top: auto;
    }

    .project-featured .shot {
        order: -1;
        border-bottom: 1px solid var(--line);
        border-left: 0;
    }

    .project-featured .shot img {
        flex: none;
        aspect-ratio: 1280 / 616;
    }

    /* As fases viram uma coluna, com a linha descendo de uma lua para a outra */
    .phases {
        grid-template-columns: 1fr;
    }

    .phases li {
        display: grid;
        grid-template-columns: 29px 1fr;
        column-gap: 16px;
        padding: 0 0 22px;
    }

    .phases li:last-child {
        padding-bottom: 0;
    }

    .phases li::before {
        top: 36px;
        right: auto;
        bottom: 6px;
        left: 14px;
        width: 1px;
        height: auto;
    }

    .phase-moon {
        grid-row: span 2;
    }

    .phases h3 {
        margin-top: 2px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .actions .button {
        flex: 1 1 100%;
    }

    .brand {
        font-size: 1.1rem;
    }

    .brand svg {
        width: 30px;
        height: 30px;
    }
}

/* Telas bem estreitas: o cabeçalho abre mão do ícone e de um pouco de respiro. */
@media (max-width: 380px) {
    .lang .icon {
        display: none;
    }

    .lang,
    .menu summary {
        padding-inline: 12px;
    }

    .brand {
        gap: 8px;
        font-size: 1rem;
    }
}

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

    .shot img {
        transition: none;
    }
}
