/**
  * @file style.css
* @description Estilos principais para o site pessoal de Tiago Olivoto, incluindo design responsivo, animações e componentes reutilizáveis.
* @version 7.0 (Restaurada, Completa e Organizada)
*/
  
  /* ====================================================================
  --- 0. CONFIGURAÇÕES GLOBAIS & DESIGN SYSTEM ---
  ==================================================================== */
  
  :root {
    --primary: #10b981;
      --primary-dark: #059669;
      --secondary: #3b82f6;
      --dark: #0f172a;
      --dark-light: #1e293b;
      --text: #e2e8f0;
      --textplot: rgba(16, 185, 129, 0.75);
    --text-muted: #94a3b8;
      --accent: #f59e0b;
      --bg-card: rgba(30, 41, 59, 0.5);
    --border: rgba(148, 163, 184, 0.1);
    --borderplot: rgba(148, 163, 184, 0.1);
    --glow: rgba(16, 185, 129, 0.5);
    --glass: rgba(255, 255, 255, 0.03);
    --error: #f44336;
      --light-bg: #f8fafc; /* light blue-gray */
      --light-text: #1e293b; /* dark blue-gray */
      --light-bg-card: #ffffff;
      --light-border: #e2e8f0;
  }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.25;
  color: var(--text);
  background: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  cursor: default;
}
/* ====================================================================
  --- TEMA CLARO (LIGHT MODE OVERRIDES) ---
  ==================================================================== */
  
  /* 1. Regra Principal (O que faltou)
Muda o fundo e o texto padrão de todo o site */
  body.light-mode {
    color: var(--light-text);
    background: var(--light-bg); /* Define o fundo claro */
  }

/* 2. Ajustes de Contraste e Links */
  body.light-mode a { 
    color: var(--primary-dark); 
  }
body.light-mode .section-intro { 
  background: rgba(255, 255, 255, 0.7); 
  border-left-color: var(--primary-dark); 
}

/* 3. Ajuste do Header (que tinha seu próprio fundo escuro) */
  body#index-page.light-mode header {
/* Mantém um gradiente sutil, mas usa o fundo claro */
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.1) 0%, transparent 50%), var(--light-bg);
border-bottom-color: var(--light-border);
animation: none;
}
/* Ajuste do texto do Hero */
  body#index-page.light-mode header h1 {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
-webkit-background-clip: text;
background-clip: text;
}
body#index-page.light-mode .subtitle {
color: var(--light-text);
}
body#index-page.light-mode .subtitle::after { /* Cursor piscando */
color: var(--primary-dark);
}

/* 4. Navegação e Rodapé */
  body.light-mode nav { 
    background: rgba(248, 250, 252, 0.95); 
    border-bottom-color: var(--light-border); 
  }
body#index-page.light-mode nav.scrolled { 
background: rgba(248, 250, 252, 0.95); 
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
}
body.light-mode footer { 
  background: rgba(248, 250, 252, 0.95); 
  border-top-color: var(--light-border); 
}

/* 5. Cards, Sidebars e Links de Contato (Forçando fundo branco) */
  body.light-mode .card, 
body.light-mode .sidebar, 
body.light-mode .contact-link,
body.light-mode .project-card,
body.light-mode .publication-card,
body.light-mode .post-card,
body.light-mode .full-post { 
  background: var(--light-bg-card) !important; 
  border-color: var(--light-border);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); 
}

/* 6. Texto dentro dos Cards */
  body.light-mode .card p, 
body.light-mode .card h3,
body.light-mode .post-content h3,
body.light-mode .post-excerpt,
body.light-mode .full-post p,
body.light-mode .full-post h1,
body.light-mode .full-post h2,
body.light-mode .full-post h3 {
  color: var(--light-text) !important; /* Garante que o texto fique escuro */
}
/* Corrigindo links e tags específicos dentro dos cards */
  body.light-mode .post-tag,
body.light-mode .topic-tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--secondary);
  border-color: rgba(59, 130, 246, 0.3);
}
body.light-mode .topic-tag:hover {
  background: var(--secondary);
  color: var(--light-bg-card);
}

/* 7. Links da Navegação Principal */
  body#index-page.light-mode .nav-link { 
color: var(--light-text); 
}
body#index-page.light-mode .nav-link:hover, 
body#index-page.light-mode .nav-link.active { 
color: var(--primary-dark); 
}

/* 8. Controles de Busca e Botões de Tema/Idioma */
  body.light-mode .controls input { 
    background: var(--light-bg-card);
    border-color: var(--light-border); 
    color: var(--light-text); 
  }

body.light-mode .lang-switcher,
body.light-mode .theme-toggle-btn {
  background: var(--light-bg-card);
  border-color: var(--light-border);
  color: var(--primary-dark);
}
body.light-mode .lang-switcher:hover,
body.light-mode .theme-toggle-btn:hover {
  background: var(--primary-dark);
  color: var(--light-bg-card);
}

/* 9. Fundo de Partículas (Ocultar no modo claro) */
  body.light-mode #particle-canvas {
opacity: 0.1; 
visibility: hidden; /* Garante que desapareça */
  }

/* 10. Barra de Rolagem (Scrollbar) */
  body.light-mode ::-webkit-scrollbar-track { 
    background: var(--light-border); 
  }
body.light-mode ::-webkit-scrollbar-thumb { 
  background: var(--primary-dark); 
}
body.light-mode ::-webkit-scrollbar-thumb:hover { 
  background: var(--primary); 
}

/* 11. Ícones do Rodapé */
  body.light-mode .footer-column ul li a { color: var(--light-text); }
body.light-mode .footer-column ul li a:hover { color: var(--primary-dark); }
body.light-mode .footer-column ul li a .icon-img { background-color: var(--light-text); }
body.light-mode .footer-column ul li a:hover .icon-img { background-color: var(--primary-dark); }


/* Botão Tema */
  .theme-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--primary);
    background: var(--bg-card); color: var(--primary); cursor: pointer;
    backdrop-filter: blur(10px); transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }
.theme-toggle-btn:hover {
  background: var(--primary); color: var(--dark); transform: scale(1.1);
}
.theme-toggle-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Novo Contêiner para os botões fixos no topo */
  /* style.css (Novo Contêiner para os botões fixos no topo) */
  .fixed-actions-container {
    position: fixed;
    top: 60px; /* Restaurado para 20px de distância do topo */
      right: 20px;
    z-index: 1001;
    display: flex; 
    gap: 10px; 
    align-items: center;
  }

