/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */
:root {
    /* Colors */
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    /* Accents */
    --accent-1: #6366f1; /* Indigo */
    --accent-2: #ec4899; /* Pink */
    --accent-3: #8b5cf6; /* Violet */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --nav-scrolled-bg: rgba(5, 5, 5, 0.85);
    
    --btn-secondary-hover: rgba(255, 255, 255, 0.1);

    --card-shadow: none;
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-scrolled-bg: rgba(248, 250, 252, 0.85);
    
    --btn-secondary-hover: rgba(0, 0, 0, 0.05);

    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Animated Background Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-3px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: var(--nav-scrolled-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.5s ease;
}

.logo span {
    color: var(--accent-2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-1);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    position: relative;
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.5s ease, border-color 0.5s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--card-hover-shadow);
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image-wrapper {
    overflow: hidden;
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.5s ease;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-1);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--accent-2);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Poderíamos adicionar um menu hambúrguer aqui */
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-container {
        padding: 4rem 1.5rem;
    }
    
    .glass-panel {
        padding: 2rem 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
