
/* --------------------------------------------------------------------------
   PALETA E TOKENS (globais)
   Usado em todas as sections (cores, radius, sombra)
   -------------------------------------------------------------------------- */
:root {
  --bg: #0d1117;        /* fundo da página */
  --surface: #161b22;   /* cartões/sections */
  --border: #30363d;    /* bordas/divisores */
  --text: #c9d1d9;      /* texto padrão */
  --muted: #8b949e;     /* texto secundário */
  --link: #58a6ff;      /* links */
  --link-hover: #79c0ff;/* hover de links */
  --accent: #238636;    /* verde destaque (estilo GitHub) */
  --danger: #f85149;    /* vermelho destaque */
  --radius: 12px;       /* raio padrão */
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.25); /* sombra padrão */

  /* altura do header para compensar âncoras/scroll */
  --header-h: 72px;
}

/* --------------------------------------------------------------------------
   RESET BÁSICO + TIPOGRAFIA
   Afeta o documento todo
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Ubuntu, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   LINKS + ACESSIBILIDADE
   Afeta qualquer link e foco navegável
   -------------------------------------------------------------------------- */
a {
  color: var(--link);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   CONTAINER + FLUXO VERTICAL
   Envolve todas as sections (layout principal em coluna)
   -------------------------------------------------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}
.content {
  display: block;          /* garante fluxo vertical */
  margin-top: 24px;
}
.content > section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;     /* respiro entre as sections */
}
.content > section > h2 {
  margin: 0 0 14px 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* --------------------------------------------------------------------------
   HEADER FIXO (site-header principal)
   Usado no topo do site + navegação
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.9); /* translúcido */
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 12px 20px;
  backdrop-filter: blur(6px);
}
.site-header .logo {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   NAVEGAÇÃO (menu do header)
   Lista de links horizontais com animação de sublinhado
   -------------------------------------------------------------------------- */
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  position: relative;
  transition: color 0.2s ease;
}
.nav a::after {
  /* underline animado ao hover */
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--link);
  transition: width 0.3s ease;
}
.nav a:hover { color: var(--link); }
.nav a:hover::after { width: 100%; }

/* --------------------------------------------------------------------------
   OFFSET DE SCROLL PARA ÂNCORAS
   Evita que o header cubra títulos ao navegar por hash
   -------------------------------------------------------------------------- */
html {
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth; /* opcional: rolagem suave */
}

/* --------------------------------------------------------------------------
   HEADER (alternativo do conteúdo)
   Caso use <header> dentro do .container
   -------------------------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(13, 17, 23, 0.75);
  border-bottom: 1px solid var(--border);
}
header h1 {
  margin: 0;
  padding: 16px 0;
  font-size: 24px;
  letter-spacing: 0.2px;
}

/* --------------------------------------------------------------------------
   DIVISORES (hr)
   Podem ser usados entre blocos menores dentro das sections
   -------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ==========================================================================
   SECTION: PROFILE
   Estrutura do perfil (foto + informações)
   ========================================================================== */
.profile {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-pic img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.profile .info h2 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.25;
}
.profile .info h3 {
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--link);
  font-size: 16px;
}
.profile .info .dob {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}
/* ícones/links sociais abaixo do nome */
.social-links {
  display: flex;
  gap: 10px;
  margin: 6px 0 14px;
}
.social-links a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #0f141a;
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}
.social-links a:hover {
  transform: translateY(-1px);
  background: #0b2239;
  border-color: #2b5a85;
}
/* parágrafos da bio */
.profile .info p {
  margin: 10px 0 10px; /* corrigido: adiciona 'px' */
  color: var(--text);
}
.profile .info p + p { margin-top: 6px; }

/* ==========================================================================
   SECTION: ACADEMIC
   Cartões de formação/graduação
   ========================================================================== */
.academic-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 14px;
  background: #0f1419;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 12px 0;
}
.academic-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #222b33;
}
.academic-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.academic-info .degree,
.academic-info .date,
.academic-info .skills,
.academic-info .description {
  margin: 2px 0;
  color: var(--muted);
  font-size: 14px;
}
.academic-info .skills { color: #7ee787; } /* verdinho GitHub */

/* ==========================================================================
   SECTION: EXPERIENCE
   Histórico profissional + subprojetos
   ========================================================================== */
.experience-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 14px;
  background: #0f1419;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 12px 0;
}
.experience-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #222b33;
}
.experience-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.experience-info .company,
.experience-info .date,
.experience-info .location {
  margin: 2px 0;
  color: var(--muted);
  font-size: 14px;
}
/* subprojetos detalhados dentro de cada experiência */
.project {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.project h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #d2a8ff; /* roxinho GitHub */
}
.project p {
  margin: 0 0 8px;
  color: var(--text);
}
.project ul {
  margin: 0 0 8px 18px;
  padding: 0;
}
.project ul li {
  margin: 4px 0;
  color: var(--muted);
}