/* Ajuste o lang-fixed original, se necessário, para garantir que o posicionamento não se duplique */
  /* Se existir: */
  /* --- 2.3 Switcher de Idioma --- */
  /* ... (Seletor .lang-switcher) ... */
  .lang-fixed { 
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
  }

/* Fundo Animado e Scrollbar */
  #particle-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
  ::-webkit-scrollbar { width: 15px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }


/* ====================================================================
  --- 1. LAYOUT & TIPOGRAFIA COMUM ---
  ==================================================================== */
  
  .container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.section { margin-bottom: 80px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 30px; }

p, li { color: var(--text-muted); font-size: 1.05rem; }
a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { text-decoration: underline; }

/* Títulos Gerais e Introdução */
  .container h1 { font-size: 2rem; color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 30px; }
.container h2 { font-size: clamp(1.5rem, 4vw, 1.8rem); color: var(--primary); position: relative; padding-left: 20px; margin-top: 40px; margin-bottom: 25px; }
.container h2::before { 
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); 
width: 4px; height: 70%; background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%); 
border-radius: 2px; 
}
.section-intro { 
  color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; 
  background: rgba(30, 41, 59, 0.3); border-radius: 12px; border-left: 3px solid var(--primary); 
  margin: -15px 0 40px 0; padding: 20px; 
}


/* ====================================================================
  --- 2. COMPONENTES REUTILIZÁVEIS ---
  ==================================================================== */
  
  /* --- 2.1 Navegação Global (Padrão) --- */
  nav { 
    position: sticky; top: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); 
    border-bottom: 1px solid var(--border); z-index: 1000; padding: 15px 0; 
    transition: padding 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; 
  }
nav.scrolled { padding: 8px 0; }
.nav-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; padding: 0 20px; align-items: center; }

/* --- 2.2 Botões de Ação (CTA, Link) --- */
  .cta-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
    padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: 600; 
    transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
    border: 1px solid transparent; position: relative; overflow: hidden; z-index: 1; text-align: center; cursor: pointer;
  }
.cta-btn svg { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }
.cta-btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.6s ease; z-index: -1;
}
.cta-btn:hover::before { left: 100%; }
.cta-btn.primary { background: var(--primary); color: var(--dark); }
.cta-btn.primary:hover { background: var(--primary-dark); transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }
.cta-btn.secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.cta-btn.secondary:hover { background: rgba(16, 185, 129, 0.1); transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2); }

.link-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; 
  background: var(--primary); color: #fff !important; border-radius: 10px; 
    text-decoration: none; font-weight: 600; border: 1px solid var(--primary); 
  transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25); 
  text-align: center; cursor: pointer;
}
.link-btn:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35); transform: translateY(-2px); text-decoration: none; color: #fff !important; }
    .link-btn.secondary { background: transparent; color: var(--primary) !important; box-shadow: none; }
  .link-btn.secondary:hover { background: rgba(16, 185, 129, 0.12); color: var(--primary) !important; transform: translateY(-2px); }
  .btn-small { padding: 8px 16px; font-size: 0.9rem; }
  
  /* --- 2.3 Switcher de Idioma (AJUSTADO PARA CENTRALIZAÇÃO) --- */
.lang-switcher {
    /* TRANSFORMA O BOTÃO EM UM CONTAINER FLEXÍVEL */
    display: flex;
    align-items: center; /* Alinha verticalmente */
    justify-content: center; /* Alinha horizontalmente */
    gap: 0; /* Controla o espaçamento usando padding/margin nos spans */

    background: var(--bg-card);
    border: 1px solid var(--primary);
    padding: 6px 10px; /* Reduza o padding do container, os spans internos terão padding */
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap; 
    transition: all 0.3s ease;
    color: var(--primary); /* Cor base do texto/span não ativo */
}

/* Estilo dos itens individuais (PT, EN, ES) */
.lang-switcher span {
    display: inline-block;
    padding: 4px 8px; /* Espaçamento interno em torno do texto/bandeira */
    margin: 0 2px; /* Espaçamento entre os itens */
    border-radius: 14px; /* Para o fundo do destaque */
    transition: all 0.2s ease;
    text-align: center; /* Centraliza o texto dentro do span */
    /* Garante que o texto base (não ativo) use a cor do botão */
    color: currentColor; 
}

/* Estilo do hover para os itens não ativos */
.lang-switcher span:not(.active):hover {
    background-color: rgba(16, 185, 129, 0.1);
}

/* Item Ativo (PT, EN, ES) - Onde o fundo e a cor mudam */
.lang-switcher .lang-pt.active,
.lang-switcher .lang-en.active,
.lang-switcher .lang-es.active {
    /* CORREÇÃO CRÍTICA: Aplica o fundo de destaque (ex: verde) */
    background: var(--primary); 
    /* Garante que a cor do texto no item ativo seja visível (ex: var(--dark) ou var(--text)) */
    color: var(--dark) !important; 
    font-weight: 700;
    transform: scale(1.05); /* Destaque sutil */
}

.lang-switcher:hover { 
    background: var(--primary); 
    color: var(--dark); /* A cor do container muda, mas é anulada pelo span.active */
}

