:root {
    /* Tema Light */
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --primary: #0284c7;
    --primary-light: #7dd3fc;
    --accent: #8b5cf6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #f1f5f9;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, #0284c7 0%, #8b5cf6 100%);
    --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

[data-theme="dark"] {
    /* Tema Dark */
    --bg-body: #020617;
    --bg-card: #0f172a;
    --bg-nav: rgba(2, 6, 23, 0.85);
    --primary: #38bdf8;
    --primary-light: #0ea5e9;
    --accent: #a78bfa;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.5);
    --gradient: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease;
    overflow-x: hidden;
}

h1, h2, h3, .nav-logo { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: -0.02em; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Canvas Background (Efeito Constelação) --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
}

nav .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.nav-logo {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}
.nav-logo:hover { transform: scale(1.05); }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); position: relative; }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.7rem;
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.1); box-shadow: var(--shadow); }

/* --- Hero Section --- */
.hero {
    padding: 220px 0 120px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-badge {
    padding: 0.7rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    animation: float 4s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: clamp(3.5rem, 10vw, 6rem);
    line-height: 0.9;
    margin-bottom: 2.5rem;
    letter-spacing: -3px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textFlow 6s linear infinite;
}

@keyframes textFlow {
    to { background-position: 200% center; }
}

.hero p {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.btn-group { display: flex; gap: 1.5rem; }

.btn {
    padding: 1.1rem 2.8rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.4);
}

/* Efeito de Brilho (Shimmer) */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(2, 132, 199, 0.5);
}

.btn-outline {
    border: 2px solid var(--border);
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    background: var(--bg-card);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered Delay for grid items */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* --- Sections --- */
section { padding: 140px 0; }
.section-header { text-align: center; margin-bottom: 6rem; }
.tagline { 
    color: var(--primary); 
    text-transform: uppercase; 
    font-weight: 800; 
    letter-spacing: 0.2em; 
    font-size: 0.85rem; 
    margin-bottom: 1.2rem; 
    display: block;
}
.section-header h2 { font-size: clamp(2.5rem, 6vw, 3.5rem); }

/* --- Journey Section --- */
.journey-card {
    background: var(--bg-card);
    border-radius: 40px;
    border: 1px solid var(--border);
    padding: 5rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.journey-content h2 { font-size: 2.8rem; margin-bottom: 2rem; line-height: 1.1; }
.journey-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.profile-frame {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 40px;
    background: var(--gradient);
    padding: 10px; /* Cria a borda gradiente */
    box-shadow: 0 20px 60px rgba(2, 132, 199, 0.3);
    transition: var(--transition);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    display: block;
    transition: var(--transition);
}

.profile-frame:hover {
    transform: scale(1.03) rotate(2deg);
    box-shadow: 0 30px 80px rgba(2, 132, 199, 0.5);
}

.profile-frame:hover .profile-img {
    filter: brightness(1.1);
}

/* --- Project Cards Custom --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 35px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.project-thumb {
    width: 100%;
    height: 280px;
    background: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.project-card:hover .project-thumb img { transform: scale(1.15); }

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.4s;
    backdrop-filter: blur(8px);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-content { padding: 2.5rem; }
.project-meta { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.p-tag {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-body);
    border-radius: 100px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.project-content h3 { margin-bottom: 1rem; font-size: 1.8rem; }

/* --- Modern Contact --- */
.contact-wrap {
    background: var(--bg-card);
    border-radius: 50px;
    border: 1px solid var(--border);
    padding: 6rem;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 6rem;
}

.c-form input, .c-form textarea {
    width: 100%;
    background: var(--bg-body);
    border: 1.5px solid var(--border);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}
.c-form input:focus, .c-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 20px rgba(2, 132, 199, 0.1); }

/* --- Footer --- */
footer { padding: 120px 0 80px; text-align: center; border-top: 1px solid var(--border); }
.f-logo { font-size: 2.5rem; font-weight: 800; margin-bottom: 2.5rem; display: block; }
.f-links { display: flex; justify-content: center; gap: 4rem; margin-bottom: 4rem; flex-wrap: wrap; }
.f-links a { font-weight: 700; color: var(--text-muted); font-size: 1.1rem; }
.f-links a:hover { color: var(--primary); transform: translateY(-5px); }

/* Scroll Top Button */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--gradient);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-10px); }

/* Skill Pills */
.skill-pill {
    padding: 1.25rem 2.5rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-weight: 700;
    transition: var(--transition);
}
.skill-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* --- Media Queries (Responsividade) --- */

/* Telas Médias (Tablets) */
@media (max-width: 992px) {
    .container { padding: 0 2rem; }
    
    .journey-card, .contact-wrap { 
        grid-template-columns: 1fr; 
        padding: 4rem; 
        gap: 3rem; 
    }

    .hero h1 { font-size: 4rem; }
    .hero p { font-size: 1.2rem; }
    
    .projects-grid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}

/* Telas Pequenas (Mobile) */
@media (max-width: 768px) {
    nav { height: 65px; }
    .nav-logo { font-size: 1.3rem; }
    
    section { padding: 80px 0; }
    .section-header { margin-bottom: 4rem; }
    
    .nav-links { display: none; }
    
    .hero { padding-top: 130px; }
    .hero h1 { font-size: 3.2rem; letter-spacing: -1.5px; }
    
    .journey-card, .contact-wrap { 
        padding: 3rem 1.5rem; 
        border-radius: 30px; 
    }
    
    .journey-visual { 
        width: 100%; 
        max-width: 300px; 
        margin: 0 auto; 
    }
    
    .journey-content h2, .contact-wrap h2 { font-size: 2rem; }
    
    .projects-grid { 
        grid-template-columns: 1fr; 
    }
    
    .contact-wrap { 
        gap: 2rem; 
    }
}

/* Telas Muito Pequenas (iPhone SE / Fold) */
@media (max-width: 480px) {
    .hero h1 { font-size: 2.6rem; }
    
    .btn-group { 
        flex-direction: column; 
        width: 100%; 
    }
    
    .btn { 
        width: 100%; 
        justify-content: center; 
        padding: 0.9rem 1.5rem; 
        font-size: 1rem;
    }
    
    .contact-wrap { 
        padding: 2.5rem 1rem; 
    }
    
    .c-form input, .c-form textarea { 
        padding: 1rem; 
        border-radius: 15px; 
        font-size: 1rem;
        margin-bottom: 1rem; 
    }
    
    .f-links { 
        flex-direction: column; 
        gap: 1.5rem; 
    }

    .scroll-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}
