@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Silkscreen&family=VT323&display=swap');

/* ========== CSS VARIABLES - PIXEL ART ========== */
:root {
    --pixel-blue: #5b6ee1;
    --pixel-pink: #f492f0;
    --pixel-yellow: #ffd93d;
    --pixel-orange: #ff8552;
    --pixel-green: #6bcf7f;
    --pixel-dark: #2d2d44;
    --pixel-darker: #1a1a2e;
    --pixel-light: #ffffff;
    --pixel-beige: #f4e8c1;
    --pixel-brown: #8b6939;
    --font-pixel: 'Press Start 2P', 'Silkscreen', 'VT323', 'Courier New', Courier, monospace;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

body {
    font-family: var(--font-pixel);
    color: var(--pixel-light);
    background-color: var(--pixel-darker);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
}

/* ========== PIXEL GRID BACKGROUND ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 4px,
            rgba(91, 110, 225, 0.03) 4px,
            rgba(91, 110, 225, 0.03) 8px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 4px,
            rgba(91, 110, 225, 0.03) 4px,
            rgba(91, 110, 225, 0.03) 8px);
    pointer-events: none;
    z-index: 0;
}

/* ========== FLOATING PIXELS ANIMATION ========== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, var(--pixel-yellow), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--pixel-pink), transparent),
        radial-gradient(2px 2px at 80% 10%, var(--pixel-blue), transparent),
        radial-gradient(2px 2px at 40% 80%, var(--pixel-green), transparent),
        radial-gradient(2px 2px at 90% 50%, var(--pixel-orange), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 10% 90%;
    animation: floatingPixels 20s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatingPixels {

    0%,
    100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 10% 90%;
    }

    25% {
        background-position: 100% 0%, 0% 100%, 80% 20%, 20% 80%, 90% 10%;
    }

    50% {
        background-position: 100% 100%, 0% 0%, 20% 80%, 50% 50%, 50% 50%;
    }

    75% {
        background-position: 0% 100%, 100% 0%, 90% 10%, 10% 90%, 80% 20%;
    }
}

/* ========== CONTAINER PRINCIPAL - PIXEL STYLE ========== */
.container {
    position: relative;
    z-index: 1;
    max-width: 580px;
    width: 100%;
    background: var(--pixel-dark);
    padding: 3rem 2rem;
    box-shadow:
        8px 8px 0px var(--pixel-darker),
        0 0 0 4px var(--pixel-blue);
    border: 4px solid var(--pixel-light);
    animation: containerAppear 0.5s steps(10);
}

@keyframes containerAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== PIXEL BORDER DECORATION ========== */
.container::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg,
            var(--pixel-blue) 0%,
            var(--pixel-pink) 25%,
            var(--pixel-yellow) 50%,
            var(--pixel-green) 75%,
            var(--pixel-orange) 100%);
    z-index: -1;
    opacity: 0.1;
}

/* ========== HEADER SECTION ========== */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 4px dotted var(--pixel-blue);
}

.profile-wrapper {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

/* Pixel corners decoration */
.profile-wrapper::before,
.profile-wrapper::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--pixel-yellow);
    box-shadow: 0 0 0 2px var(--pixel-darker);
}

.profile-wrapper::before {
    top: -8px;
    left: -8px;
}

.profile-wrapper::after {
    bottom: -8px;
    right: -8px;
}

.profile-pic {
    width: 130px;
    height: 130px;
    border: 4px solid var(--pixel-light);
    box-shadow:
        4px 4px 0px var(--pixel-blue),
        8px 8px 0px var(--pixel-pink);
    transition: transform 0.1s steps(5);
    animation: pixelBounce 2s ease-in-out infinite;
}

@keyframes pixelBounce {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.profile-pic:hover {
    transform: scale(1.1);
    box-shadow:
        6px 6px 0px var(--pixel-blue),
        12px 12px 0px var(--pixel-pink);
}

h1 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--pixel-light);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-shadow:
        3px 3px 0px var(--pixel-blue),
        6px 6px 0px var(--pixel-pink);
    line-height: 1.8;
}

.subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--pixel-yellow);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.6;
}

.description {
    font-size: 0.6rem;
    font-weight: 400;
    color: var(--pixel-beige);
    line-height: 1.8;
    max-width: 90%;
    margin: 0 auto;
    text-align: center;
}

/* ========== SECTIONS ========== */
.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--pixel-yellow);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title i {
    font-size: 1rem;
    color: var(--pixel-pink);
}

/* ========== LINKS LISTS ========== */
.links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ========== LINK BUTTONS - PIXEL STYLE ========== */
.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 400;
    position: relative;
    border: 3px solid var(--pixel-light);
    transition: all 0.1s steps(3);
    cursor: pointer;
}

.link-button:hover {
    transform: translate(-4px, -4px);
    border-color: var(--pixel-yellow);
}

.link-button:active {
    transform: translate(0, 0);
}

