/* ===========================
   Reset básico e estrutura
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Wrapper principal para centralizar conteúdo em telas grandes */
.page-index,
.page-projetos,
.page-contato {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Container máximo do site */
.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
}

/* ===========================
   Temas: escuro e claro
   =========================== */

body.dark-mode {
  background-color: #121212;
  color: #f5f5f5;
}

body.light-mode {
  background-color: #f5f5f5;
  color: #333333;
}

/* Header e footer nos temas */

body.dark-mode .site-header,
body.dark-mode .site-footer {
  background-color: #1f1f1f;
}

body.light-mode .site-header,
body.light-mode .site-footer {
  background-color: #222222;
  color: #ffffff;
}

/* Links de footer */
.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer a:hover {
  color: #ffd700;
  transform: scale(1.05);
}

/* ===========================
   Header
   =========================== */

.site-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Avatar à esquerda, tamanho médio (≈ 120px) */
.avatar-box {
  flex: 0 0 auto;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #ffd700;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

/* Imagens específicas por página */
.page-index .avatar {
  background-image: url('ArvoreDaVida.jpg');
}

.page-projetos .avatar,
.page-contato .avatar {
  background-image: url('BERCELLI.jpg');
}

.avatar:hover
{
  animation: zoomCirculo 1s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}

/* Título, subtítulo e navegação */
.title-nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.title-nav h1 {
  margin: 0;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Navegação principal */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.main-nav a {
  padding: 0.4rem 0.8rem;
  color: #e0e0e0;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  background-color: transparent;
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

body.light-mode .main-nav a {
  color: #f5f5f5;
}

.main-nav a:hover {
  color: #ffd700;
  background-color: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
}

.menuItem.active {
  color: #ffd700;
  background-color: rgba(255, 255, 255, 0.08);
}

/* Botão de tema */
.theme-toggle-box {
  flex: 0 0 auto;
}

#toggle-theme {
  margin: 0;
  padding: 0.3rem 0.8rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
  background-color: #333333;
  color: #f5f5f5;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

body.light-mode #toggle-theme {
  background-color: #f5f5f5;
  color: #333333;
}

#toggle-theme:hover {
  transform: scale(1.05);
  background-color: #555555;
}

/* ===========================
   Main / cards / conteúdo
   =========================== */

.site-main {
  flex: 1 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* Grid de cards na home */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Card base */
.card {
  border-radius: 8px;
  padding: 1.25rem;
  background-color: #1e1e1e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.light-mode .card {
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

/* Títulos de seção */
.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  transition: transform 0.2s ease, color 0.2s ease;
  transform-origin: left center;
}

.card h2:hover {
  color: #ffd700;
  transform: scale(1.03);
}

/* Listas de destaque */
.highlight-list {
  padding-left: 1.1rem;
  margin-bottom: 1rem;
}

/* Botões de ação */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* Primário */
.btn-primary {
  background-color: #333333;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #555555;
  transform: scale(1.05);
}

/* Secundário */
.btn-secondary {
  background-color: #333333;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #555555;
  transform: scale(1.05);
}

/* Área de ações (voltar, etc.) */
.actions {
  margin-top: 1.5rem;
}

/* ===========================
   Tabelas
   =========================== */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid #444444;
  padding: 0.5rem;
  text-align: left;
}

thead tr {
  background-color: #2c2c2c;
  color: #ffd700;
}

tbody tr {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

tbody tr:nth-child(even) {
  background-color: #252525;
}

tbody tr:hover {
  background-color: #333333;
  transition: background-color 0.2s ease;
}

/* Tabelas no tema claro */
body.light-mode thead tr {
  background-color: #333333;
  color: #ffffff;
}

body.light-mode td,
body.light-mode th {
  background-color: #f2f2f2;
  color: #333333;
  border: 1px solid #cccccc;
}

body.light-mode tbody tr:nth-child(even) td {
  background-color: #e0e0e0;
}

body.light-mode tbody tr:hover td {
  background-color: #d0d0d0;
}


/* Container da tabela incrementada com link*/

/* Link do projeto */
.link-projeto {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}

.link-projeto:hover {
  text-decoration: underline;
}

/* Área de filtros */
.filtros {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.btn-limpar {
  padding: 8px 14px;
  background: whitesmoke;
  color: black;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s ease;
}

.btn-limpar:hover {
  background: #ffd700;
  transform: scale(1.05);
}

.btn-limpar:active {
  transform: scale(0.95);
}

.filtros input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 250px;
}

/* ===========================
   Formulário de contato
   =========================== */

.form-contato {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
}

.form-contato label {
  margin-top: 0.75rem;
  font-weight: bold;
}

.form-contato input,
.form-contato textarea {
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: 5px;
  border: 1px solid #cccccc;
  font-family: Arial, sans-serif;
}

/* Formulário — modo escuro */
body.dark-mode .form-contato input,
body.dark-mode .form-contato textarea {
  background-color: #1f1f1f;
  color: #e0e0e0;
  border: 1px solid #444444;
}

/* Formulário — modo claro */
body.light-mode .form-contato input,
body.light-mode .form-contato textarea {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #cccccc;
}

.form-contato button {
  margin-top: 1rem;
  padding: 0.7rem;
  background-color: #333333;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.form-contato button:hover {
  background-color: #555555;
  transform: scale(1.03);
}

/* ===========================
   Rodapé
   =========================== */

.site-footer {
  flex-shrink: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ===========================
   Stack Tecnológica
   =========================== */

.tech-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 1rem;
}

.tech-card {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

body.light-mode .tech-card {
  background-color: #ffffff;
  border: 1px solid #ccc;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.tech-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.tech-card h3 {
  margin: 0.3rem 0 0.6rem 0;
  color: #ffd700;
  font-size: 1.1rem;
}

.tech-card ul {
  padding-left: 1.1rem;
  margin: 0;
  text-align: left;
}

.tech-card li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

/* ===========================
   Experiência Profissional
   =========================== */

.exp-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}

.exp-card {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode .exp-card {
  background-color: #ffffff;
  border: 1px solid #ccc;
}

.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.exp-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  text-align: center;
}

.exp-card h3 {
  margin: 0.3rem 0 0.6rem 0;
  color: #ffd700;
  font-size: 1.15rem;
  text-align: center;
}

.exp-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

/* ===========================
   Formação Acadêmica
   =========================== */

.edu-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1rem;
}

.edu-card {
  background-color: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode .edu-card {
  background-color: #ffffff;
  border: 1px solid #ccc;
}

.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.edu-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  text-align: center;
}

.edu-card h3 {
  margin: 0.3rem 0 0.6rem 0;
  color: #ffd700;
  font-size: 1.15rem;
  text-align: center;
}

.edu-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

/* Cards principais da home em colunas */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}

