/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --bg-darker: #0f172a;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section-dark {
    background-color: var(--bg-darker);
    color: #ffffff;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.text-center {
    text-align: center;
}

.loading {
    text-align: center;
    padding: var(--spacing-xl);
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text {
    font-family: var(--font-heading);
}

.logo-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-base);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 1s ease;
}

.highlight {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
    min-height: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.typing-text {
    border-right: 2px solid var(--secondary-color);
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.hero-social {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition-base);
}

.social-link:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: white;
    font-size: 2rem;
    opacity: 0.7;
}

/* ========================================
   About Section
   ======================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-paragraph {
    margin-bottom: var(--spacing-md);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-skills {
    margin-top: var(--spacing-xl);
}

.skills-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    transition: var(--transition-base);
}

.skill-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary-color);
    border-radius: 1rem;
    z-index: -1;
}

/* ========================================
   Content Section
   ======================================== */
.content-subsection {
    margin-bottom: var(--spacing-2xl);
}

.subsection-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.subsection-title i {
    color: var(--secondary-color);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition-base);
}

.video-card:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: var(--spacing-md);
}

.video-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: white;
}

.video-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.book-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    text-align: center;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.book-cover {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.5rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.book-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    color: white;
}

.book-author {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-sm);
}

.book-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

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

.project-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content {
    padding: var(--spacing-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-md);
}

.project-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.project-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-em_andamento {
    background: #fef3c7;
    color: #92400e;
}

.status-lancado {
    background: #d1fae5;
    color: #065f46;
}

.status-pausado {
    background: #fee2e2;
    color: #991b1b;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-info-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: white;
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.7);
}

.contact-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.form-message {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: 0.5rem;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer-text {
    margin-bottom: 0.5rem;
}

.footer i {
    color: #ef4444;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: var(--spacing-xl);
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}
