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

:root {
  font-size: 16px;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: #bababa;
}

::-webkit-scrollbar-thumb {
  background-color: #1d1342;
}

@keyframes entering {
  0% {
    opacity: 0;
    transform: translateY(-200px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  color: #0d3f7c;
  font-family: "Roboto", sans-serif;
  display: grid;
  background-color: #f1f3f5;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 160%;
  grid-template-areas:
    "profile"
    "timeline";
  overflow-y: visible;
}

main {
  grid-area: timeline;
  animation: entering 0.7s ease-in-out;
  /* Padding removido daqui */
}

/* Aplicado nas páginas de filtro (experiencia, formacao, etc.) */
.main-wrapper {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 100px 64px 48px 64px; /* Padding aplicado aqui */
}

.lista-conteudo {
  flex: 2; /* Ocupa 2/3 do espaço */
  min-width: 300px; /* Largura mínima para o conteúdo */
}

/* Aplicado na index.html */
.sobre_mim {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 100px 64px 48px 64px; /* Padding aplicado aqui */
}

.banners,
.memory,
.projeto {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.redes {
  gap: 2px;
}

.rede,
.redes {
  display: flex;
  text-align: center;
}

.rede a p {
  font-size: 16px;
}

.rede {
  gap: 1px;
}

.rede a {
  padding-top: 8px;
  justify-content: center;
}

.lista-conteudo div a {
  text-decoration: none;
  color: #02234a;
  padding: 16px 0;
  width: 100%;
  border-radius: 8px;
}

.menu {
  display: flex;
  justify-content: center;
  margin: 0 -64px 40px -64px;
  background: linear-gradient(#101056, #080434, #040121);
  border: #131011;
  gap: 16px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  text-align: right;
  padding: 12px;
  color: #eaeaea;
  font-weight: 600;
  width: auto;
}

main div h1,
main div h2,
main div p {
  color: #02234a;
  font-size: 2rem;
}

main div h2 {
  font-size: 1.6rem;
}

main div p {
  font-size: 1.2rem;
}

.content {
  margin: -16px 0 24px 0;
  width: 100%;
}

.modal-content a:hover,
.rede:hover {
  background-color: #196cb4;
  color: #eaeaea;
  border-radius: 8px;
}

.menu a:hover {
  color: #1e7fd4;
}

main button {
  border-radius: 8px;
  background: linear-gradient(#1073c9, #003067);
  width: 120px;
  height: 44px;
  font-size: 16px;
  font-weight: 600;
  color: #eaeaea;
  padding: 8px;
  display: block;
  margin: 0;
  cursor: pointer;
  border: solid 0.5px #003067;
}

main button:hover {
  background: linear-gradient(#005fd4, #001a39);
}

.lista-conteudo div p a {
  padding: 0;
}

.resumo_qualificacoes {
  padding: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(#0016a51a, #0059ff34);
  color: #f1f3f5;
  width: 100%;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

label {
  padding-bottom: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 35px;
  margin-bottom: 16px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #002c62;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider:before {
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

ul {
  list-style-type: none;
  display: block;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background-color: #dde5f0;
  border: solid 1px #002c62;
  margin-bottom: 16px;
}

li {
  color: #002c62;
  padding: 10px 16px 10px 16px;
  text-align: left;
  font-size: 16px;
}

.memory {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
}

.memory small {
  color: rgb(133, 137, 138);
  font-size: 0.75rem;
}

.memory h1 {
  font-size: 2rem;
  color: #02234a;
}

.experience {
  margin-bottom: 24px;
}

.memory img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  border: solid 1px #dfe6ee;
  transition: transform 0.3s ease-in-out;
}

.memory div {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 8px;
}

.memory:hover img {
  transform: scale(1.1);
}

.memory p {
  font-size: 1.2rem;
  color: #02234a;
  line-height: 28px;
}

.memory section {
  display: none;
}

.projetos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
}

.projeto {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 8px;
  border: solid 1px #0016a53a;
  padding: 36px;
  gap: 28px;
}

.projeto .descricao-projeto {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.header {
  grid-area: profile;
  background: linear-gradient(#000061, #04003d, #05002c);
  display: flex;
  align-items: center;
  padding: 12px 64px 0 64px;
  flex-direction: row;
  justify-content: space-between;
}

.header * {
  animation: entering 0.7s ease-in-out;
}

.header div div a {
  text-decoration: none;
}

.header .foto_perfil {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(270deg, #ffffff, #eaeaea) border-box;
}

.header p {
  font-size: 1.7rem;
  color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  text-align: left;
  text-shadow: black;
}
.header p small {
  font-size: 1rem;
}

.tags,
.ver-projeto {
  display: inline-block;
  margin-top: 8px;
}

small.tag {
  padding: 6px;
  border-radius: 8px;
  width: fit-content;
}

small.graduacao,
small.tipo-de-projeto {
  color: #431ce3;
  border: solid 1px #431ce3;
}

small.programa,
small.pleno,
small.linguagem,
small.senioridade {
  color: #0073ff;
  border: solid 1px #0073ff;
}

small.curso {
  color: #144b8e;
  border: solid 1px #144b8e;
}

small.bootcamp,
small.ferramenta {
  color: #04003d;
  border: solid 1px #04003d;
}

.cabeçalho-perfil {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.menu-modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #f1f3f5;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  width: 80%;
  max-width: 300px;
  position: relative;
}

.modal-content a {
  display: block;
  color: #02234a;
  padding: 10px;
  text-decoration: none;
  font-weight: 600;
  margin: 10px 0;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #333;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.menu-icone {
  display: none;
}

footer {
  padding: 8px 64px 64px 64px;
}

footer div {
  display: flex;
  justify-content: flex-end;
}

.container-filtro {
  position: relative;
}

.titulo-e-filtro {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.botao-filtro {
  display: none; /* Escondido no desktop */
  padding: 10px 15px;
  width: 50px;
  font-size: 16px;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
}

.filtrar {
  width: 15px;
}

#filtro-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1001; 
}

/* SIDEBAR DESKTOP */
#filtro-container {
  display: block;
  position: relative;
  flex: 1; /* Ocupa 1/3 */
  min-width: 400px;
  padding: 24px;
  border: 1px solid #ddd;
  background-color: #fff;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 5px;
  align-self: flex-start;
}

.opcoes-filtro h4 {
  margin-top: 16px;
  margin-bottom: 8px;
  gap: 64px;
}

.categoria,
.categoria-verificar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.opcao {
  padding: 5px 10px;
  cursor: pointer;
  border: 1px solid #007bff;
  border-radius: 3px;
  color: #007bff;
  transition: background-color 0.3s, color 0.3s;
}

.opcao.selecionado,
.opcao:hover {
  background-color: #007bff;
  color: #fff;
}

.btns-filtro {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  gap: 8px;
}

#botaoFiltrar,
#botaoLimpar {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btnTopo {
  border: none;
  border-radius: 8px;
  color: #eaeaea;
  background: linear-gradient(#072448, #021225);
  width: 150px;
  height: 50px;
  font-size: 16px;
  font-weight: 600;
  padding: 8px;
  display: block;
  margin: -12px 0;
  cursor: pointer;
}

.btnTopo:hover {
  background: linear-gradient(#12122e, #01060c);
}

main button#botaoLimpar {
  background: linear-gradient(#ffffff, #bbc9db);
  color: #003067;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
}
.language-switcher a,
.language-switcher span {
  color: #eaeaea;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.language-switcher a.lang-active {
  color: #1e7fd4;
  font-weight: 700;
}
.language-switcher a.lang-inactive {
  color: #bababa;
  opacity: 0.8;
}
.language-switcher a.lang-inactive:hover {
  opacity: 1;
  color: #eaeaea;
}
.modal-content .language-switcher {
  justify-content: center;
  padding: 10px 0;
  margin-top: 10px;
  border-top: 1px solid #ddd;
}
.modal-content .language-switcher a,
.modal-content .language-switcher span {
  color: #02234a;
}
.modal-content .language-switcher a.lang-active {
  color: #1073c9;
}
.modal-content .language-switcher a.lang-inactive {
  color: #555;
}


@media (max-width: 825px) {
  li {
    color: #002c62;
    padding: 10px 2px 10px 2px;
    text-align: left;
    font-size: 16px;
  }

  .header {
    grid-area: profile;
    background: linear-gradient(#000061, #04003d, #05002c);
    display: flex;
    align-items: left;
    justify-content: top;
    gap: 32px;
    padding: 16px 24px;
    border-right: solid 1px;
  }
  
  /* Remove o padding do .main-wrapper no mobile */
  .main-wrapper {
    display: block;
    padding: 32px 24px 0 24px;
  }

  /* Aplica o padding mobile para a home */
  .sobre_mim {
    padding: 32px 24px 0 24px;
  }

  .lista-conteudo {
    flex: none; 
    width: 100%;
  }

  footer {
    padding: 24px 24px 64px 24px;
  }

  img.foto_perfil {
    width: 42px;
    height: 42px;
  }

  .redes {
    display: none;
  }

  .menu {
    display: none;
  }

  .menu-icone {
    display: flex;
    cursor: pointer;
  }

  .header p {
    font-size: 16px;
  }

  .header p strong {
    font-size: 18px;
  }

  .social-icons {
    background-color: #002c62;
    display: flex;
    flex-direction: row;
    justify-content: center;
    border-radius: 8px;
    padding: -4px;
  }

  .resumo_qualificacoes {
    padding: 24px;
  }

  .projeto {
    padding: 24px;
    margin-bottom: 8px;
    max-width: 100%;
  }

  small.tag {
    display: inline-block;
    margin-top: 6px;
  }

  .botao-filtro {
    display: flex;
  }

  #filtro-container {
    display: none; 
    position: fixed;
    z-index: 1002; 
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    min-width: auto; 
    flex: none; 
  }
  
  .menu .language-switcher {
    display: none;
  }
}

@media (max-width: 415px) {
  .projetos {
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* --- REGRAS PARA O GRID DA HOME --- */
.grid-resumo {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
.grid-resumo .resumo_qualificacoes {
  max-width: 600px;
  justify-self: center;
}
@media (min-width: 864px) {
   .grid-resumo {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1280px) {
   .grid-resumo {
    grid-template-columns: repeat(3, 1fr);
  }
}