:root {
  --azul: #1976d2;
  --azul-escuro: #0d1b2a;
  --cinza-bg: #f5f5f5;
  --texto: #333;
  --sombra: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Helvetica, Arial,
    Ubuntu, Cantarell, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--cinza-bg);
  color: var(--texto);
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--cinza-bg);
}

/* Sidenav fixo */
.sidenav {
  width: 250px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--azul-escuro);
  color: #fff;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.sidenav .perfil {
  margin-bottom: 2rem;
}
.sidenav .perfil h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.sidenav .perfil p {
  font-size: 0.95rem;
  color: #ddd;
}

.sidenav a {
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  margin-bottom: 0.5rem;
  transition: background 0.3s ease;
  display: block;
}
.sidenav a:hover {
  background-color: #125ca0;
}
.sidenav a.active {
  background-color: #125ca0;
}

/* Conteúdo principal */
.conteudo {
  margin-left: 250px;
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

/* Seções comuns */
section {
  padding: 3rem;
}

/* Início */
.inicio .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.inicio .foto img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--azul);
}
.inicio .info {
  flex: 1;
}
.inicio .info h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.inicio .info h1 strong {
  color: var(--azul);
}
.inicio .info p {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 1.5rem;
}

.inicio .botoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.inicio .botoes a {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  color: #fff;
}

.inicio .botoes a.github {
  background: white;
}
.inicio .botoes a.github:hover {
  background: white;
}
.inicio .botoes a.linkedin {
  background: white;
}
.inicio .botoes a.linkedin:hover {
  background: white;
}
.inicio .botoes a.email {
  background: white;
}
.inicio .botoes a.email:hover {
  background: white;
}

/* Títulos de seção */
.skills h2,
.certificacoes h2,
.projetos h2,
.experiencias h2 {
  font-size: 1.8rem;
  color: var(--azul);
  margin-bottom: 2rem;
}

/* Skills */
.skills .categorias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.skills .categoria {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.skills .categoria h3 {
  font-size: 1.2rem;
  color: var(--azul);
  margin-bottom: 1rem;
}
.skills .categoria ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.skills .categoria li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: #333;
}

/* Certificações */
.certificacoes .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.certificacoes .certificado {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.certificacoes .certificado img {
  width: 100px;
  height: auto;
  margin-bottom: 1rem;
}
.certificacoes .certificado h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.5rem;
}
.certificacoes .certificado a {
  text-decoration: none;
  color: var(--azul);
  font-weight: bold;
  transition: color 0.2s;
}
.certificacoes .certificado a:hover {
  color: #125ca0;
}

/* Projetos */
.projetos .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.projetos .card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--sombra);
}
.projetos .card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #333;
}
.projetos .card p {
  font-size: 1rem;
  color: #555;
  margin: 1rem 0;
}
.projetos .card .links {
  display: flex;
  gap: 1rem;
}
.projetos .card .links a {
  color: var(--azul);
  font-size: 1.4rem;
  transition: transform 0.2s ease;
}
.projetos .card .links a:hover {
  transform: scale(1.2);
}

/* Experiências */
.experiencias .timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.experiencias .timeline .item {
  border-left: 3px solid var(--azul);
  padding-left: 1rem;
  position: relative;
}
.experiencias .timeline .item h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}
.experiencias .timeline .item span {
  font-size: 0.95rem;
  color: #888;
}
.experiencias .timeline .item p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #444;
}
.experiencias .timeline .item::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--azul);
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 6px;
}

.experiencias .download-cv {
  margin-top: 2rem;
}
.experiencias .download-cv a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--azul);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.experiencias .download-cv a i {
  font-size: 1.2rem;
}
.experiencias .download-cv a:hover {
  background-color: #125ca0;
}

/* ===== ÍCONES COMO IMAGEM ===== */

/* Ícones pequenos embutidos em botões/links (GitHub, LinkedIn, Email, cards de projetos) */
.icon-inline {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  transition: transform .15s ease;
}

/* Ícones da lista de skills (um pouquinho maiores) */
.icon-li {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 20px;          /* garante alinhamento com o texto */
  display: inline-block;
  vertical-align: middle;
}

.inicio .botoes a { justify-content: center; }
.inicio .botoes a:hover .icon-inline { transform: scale(1.08); }


.projetos .card .links .link-icon img { transition: transform .2s ease; }
.projetos .card .links .link-icon:hover img { transform: scale(1.12); }
/* ===== Botão hambúrguer (desktop: escondido | mobile: visível) ===== */
.menu-toggle {
  display: none;                 /* some no desktop */
  position: fixed;
  top: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--azul);
  color: #fff;
  border: 0;
  border-radius: 10px;
  z-index: 1100;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
  cursor: pointer;
  touch-action: manipulation;

  /* quando virar flex no mobile, já estará centralizado */
  align-items: center;
  justify-content: center;
}

.menu-toggle .hamburger {
  display: block;
  position: relative;
  width: 24px;
  height: 16px;
  background:
    linear-gradient(#fff,#fff) 0 0/100% 2px no-repeat,
    linear-gradient(#fff,#fff) 0 7px/100% 2px no-repeat,
    linear-gradient(#fff,#fff) 0 14px/100% 2px no-repeat;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform-origin: center;
  transform: rotate(0deg);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}

body.menu-aberto .menu-toggle .hamburger { background: none; }
body.menu-aberto .menu-toggle .hamburger::before { opacity: 1; transform: rotate(45deg); }
body.menu-aberto .menu-toggle .hamburger::after  { opacity: 1; transform: rotate(-45deg); }

/* ===== Mobile: sidenav off-canvas ===== */
@media (max-width: 768px) {
  /* tira o empurrão do conteúdo no mobile */
  .conteudo {
    margin-left: 0;
    padding-top: 4.5rem;       /* espaço pro botão */
  }

  /* menu fora da tela por padrão */
  .sidenav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1099;
    box-shadow: 2px 0 12px rgba(0,0,0,.25);
  }

  /* quando abrir, entra */
  .sidenav.aberto {
    transform: translateX(0);
  }

  /* mostra o botão só no mobile e empurra ele quando o menu abre */
  .menu-toggle { display: flex; }
  body.menu-aberto .menu-toggle { left: 260px; }

  /* opcional: trava o scroll do body quando o menu está aberto */
  body.menu-aberto { overflow: hidden; }
}
