﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Lexend:wght@400;500&family=Open+Sans:wght@400;600&display=swap');

/* ==========================================================
   TOKENS
   ========================================================== */
:root {
    --header-h: 62px;
    --footer-h: 104px;
    --laranja-1: #c4622d;
    --laranja-btn-1: #f4804a;
    --laranja-btn-2: #ff9d66;
    --verde-btn-1: #2e9e44;
    --verde-btn-2: #4fd56a;
    --vermelho-escuro: #a00000;
    --oliva: #5b5d42;
    --azul-neon: #8fcaff;
    --verde-neon: #6dff7a;
    --texto-claro: #ffffff;
    --fonte-titulo: 'Lexend', 'Segoe UI', sans-serif;
    --fonte-sub: 'DM Sans', 'Segoe UI', sans-serif;
    --fonte-texto: 'Open Sans', 'Segoe UI', sans-serif;
    --fonte-ui: Arial, Helvetica, sans-serif;
    --btn-w: 224px;
    --btn-h: 62px;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--fonte-texto);
    color: var(--texto-claro);
    background: #2d3a20;
}

img {
    max-width: 100%;
}

button {
    font-family: var(--fonte-ui);
    cursor: pointer;
    border: 0;
}

    button:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 3px;
    }

/* ==========================================================
   CABEÇALHO
   ========================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, var(--laranja-1) 0%, #b0301a 50%, var(--vermelho-escuro) 100%);
}

    /* Botão "Zynsk" */
    header > button:nth-of-type(1) {
        height: 100%;
        padding: 0 6px 0 clamp(16px, 3vw, 30px);
        background: none;
        color: #fff;
        font-size: clamp(1.3rem, 3vw, 1.65rem);
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    /* Raposa */
    header > img {
        height: clamp(28px, 4vw, 34px);
        width: auto;
        display: block;
    }

    /* Botão "Sobre Mim" */
    header > button:nth-of-type(2) {
        margin-left: auto;
        height: 100%;
        padding: 0 clamp(12px, 3vw, 24px);
        background: none;
        color: #fff;
        font-size: 1.1rem;
        font-weight: 700;
        transition: opacity 0.2s;
    }

/* Botão do GitHub */
#github-button {
    height: 100%;
    padding: 0 clamp(20px, 8vw, 130px) 0 10px;
    display: flex;
    align-items: center;
    background: none;
    border-left: 3px solid #fff;
}

    #github-button img {
        width: 50px;
        height: 50px;
        display: block;
        border-radius: 50%;
        transition: transform 0.2s;
    }

/* ==========================================================
   CONTEÚDO PRINCIPAL (primeiro <div> do body)
   Layout padrão = celular / telas estreitas (1 coluna)
   ========================================================== */
body > div:first-of-type {
    position: relative;
    isolation: isolate;
    flex: 1;
    min-height: calc(100vh - var(--header-h) - var(--footer-h));
    min-height: calc(100dvh - var(--header-h) - var(--footer-h));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: center;
    row-gap: 18px;
    padding: clamp(30px, 6vw, 80px) clamp(20px, 6vw, 80px);
    text-align: center;
}

/* Imagem de fundo */
#Background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

    #Background img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center;
        user-select: none;
        -webkit-user-drag: none;
        pointer-events: none;
    }

/* Título com brilho neon */
body > div:first-of-type h1 {
    width: 100%;
    max-width: 900px;
    margin: 0;
    font-family: var(--fonte-titulo);
    font-weight: 500;
    font-size: clamp(1.8rem, 4.6vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: 0.05em;
    color: var(--azul-neon);
    text-shadow: 0 0 6px rgba(143, 202, 255, 0.9), 0 0 18px rgba(80, 160, 255, 0.7);
    overflow-wrap: anywhere;
}

    /* "ZYNSK" verde */
    body > div:first-of-type h1 span {
        color: var(--verde-neon);
        text-shadow: 0 0 6px rgba(109, 255, 122, 0.9), 0 0 18px rgba(40, 220, 70, 0.7);
    }

/* Subtítulo */
body > div:first-of-type > p {
    width: 100%;
    max-width: 800px;
    margin: 0 0 20px;
    font-family: var(--fonte-sub);
    font-size: clamp(1rem, 1.9vw, 1.55rem);
    letter-spacing: 0.02em;
    color: rgba(235, 235, 235, 0.82);
}

/* Botões: Mecatrônica, Informática e contate-me */
.redondo,
.contato {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width: 280px;
    height: 54px;
    border: none;
    outline: none;
    border-radius: 31px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.redondo {
    background: linear-gradient(90deg, var(--laranja-btn-1), var(--laranja-btn-2));
}

.contato {
    background: linear-gradient(90deg, var(--verde-btn-1), var(--verde-btn-2));
}

    .redondo:active,
    .contato:active {
        transform: translateY(0);
    }

    .redondo:focus-visible,
    .contato:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 3px;
    }

/* ==========================================================
   SOBRE MIM (modal)
   ========================================================== */
#sobreEu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    width: min(652px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 52px 8px 24px 10px;
    border-radius: 28px;
    background: linear-gradient(145deg, #c9825e 0%, #a85a5a 50%, #8c3850 100%);
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

    #sobreEu.aberto {
        display: block;
        animation: abrir-modal 0.25s ease-out;
    }

@keyframes abrir-modal {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Botão de fechar */
#sobreEu > button {
    position: absolute;
    top: 20px;
    right: 18px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border-radius: 50%;
    transition: transform 0.2s;
}

    #sobreEu > button img {
        width: 100%;
        height: 100%;
        display: block;
    }