/* ========== PROJECT BUTTONS ========== */
.project-button {
    color: var(--pixel-light);
    padding: 1.3rem 1.5rem;
    background: var(--pixel-dark);
}

.button-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.button-content i {
    font-size: 1.5rem;
    color: var(--pixel-light);
    flex-shrink: 0;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.button-title {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--pixel-light);
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.button-desc {
    font-size: 0.5rem;
    font-weight: 400;
    color: var(--pixel-beige);
    display: block;
    line-height: 1.5;
}

/* ========== SOCIAL BUTTONS ========== */
.social-button {
    color: var(--pixel-light);
    gap: 0.8rem;
    font-size: 0.7rem;
    background: var(--pixel-dark);
    padding: 1rem 1.5rem;
}

.social-button i {
    font-size: 1.2rem;
}

/* ========== CORES ESPECÍFICAS - PIXEL ART ========== */

/* Projetos - cada um com cor única e sombra pixel */
.projects-links li:nth-child(1) .project-button {
    box-shadow: 4px 4px 0px var(--pixel-blue);
}

.projects-links li:nth-child(1) .project-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-blue);
    background: var(--pixel-blue);
}

.projects-links li:nth-child(2) .project-button {
    box-shadow: 4px 4px 0px var(--pixel-pink);
}

.projects-links li:nth-child(2) .project-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-pink);
    background: var(--pixel-pink);
}

.projects-links li:nth-child(3) .project-button {
    box-shadow: 4px 4px 0px var(--pixel-green);
}

.projects-links li:nth-child(3) .project-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-green);
    background: var(--pixel-green);
}

.projects-links li:nth-child(4) .project-button {
    box-shadow: 4px 4px 0px var(--pixel-orange);
}

.projects-links li:nth-child(4) .project-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-orange);
    background: var(--pixel-orange);
}

.projects-links li:nth-child(5) .project-button {
    box-shadow: 4px 4px 0px var(--pixel-yellow);
}

.projects-links li:nth-child(5) .project-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-yellow);
    background: var(--pixel-yellow);
    color: var(--pixel-darker);
}

/* Redes Sociais */
.social-links li:nth-child(1) .social-button {
    box-shadow: 4px 4px 0px var(--pixel-blue);
}

.social-links li:nth-child(1) .social-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-blue);
    background: var(--pixel-blue);
}

.social-links li:nth-child(2) .social-button {
    box-shadow: 4px 4px 0px var(--pixel-pink);
}

.social-links li:nth-child(2) .social-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-pink);
    background: var(--pixel-pink);
}

.social-links li:nth-child(3) .social-button {
    box-shadow: 4px 4px 0px var(--pixel-orange);
}

.social-links li:nth-child(3) .social-button:hover {
    box-shadow: 8px 8px 0px var(--pixel-orange);
    background: var(--pixel-orange);
}

/* ========== FOOTER / CTA ========== */
footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 4px dotted var(--pixel-green);
}

.cta {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--pixel-yellow);
    margin-bottom: 1rem;
    line-height: 1.6;
    text-transform: uppercase;
}

.cta-subtitle {
    font-size: 0.6rem;
    font-weight: 400;
    color: var(--pixel-beige);
    line-height: 1.6;
}

/* ========== PIXEL DECORATIONS ========== */
.section::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: var(--pixel-yellow);
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 640px) {
    body {
        padding: 1.5rem 0.5rem;
    }

    .container {
        padding: 2rem 1.5rem;
        box-shadow:
            6px 6px 0px var(--pixel-darker),
            0 0 0 3px var(--pixel-blue);
        border: 3px solid var(--pixel-light);
    }

    .profile-pic {
        width: 110px;
        height: 110px;
    }

    h1 {
        font-size: 1.2rem;
        text-shadow:
            2px 2px 0px var(--pixel-blue),
            4px 4px 0px var(--pixel-pink);
    }

    .subtitle {
        font-size: 0.6rem;
    }

    .description {
        font-size: 0.55rem;
        max-width: 100%;
    }

    .section-title {
        font-size: 0.7rem;
    }

    .button-content i {
        font-size: 1.2rem;
    }

    .button-title {
        font-size: 0.6rem;
    }

    .button-desc {
        font-size: 0.45rem;
    }

    .social-button {
        font-size: 0.6rem;
    }

    .cta {
        font-size: 0.6rem;
    }

    .cta-subtitle {
        font-size: 0.55rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 1.5rem 1rem;
        box-shadow:
            4px 4px 0px var(--pixel-darker),
            0 0 0 3px var(--pixel-blue);
    }

    h1 {
        font-size: 1rem;
    }

    .button-content {
        gap: 0.8rem;
    }

    .link-button {
        padding: 1rem;
    }

    .project-button {
        padding: 1.1rem 1rem;
    }

    .profile-pic {
        width: 90px;
        height: 90px;
    }
}

/* ========== LOADING SCREEN EFFECT ========== */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100vh);
    }
}

.container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    animation: scanline 8s linear infinite;
    pointer-events: none;
}