/* Posição Fixa */
.lang-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
  body.scrolled .lang-fixed { opacity: 0; transform: scale(0.8); visibility: hidden; pointer-events: none; }
  
  
  /* --- 2.4 Rodapé (Footer) --- */
    footer { 
      background: rgba(15, 23, 42, 0.95); border-top: 1px solid var(--border); 
      padding: 60px 20px 40px; text-align: left; margin-top: 80px; 
    }
  .footer-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 30px; margin-bottom: 40px; max-width: 1200px; margin-left: auto; margin-right: auto; 
  }
  .footer-column h4 { 
    color: var(--primary); margin-bottom: 15px; font-size: 1.1rem; position: relative; 
    padding-bottom: 10px; border-bottom: 1px solid var(--border); 
  }
  .footer-column h4::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 40px; height: 2px; background: var(--primary); }
  .footer-column p, .footer-column ul li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.8; }
  .footer-column p + ul { margin-top: 15px; }
  .footer-column ul { list-style: none; padding: 0; }
  .footer-column ul li { margin-bottom: 10px; }
  .footer-column ul li[data-key="footer-location"] { display: flex; align-items: center; gap: 8px; color: var(--text-muted); padding-top: 10px; }
  .footer-column ul li a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; display: flex; align-items: center; gap: 8px; }
  .footer-column ul li a:hover { color: var(--primary); }
  .footer-column ul li a svg { width: 16px; height: 16px; flex-shrink: 0; }
  .footer-column ul li a .icon-img { width: 16px; height: 16px; flex-shrink: 0; background-color: var(--text-muted); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background-color 0.3s ease; }
  .footer-column ul li a:hover .icon-img { background-color: var(--primary); }
  .icon-doi { -webkit-mask-image: url(https://upload.wikimedia.org/wikipedia/commons/1/11/DOI_logo.svg); mask-image: url(https://upload.wikimedia.org/wikipedia/commons/1/11/DOI_logo.svg); }
  .footer-bottom { padding-top: 30px; margin-top: 30px; text-align: center; }
  .footer-content { max-width: 1200px; margin: 0 auto; }
  .footer-license { margin-top: 20px; margin-bottom: 15px; font-size: 0.8rem; color: var(--text-muted); }
  .footer-license a { color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
  .footer-license a:hover { color: var(--primary); }
  .footer-update { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 15px; }
  .footer-update svg { width: 14px; height: 14px; }
  .back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background-color: var(--primary); color: var(--dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; opacity: 0; visibility: hidden; transition: all 0.4s ease; z-index: 1000; box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4); }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background-color: var(--primary-dark); transform: translateY(-5px); }

  /* --- 2.5 Componente: Notificação (Toast) --- */
    #toast-notification {
    visibility: hidden; opacity: 0; position: fixed; z-index: 2000; bottom: 30px; right: 30px;
  min-width: 250px; background-color: var(--primary); color: var(--dark); font-weight: 500;
  text-align: center; border-radius: 8px; padding: 16px 24px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0.5s; transform: translateY(20px);
}
#toast-notification.show { visibility: visible; opacity: 1; transform: translateY(0); }


/* ====================================================================
  --- 3. ESTILOS DE PÁGINAS E SEÇÕES ESPECÍFICAS ---
  ==================================================================== */
  
  /* --- 3.1. Página Inicial (#index-page) --- */
    
    /* Navegação da Página Inicial (Transparente no Topo) */
      #index-page nav { background: transparent; border-bottom: 1px solid transparent; box-shadow: none; }
      #index-page nav.scrolled { background: rgba(15, 23, 42, 0.95); border-bottom-color: var(--border); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
      #index-page .nav-col-left { justify-self: start; }
      #index-page .nav-col-center { display: flex; gap: 25px; justify-content: center; flex-wrap: wrap; }
      #index-page .nav-col-right { justify-self: end; }
      #index-page .nav-avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--primary); transform: scale(0); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; box-shadow: 0 0 10px var(--glow); }
      #index-page nav.scrolled .nav-avatar { transform: scale(1); opacity: 1; }
      #index-page .nav-link { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.3s ease, transform 0.3s ease; position: relative; }
      #index-page .nav-link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s ease; }
      #index-page .nav-link:hover, #index-page .nav-link.active { color: var(--primary); transform: translateY(-2px); }
      #index-page .nav-link:hover::after, #index-page .nav-link.active::after { width: 100%; }
      #index-page .nav-col-right .lang-switcher { opacity: 0; transform: scale(0); }
      #index-page nav.scrolled .nav-col-right .lang-switcher { opacity: 1; transform: scale(1); }
      
      /* Header/Hero da Página Inicial */
      #index-page header { 
      position: relative; padding: 100px 20px 60px; text-align: center; 
    background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.15) 0%, transparent 60%), linear-gradient(270deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9)); 
    background-size: 200% 200%; border-bottom: 1px solid var(--border); animation: animated-gradient 15s ease-infinite; 
    }
#index-page .hero-content { max-width: 900px; margin: 0 auto; animation: fadeInUp 0.8s ease; }
#index-page .avatar { 
width: 280px; height: 280px; border-radius: 50%; border: 4px solid var(--primary); 
box-shadow: 0 0 40px var(--glow); margin: 0 auto 30px; display: block; animation: glow 3s ease-in-out infinite; 
}
#index-page header h1 { 
font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; margin-bottom: 10px; 
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); 
-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; 
border-bottom: none; padding-bottom: 0; 
}
#index-page .subtitle { font-size: clamp(1.1rem, 3vw, 1.3rem); color: var(--text-muted); margin-bottom: 25px; font-weight: 300; height: 1.6em; min-height: 1.6em; }
#index-page .subtitle::after { content: '▋'; animation: blink 0.7s infinite; color: var(--primary); font-weight: 400; }
#index-page .hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 26px 0 8px; }
#index-page .badges { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin: 30px 0; }
#index-page .badge { background: var(--bg-card); border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; color: var(--primary); backdrop-filter: blur(10px); transition: all 0.3s ease; }
#index-page .badge:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3); border-color: var(--primary); }

/* Ícones Sociais do Hero */
  #index-page .social-icons-hero {
  display: flex; justify-content: center; gap: 5px; margin: 20px 0 10px; flex-wrap: wrap;
}
#index-page .social-icons-hero a {
width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
border-radius: 50%; background: var(--bg-card); border: none; color: var(--primary); 
transition: all 0.3s ease;
}
#index-page .social-icons-hero a:hover {
transform: translateY(-3px) scale(1.12); border-color: var(--primary);
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
background-color: rgba(16, 185, 129, 0.1); color: var(--primary);
}
#index-page .social-icons-hero a svg { width: 30px; height: 30px; fill: currentColor; }
#index-page .social-icons-hero .nepem-hero-icon .icon-img {
width: 25px; height: 25px; background-color: var(--text);
transition: background-color 0.05s ease;
}
#index-page .social-icons-hero a:hover .nepem-hero-icon .icon-img { background-color: var(--primary); }

/* Card Base da Página Inicial (Glassmorphism) */
  #index-page .card { 
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; 
padding: 25px; backdrop-filter: blur(10px); transition: all 0.3s ease; 
position: relative; overflow: hidden; 
}
#index-page .card:hover { transform: translateY(-8px); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 10px 40px rgba(16, 185, 129, 0.2); }
#index-page .card::before { 
content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; 
background: radial-gradient(80px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.3), transparent 80%); 
border-radius: inherit; opacity: 0; transition: opacity 1s; z-index: 1; 
}
#index-page .card:hover::before { opacity: 1; }
#index-page .card > * { position: relative; z-index: 2; }
#index-page .card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.2rem; text-align: left;}
#index-page .card p:not(.citations) { color: var(--text-muted); line-height: 1.8; margin-top: 20px; }
#index-page #sobre .card p:first-of-type { font-size: 1.1rem; margin-top: 0; }
#index-page .icon { font-size: 2rem; margin-bottom: 15px; display: block; position: relative; overflow: hidden; }
#index-page .icon::after { content: ''; position: absolute; top: 0; transform: translateX(-100%); width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); }
#index-page .card.visible .icon::after { animation: shine-effect 2.5s ease-in-out infinite; }

