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

:root {
    color-scheme: dark;

    /* Identidade MenteDev: ciano da logo sobre a base slate do portfólio */
    --accent: #00dcff;
    --accent-hover: #6beaff;
    --accent-ink: #06202b;

    --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 */
    --display: "Comfortaa", "Montserrat", sans-serif;
    --sans: "Montserrat", "Segoe UI", Arial, sans-serif;

    /* 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);
}

*,
*::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.14;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.85rem, 3.4vw, 2.75rem);
}

p {
    margin: 0;
}

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

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

: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: 660px;
    margin-bottom: clamp(36px, 5vw, 56px);
}

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

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

/* Marcador: o círculo menor 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: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.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: 34em;
    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: 8px;
    min-height: 50px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    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);
}

.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);
}

/* 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;
}

/* Brilho suave atrás de um elemento de destaque */
.glow {
    position: relative;
    z-index: 0;
}

.glow::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -20% -24% -10% -8%;
    background: radial-gradient(closest-side, rgba(0, 220, 255, 0.13), transparent);
    pointer-events: none;
}

/* Lista com o círculo da logo como marcador */
.ring-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 0.92rem;
    font-weight: 500;
    list-style: none;
}

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

.ring-list li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 0.48em;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
}

/* Ícones: símbolos de images/icons.svg, dentro de um anel */

.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-ring {
    display: grid;
    flex: none;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    color: var(--accent);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: clamp(32px, 4vw, 56px);
}

.icon-grid .icon-ring {
    margin-bottom: 26px;
}

.icon-grid h3 {
    font-size: 1.3rem;
}

.icon-grid p {
    margin-top: 12px;
    color: var(--muted);
}

.icon-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.icon-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
}

.icon-list li:first-child {
    border-top: 1px solid var(--line);
}

.icon-list .icon-ring {
    width: 48px;
    height: 48px;
}

.icon-list .icon {
    width: 20px;
    height: 20px;
}

/* Variante com título e descrição em cada linha */
.icon-list-detailed li {
    align-items: flex-start;
    padding-block: 24px;
}

.icon-list-detailed h3 {
    font-size: 1.15rem;
}

.icon-list-detailed p {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 400;
}

/* 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: 36px;
    min-height: var(--header-height);
}

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

.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);
}

.header-cta {
    min-height: 42px;
    padding-inline: 20px;
    font-size: 0.9rem;
}

.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-size: 0.76rem;
    font-weight: 500;
}

.shot figcaption::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.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);
}

/* Fora de um card, o screenshot ganha moldura própria */
.shot-framed {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 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(24px, 3vw, 36px);
}

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

.project h3 {
    margin-top: 12px;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
}

.project-summary {
    max-width: 32em;
    margin-top: 12px;
    color: var(--muted);
}

.project .ring-list {
    margin-block: 22px 30px;
}

.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 40%;
    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;
}

/* Chamada de contato */

.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(48px, 8vw, 96px) 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: 16em;
    margin-top: 18px;
}

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

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

/* 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.15rem;
}

.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,
    .header-cta {
        display: none;
    }

    .menu {
        position: relative;
        display: block;
        margin-left: auto;
    }

    .menu summary {
        display: inline-flex;
        align-items: center;
        min-height: 42px;
        padding-inline: 18px;
        border: 1px solid var(--line-strong);
        border-radius: 999px;
        font-size: 0.9rem;
        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(280px, 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);
    }

    .menu nav .menu-cta {
        color: var(--accent);
        font-weight: 600;
    }

    .split {
        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;
    }

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

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

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

    .shot img {
        transition: none;
    }
}
