/* --- GERAL E VARIÁVEIS --- */
:root {
    --primary-color: #9d4edd;
    --secondary-color: #5a189a;
    --background-color: #10002b;
    --card-background: #240046;
    --text-color: #e0aaff;
    --header-background: rgba(16, 0, 43, 0.85);
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

section {
    padding: 100px 0;
}

/* --- ANIMAÇÕES --- */
.fade-in {
    animation: fadeInAnimation 1s ease-in forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

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


/* --- HEADER --- */
#main-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

#main-header.scrolled {
    background-color: var(--header-background);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#main-header nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

#main-header nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

/* Estilos do Menu Hambúrguer */
#mobile-menu-toggle {
    display: none; /* Escondido por padrão em telas grandes */
    font-size: 1.8rem;
    color: var(--white);
    cursor: pointer;
    z-index: 1001; /* Garante que fique acima do conteúdo */
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

#main-header nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

#main-header nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

#main-header nav a:hover {
    color: var(--white);
}

#main-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

#main-header nav a:hover::after {
    width: 100%;
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--white);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--background-color);
    z-index: -1;
}

.hero-content {
    z-index: 1;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    animation-delay: 0.2s;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 0.5rem; /* Margin reduced */
    color: var(--text-color);
    animation-delay: 0.4s;
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
    animation-delay: 0.7s; /* Delay adjusted */
    display: inline-block; /* Added for consistency */
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.6);
}

/* --- TYPEWRITER --- */
.typewriter-container {
    height: 2.5rem; 
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    animation-delay: 0.5s;
    font-weight: 600;
}

#typewriter {
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    width: 4px;
    height: 1.6rem;
    background-color: var(--primary-color);
    animation: blink 0.8s infinite;
    vertical-align: bottom;
}


/* --- SOBRE SECTION --- */
.sobre-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    object-fit: cover;
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.5);
}

.sobre-texto {
    flex: 1;
}

.sobre-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
}

.sobre-botao-container {
    margin-top: 30px;
    max-width: 700px;
    display: flex;
    justify-content: space-around;
}

.sobre-botao-container a {
background-color: var(--card-background);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.sobre-botao-container a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    color: var(--white);
}

/* --- TABS FOR HISTORY SECTION --- */
.tabs-nav {
    text-align: center;
    margin-bottom: 50px;
}

.tab-btn {
    font-family: 'Poppins', sans-serif;
    background: none;
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

.tab-panel {
    display: none;
    animation: fadeInAnimation 0.6s ease;
}

.tab-panel.active {
    display: block;
}

/* --- TIMELINE SECTION --- */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--background-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 35px;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 50%;
    text-align: left;
}

.timeline-item:nth-child(even) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: -8px;
}

.timeline-content {
    background-color: var(--card-background);
    padding: 20px 30px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--secondary-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content h3 {
    color: var(--white);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- HABILIDADES SECTION --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    text-align: center;
}

.skill-card {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-card span {
    font-weight: 600;
    color: var(--white);
}

@keyframes pulse-hint {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(157, 78, 221, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
    }
}

.skill-card.hint-animation {
    animation: pulse-hint 2s infinite ease-in-out;
    border-color: var(--primary-color);
}

.click-hint-tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    pointer-events: none;
}

.click-hint-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}


.skill-tooltip-popup {
    /* Posição e top/left são definidos pelo JS agora */
    position: absolute;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    width: max-content;
    max-width: 220px;
    text-align: center;
    /* Z-index muito alto para garantir que fique na frente de tudo */
    z-index: 9999;
    animation: fadeInTooltip 0.3s ease forwards;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* --- PROJETOS SECTION (CAROUSEL) --- */
.project-swiper {
    width: 100%;
    padding-bottom: 50px; /* Espaço para a paginação */
}

.swiper-slide {
    height: auto; /* Permite que a altura seja definida pelo conteúdo */
}

.project-card {
    background: var(--card-background);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Garante que o card ocupe todo o slide */
    height: 100%; /* Garante que todos os cards na mesma linha tenham a mesma altura */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 10px;
}

.project-info p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.tech-tags {
    margin-bottom: 20px;
}

.tech-tags span {
    background-color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 5px;
    font-weight: 600;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

/* Estilos Customizados para o Swiper */
.swiper-pagination-bullet {
    background: var(--text-color);
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: var(--white);
}


.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
}

.btn-primary i, .btn-secondary i {
    margin-right: 8px;
}

/* --- CONTATO SECTION --- */
#contato {
    text-align: center;
}

#contato p {
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.copy-button-wrapper {
    position: relative;
}

a.contact-button, button.contact-button {
    background-color: var(--card-background);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

a.contact-button:hover, button.contact-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-button i {
    margin-right: 10px;
}

.copy-feedback-tooltip {
    position: absolute;
    top: 115%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.copy-feedback-tooltip.visible {
    opacity: 1;
    visibility: visible;
}


/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px 0;
    background: var(--card-background);
    margin-top: 60px;
    border-top: 2px solid var(--secondary-color);
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 900px) {
    .timeline-item:nth-child(even) {
        text-align: right;
    }
    .timeline-item:nth-child(odd) {
        text-align: left;
    }
}

@media (max-width: 768px) {
.hero-content h1 { font-size: 3rem; }
    .hero-content p { font-size: 1.2rem; }
    .typewriter-container { font-size: 1.2rem; height: 2rem;}
    .sobre-content { flex-direction: column; text-align: center; }
    
    /* --- Lógica do Menu Mobile --- */
    #mobile-menu-toggle {
        display: block; /* Mostra o ícone do hambúrguer */
    }

    #main-nav {
        position: fixed;
        top: 0;
        left: 100%; /* Começa fora da tela, à direita */
        width: 100%;
        height: 100vh;
        background-color: var(--header-background);
        backdrop-filter: blur(15px);
        transition: left 0.5s ease-in-out;
        z-index: 1000;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    #main-nav.active {
        left: 0; /* Move o menu para dentro da tela */
    }
    
    #main-header nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    #main-header nav a {
        font-size: 1.8rem;
    }
    
    #main-header nav a:hover::after {
        width: 0; /* Remove o efeito de sublinhado no mobile */
    }

    .tabs-nav {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Timeline responsiva */
    .timeline-container::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 55px;
        padding-right: 15px;
    }
    
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
        text-align: left !important;
    }

    .timeline-dot {
        left: 12px !important;
    }

    /* Esconde as setas de navegação em telas menores */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    .sobre-botao-container a {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
    }

    contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-button {
      min-width: 100%;
      width: 100%;
      max-width: 300px;
    }

    .copy-button-wrapper {
        min-width: 100%;
        width: 100%;
        text-align: center;
    }

    .sobre-botao-container{
        flex-direction: column;
        align-items: center;
    }
}