@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap');

@font-face {
    font-family: 'Quinn';
    src: url('./font/Quinn-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --bg-color: #050505;
    --text-main: #ffffff; 
    --text-secondary: #a1a1aa; /* Cinza médio (Zinc 400) */
    --primary-color: #5763a5; /* Novo Azul solicitado */
    --hover-glow: #6f7bc4; /* Versão mais clara para brilho */
    --main-font: 'Inter', system-ui, -apple-system, sans-serif;
    --title-font: 'Quinn', sans-serif;
    --desc-font: 'Montserrat', sans-serif;
}

/* Tema Claro */
body.light-mode {
    --bg-color: #f4f4f5; /* Fundo claro */
    --text-main: #18181b; /* Texto escuro */
    --text-secondary: #52525b; /* Texto secundário mais escuro */
    --primary-color: #5763a5; /* Mantém a identidade */
}

body.light-mode {
    background-image: radial-gradient(circle at 50% 0%, #e4e4e7 0%, #f4f4f5 60%);
}

html, body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; /* Chrome, Safari e Opera */
}

body {
    font-family: var(--main-font);
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #050505 60%); /* Degrade sutil no topo */
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Evita scroll horizontal */
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Controles (Tema e Idioma) */
.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 100;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    padding: 5px;
}

.control-btn:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--code-font);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    padding: 2px 5px;
    transition: color 0.3s;
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

.lang-btn:hover {
    color: var(--text-main);
}

.separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
    pointer-events: none; 
}

.main-content {
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1; 
}

.profile-container {
    margin-bottom: 2rem;
    position: relative;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #27272a; 
    padding: 3px;
    background-color: var(--bg-color);
    transition: all 0.4s ease;
    filter: grayscale(100%); 
}

.profile-container:hover .profile-pic {
    border-color: var(--primary-color);
    filter: grayscale(0%);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.2);
    transform: scale(1.02);
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
    font-family: var(--title-font);
    font-weight: normal; 
    letter-spacing: 1px;
    color: var(--text-main);
    text-transform: uppercase;
}

.job-title {
    color: var(--text-secondary); 
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.job-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-content:hover .job-title::after {
    width: 100%; 
}

.description {
    color: #71717a; 
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1rem;
    max-width: 420px;
    font-weight: 400;
    font-family: var(--desc-font);
}

.affiliations {
    margin-bottom: 3rem;
    max-width: 500px;
    width: 100%;
}

.affiliations-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: var(--code-font);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

body.light-mode .tag {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(87, 99, 165, 0.1);
    transform: translateY(-2px);
}

/* Botões Minimalistas */
.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px; /* Quadrado arredondado moderno (squircle) */
    text-decoration: none;
    background-color: #0a0a0a; /* Quase preto */
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #27272a; /* Borda muito sutil */
}

/* Hover Agressivo e Elegante */
.social-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(87, 99, 165, 0.4);
}

/* Botão Trajetória */
.trajectory-btn {
    margin-top: 2rem;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trajectory-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px rgba(87, 99, 165, 0.3);
    transform: translateY(-2px);
}

/* Modal / Overlay da Timeline */
.timeline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

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

.timeline-container {
    width: 90%;
    max-width: 600px;
    padding: 4rem 1rem;
    position: relative;
    transition: max-width 0.3s ease;
    display: flex;
    flex-direction: column;
}

.timeline-title {
    color: var(--text-main);
    margin-bottom: 3rem;
    text-align: center;
    font-family: var(--title-font);
    font-size: 2rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 100;
}

.close-btn:hover {
    color: var(--text-main);
}

/* Estilo da Timeline Mobile (Padrão) */
.timeline {
    position: relative;
    padding-left: 30px;
    /* A linha agora é um pseudo-elemento separado para poder animar */
}

/* Linha vertical animada */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0%; /* Começa com altura 0 */
    background-color: #27272a;
    transition: height 1.5s ease-out; /* Animação de crescimento */
}