/* Título só para leitores de tela */
#sobreEu h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

#sobreEu p {
    margin: 0 0 1.55em;
    padding: 0 6px;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
}

    #sobreEu p:last-child {
        margin-bottom: 0;
    }

/* ==========================================================
   RODAPÉ
   ========================================================== */
footer {
    position: relative;
    min-height: var(--footer-h);
    padding: 16px clamp(80px, 12vw, 130px) 16px 12px; /* espaço para a raposa */
    background: var(--oliva);
    color: #fff;
    font-family: var(--fonte-texto);
    font-size: 0.95rem;
    line-height: 1.35;
}

    footer p {
        margin: 0 0 4px;
    }

    /* Raposa no canto direito */
    footer::after {
        content: "";
        position: absolute;
        right: clamp(16px, 3vw, 40px);
        top: 50%;
        width: clamp(56px, 6vw, 76px);
        height: clamp(56px, 6vw, 76px);
        transform: translateY(-50%);
        background: url('/Images/Icons/FoxIconTransparente.png') center / contain no-repeat;
    }

/* ==========================================================
   HOVER (só em dispositivos com mouse, evita "hover preso" no toque)
   ========================================================== */
@media (hover: hover) {
    header > button:nth-of-type(2):hover {
        opacity: 0.8;
    }

    #github-button:hover img {
        transform: scale(1.08);
    }

    .redondo:hover,
    .contato:hover {
        transform: translateY(-3px);
        filter: brightness(1.08);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    }

    #sobreEu > button:hover {
        transform: scale(1.12);
    }
}

/* ==========================================================
   TELAS MÉDIAS E GRANDES (PC, notebook, tablet deitado)
   Imagem inteira define a altura; conteúdo fica por cima, à esquerda
   ========================================================== */
@media (min-width: 769px) {
    body > div:first-of-type {
        /* ~ proporção da imagem (100 / 2.17 = 46vw); cresce se a janela for mais alta */
        min-height: clamp(480px, 46vw, calc(100vh - var(--header-h)));
        min-height: clamp(480px, 46vw, calc(100dvh - var(--header-h)));
        padding: 0;
        justify-items: stretch;
        align-content: stretch;
        text-align: left;
        column-gap: clamp(10px, 2vw, 43px);
        row-gap: 28px;
        /* margem | botão | botão | resto */
        grid-template-columns: clamp(10px, 4vw, 60px) repeat(2, minmax(180px, var(--btn-w))) 1fr;
        /* sobra | h1 | p | botões | contate-me | sobra */
        grid-template-rows: 1fr auto auto auto auto 1fr;
    }

        body > div:first-of-type h1 {
            grid-area: 2 / 2 / 3 / -1;
            letter-spacing: 0.1em;
        }

        body > div:first-of-type > p {
            grid-area: 3 / 2 / 4 / -1;
            margin: 0 0 36px 6px;
        }

    .redondo,
    .contato {
        width: var(--btn-w);
        max-width: none;
        height: var(--btn-h);
    }

        .redondo:nth-of-type(1) {
            grid-area: 4 / 2;
        }

        .redondo:nth-of-type(2) {
            grid-area: 4 / 3;
        }

    .contato {
        grid-area: 5 / 2;
    }

    #sobreEu {
        padding-top: 56px;
        border-radius: 40px;
    }

        #sobreEu p {
            font-size: 1.1rem;
        }
}

/* Título em uma linha só quando há espaço */
@media (min-width: 1100px) {
    body > div:first-of-type h1 {
        white-space: nowrap;
    }
}

/* ==========================================================
   CELULARES MUITO PEQUENOS
   ========================================================== */
@media (max-width: 360px) {
    footer {
        font-size: 0.85rem;
    }

    #github-button img {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================
   ACESSIBILIDADE: menos movimento
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
