/* SpaceCore Design System - Single Page Edition */
:root {
    --void-black: #050505;
    --stellar-white: #ffffff;
    --nova-blue: #00d1ff;
    --stardust: rgba(255, 255, 255, 0.3);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--stellar-white);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}


section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 12vh 0;
}

@media (max-width: 992px) {
    section {
        min-height: auto;
        padding: 80px 0;
    }
}


/* Hero Styles */
h1 {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 0.9;
    text-shadow: 0 0 30px rgba(5, 5, 5, 0.8);
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    min-width: 320px;
    z-index: 10;
    position: relative;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--nova-blue);
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-summary {
    font-size: 1.1rem;
    max-width: 500px;
    color: rgba(255, 255, 255, 0.8);
    border-left: 3px solid var(--nova-blue);
    padding-left: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-image-area {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 992px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .hero-summary {
        margin: 0 auto 2rem;
        text-align: left;
    }

    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
}


.profile-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    overflow: hidden;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    border: 1px solid var(--stardust);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.1);
    transition: filter 0.5s ease;
}

.profile-frame:hover img {
    filter: grayscale(0) contrast(1);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--stellar-white);
    color: var(--stellar-white);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.1em;
    position: relative;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    margin-top: 2rem;
}

.cta-button:hover {
    background: var(--stellar-white);
    color: var(--void-black);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Portfolio Section */
h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    text-transform: uppercase;
    margin-bottom: 2rem;
    line-height: 0.95;
    /* Ajuste para evitar sobreposição */
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
}


.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stardust);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img {
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--stardust);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover .project-img img {
    filter: grayscale(0);
    transform: scale(1.05);
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-15px);
    border-color: var(--nova-blue);
}

.project-card .num {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-size: 3.5rem;
    font-family: var(--font-display);
    opacity: 0.1;
}

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.project-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    border: 1px solid var(--stardust);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

/* New Content Styles */
.formation-list {
    list-style: none;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}


.formation-item {
    margin-bottom: 2.5rem;
    border-left: 2px solid var(--stardust);
    padding-left: 2rem;
    transition: border-color 0.3s ease;
}

.formation-item:hover {
    border-color: var(--nova-blue);
}

.formation-item h4 {
    font-family: var(--font-display);
    color: var(--stellar-white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.formation-item p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.contact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stardust);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--nova-blue);
    transform: translateY(-5px);
}

.contact-card h4 {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2rem;
    color: var(--nova-blue);
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1rem;
    color: var(--stellar-white);
    line-height: 1.5;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-item {
    width: 50px;
    height: 50px;
    border: 1px solid var(--stardust);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--stellar-white);
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.social-item:hover {
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.2);
}

.social-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* CV/Resume Button - Special variant */
.social-item--cv {
    width: auto;
    padding: 0 1.2rem;
    gap: 0.5rem;
    border-color: rgba(0, 209, 255, 0.3);
    background: rgba(0, 209, 255, 0.04);
}

.social-item--cv:hover {
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.15);
    box-shadow: 0 0 25px rgba(0, 209, 255, 0.3), inset 0 0 15px rgba(0, 209, 255, 0.05);
}

.cv-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nova-blue);
    transition: color 0.3s ease;
}

.social-item--cv:hover .cv-label {
    color: var(--stellar-white);
}



.btn-go {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    border: 1px solid var(--stellar-white);
    color: var(--stellar-white);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-go:hover {
    background: var(--stellar-white);
    color: var(--void-black);
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.4;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(2.5rem, 12vw, 4.5rem) !important;
    }

    .profile-frame {
        max-width: 320px !important;
    }

    .lang-trigger {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.6rem;
    }

    .scroll-hint {
        display: none;
        /* Cache memory optimization for small screens */
    }
}

@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .lang-card {
        padding: 2rem 1.5rem;
    }

    .lang-grid {
        grid-template-columns: 1fr;
    }
}


/* Celestial Rocket Animation */
.rocket-container {
    position: absolute;
    /* Restrito ao Hero */
    bottom: -150px;
    left: -150px;
    width: 200px;
    z-index: 9999;
    pointer-events: none;
    animation: flightPath 120s infinite linear;
    /* A cada 2 minutos */
    mix-blend-mode: screen;
}

.rocket-container img {
    width: 100%;
    transform: rotate(10deg);
    filter: url(#neon-glow);
}

@keyframes flightPath {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    1% {
        opacity: 1;
    }

    8% {
        opacity: 1;
    }

    10% {
        transform: translate(120vw, -120vh) rotate(5deg);
        opacity: 0;
    }

    100% {
        transform: translate(120vw, -120vh) rotate(5deg);
        opacity: 0;
    }
}

/* Language Selector Modal */
#lang-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    /* Fundo sólido para esconder a página atrás */
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content-hidden {
    opacity: 0;
    filter: blur(10px);
    pointer-events: none;
    transition: opacity 1.5s ease, filter 1.5s ease;
}

.content-visible {
    opacity: 1;
    filter: blur(0);
    pointer-events: all;
}

.lang-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stardust);
    padding: 4rem;
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: modalSlideUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}


.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.lang-opt {
    padding: 2rem;
    background: transparent;
    border: 1px solid var(--stardust);
    color: var(--stellar-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-opt:hover {
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.05);
    transform: translateY(-5px);
}

.lang-opt h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lang-opt p {
    font-size: 0.8rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Floating Language Trigger */
.lang-trigger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9000;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stardust);
    color: var(--stellar-white);
    padding: 0.7rem 1.2rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-trigger:hover {
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.1);
    transform: translateX(-5px);
}

/* Decorative Side Label */
.side-label {
    position: absolute;
    bottom: 5rem;
    left: 0;
    transform-origin: left bottom;
    transform: rotate(-90deg);
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    opacity: 0.4;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .side-label {
        display: none;
    }
}

/* ===== NAVIGATION BAR ===== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.4s ease, background 0.4s ease;
}

.main-nav.nav-hidden {
    transform: translateY(-100%);
}

.main-nav.nav-scrolled {
    background: rgba(5, 5, 5, 0.92);
    border-bottom-color: rgba(0, 209, 255, 0.1);
}

.nav-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--stellar-white);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--nova-blue);
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.08);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 9000;
    width: 48px;
    height: 48px;
    border: 1px solid var(--stardust);
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    color: var(--stellar-white);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--nova-blue);
    background: rgba(0, 209, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.2);
    transform: translateY(-4px);
}

/* Adjust lang-trigger position to not overlap with nav */
.lang-trigger {
    top: 5.5rem;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
    .main-nav {
        gap: 0;
        padding: 0.7rem 0.5rem;
    }

    .nav-link {
        font-size: 0.6rem;
        letter-spacing: 0.12em;
        padding: 0.5rem 0.6rem;
    }

    .lang-trigger {
        top: 4.5rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.6rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}