/* ===========================
   Box do contador de visitas
   =========================== */

.contador-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
  font-size: 0.85rem;
  min-width: 150px;
}

body.light-mode .contador-box {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.contador-item {
  display: flex;
  justify-content: space-between;
}

.contador-label {
  opacity: 0.85;
  font-weight: bold;
}

.contador-valor {
  color: #ffd700;
  font-weight: bold;
}

@keyframes zoomCirculo
{
  0%
  {
    transform: scale(1);
  }
  33%
  {
    transform: scale(1.3);
  }
  66%
  {
    transform: scale(1.6);
  }
}

/* GRID DE PROJETOS */
.grid-projetos {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}

/* Card dos projetos */
.grid-projetos .card {
  background-color: #1e1e1e;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid #333;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  transition: transform .25s ease, box-shadow .25s ease;
}

body.light-mode .grid-projetos .card {
  background-color: #ffffff;
  border: 1px solid #ccc;
}

.grid-projetos .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: .5rem;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #0b0f14;
  border: 1px solid #444;
  font-size: 0.75rem;
  color: #ccc;
}

.badge.destaque {
  background: #ffd700;
  color: #000;
  font-weight: bold;
}

/* ===========================
   LINKS DOS CARDS DE PROJETOS
   =========================== */

.grid-projetos .card a {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: bold;
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: 0.25s ease;
}

/* Modo escuro */
body.dark-mode .grid-projetos .card a {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
}

body.dark-mode .grid-projetos .card a:hover {
  background: rgba(255, 215, 0, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

/* Modo claro */
body.light-mode .grid-projetos .card a {
  color: #333;
  background: #f5f5f5;
  border: 1px solid #ccc;
}

body.light-mode .grid-projetos .card a:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

/* ===========================
   LINKS DOS CARDS — ALTURA IGUAL AO BADGE DESTAQUE
   =========================== */

.grid-projetos .card a {
  display: inline-flex;          /* mesma lógica dos badges */
  align-items: center;           /* centraliza verticalmente */
  height: 28px;                  /* mesma altura visual do badge */
  padding: 0 0.75rem;            /* igual ao badge destaque */
  border-radius: 999px;          /* formato pílula igual ao badge */
  font-size: 0.80rem;            /* mesmo tamanho do texto */
  font-weight: bold;
  text-decoration: none;
  transition: 0.25s ease;
}

/* Modo escuro */
body.dark-mode .grid-projetos .card a {
  color: #000;
  /*background: #ffd700;*/
  background: #fff3a3;
  border: 1px solid rgba(255, 215, 0, 0.45);
}

body.dark-mode .grid-projetos .card a:hover {
  background: #ffe45c;
  transform: translateY(-2px);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.45);
}

/* Modo claro */
body.light-mode .grid-projetos .card a {
  color: #333;
  background: #fff3a3;
  border: 1px solid #e0c200;
}

body.light-mode .grid-projetos .card a:hover {
  background: #ffe45c;
  transform: translateY(-2px);
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.filtros-projetos {
  display: flex;
  gap: 10px;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.filtros-projetos input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #666;
  background: #1e1e1e;
  color: #fff;
}

body.light-mode .filtros-projetos input {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

/* ===========================
   Responsividade
   =========================== */

/* Celulares até 480px (≈ 5") */
@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .avatar {
    width: 90px;
    height: 90px;
  }

  .title-nav h1 {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .main-nav {
    gap: 0.5rem;
  }

  .main-nav a {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }

  #toggle-theme {
    margin-top: 0.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* 481px a 600px (≈ 5.5") */
@media (min-width: 481px) and (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .contador-box {
    align-self: flex-start;
    margin-top: 0.5rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .title-nav h1 {
    font-size: 1.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* 601px a 900px (tablets 7") */
@media (min-width: 601px) and (max-width: 900px) {
  .header-inner {
    gap: 1.25rem;
  }

  .avatar {
    width: 110px;
    height: 110px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 901px a 1200px (tablets 10–11") */
@media (min-width: 901px) and (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 1201px a 2000px (desktops) */
@media (min-width: 1201px) and (max-width: 2000px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 2001px+ (TVs / telas muito grandes) */
@media (min-width: 2001px) {
  .site-header,
  .site-main,
  .site-footer {
    max-width: 1400px;
  }

  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .title-nav h1 {
    font-size: 2.1rem;
  }

  .subtitle {
    font-size: 1.05rem;
  }
}