/* Timeline (Formação) */
  #index-page .timeline { position: relative; padding: 20px 0; }
  #index-page .timeline::before { content: ''; position: absolute; left: 30px; top: 0; height: 100%; width: 2px; background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%); }
  #index-page .timeline-item { position: relative; padding-left: 70px; margin-bottom: 40px; }
  #index-page .timeline-dot { position: absolute; left: 24px; top: 15px; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 20px var(--glow); transition: transform 0.3s ease; }
  #index-page .timeline-item:hover .timeline-dot { transform: scale(1.5); }
  #index-page .timeline-content.card { padding: 25px; }
  #index-page .timeline-header + .small-muted { margin-top: 5px; }
  #index-page .timeline-date { color: var(--accent); font-weight: 600; margin-bottom: 5px; }
  #index-page .timeline-details { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; color: var(--text-muted); }
  #index-page .timeline-item.expanded .timeline-details { max-height: 300px; }
  #index-page .toggle-details-btn { background: none; border: 1px solid var(--primary); color: var(--primary); padding: 5px 10px; border-radius: 5px; cursor: pointer; margin-top: 15px; transition: all 0.3s; }
  #index-page .toggle-details-btn:hover { background: rgba(16, 185, 129, 0.1); }
  
  /* Habilidades (Skills) */
  #index-page .skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 20px; }
  #index-page .skill-category.card { padding: 25px; }
  #index-page .skill-category h3 { color: var(--primary); font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); position: relative; }
  #index-page .skill-category h3::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 50px; height: 2px; background: var(--primary); }
  #index-page .skill-item { display: flex; align-items: center; margin-bottom: 18px; font-size: 1rem; opacity: 0; transform: translateX(-20px); transition: opacity 0.5s ease, transform 0.5s ease; }
  #index-page .skill-item.visible { opacity: 1; transform: translateX(0); }
  #index-page .skill-name { width: 40%; color: var(--text); padding-right: 15px; font-weight: 500; }
  #index-page .skill-bar-container { width: 60%; height: 10px; background-color: var(--dark-light); border-radius: 5px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); }
  #index-page .skill-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%); border-radius: 5px; transition: width 1.2s cubic-bezier(0.25, 1, 0.5, 1); will-change: width; transform: translateZ(0); }
  #index-page .skill-item.visible .skill-bar { width: var(--proficiency-level); }
  
  /* Google Scholar */
  #index-page .scholar-summary-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 30px; margin-bottom: 40px; margin-top: 25px; }
  #index-page .scholar-header { display: flex; align-items: center; gap: 15px; }
  #index-page .scholar-header svg { width: 40px; height: 40px; color: #4285F4; }
  #index-page .scholar-header h3 { margin: 0; font-size: 1.5rem; color: var(--text); }
  #index-page .scholar-metrics { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
  #index-page .metric-item { text-align: center; }
  #index-page .metric-value { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
  #index-page .metric-label { font-size: 0.9rem; color: var(--text-muted); }
  #index-page .scholar-chart-container { width: 100%; min-height: 450px; margin: 30px auto 0; }
  
  /* Seções NEPEM / Feature */
  #index-page .feature-section.card { padding: 40px; }
  #index-page .feature-section { display: grid; grid-template-columns: 1fr; gap: 40px; }
  #index-page .feature-section + .feature-section { margin-top: 40px; }
  #index-page .feature-logo { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
  #index-page .feature-content h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 10px; }
  #index-page .feature-content p { color: var(--text-muted); margin-bottom: 20px; }
  #index-page .feature-list { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px; }
  #index-page .feature-list li { display: flex; align-items: center; gap: 10px; }
  #index-page .feature-list li::before { content: '✔️'; color: var(--primary); font-size: 1.2rem; }
  
  /* Menu Hamburger (Mobile) */
  #index-page .nav-toggle-checkbox { display: none; }
  #index-page .nav-toggle-label { display: none; cursor: pointer; z-index: 1002; padding: 10px; }
  #index-page .hamburger, #index-page .hamburger::before, #index-page .hamburger::after { content: ''; display: block; width: 24px; height: 2px; background-color: var(--primary); border-radius: 3px; position: relative; transition: all 0.3s ease-in-out; }
  #index-page .hamburger::before { top: -7px; }
  #index-page .hamburger::after { top: 5px; }
  #index-page .nav-toggle-checkbox:checked ~ .nav-toggle-label .hamburger { transform: rotate(135deg); }
  #index-page .nav-toggle-checkbox:checked ~ .nav-toggle-label .hamburger::before { top: 0; transform: rotate(90deg); }
  #index-page .nav-toggle-checkbox:checked ~ .nav-toggle-label .hamburger::after { top: 0; transform: rotate(90deg); opacity: 0; }
  
  
  /* --- 3.2. Páginas Internas (Navegação Padrão) --- */
  body:not(#index-page) .nav-brand { justify-self: start; }
    body:not(#index-page) .nav-brand a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
      body:not(#index-page) .nav-avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--primary); box-shadow: 0 0 10px var(--glow); }
        body:not(#index-page) .nav-brand-text { color: var(--text); font-weight: 600; font-size: 1.1rem; }
          body:not(#index-page) .nav-actions { justify-self: end; display: flex; align-items: center; gap: 15px; }
            body:not(#index-page) .nav-title-container { text-align: center; }
              body:not(#index-page) .nav-title { font-size: 1.1rem; color: var(--text); font-weight: 600; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 0; margin-bottom: 0; }
                body:not(#index-page) nav.scrolled .nav-title { opacity: 1; visibility: visible; transform: translateY(0); }
                  
                  
                  /* --- 3.3. Seção de Projetos e Publicações (Filtros e Cards) --- */
                    .sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px 30px; backdrop-filter: blur(10px); box-shadow: 0 10px 35px rgba(2, 6, 23, 0.4); }
                  .controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
                  .controls input { flex: 1; min-width: 160px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--glass); color: var(--text); transition: all 0.3s ease; }
                  .controls input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); outline: none; }
                  .controls button { padding: 10px 14px; border-radius: 12px; border: none; background: var(--primary); color: #042017; cursor: pointer; font-weight: 600; transition: all 0.3s ease; }
                      .controls button:hover { background: var(--primary-dark); transform: translateY(-2px); }
                    
                    /* Cards de Projeto */
                      .projects { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
                    #page-projects .projects-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
                    .project-card { background: rgba(255, 255, 255, 0.03); border-radius: 14px; padding: 16px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; transition: all 0.35s ease; }
                    .project-card:hover { transform: translateY(-4px); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 6px 28px rgba(16, 185, 129, 0.15); }
                    #page-projects .project-card { min-height: 180px; }
                    .project-top h3 { margin: 0; font-size: 1.05rem; color: var(--primary); font-weight: 600; }
                    .project-description, .project-desc { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; flex-grow: 1; }
                    .project-topics { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
                    .topic-tag { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--secondary); padding: 3px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
                    .topic-tag:hover, .topic-tag.active { background: var(--secondary); color: var(--dark); transform: scale(1.05); }
                    .project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
                    .meta-badge { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
                    .language-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 50px; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35); color: var(--secondary); font-size: 0.85rem; font-weight: 600; text-transform: capitalize; transition: all 0.3s ease; }
                    .language-badge:hover { background: var(--secondary); color: var(--dark); transform: scale(1.05); }
                    .project-card .actions { margin-top: auto; padding-top: 10px; display: flex; gap: 15px; }
                    /* Override para #projects-list na index */
                    #projects-list {
                    display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); 
                  }
                  
                  /* Cards de Publicação */
                    .publication-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
                  .publication-card.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 25px; backdrop-filter: blur(10px); transition: all 0.3s ease; }
                  .publication-card.card:hover { transform: translateY(-5px); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 5px 30px rgba(16, 185, 129, 0.2); }
                  .publication-card h3 { color: var(--primary); font-size: 1.2rem; }
                  .publication-card > a { color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.3s ease; margin-top: auto; padding-top: 10px; }
                  .publication-card > a:hover { color: var(--primary-dark); }
                  .publication-meta { font-size: 0.9rem; color: var(--text-muted); }
                  .publication-card .citations { font-size: 0.9rem; color: var(--accent); font-weight: bold; }
                  .publication-doi { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 0.9rem; }
                  .publication-doi img { width: 20px; height: 20px; }
                  .publication-doi a { color: var(--text-muted); text-decoration: none; word-break: break-all; transition: color 0.3s ease; }
                  .publication-doi a:hover { color: var(--primary); }
                  
                  
                  /* --- 3.4. Seção de Posts (Listagem e Card) --- */
                    .posts-grid, .post-list { 
                      display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
                      gap: 25px; margin-top: 25px; width: 100%; 
                    }
                  .post-card {
                    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; 
                    padding: 20px; backdrop-filter: blur(10px); box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); 
                    overflow: hidden; display: flex; flex-direction: column; height: 100%; 
                    transition: all 0.3s ease;
                  }
                  .post-card:hover { transform: translateY(-5px); border-color: rgba(16, 185, 129, 0.4); box-shadow: 0 5px 30px rgba(16, 185, 129, 0.2); }
                  .post-image { margin: -20px -20px 20px -20px; overflow: hidden; height: 180px; }
                  .post-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
                  .post-content { padding: 0; flex-grow: 1; display: flex; flex-direction: column; }
                  .post-content h3 { margin-top: 0; font-size: 1.2rem; color: var(--primary); font-weight: 600; margin-bottom: 5px; }
                  .post-excerpt { color: var(--text-muted); font-size: 1rem; line-height: 1.5; margin-bottom: 15px; flex-grow: 1; }
                  .post-date { font-size: 0.9rem; color: var(--text-muted); margin: 5px 0 10px 0; }
                  .read-more-btn {
                    display: inline-flex; align-self: flex-start; padding: 8px 14px; border-radius: 8px; 
                    background: var(--primary); color: var(--dark) !important; font-weight: 600; 
                    text-decoration: none !important; transition: all 0.3s ease;
                  }
                  .read-more-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
                  /* style.css (Adicionar ao bloco de Posts ou Componentes) */
                    .post-tags-container {
                      display: flex;
                      flex-wrap: wrap;
                      gap: 8px; /* Espaço entre as tags */
                        margin-bottom: 12px; /* Espaço entre as tags e o excerpt */
                        margin-top: 5px; /* Espaço entre a data e as tags */
                    }
                  .post-tag {
                    display: inline-block;
                    padding: 4px 10px;
                    border-radius: 12px;
                    font-size: 0.8rem;
                    font-weight: 500;
                    white-space: nowrap;
                    cursor: default; /* Tags não são clicáveis por padrão */
                      
                      /* Cores (usando secundária ou de acento para diferenciar) */
                      background: rgba(59, 130, 246, 0.1); /* Usando var(--secondary) diluída */
                      color: var(--secondary);
                    border: 1px solid rgba(59, 130, 246, 0.3);
                    transition: all 0.2s ease;
                  }
                  .post-tag:hover {
                    background: rgba(59, 130, 246, 0.2);
                  }
                  
                  /* --- 3.5. Página de Postagem Única (post.html) --- */
                    .full-post {
                      max-width: 900px; margin: 40px auto; padding: 40px; /* Ajustado padding */
                        background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border);
                      box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
                    }
                  .full-post h1 { font-size: 2.5rem; color: var(--primary); border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 15px; }
                  .full-post small { display: block; color: var(--text-muted); font-size: 1rem; margin-bottom: 25px; }
                  .full-post-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; }
                  .post-body p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 20px; color: var(--text); }
                  .post-body h2 { font-size: 1.8rem; color: var(--primary); margin-top: 30px; margin-bottom: 15px; padding-left: 0; }
                  .post-body h2::before { display: none; }
                  .post-body h3 { font-size: 1.5rem; color: var(--secondary); margin-top: 25px; margin-bottom: 15px; }
                  .post-body h4 { font-size: 1.2rem; color: var(--accent); margin-top: 20px; margin-bottom: 10px; }
                  .back-to-home-container { margin-top: 40px; text-align: center; }
                  
                  
                  /* --- 3.6. Seção de Contato e Links Rápidos --- */
                    .contact-container {
                        display: grid;
                        grid-template-columns: 1fr;
                        gap: 50px; /* Aumenta o espaço entre o formulário e os links */
                        align-items: flex-start;
                    }
                    @media(min-width: 992px) {
                        .contact-container { grid-template-columns: 2fr 1fr; }
                    }
                  .contact-form { display: flex; flex-direction: column; gap: 20px; }
                  .form-group { position: relative; }
                  .form-group label { display: block; color: var(--text-muted); margin-bottom: 8px; font-size: 0.9rem; }
                  .form-group input, .form-group textarea { width: 100%; background-color: var(--glass); border: 1px solid var(--border); color: var(--text); padding: 14px; border-radius: 8px; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
                  .form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 10px var(--glow); }
                  .form-group textarea { resize: vertical; min-height: 120px; }
                  .contact-form button.link-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-size: 1rem; }
                  .contact-form button.link-btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
                  .contact-links-aside h3 { margin-bottom: 20px; color: var(--primary); }
                  .contact-grid { display: grid; grid-template-columns: 1fr; gap: 15px; perspective: 1000px; }
                  .contact-link {
                    display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 15px;
                    padding: 15px 20px; text-decoration: none; background: var(--bg-card); border: 1px solid var(--border);
                    border-radius: 12px; color: var(--text); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
                    backdrop-filter: blur(10px);
                  }
                  .contact-link:hover { transform: scale(1.03) rotateY(3deg) translateX(5px); border-color: var(--primary); box-shadow: 0 8px 35px rgba(16, 185, 129, 0.3); }
                  .contact-link svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--primary); transition: transform 0.3s ease; }
                  .contact-link span { font-size: 1rem; font-weight: 500; }
                  
                  
                  /* --- 3.7. Carrossel (NEPEM) --- */
                    .carousel { position: relative; max-width: 100%; overflow: hidden; margin: 20px auto; }
                  .carousel ul { 
                    display: flex; padding: 0; margin: 0; list-style: none; scroll-snap-type: x mandatory; 
                    overflow-x: auto; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; 
                  }
                  .carousel ul::-webkit-scrollbar { display: none; }
                  .carousel ul li { flex: 0 0 100%; scroll-snap-align: center; display: flex; justify-content: center; align-items: center; }
                  .carousel ul li img { width: 100%; height: 250px; object-fit: cover; }
                  .carousel ol { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
                  .carousel ol li { list-style: none; }
                  .carousel ol li a { display: block; width: 10px; height: 10px; background: #fff; border-radius: 50%; }
                      .carousel ol li a:hover, .carousel ol li a:focus { background: #ccc; }
                          .carousel .prev, .carousel .next { 
                            position: absolute; top: 30%; font-size: 2rem; color: white; cursor: pointer; z-index: 10; 
                            padding: 10px; background: none; border-radius: 100%; 
                            transition: transform 0.15s ease-out, background-color 0.15s ease-out; transform-origin: center; 
                          }
                        .carousel .prev:hover, .carousel .next:hover { transform: scale(3); }
                        .carousel .prev { left: 10px; }
                        .carousel .next { right: 10px; }
                        
                        
                        /* --- 3.8. Página de Privacidade --- */
                          #page-privacy .container { max-width: 800px; margin: 60px auto; padding: 40px; background: var(--dark-light); border-radius: 16px; border: 1px solid var(--border); }
                          
                          
                          /* ====================================================================
                          --- 4. CLASSES UTILITÁRIAS E DE ESTADO ---
                          ==================================================================== */
                          
                          .small-muted { font-size: 0.9rem; color: var(--text-muted); padding-left: 20px; }
                        .center { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; }
                        .hidden { display: none; }
                        .load-more-container {
                          margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 15px; 
                        }
                      .reveal { 
                        opacity: 0; 
                        transform: translateY(30px); 
                        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
                        will-change: opacity, transform; 
                      }
                      .reveal.visible { 
                        opacity: 1; 
                        transform: translateY(0); 
                      }
                      
                      /* Staggered Children Logic */
                      .stagger-children .reveal:nth-child(1) { transition-delay: 100ms; }
                      .stagger-children .reveal:nth-child(2) { transition-delay: 200ms; }
                      .stagger-children .reveal:nth-child(3) { transition-delay: 300ms; }
                      .stagger-children .reveal:nth-child(4) { transition-delay: 400ms; }
                      .stagger-children .reveal:nth-child(5) { transition-delay: 500ms; }
                      .stagger-children .reveal:nth-child(6) { transition-delay: 600ms; }
                        .animate-spin { animation: spin 1s linear infinite; }
                        
                        /* Skeleton Loading */
                          .skeleton-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 25px; height: 220px; overflow: hidden; position: relative; }
                        .skeleton-card::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: shimmer 1.5s infinite linear; }
                        #page-projects .skeleton-card { height: 120px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px dashed rgba(255,255,255,0.02); }
                        
                        /* Classes de Posts Antigas/Obsoletas (Mantidas para evitar quebras) */
                          .post-controls { display: flex; gap: 0.5rem; }
                        .view-all, #load-more-posts, .post-thumb, .post-info, .read-more, 
                        .post-single, .post-image-large, .back-link { display: none; }
                        .section-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; }
                        
                        /* Modal (Se usado) */
                          .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); justify-content: center; align-items: center; }
                        .modal.open { display: flex; }
                        .modal-content { background: white; border-radius: 10px; max-width: 800px; width: 90%; padding: 20px; position: relative; }
                        .modal-image { width: 100%; border-radius: 8px; margin-bottom: 15px; }
                        .close { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; cursor: pointer; }
                        
                        
                        /* ====================================================================
                          --- 5. ANIMAÇÕES (KEYFRAMES) ---
                          ==================================================================== */
                          
                          @keyframes animated-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
                    @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
                    @keyframes glow { 0%, 100% { box-shadow: 0 0 20px var(--glow); } 50% { box-shadow: 0 0 40px var(--glow), 0 0 60px rgba(16, 185, 129, 0.3); } }
                    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
                    @keyframes shine-effect { 0% { transform: translateX(-150%) skewX(-30deg); } 100% { transform: translateX(250%) skewX(-30deg); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* ====================================================================
  --- 6. RESPONSIVIDADE (MEDIA QUERIES) ---
  ==================================================================== */
  
  /* Desktop e Telas Médias (Maior que 768px) */
  @media (min-width: 768px) {
    .load-more-container { flex-direction: row; justify-content: space-between; align-items: center; }
    #index-page .feature-section { grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  }

/* Telas Grandes (Maior que 1100px) */
  @media (min-width: 1100px) { 
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
  }

/* Telas Intermediárias (Máximo 1024px) */
  @media (max-width: 1024px) { 
    #page-projects .projects-grid { grid-template-columns: repeat(2, 1fr); } 
  }

/* Tablets (Máximo 992px) - Menu Hamburger */
  @media (max-width: 992px) {
    #index-page .nav-container { grid-template-columns: 1fr auto 1fr; padding: 0 15px; }
    #index-page .nav-toggle-label { display: block; justify-self: center; }
    #index-page .nav-col-center { 
    position: fixed; top: 75px; left: -300px; min-width: 240px; padding: 10px; 
    background: rgba(30, 41, 59, 0.9); backdrop-filter: blur(15px); border: 1px solid var(--border); 
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); flex-direction: column; 
    align-items: flex-start; gap: 4px; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s; 
    opacity: 0; z-index: 1001; 
  }
#index-page .nav-toggle-checkbox:checked ~ .nav-col-center { left: 15px; opacity: 1; }
#index-page .nav-col-center .nav-link { padding: 10px; width: 100%; border-radius: 5px; }
#index-page .nav-col-center .nav-link:hover { background-color: var(--primary); color: var(--dark); }
#index-page .nav-col-center .nav-link::after { display: none !important; }
}

/* Mobile (Máximo 768px) */
  @media (max-width: 768px) { 
    #page-projects .projects-grid { grid-template-columns: 1fr; } 
    body:not(#index-page) .nav-container { grid-template-columns: auto 1fr auto; gap: 15px; padding: 0 15px; }
      body:not(#index-page) .nav-avatar { width: 40px; height: 40px; }
        body:not(#index-page) .nav-brand-text, body:not(#index-page) .nav-title { font-size: 1rem; }
  }
@media (max-width: 520px) { 
  #page-projects .project-top { flex-direction: column; gap: 6px; } 
  #page-projects .project-meta { gap: 8px; } 
}
@media (max-width: 480px) {
  body:not(#index-page) .nav-brand-text { display: none; }
}


/* ====================================================================
  --- 7. REFINAMENTOS (v8): hero, gráfico, habilidades, carrossel,
         espaçamentos, acessibilidade e movimento reduzido ---
  ==================================================================== */

/* Ritmo vertical: menos vazio entre seções e antes do rodapé */
.container { padding: 40px 20px 20px; }
.section { margin-bottom: 64px; scroll-margin-top: 80px; }
.container h2 { margin-top: 0; }
footer { margin-top: 24px; }

/* Hero: números de destaque */
#index-page .hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  max-width: 640px; margin: 28px auto 0; padding: 0;
}
#index-page .hero-stats > div {
  display: flex; flex-direction: column-reverse; align-items: center; gap: 2px;
  padding: 14px 8px; border-radius: 14px; background: var(--bg-card);
  border: 1px solid var(--border); backdrop-filter: blur(10px);
}
#index-page .hero-stats dd {
  margin: 0; font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 700; line-height: 1.1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
#index-page .hero-stats dt { font-size: 0.82rem; color: var(--text-muted); text-transform: lowercase; letter-spacing: .02em; }
#index-page .cta-btn { min-width: 190px; }
#index-page .cta-btn.primary { color: #04130d; }
#index-page .avatar { object-fit: cover; }

/* Gráfico de citações/publicações (SVG próprio) */
#index-page .scholar-chart-container { position: relative; min-height: 0; margin-top: 10px; }
.scholar-chart { width: 100%; height: auto; display: block; overflow: visible; }
.scholar-chart text { font-family: inherit; }
.chart-panel-title { fill: var(--text); font-size: 14px; font-weight: 600; }
.chart-tick, .chart-year-label { fill: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-value { fill: var(--text-muted); font-size: 12px; font-weight: 600; }
.chart-value-strong { fill: var(--text); font-size: 13px; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis { stroke: rgba(148, 163, 184, 0.35); stroke-width: 1; }
.chart-hit { fill: transparent; }
.chart-bar-c { fill: var(--primary); }
.chart-bar-p { fill: var(--secondary); }
.chart-bar-c, .chart-bar-p { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.scholar-chart.is-drawn .chart-bar-c, .scholar-chart.is-drawn .chart-bar-p { transform: scaleY(1); }
.chart-year { cursor: pointer; outline: none; }
.chart-year:hover .chart-bar-c, .chart-year:focus-visible .chart-bar-c { fill: #34d399; }
.chart-year:hover .chart-bar-p, .chart-year:focus-visible .chart-bar-p { fill: #60a5fa; }
.chart-year:focus-visible .chart-hit { fill: rgba(16, 185, 129, 0.08); }
.scholar-chart:has(.chart-year.is-active) .chart-year:not(.is-active) .chart-bar-c,
.scholar-chart:has(.chart-year.is-active) .chart-year:not(.is-active) .chart-bar-p { opacity: .35; }
.chart-year.is-active .chart-year-label { fill: var(--primary); font-weight: 700; }
.chart-tooltip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; opacity: 0;
  transition: opacity .15s; z-index: 5; display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: rgba(15, 23, 42, 0.96); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: .85rem; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.chart-tooltip.show { opacity: 1; }
.chart-tooltip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.chart-tooltip .dot-c { background: var(--primary); }
.chart-tooltip .dot-p { background: var(--secondary); }
.chart-hint { font-size: .85rem; color: var(--text-muted); margin-top: 6px; text-align: center; }
#index-page .card p.chart-hint { margin-top: 6px; line-height: 1.4; }
#index-page .metric-value-period { font-weight: 600; color: var(--text); }
#year-filter-chip { width: fit-content; }

/* Habilidades: nome acima da barra (nomes longos não espremem mais a coluna) */
#index-page .skill-item { flex-wrap: wrap; row-gap: 6px; margin-bottom: 14px; }
#index-page .skill-name { width: 100%; padding-right: 0; font-size: .95rem; }
#index-page .skill-bar-container { width: 100%; height: 8px; }

/* Botões fixos (tema + idioma) lado a lado; antes o idioma ficava por cima do tema */
.fixed-actions-container { top: 20px; }
.fixed-actions-container .lang-fixed { position: static; }

/* Projetos */
#projects-list { gap: 16px; }
.project-desc { overflow-wrap: anywhere; }
.project-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card .project-meta { padding-top: 10px; gap: 8px; }
.project-card .language-badge { height: auto; min-width: 0; padding: 6px 12px; font-size: .8rem; }
.project-updated { font-size: .82rem; color: var(--text-muted); }
.project-card .actions { flex-wrap: wrap; gap: 10px; }

/* Posts */
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-image { display: block; }
.post-image img { transition: transform .5s ease; }
.post-card:hover .post-image img { transform: scale(1.04); }

/* Carrossel NEPEM */
.carousel { border-radius: 14px; }
.carousel ul li img { height: clamp(200px, 32vw, 300px); }
.carousel .prev, .carousel .next {
  top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 50%;
  backdrop-filter: blur(6px);
}
.carousel .prev:hover, .carousel .next:hover { transform: translateY(-50%) scale(1.1); background: var(--primary); color: var(--dark); }
.carousel ol { padding: 0; margin: 0; }
.carousel ol li a { width: 8px; height: 8px; background: rgba(255,255,255,.5); transition: width .3s, background .3s; border-radius: 99px; }
.carousel ol li a.active { width: 22px; background: #fff; }
#index-page .feature-logo img { width: auto; height: 120px; }

/* Rodapé */
.footer-sitemap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.footer-nepem-icon { width: auto; height: 16px; flex-shrink: 0; }
body.light-mode .footer-nepem-icon { filter: none; }

/* Acessibilidade: foco visível no teclado */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px;
}
.carousel .prev:focus-visible, .carousel .next:focus-visible { outline-offset: 2px; border-radius: 50%; }

/* Tema claro para os elementos novos */
body#index-page.light-mode .hero-stats > div { background: var(--light-bg-card); border-color: var(--light-border); }
body#index-page.light-mode .hero-stats dd { color: var(--light-text); }
body#index-page.light-mode .hero-stats dt,
body.light-mode .chart-tick, body.light-mode .chart-year-label, body.light-mode .chart-value { fill: #475569; color: #475569; }
body.light-mode .chart-panel-title, body.light-mode .chart-value-strong { fill: var(--light-text); }
body.light-mode .chart-grid { stroke: #e2e8f0; }
body.light-mode .chart-tooltip { background: #fff; color: var(--light-text); border-color: var(--light-border); box-shadow: 0 8px 24px rgba(15,23,42,.12); }
body.light-mode .chart-hint, body.light-mode .project-updated { color: #475569; }
body#index-page.light-mode .metric-value-period { color: var(--light-text); }
body.light-mode .cta-btn.secondary { color: var(--primary-dark); border-color: var(--primary-dark); }
body#index-page.light-mode .social-icons-hero a { background: rgba(16, 185, 129, 0.10); color: var(--primary-dark); }

/* Celular */
@media (max-width: 640px) {
  .fixed-actions-container { top: 12px; right: 12px; gap: 8px; }
  .fixed-actions-container .lang-switcher { padding: 4px 6px; }
  .fixed-actions-container .theme-toggle-btn { width: 34px; height: 34px; }
  #index-page header { padding: 76px 16px 44px; }
  #index-page .avatar { width: 180px; height: 180px; margin-bottom: 22px; }
  #index-page .social-icons-hero a { width: 48px; height: 48px; }
  #index-page .social-icons-hero a svg { width: 24px; height: 24px; }
  #index-page .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #index-page .cta-btn { min-width: 0; flex: 1 1 150px; padding: 12px 16px; }
  #projects-list { grid-template-columns: 1fr; }
  .sidebar { padding: 18px; }
  #index-page .card { padding: 20px; }
  #index-page .feature-section.card { padding: 22px; gap: 20px; }
  #index-page .feature-content h3 { font-size: 1.35rem; }
  #index-page .timeline::before { left: 12px; }
  #index-page .timeline-item { padding-left: 36px; }
  #index-page .timeline-dot { left: 6px; }
  .chart-tick, .chart-year-label, .chart-value { font-size: 11px; }
  .chart-panel-title { font-size: 13px; }
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* Movimento reduzido: sem animações contínuas nem revelações */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  #particle-canvas { display: none; }
}
/* ====================================================================
  --- 8. Topo compacto no computador + botões ao rolar (v8.1) ---
  ==================================================================== */

/* Ao rolar, os botões fixos somem e o tema/idioma ficam dentro da barra */
.fixed-actions-container { transition: opacity .3s ease, visibility .3s ease, transform .3s ease; }
body.scrolled .fixed-actions-container { opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none; }
#index-page .nav-col-right { display: flex; align-items: center; gap: 10px; }
#index-page .nav-theme-btn { width: 36px; height: 36px; opacity: 0; transform: scale(0); transition: opacity .3s ease, transform .3s ease; }
#index-page nav.scrolled .nav-theme-btn { opacity: 1; transform: scale(1); }
#index-page .nav-theme-btn svg { width: 18px; height: 18px; }

/* Computador: foto à esquerda, conteúdo à direita (metade da altura de antes) */
@media (min-width: 900px) {
  #index-page header { padding: 96px 32px 56px; text-align: left; }
  #index-page .hero-content {
    max-width: 1120px; display: grid; grid-template-columns: auto minmax(0, 1fr);
    column-gap: 56px; align-items: center;
  }
  #index-page .hero-content > * { grid-column: 2; }
  #index-page .avatar { grid-column: 1; grid-row: 1 / span 6; width: 260px; height: 260px; margin: 0; }
  #index-page header h1 { font-size: clamp(2.4rem, 4vw, 3.3rem); margin-bottom: 6px; }
  #index-page .subtitle { margin-bottom: 14px; }
  #index-page .social-icons-hero { justify-content: flex-start; margin: 6px 0 4px -6px; gap: 2px; }
  #index-page .social-icons-hero a { width: 52px; height: 52px; }
  #index-page .social-icons-hero a svg { width: 26px; height: 26px; }
  #index-page .hero-cta { justify-content: flex-start; margin: 18px 0 0; }
  #index-page .hero-stats { margin: 22px 0 0; max-width: 620px; }
}
@media (min-width: 1400px) {
  #index-page .avatar { width: 300px; height: 300px; }
}

/* Topo: bloco foto + texto centralizado na tela */
@media (min-width: 900px) {
  #index-page .hero-content { grid-template-columns: auto auto; justify-content: center; }
}
/* Ícones das áreas de atuação: o brilho fica restrito ao emoji */
#index-page .icon { display: inline-block; }
@media (min-width: 900px) {
  /* largura fixa: os quadros não encolhem e a coluna não "pula" enquanto o subtítulo é digitado */
  #index-page .hero-stats { width: 580px; max-width: none; }
}

/* Projetos destacados pelo painel admin */
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.featured-badge { font-size: .72rem; font-weight: 700; color: var(--primary); background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.35); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.project-card.is-featured { border-color: rgba(16,185,129,.45); }
/* Link discreto para o painel admin, no rodapé */
.footer-admin { opacity: .55; font-size: .8rem; }
.footer-admin:hover { opacity: 1; }