/* Quando ativo, a linha cresce */
.timeline.active::before {
    height: 100%;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
    opacity: 0; /* Começa invisível */
    transform: translateX(-20px); /* Começa deslocado */
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Bolinha da timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    left: -35px; /* Ajuste fino para alinhar com a linha */
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    z-index: 2;
    transform: scale(0); /* Começa pequena */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item.visible::after {
    transform: scale(1);
}

.timeline-item:hover::after {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.timeline-year {
    color: var(--primary-color);
    font-family: var(--code-font); /* Usando a fonte monoespaçada se disponível, ou fallback */
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    color: var(--text-main);
    font-family: var(--title-font);
    font-weight: normal;
    letter-spacing: 0.5px;
}

.timeline-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-family: var(--desc-font);
}

/* Animação de Entrada */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content > * {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0; /* Começa invisível */
}

.profile-container { animation-delay: 0.1s; }
h1 { animation-delay: 0.2s; }
.job-title { animation-delay: 0.3s; }
.description { animation-delay: 0.4s; }
.social-links { animation-delay: 0.5s; }

/* ----------------------------------------------------------- */
/* MEDIA QUERIES PARA DESKTOP (Horizontal Timeline) */
/* ----------------------------------------------------------- */
@media (min-width: 992px) {
    .timeline-container {
        max-width: 1200px; /* Largura maior para desktop */
        padding: 0 2rem;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .timeline {
        display: flex;
        justify-content: space-between;
        padding-left: 0;
        padding-top: 40px; /* Espaço para a linha no topo */
        width: 100%;
        margin-top: 2rem;
    }

    /* Linha Horizontal */
    .timeline::before {
        width: 0%;
        height: 2px;
        top: 0;
        left: 0;
        transition: width 1.5s ease-out;
    }

    .timeline.active::before {
        width: 100%;
        height: 2px; /* Garante que height não seja sobrescrito */
    }

    .timeline-item {
        width: 18%; /* Distribui os itens horizontalmente */
        margin-bottom: 0;
        text-align: center;
        padding-top: 20px;
        transform: translateY(20px); /* Animação de entrada vindo de baixo */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .timeline-item.visible {
        transform: translateY(0);
    }

    /* Ajuste da bolinha */
    .timeline-item::after {
        top: -6px; /* Centralizado na linha de 2px (top:0) */
        left: 50%;
        transform: translateX(-50%) scale(0);
    }
    
    .timeline-item.visible::after {
        transform: translateX(-50%) scale(1);
    }

    /* Ano sempre visível acima do conteúdo */
    .timeline-year {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

    /* Conteúdo oculto inicialmente */
    .timeline-content {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.4s ease;
        background-color: rgba(10, 10, 10, 0.8);
        padding: 1rem;
        border-radius: 8px;
        border: 1px solid #27272a;
        position: absolute;
        top: 60px; /* Abaixo do ano */
        width: 100%;
        min-width: 250px;
        left: 50%;
        margin-left: -125px; /* Centraliza o tooltip */
        z-index: 10;
        pointer-events: none;
    }

    /* Seta do tooltip */
    .timeline-content::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        margin-left: -6px;
        border-width: 0 6px 6px 6px;
        border-style: solid;
        border-color: transparent transparent #27272a transparent;
    }

    /* Hover revela o conteúdo */
    .timeline-item:hover .timeline-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Hover na bolinha/item destaca o ano também */
    .timeline-item:hover .timeline-year {
        text-shadow: 0 0 10px rgba(87, 99, 165, 0.6);
    }
}

/* --- Portfolio Page --- */
.portfolio-container {
    width: 90%;
    max-width: 1000px;
    padding: 2rem;
    position: relative;
    z-index: 1;
    margin-top: 60px; /* Space for controls */
    animation: fadeInUp 0.8s ease-out forwards;
}

.portfolio-header {
    margin-bottom: 3rem;
    text-align: left;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.3s;
    font-weight: 500;
}

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

.portfolio-header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-align: left;
}

.portfolio-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1.1rem;
    font-family: var(--desc-font);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.work-item {
    background-color: rgba(10, 10, 10, 0.5);
    border: 1px solid #27272a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body.light-mode .work-item {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #e4e4e7;
}

.work-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px -5px rgba(87, 99, 165, 0.2);
}

.work-image {
    height: 220px; /* Aumentei um pouco a altura */
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Garante que a imagem não vaze */
    border-bottom: 1px solid #27272a;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cobre a área sem distorcer */
    transition: transform 0.5s ease;
}

body.light-mode .work-image {
    background-color: #e4e4e7;
    border-bottom-color: #d4d4d8;
}

.work-item:hover .work-image img {
    transform: scale(1.1); /* Zoom suave na imagem ao passar o mouse */
}

.work-info {
    padding: 1.5rem;
    text-align: left;
}

.work-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--text-main);
    font-family: var(--title-font);
}

.work-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
