/* Reset & Variáveis */
:root {
    /* Cores Light Mode (Padrão) */
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #334155; /* Slate 700 */
    --accent-color: #2563eb; /* Blue 600 */
    --accent-hover: #1d4ed8; /* Blue 700 */
    --text-color: #333333;
    --bg-color: #ffffff;
    --bg-light: #f8fafc; /* Slate 50 */
    --bg-header: rgba(255, 255, 255, 0.85); /* Transparente para Glassmorphism */
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --gradient-hero: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --radius: 12px;
}

[data-theme="dark"] {
    --primary-color: #f8fafc; /* Slate 50 */
    --secondary-color: #94a3b8; /* Slate 400 */
    --accent-color: #60a5fa; /* Blue 400 */
    --accent-hover: #3b82f6; /* Blue 500 */
    --text-color: #cbd5e1; /* Slate 300 */
    --bg-color: #0f172a; /* Slate 900 */
    --bg-light: #1e293b; /* Slate 800 */
    --bg-header: rgba(15, 23, 42, 0.85); /* Transparente para Glassmorphism */
    --border-color: #334155; /* Slate 700 */
    --card-bg: #1e293b; /* Slate 800 */
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* Layout Containers */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    width: 100%;
}

section {
    padding: var(--spacing-lg) 0;
}

/* Header & Nav - Glassmorphism */
header {
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

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

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

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

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    margin-left: 1rem;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background-color: var(--bg-light);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(15deg);
}

.theme-toggle .sun {
    display: none;
    font-size: 1.1rem;
}

.theme-toggle .moon {
    display: block;
    font-size: 1.1rem;
}

[data-theme="dark"] .theme-toggle .sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon {
    display: none;
}

/* Menu Toggle Mobile */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0.5rem;
    transition: color 0.3s ease;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    padding: 8rem 0 6rem;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Efeito decorativo no background */
.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    text-align: center;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px var(--shadow-color);
    object-fit: cover;
    aspect-ratio: 4/3;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 900px) {
    .hero .container {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-content {
        text-align: left;
        padding-right: 2rem;
    }

    .hero p {
        margin-left: 0;
    }
}

/* Botões Modernos */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background-color: var(--accent-color);
    color: #ffffff;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    margin-left: 1rem;
    border-radius: 50px;
    box-shadow: none;
}

[data-theme="dark"] .btn-outline {
    border-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
    transform: translateY(-2px);
}

/* Areas de Atuação & Cards Gerais */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px var(--shadow-color);
    border-color: var(--accent-color);
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card h3 i {
    color: var(--accent-color);
}

.card p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Blog & Articles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px var(--shadow-color);
}

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

.article-card:hover .article-thumb {
    transform: scale(1.05);
}

.article-card a {
    overflow: hidden;
    display: block;
}

.article-content {
    padding: 2rem;
}

.article-meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.article-title a {
    color: var(--primary-color);
}

.article-title a:hover {
    color: var(--accent-color);
}

.article-excerpt {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.read-more {
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Single Article Styling */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1rem;
}

.article-cover {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 15px -3px var(--shadow-color);
}

.article-detail h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.article-detail .meta {
    color: var(--secondary-color);
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    font-size: 1.1rem;
}

.article-body h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 3rem 0 1.5rem;
}

.article-body h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body ul, .article-body ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    color: var(--text-color);
}

.article-body li {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.article-body code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.article-body pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-body pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-family: 'Fira Code', monospace;
}

/* About Page Styles */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 4rem;
}

.about-header {
    display: flex;
    flex-direction: column-reverse;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.profile-image {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 0 4px var(--accent-color), 0 20px 25px -5px var(--shadow-color);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05) rotate(3deg);
}

@media (min-width: 768px) {
    .about-header {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* Stats Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
}

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

.stat-item h3 {
    font-size: 2.25rem;
    color: var(--accent-color);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 3px solid var(--accent-color);
    top: 24px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--border-color);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.right::after {
    left: -8px;
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* Mobile Timeline adjustments */
@media screen and (max-width: 768px) {
  .timeline::after {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 0;
  }
  
  .timeline-item::before {
    left: 40px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--border-color) transparent transparent;
  }

  .left::after, .right::after {
    left: 12px;
  }
  
  .right {
    left: 0%;
  }
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px var(--shadow-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
    background-color: var(--bg-light);
    color: var(--text-color);
    margin-top: auto;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] footer {
    background-color: #020617;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.footer-links a {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
    display: inline-block;
}

.copyright {
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: 0 10px 15px -3px var(--shadow-color);
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }
    
    .theme-toggle {
        margin: 1rem auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        transform: none;
    }
    
    .hero-image:hover {
        transform: none;
    }
}