/* --- I. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS --- */
:root {
    --bg-color: #111111;
    --accent-color: #ffff00;
    --text-color: #F5F5F5;
    --secondary-text-color: #888888;
    --modal-bg-color: rgba(29, 29, 29, 0.7);
    --font-primary: 'Satoshi', sans-serif;
    --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-text-color) var(--bg-color);
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    cursor: none;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 900; }

::selection { background-color: var(--accent-color); color: var(--bg-color); }
::-moz-selection { background-color: var(--accent-color); color: var(--bg-color); }

/* --- ANIMAÇÕES DE ENTRADA (SCROLL-TRIGGERED) --- */
@keyframes fadeIn-up {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn-left {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn-right {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Estado inicial dos elementos que serão animados */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out-quint), transform 0.8s var(--ease-out-quint);
}
.reveal-up.is-visible { animation: fadeIn-up 0.8s var(--ease-out-quint) forwards; }
.reveal-left.is-visible { animation: fadeIn-left 0.8s var(--ease-out-quint) forwards; }
.reveal-right.is-visible { animation: fadeIn-right 0.8s var(--ease-out-quint) forwards; }


/* --- II. UI GERAL --- */
/* ... (código do cursor, paleta, header, footer permanece o mesmo) ... */
#cursor, #cursor-trail { position: fixed; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 9999; transition-property: width, height, border, background-color, transform; transition-duration: 0.4s; transition-timing-function: var(--ease-out-quint); }
#cursor { background-color: var(--accent-color); }
#cursor-trail { background-color: var(--accent-color); opacity: 0.3; transition-duration: 0.8s; }
#cursor.hovered, #cursor-trail.hovered { width: 40px; height: 40px; background-color: transparent; border: 1px solid var(--accent-color); }
.section-container { width: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 120px 5%; position: relative; }
#command-palette { position: fixed; inset: 0; z-index: 9998; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease-out-quint); }
#command-palette.visible { opacity: 1; pointer-events: all; }
.palette-overlay { position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); }
.palette-modal { position: relative; background-color: var(--modal-bg-color); border-radius: 8px; width: auto; max-width: 90%; transform: scale(0.95); transition: transform 0.4s var(--ease-out-quint); }
#command-palette.visible .palette-modal { transform: scale(1); }
.palette-list { list-style: none; min-width: 500px; }
.palette-item { display: flex; align-items: center; padding: 16px 24px; font-size: 1rem; border-bottom: 1px solid #333; transition: background-color 0.3s ease, color 0.3s ease; }
.palette-item:last-child { border-bottom: none; }
.palette-item:hover { background-color: var(--accent-color); color: var(--bg-color); }
.palette-item i { font-size: 1.2rem; margin-right: 16px; }
.main-header, .main-footer { position: fixed; width: 100%; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 100; font-weight: 700; mix-blend-mode: difference; color: var(--text-color); }
.main-header { top: 0; }
.main-footer { bottom: 0; color: inherit; font-weight: 400; font-size: 0.9rem; }
.main-footer i { color: var(--accent-color); vertical-align: middle; }
.header-command { display: flex; align-items: center; gap: 10px; }
.header-command i { font-size: 1.5rem; transition: transform 0.3s var(--ease-out-quint); }
.header-command:hover i { transform: translateY(-3px); }


/* --- III. SEÇÕES ESPECÍFICAS --- */
#hero { justify-content: center; text-align: left; padding: 0 5%; }
#hero h1 { font-size: clamp(3rem, 12vw, 10rem); line-height: 0.9; text-transform: uppercase; }
#hero h2 { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 300; color: var(--secondary-text-color); margin-top: 20px; max-width: 700px; opacity: 0; animation: fadeIn-up 0.8s ease 1.2s forwards; } /* Atraso maior para esperar o scramble */

.interactive-hover { display: inline-block; }
.interactive-hover span { display: inline-block; transition: color 0.2s ease-out; }

#about { flex-direction: row; justify-content: center; align-items: center; max-width: 1400px; }
.about-title-wrapper { flex-basis: 30%; display: flex; align-items: center; justify-content: center; }
.about-title { font-size: clamp(3rem, 15vw, 12rem); color: #222; writing-mode: vertical-rl; transform: rotate(180deg); text-transform: uppercase; }
.about-content { flex-basis: 60%; display: flex; justify-content: center; flex-direction: column; padding-left: clamp(20px, 5vw, 80px); }
.about-content p { font-size: clamp(1.1rem, 2.5vw, 1.8rem); line-height: 1.6; font-weight: 300; max-width: 900px; }
.about-content p strong { color: var(--accent-color); font-weight: 500; }
.line-mask { display: inline-block; overflow: hidden; }
.line-mask span { display: block; transform: translateY(110%); transition: transform 1s var(--ease-out-quint); transition-delay: var(--delay); }
.line-mask.is-visible span { transform: translateY(0); }

#projects { height: 400vh; padding: 0; position: relative; }
.projects-sticky-container { position: sticky; top: 0; height: 100vh; width: 100%; overflow-x: hidden; }
.projects-track { height: 100%; display: flex; align-items: center; will-change: transform; }
.project-card { height: 100vh; width: 100vw; flex-shrink: 0; display: flex; justify-content: center; align-items: center; padding: 0 10%; background-color: #1a1a1a; position: relative; border-right: 1px solid #222; }
.project-card.title-card { background-color: var(--bg-color); align-items: flex-start; justify-content: center; flex-direction: column; padding-left: 5%; }
.title-card h1 { font-size: clamp(3rem, 10vw, 8rem); line-height: 1; }
.project-overlay { position: absolute; inset:0; background-color: rgba(0,0,0,0.6); }
.project-content { position: relative; z-index: 2; max-width: 1100px; }
.project-content h2 { font-size: clamp(3rem, 8vw, 6rem); line-height: 1; text-transform: uppercase; }
.project-tags { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.project-tags span { background-color: var(--accent-color); color: var(--bg-color); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: 700; }
.project-content p { font-size: 1.2rem; font-weight: 300; max-width: 550px; margin-bottom: 30px; line-height: 1.6; }
.project-link { font-size: 1.2rem; font-weight: 700; display: inline-block; position: relative; }
.project-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--accent-color); transition: width 0.4s var(--ease-out-quint); }
.project-link:hover::after { width: 100%; }

#experience { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.experience-wrapper { width: 100%; max-width: 1200px; }
.experience-content { display: none; }
.experience-content.active { display: block; animation: fadeIn-up 0.6s var(--ease-out-quint); }
.experience-title { font-size: clamp(2rem, 5vw, 3.5rem); }
.experience-content h3 { font-size: 1.2rem; font-weight: 400; color: var(--secondary-text-color); margin-bottom: 30px; }
.experience-content ul { list-style: none; }
.experience-content li { font-size: 1.2rem; font-weight: 300; padding-left: 30px; position: relative; margin-bottom: 15px; }
.experience-content li::before { content: '→'; position: absolute; left: 0; color: var(--accent-color); }
.timeline-nav { display: flex; justify-content: center; gap: 30px; margin-top: 50px; border-top: 1px solid #333; padding-top: 30px; width: 100%; }
.timeline-nav-item { font-size: 1rem; font-weight: 500; color: var(--secondary-text-color); transition: color 0.3s ease; }
.timeline-nav-item.active { color: var(--accent-color); font-weight: 700; }

#skills { overflow: hidden; }
.skills-watermark { position: absolute; font-size: clamp(10rem, 25vw, 50rem); font-weight: 900; color: #1a1a1a; user-select: none; }
.skills-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 50px; width: 100%; max-width: 1400px; }
.skill-category h3 { font-size: 1.5rem; padding-bottom: 10px; border-bottom: 2px solid var(--accent-color); margin-bottom: 20px; }
.skill-category ul { list-style: none; }
.skill-category li { margin-bottom: 10px; font-size: 1.2rem; font-weight: 300; }
.skill-category a { display: flex; align-items: center; transition: color 0.3s ease; }
.skill-category a:hover { color: var(--accent-color); }
.skill-category a i { margin-left: 8px; }

#contact { overflow: hidden; } /* Para conter a animação */
.contact-title { font-size: clamp(2rem, 8vw, 6rem); text-align: center; max-width: 1200px; line-height: 1.1; text-transform: uppercase; }
.contact-title .highlight { color: var(--accent-color); }
.contact-links { margin-top: 50px; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.contact-links a { font-size: 1.2rem; font-weight: 700; transition: color 0.3s ease; }
.contact-links a:hover { color: var(--accent-color); }

/* --- IV. RESPONSIVIDADE --- */
@media (max-width: 768px) {
    #hero h1 { font-size: clamp(3rem, 12vw, 10rem); line-height: 0.9; text-transform: uppercase; text-align: center; max-width: 240px;}
    #cursor, #cursor-trail { display: none; }
    body { cursor: auto; }
    a, button, .magnetic-item { cursor: pointer; }
    .main-header, .main-footer { mix-blend-mode: normal; background-color: var(--bg-color);}
    .main-header { padding: 15px; }
    .main-footer { padding: 15px; }
    #about { flex-direction: column; text-align: center; max-width: 100%; }
    .about-title-wrapper { flex-basis: auto; }
    .about-title { writing-mode: horizontal-tb; transform: rotate(0); font-size: 3rem; margin-bottom: 40px; color: var(--secondary-text-color); }
    .about-content { padding-left: 0; }
    #projects { height: auto; padding: 120px 5%; }
    .projects-sticky-container { all: unset; }
    .projects-track { display: grid; gap: 30px; }
    .project-card { all: unset; display: flex; flex-direction: column; justify-content: space-between; padding: 30px; min-height: 350px; border-radius: 8px; background-color: #1a1a1a; border: 1px solid #222; }
    .project-card.title-card { display: none; }
    #experience, #skills { padding-top: 120px; padding-bottom: 120px; }
    .timeline-nav { flex-direction: column; gap: 15px; align-items: center; }
    .contact-links { flex-direction: column; gap: 20px; align-items: center; }
    .header-command span { display: none; }
}

/* --- V. EASTER EGGS --- */
.retro-hint { display: none; position: relative; }
body.retro-theme {
    --accent-color: #39FF14; --text-color: #39FF14; --secondary-text-color: #39FF14; --bg-color: #000;
    font-family: 'VT323', monospace;
}
body.retro-theme .about-title, body.retro-theme .skills-watermark, body.retro-theme .main-header, body.retro-theme .main-footer { mix-blend-mode: normal; }
body.retro-theme .footer-text { display: none; }
body.retro-theme .retro-hint { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }
.retro-hint.typing::after { content: '_'; font-family: 'VT323', monospace; animation: blink 1s step-end infinite; }
@keyframes glitch-effect { 0%, 100% { transform: translate(0, 0); opacity: 1; } 10% { transform: translate(-3px, 3px); } 20% { transform: translate(3px, -3px); } 30% { transform: translate(-3px, -3px); text-shadow: -1px 0 red, 1px 0 cyan; } 40% { transform: translate(3px, 3px); text-shadow: 1px 0 red, -1px 0 cyan; } 50% { opacity: 0.8; transform: scale(1.02); } 60% { text-shadow: none; transform: translate(0, 0); } }
body.glitching { animation: glitch-effect 0.4s linear; }
#glitch-message { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; font-family: 'VT323', monospace; color: var(--accent-color); background-color: var(--bg-color); padding: 10px 20px; z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
#glitch-message.visible { opacity: 1; }
.palette-input-wrapper { display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid #333; }
.palette-input-wrapper i { color: var(--secondary-text-color); }
#palette-input { width: 100%; background: none; border: none; color: var(--text-color); font-family: var(--font-primary); font-size: 1rem; padding: 16px 12px; outline: none; }
#snake-game-container { display: none; padding: 20px; flex-direction: column; align-items: center; justify-content: center; position: relative; }
#snake-game-container.active { display: flex; }
#snake-instructions { position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); z-index: 10; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
#snake-instructions.visible { display: flex; }
#snake-instructions h3 { font-size: 2rem; color: var(--accent-color); }
#snake-instructions p { font-size: 1.1rem; margin-top: 15px; }
#snake-instructions p strong { background-color: var(--secondary-text-color); color: var(--bg-color); padding: 2px 6px; border-radius: 4px; }
#start-snake-btn { margin-top: 30px; background-color: var(--accent-color); color: var(--bg-color); border: none; padding: 12px 24px; font-size: 1.1rem; font-weight: 700; border-radius: 4px; transition: transform 0.3s var(--ease-out-quint); }
#start-snake-btn:hover { transform: scale(1.05); }
#snake-canvas { width: 500px; height: 500px; background-color: #000; border: 2px solid var(--accent-color); }
#snake-score { margin-top: 10px; font-size: 1.2rem; }
#snake-game-over { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; font-weight: bold; color: #ff4757; text-align: center; backdrop-filter: blur(5px); background-color: rgba(0,0,0,0.5); padding: 20px; border-radius: 8px; }
#snake-game-over.visible { display: block; }

/* --- VI. SCROLLBAR CUSTOMIZADO --- */
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--bg-color); }
body::-webkit-scrollbar-thumb { background-color: var(--secondary-text-color); border-radius: 10px; border: 2px solid var(--bg-color); }
body::-webkit-scrollbar-thumb:hover { background-color: var(--accent-color); }