/* -------------------- RESET E CONFIGURAÇÕES GERAIS -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #666;
  color: #fff;
  margin: 0;
}

/* -------------------- NAVBAR -------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #333;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  padding: 1rem 2rem;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  color: #fff;
  font-weight: bold;
  padding-right: 40px;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: #f5c518;
}

.nav-links a.active {
  border-bottom: 2px solid #f5c518;
}


/* -------------------- CONTEÚDO -------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 1% auto;
  text-align: center;
  padding-top: 100px;
  padding-left: 1rem;
  padding-right: 1rem;
}

h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 32px;
  margin-bottom: 40px;
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
}

/* -------------------- PROJETOS -------------------- */
.projetos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 60px;
  justify-items: center;
  margin-top: 50px;
}

.projeto-link {
  display: block;
  text-decoration: none;
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
  transition: transform 0.3s ease;
  will-change: transform;
  position: relative;
}

.projeto-img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.projeto-link:hover .projeto-img {
  transform: scale(1.05);
}

/* Animação com delay para projetos */
.projetos > .projeto-link:nth-child(1) { animation-delay: 0.1s; }
.projetos > .projeto-link:nth-child(2) { animation-delay: 0.3s; }
.projetos > .projeto-link:nth-child(3) { animation-delay: 0.5s; }

/* Hover Scale (blocos "Em breve") */
.hover-scale {
  width: var(--projeto-width-desktop);
  max-width: 100%;
  height: 200px;
  background-color: black;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: #fff;
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* -------------------- BOTÃO "VER MAIS" -------------------- */
#verMaisBtn {
  display: block;
  margin: 40px auto 0;
  padding: 10px 20px;
  width: 250px;
  height: 40px;
  background-color: #fff;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
  animation-delay: 0.7s;
}

#verMaisBtn:hover {
  background-color: #ddd;
}

/* -------------------- ANIMAÇÕES -------------------- */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------- GITHUB -------------------- */
.github {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 10px auto;
  width: 100%;
  max-width: 300px;
}


.link {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 22px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  margin-top: 10px;
}

.link:hover {
  text-decoration: underline;
}

/* -------------------- TOOLTIP PERSONALIZADO -------------------- */
.projeto-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 12px;
  font-size: 18px;
  border-radius: 6px;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  width: 220px;
  text-align: center;
  z-index: 10;
  border: 1.5px solid #fff;
}

.projeto-link:hover::after {
  opacity: 1;
  visibility: visible;
}

/* -------------------- VARIÁVEIS -------------------- */
:root {
  --projeto-width-desktop: 300px;
  --projeto-width-tablet: 45vw;
  --projeto-width-mobile: 90vw;
}

/* -------------------- PROJETOS OCULTOS -------------------- */
.projeto-oculto {
  display: none;
}

.projeto-oculto.show {
  display: block;
}

/* -------------------- RESPONSIVIDADE -------------------- */
@media (max-width: 600px) {
  .projetos {
    grid-template-columns: 1fr;
    gap: 20px;
  }
 .nav-links a {
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
  }
  .hover-scale {
    width: var(--projeto-width-mobile);
    height: 160px;
    font-size: 14px;
  }

  .projeto-img {
    width: 100%;
    height: auto;
    margin-top: 10%;
  }

  .container {
    margin: 10% auto 10% auto;
  }

  h1 {
    font-size: 24px;
  }

  #verMaisBtn {
    width: var(--projeto-width-mobile);
    margin-bottom: 40px;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
  }
   .logo {
    order: 0;
    padding-right: 0; 
    text-align: center;
  }

  /* Ajuste do tooltip para mobile */
  .projeto-link::after {
    bottom: 105%;
    font-size: 14px;
    width: 180px;
    padding: 8px 10px;
  }
}

@media (max-width: 400px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
  }
   .nav-links a {
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
  }
    .projeto-link::after {
    bottom: 105%;
    font-size: 14px;
    width: 180px;
    padding: 8px 10px;
  }
}
