/* ==========================================================================
   1. VARIÁVEIS E CONFIGURAÇÕES GERAIS
   ========================================================================== */
:root {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --dark: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-site: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { height: 100%; margin: 0; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-site);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===========================
   2. NAVBAR E DROPDOWN
   =========================== */
.navbar { background: var(--dark); position: sticky; top: 0; z-index: 1000; padding: 0.5rem 0; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; }
.brand { color: white; font-size: 1.4rem; font-weight: 800; text-decoration: none; letter-spacing: -0.5px; }
.nav-menu { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.nav-menu li { position: relative; display: flex; align-items: center; }
.nav-menu a { color: #94a3b8; text-decoration: none; padding: 0.5rem 1rem; font-weight: 500; transition: 0.2s; }
.nav-menu a:hover { color: white; }

.dropdown-content { 
    display: none; position: absolute; background: white; min-width: 220px; 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); top: 100%; left: 0;
    border-radius: 8px; padding: 0.5rem 0; z-index: 1001;
}
.dropdown-content::before { content: ""; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { color: var(--text-main) !important; padding: 0.6rem 1.2rem; display: block; text-decoration: none; }
.dropdown-content a:hover { background: var(--primary-soft); color: var(--primary) !important; }

/* ===========================
   3. LAYOUT E CONTAINERS
   =========================== */
.content-wrapper { flex: 1; width: 100%; max-width: 1200px; margin: 2rem auto; padding: 0 2rem; box-sizing: border-box; }
.page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }

/* ===========================
   4. CARDS E TAGS
   =========================== */
.post-card { 
    background: var(--bg-card); padding: 2rem; border-radius: var(--radius); 
    border: 1px solid var(--border); text-decoration: none; color: inherit; 
    display: block; margin-bottom: 1.5rem; transition: var(--transition); 
}
.post-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card h3 { margin: 0.5rem 0; font-size: 1.6rem; font-weight: 700; color: var(--dark); }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.tag-pill { 
    background: var(--primary-soft); color: var(--primary); font-size: 0.75rem; 
    font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 6px; 
    text-decoration: none; transition: var(--transition); 
}
.tag-pill:hover, .tag-pill.active { background: var(--primary); color: white; }

/* ===========================
   5. PÁGINA SOBRE (Foto + Badges + Social)
   =========================== */
.about-grid { display: flex; gap: 60px; align-items: center; background: white; padding: 40px; border-radius: var(--radius); border: 1px solid var(--border); }
.about-image-container { flex: 0 0 220px; text-align: center; }
.profile-pic { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary-soft); }

.section-title { font-size: 1.4rem; color: var(--dark); margin-top: 40px; border-bottom: 2px solid var(--primary-soft); display: inline-block; padding-bottom: 5px; }
.skill-category { margin-bottom: 25px; }
.skill-category h4 { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; }

.badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-grid img { height: 28px; border-radius: 4px; transition: transform 0.2s; }
.badge-grid img:hover { transform: scale(1.05); }

.btn-social {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px; border-radius: 8px; color: white; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; transition: var(--transition);
}
.btn-social.linkedin { background: #0077b5; }
.btn-social.github { background: #24292e; }
.btn-social:hover { filter: brightness(1.2); transform: translateY(-2px); }

/* ===========================
   6. SIDEBAR, ARTIGOS E CÓDIGO
   =========================== */
.sidebar-box { position: sticky; top: 6rem; background: white; border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); }
.sidebar-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; margin-bottom: 1rem; display: block; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }

.post-body { font-size: 1.15rem; line-height: 1.7; color: #334155; }
.post-body h2 { margin-top: 2.5rem; color: var(--dark); border-bottom: 1px solid var(--border); padding-bottom: 10px; }

pre { border-radius: 8px; position: relative; padding: 1.5rem !important; margin: 1.5rem 0 !important; }
.copy-code-button { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; width: 34px; height: 34px; border-radius: 6px; cursor: pointer; opacity: 0; display: flex; align-items: center; justify-content: center; }
pre:hover .copy-code-button { opacity: 1; }

/* ===========================
   7. FOOTER SLIM (Centralização e Efeito Gopher)
   =========================== */
footer { 
    background: var(--dark); 
    color: #94a3b8; 
    padding: 2rem 1rem; 
    text-align: center; 
    margin-top: auto; 
}

footer a { color: #cbd5e1; text-decoration: none; margin: 0 0.5rem; font-size: 0.9rem; transition: 0.2s; }
footer a:hover { color: white; }
footer p { margin: 0.4rem 0; font-size: 0.85rem; }

.footer-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 15px !important;
}

.gopher-icon {
    height: 24px !important;
    width: 24px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* O gatilho do efeito */
.footer-copy:hover .gopher-icon {
    transform: translateY(-6px) rotate(-8deg) scale(1.2) !important;
}

/* ===========================
   8. RESPONSIVIDADE
   =========================== */
@media (max-width: 950px) {
    .page-layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; position: static; }
    .about-grid { flex-direction: column; text-align: center; gap: 30px; padding: 20px; }
    .content-wrapper { margin: 1rem auto; padding: 0 1rem; }
}