/* ==========================================================================
   SECTION: PROJECTS (Pinned Repos)
   Grade de projetos estilo GitHub
   ========================================================================== */
.projects-pinned {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.projects-pinned h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}
.pinned-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* cartão do repositório */
.repo-card {
  background: #0f1419;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.15s ease, transform 0.06s ease;
}
.repo-card:hover {
  border-color: #3b434c;
  transform: translateY(-1px);
}
/* cabeçalho do cartão */
.repo-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.repo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* evita quebra estranha */
}
.repo-title i { color: var(--muted); }
.repo-link {
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.repo-link:hover { text-decoration: underline; }
.repo-badge {
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: #0d1117;
  border-radius: 999px;
  padding: 2px 8px;
}
.repo-menu {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: default; /* decorativo */
}
/* conteúdo do cartão */
.repo-desc {
  margin: 6px 0 8px;
  color: var(--text);
  font-size: 14px;
}
/* tópicos/tags */
.repo-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.repo-topics li {
  font-size: 12px;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
/* meta (linguagem, estrelas, etc.) */
.repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
}
.repo-meta .lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-dot {
  --lang-color: #8b949e; /* default */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lang-color);
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.meta-link {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.meta-link:hover { color: var(--text); }

/* ==========================================================================
   SECTION: SKILLS
   Bloco de habilidades por categoria
   ========================================================================== */
.skills {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.skills h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}
.skills-block { margin-bottom: 18px; }
.skills-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--link);
}
.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skills-list li {
  font-size: 13.5px;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  line-height: 1.4;
}
/* botão auxiliar (ex.: ver mais) */
.skills .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b2239;
  color: #cfe9ff;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.2s ease;
}
.skills .btn-link:hover {
  transform: translateY(-1px);
  background: #0c2c4c;
}

/* ==========================================================================
   SECTION: CERTS (Certificados estilo LinkedIn)
   Lista de certificados com logo, emissor e ações
   ========================================================================== */
.certs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.certs h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
}
.cert-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.cert-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  background: #0f1419;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.15s ease, transform 0.06s ease;
}
.cert-card:hover {
  border-color: #3b434c;
  transform: translateY(-1px);
}
.cert-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #222b33;
  background: #0d1117;
}
.cert-title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.3;
}
.cert-issuer {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}
.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.cert-meta code {
  background: #0d1117;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 12px;
}
.cert-actions { margin-bottom: 8px; }
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b2239;
  color: #cfe9ff;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}
.cert-link:hover {
  transform: translateY(-1px);
  background: #0c2c4c;
  border-color: #2b5a85;
}
.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.cert-skills li {
  font-size: 12.5px;
  color: var(--text);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}
.cert-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
/* botão extra para downloads de certificados */
.btn-download {
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0b2239;
  color: #cfe9ff;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.btn-download:hover {
  background: #0c2c4c;
  color: #fff;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   RESPONSIVIDADE (breakpoints principais)
   Ajustes de grid e tipografia para telas menores
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .pinned-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .profile { grid-template-columns: 120px 1fr; }
  .profile-pic img {
    width: 120px; height: 120px; border-radius: 12px;
  }
}
@media (max-width: 720px) {
  .cert-card { grid-template-columns: 48px 1fr; }
  .cert-logo { width: 48px; height: 48px; border-radius: 10px; }
}
@media (max-width: 700px) {
  header h1 { font-size: 20px; }
  .content > section { padding: 16px; }
  .profile { grid-template-columns: 1fr; } /* empilha avatar e texto */
  .profile-pic { max-width: 220px; }
  .profile-pic img { width: 100%; height: auto; }
  .nav ul {
    gap: 12px; flex-wrap: wrap; justify-content: center;
  }
}
@media (max-width: 680px) {
  .pinned-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   IMPRESSÃO (PDF limpo)
   Remove elementos desnecessários e retira sombras/cores fortes
   -------------------------------------------------------------------------- */
@media print {
  /* esconde navegação/ícones sociais */
  .site-header,
  header,
  .social-links { display: none !important; }

  /* cores neutras para impressão */
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }

  /* largura total e respiro */
  .container { max-width: 100%; padding: 0 12mm; }

  /* cartões sem sombra/borda pesada */
  .content > section {
    background: #fff;
    border: none;
    box-shadow: none;
    margin-bottom: 12px;
  }
  .academic-card,
  .experience-card,
  .cert-card,
  .repo-card { break-inside: avoid; }

  .repo-card,
  .cert-card { border-color: #ddd; background: #fff; }

  .cert-link {
    color: #000; background: #fff; border-color: #bbb;
  }
}
