/* ==========================================
   RESET
========================================== */

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

html {
    scroll-behavior: smooth;
}

/* ==========================================
   TEMA (VARIÁVEIS)
========================================== */

:root {
    --bg: #f8fafc;
    --text: #1e293b;

    --card: #ffffff;
    --muted: #64748b;

    --primary: #0f172a;
    --accent: #2563eb;

    --shadow: 0 10px 30px rgba(0, 0, 0, .08);

    --radius: 18px;
}

/* DARK MODE */
body.dark {
    --bg: #0b1220;
    --text: #e2e8f0;

    --card: #111827;
    --muted: #94a3b8;

    --primary: #e2e8f0;
    --accent: #60a5fa;

    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

/* ==========================================
   BASE
========================================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;

    transition: background 0.3s ease, color 0.3s ease;
}

/* LINKS */
a {
    color: inherit;
}

/* ==========================================
   NAVBAR
========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 8%;
    background: rgba(15, 23, 42, .95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
}

.logo img {
    height: 60px;
    width: auto;
}

.menu {
    display: flex;
    gap: 30px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: .25s ease;
}

.menu a:hover {
    color: #60a5fa;
}

.menu a:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 4px;
    border-radius: 6px;
}

/* BOTÃO TEMA */
.theme-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .3);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: .3s;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, .1);
}

body.dark .theme-btn {
    border-color: var(--text);
    color: var(--text);
}

/* ==========================================
   HERO
========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;

    padding: 170px 8% 100px;

    background: linear-gradient(135deg,
            #0f172a 0%,
            #172554 50%,
            #1e40af 100%);

    color: white;
}

.hero-content {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 700px) 320px;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.hero-text {
    max-width: 700px;
}

.badge {
    display: inline-block;
    padding: 10px 18px;
    margin-bottom: 25px;

    background: rgba(255, 255, 255, .12);
    border-radius: 999px;

    font-size: .95rem;
}

.hero h1 {
    margin-bottom: 24px;
    font-size: clamp(2.2rem, 3.8vw, 4rem);
    line-height: 1.15;
    font-weight: 700;
}

.hero p {
    margin-bottom: 35px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .85);
}

/* BOTÕES */

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 999px;
    transition: .25s ease;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #2563eb;
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, .12);
}

/* ==========================================
   HERO IMAGE (CORRIGIDA)
========================================== */

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;

    border-radius: 50%;
    border: 4px solid var(--accent);

    box-shadow: 0 15px 40px rgba(0, 0, 0, .25);
}

/* ==========================================
   SEÇÕES
========================================== */

.section {
    padding: 100px 8%;
}

.section h2 {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    color: var(--primary);
}

/* ==========================================
   COMPONENTES
========================================== */

.card,
.stat,
.skill,
.timeline-item,
.contact-box {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);

    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* SOBRE */

.sobre-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.texto p {
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat {
    padding: 25px;
    text-align: center;
}

.stat h3 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 10px;
}

/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    padding: 35px;
    transition: .25s ease;
}

.card:hover {
    transform: translateY(-8px);
}

.card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* TIMELINE */

.timeline {
    position: relative;
    max-width: 900px;
    margin: auto;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 4px;
    background: #3b82f6;
}

.timeline-item {
    position: relative;
    margin-left: 90px;
    margin-bottom: 30px;
    padding: 25px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -68px;
    top: 32px;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
}

/* SKILLS */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.skill {
    padding: 25px;
    text-align: center;
    transition: .25s ease;
}

.skill:hover {
    transform: translateY(-5px);
}

.skill i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.skill span {
    font-weight: 600;
}

/* CONTATO */

.contact-box {
    max-width: 700px;
    margin: auto;
    padding: 40px;
}

.contact-box p {
    margin-bottom: 15px;
}

.contact-box i {
    color: var(--accent);
    margin-right: 10px;
}

/* ==========================================
   FOOTER (CORRIGIDO)
========================================== */

footer {
    padding: 30px;
    background: var(--card);
    color: var(--text);
    text-align: center;

    border-top: 1px solid rgba(0, 0, 0, .08);
}

body.dark footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ==========================================
   RESPONSIVO
========================================== */

@media (max-width: 992px) {

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-buttons {
        justify-content: center;
    }

    .sobre-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding-top: 230px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        margin-left: 60px;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-item::before {
        left: -40px;
    }
}