/* ===== FONTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

/* ===== VARIÁVEIS DE COR ===== */
:root {
    --primary-color: #6A0DAD;
    --title-color: #DDAAF5;
    --text-color: #BDA0E3;
    --body-color: #110022;
    --container-color: #1a0a2e; 
}

/* Estilos Gerais */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

body {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Efeito Parallax de Estrelas */
@keyframes move-twink-back {
    from {background-position:0 0;}
    to {background-position:-10000px 5000px;}
}

#stars, #stars2, #stars3 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
}

#stars {
    background: transparent url(https://www.transparenttextures.com/patterns/stardust.png) repeat top center;
    animation: move-twink-back 200s linear infinite;
}
#stars2 {
    background: transparent url(https://www.transparenttextures.com/patterns/stardust.png) repeat top center;
    animation: move-twink-back 150s linear infinite;
}
#stars3 {
    background: transparent url(https://www.transparenttextures.com/patterns/stardust.png) repeat top center;
    animation: move-twink-back 100s linear infinite;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(26, 10, 46, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(106, 13, 173, 0.3);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1001;
    box-sizing: border-box;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    width: 80px;
    height: 70px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--title-color);
    margin: 0;
}


.menu {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.menu li {
    font-size: 1rem;
}

.menu li a {
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

.menu li a:hover {
    color: var(--title-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 1rem 1rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero .btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.hero .btn:hover {
    background: #852ed1; 
}

/* Sobre Mim */
.about {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.5);
}

.about-text {
    flex: 1;
}

.about h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

/* Portifólio */
.portifolio {
    padding: 4rem 2rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.portifolio h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.projects {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Card do Projeto */
.project {
    background: var(--container-color);
    padding: 1.5rem;
    border-radius: 10px;
    width: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(106, 13, 173, 0.3); 
    text-align: left;
}

/* Título permanece no topo e o parágrafo fica centralizado */
.project h3 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}
.project p {
    text-align: center;
}

/* Centraliza os ícones e posiciona-os na parte inferior, acima do link */
.project .tech-icons {
    text-align: center;
    margin-top: auto;
}

/* Link permanece logo abaixo dos ícones */
.project a {
    display: block;
    margin-top: 10px;
}

/* Contato */
.contact {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--container-color);
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact li a {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s;
}

.contact li a:hover {
    color: #852ed1; 
}

.contact li {
    margin: 0.5rem 0;
}

.contact .social-link p {
    font-size: 1.2rem;
}

/* Script */
.animate {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.animate.visible {
    opacity: 1;
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    display: none;
    cursor: pointer;
    font-size: 16px;
    z-index: 1000;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--container-color);
    color: var(--text-color);
    font-size: 0.9rem;
    border-top: 1px solid rgba(106, 13, 173, 0.3); 
}

/* Responsividade */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .navbar { padding: 1rem; }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .project {
        width: 100%;
    }

    .about, .portifolio, .contact {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        /* width: 100%; */ /* Removido para não conflitar com o sticky */
        padding: 1rem 1rem; /* ajuste conforme necessário */
        box-sizing: border-box;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero .btn {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}

/* Estilos do menu hamburguer */
.hamburger {
    background: none;
    border: none;
    display: none;
    flex-direction: column;
    cursor: pointer;    
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 2px 0;
    transition: 0.4s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background-color: rgba(26, 10, 46, 0.8); /* --container-color com mais opacidade */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 80px 20px 20px;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
        transition: all 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        flex-direction: column;
    }

    .menu.active {
        right: 0;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .menu li {
        margin: 20px 0;
    }

    .menu li a {
        color: var(--primary-color);
    }

    .menu li a:hover {
        color: var(--title-color);
        background: transparent;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Ícones de Tecnologias utilizadas */
.tech-icons {
    margin-top: 10px;
}

.tech-icons i {
    font-size: 24px;
    margin-right: 10px;
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    margin-left: 2px;
    /* Inicialmente, sem animação para aparecer fixo durante a digitação */
}

.cursor.blink {
    animation: blink 0.7s infinite;
}

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