/* ============================================================
   RESET & CONFIGURAÇÕES GERAIS
============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Adiciona rolagem suave para links internos como #projetos */
}

body {
  font-family: "Poppins", sans-serif;
  color: #e7f1ff;
  background: #02040a;
  overflow-x: hidden;
}

/* ============================================================
   ELEMENTOS PRINCIPAIS (Header, Hero, Seções)
============================================================ */
.header {
  width: 100%;
  padding: 25px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.nickname h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #cfe8ff;
  text-shadow: 0 0 5px rgba(0, 180, 255, 0.4);
}

nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

nav a {
  text-align: center;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 500;
  color: #d9f2ff;
  background: rgba(0, 95, 145, 0.12);
  border: 1px solid rgba(0, 150, 255, 0.25);
  backdrop-filter: blur(8px);
  transition: 0.3s ease-in-out;
}

nav a:hover {
  background: rgba(0, 150, 255, 0.25);
  border-color: rgba(0, 200, 255, 0.5);
  transform: scale(1.05);
}
/* HERO EM 2 COLUNAS */
.heromae {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 30px;
  padding: 50px 60px;
}

/* COLUNA DE TEXTO */
.hero {
  max-width: 600px;
  padding-top: 300px;
}

/* TÍTULO */
.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  color: #dff3ff;
  text-shadow: 0 0 6px rgba(0, 180, 255, 0.4);
}

/* PARÁGRAFOS */
.hero p {
  margin-top: 15px;
  font-size: 1.25rem;
  opacity: 0.85;
  color: #c6e6ff;
}

/* BOTÕES */
.btns {
  margin-top: 20px;
}

.btns a {
  display: inline-block;
  margin-right: 15px;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  background: rgba(0, 120, 180, 0.15);
  border: 1px solid rgba(0, 160, 255, 0.35);
  color: #e6f6ff;
  transition: 0.25s ease;
}

.btns a:hover {
  background: rgba(0, 150, 255, 0.3);
  transform: scale(1.05);
}

/* IMAGEM DO HERO */
.hero-img {
  width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Máscara de fade estilo “meia lua” */
  -webkit-mask-image: radial-gradient(
      ellipse 80% 60% at 50% 20%, 
      white 60%, 
      transparent 100%
  );
  mask-image: radial-gradient(
      ellipse 90% 80% at 50% 20%, 
      white 60%, 
      transparent 100%
  );
}

.hero-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  
}


/* Hero responsivo */
@media (max-width: 900px) {
  .hero-img {
    display: none;
  }
}

/* Estilos Padrão das Seções */
.servicos, .projetos-recentes, .sobre, .skills, .carater {
  padding: 100px 60px;
  text-align: center;
}

.servicos h2, .projetos-recentes h2, .sobre h2, .skills h3 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #dff3ff;
  text-shadow: 0 0 6px rgba(0, 180, 255, 0.4);
}

/* Cards (Serviços) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.card {
  padding: 25px;
  border-radius: 12px;
  background: rgba(0, 40, 70, 0.2);
  border: 1px solid rgba(0, 120, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #d9eeff;
  transition: 0.25s ease;
}

.card:hover {
  background: rgba(0, 80, 140, 0.28);
  transform: scale(1.05);
}

/* Cards (Projetos) */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.projeto-card {
  background: rgba(0, 40, 70, 0.2);
  border: 1px solid rgba(0, 120, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.projeto-card:hover {
  background: rgba(0, 80, 140, 0.35);
  transform: translateY(-8px) scale(1.02);
}

.projeto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: brightness(0.9) contrast(1.1);
  border-bottom: 1px solid rgba(0, 120, 255, 0.2);
}

.projeto-info {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.projeto-info h3 {
  font-size: 1.6rem;
  color: #cfe8ff;
  margin-bottom: 15px;
}

.projeto-info p {
  font-size: 1rem;
  line-height: 1.6;
  color: #c6e6ff;
  opacity: 0.85;
  flex-grow: 1;
  margin-bottom: 20px;
}

.projeto-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.projeto-links a {
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  background: rgba(0, 120, 180, 0.15);
  border: 1px solid rgba(0, 160, 255, 0.35);
  color: #e6f6ff;
  transition: 0.25s ease;
  text-align: center;
  flex-grow: 1;
}

.projeto-links a:hover {
  background: rgba(0, 150, 255, 0.3);
  transform: scale(1.05);
}

.projeto-links a:last-child {
  background: transparent;
  border: 1px solid rgba(0, 160, 255, 0.35);
}

.projeto-links a:last-child:hover {
  background: rgba(0, 150, 255, 0.2);
  transform: scale(1.05);
}

/* Outras Seções */
.texto-sobre p {
  margin-bottom: 18px;
  font-size: 1.2rem;
  line-height: 1.6;
  opacity: 0.88;
  color: #cce6ff;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.skill p {
  margin-bottom: 5px;
}

.progress {
  background: rgba(0, 50, 80, 0.4);
  border-radius: 10px;
  height: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 130, 255, 0.4);
}

.progress span { display: block;
  height: 100%;
  background: linear-gradient(90deg, #00c4ff, #0077ff);
  
  /* ================================================= */
  /* ================ ADIÇÕES PARA ANIMAÇÃO ============ */
  /* ================================================= */
  
  /* 1. Estado inicial: a barra começa com largura 0 */
  width: 0%; 
  
  /* 2. Define a transição suave para a propriedade 'width' */
  /* A animação durará 1.5 segundos com um efeito de desaceleração no final */
  transition: width 1.5s ease-out;
}

.progress span.progress-bar-animated {
  width: var(--progress-width);
}

.valores p {
  margin-bottom: 10px;
}

/* ============================================================
   FOOTER & ELEMENTOS FIXOS
============================================================ */
/* ============================================================
   FOTO DO HERO - LADO DIREITO + FADE-OUT + FLOAT EFFECT
============================================================ */



footer {
  margin-top: 60px;
  text-align: center;
  padding: 35px;
  color: #b8d9ff;
  opacity: 0.8;
  background: rgba(0, 50, 90, 0.22);
  border-top: 1px solid rgba(0, 130, 255, 0.25);
}

/* ============================================================
   RESPONSIVIDADE TOTAL (Mobile-First Approach Refinements)
============================================================ */

/* Breakpoint para Tablets e Celulares Maiores (Paisagem) */
@media (max-width: 992px) {
  .nickname h1 {
    margin-left: 40px;
  }

  nav {
    right: 40px;
    gap: 15px;
  }

  .hero {
    padding: 120px 40px;
  }

  .servicos, .projetos-recentes, .sobre, .skills, .carater {
    padding: 80px 40px;
  }
}

/* Breakpoint Principal para Mobile (Tablets em Retrato e Celulares) */
@media (max-width: 768px) {
  /* Desativa o efeito parallax em mobile para melhor performance */
  .backone, .backtwo, .backthree, .backfour, .backfive {
    background-attachment: scroll;
  }

  .nickname h1 {
    text-align: center;
    margin-left: 0;
    margin-top: 30px;
    font-size: 2rem;
  }

  /* Transforma a navegação em um layout mais simples */
  nav {
    position: static; /* Remove o posicionamento absoluto */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    width: 90%;
    margin: 30px auto 0; /* Centraliza e adiciona espaço */
    gap: 10px;
  }

  nav a {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 80px 25px 60px; /* Reduz o padding superior */
    text-align: center;
    max-width: 100%;
  }

  .hero h2 {
    font-size: 2.5rem; /* Reduz o título principal */
  }

  .hero p {
    font-size: 1.1rem;
  }

  .btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
  }

  .btns a {
    width: 90%;
    max-width: 300px;
    text-align: center;
    margin-right: 0;
  }

  .servicos, .projetos-recentes, .sobre, .skills, .carater {
    padding: 80px 25px;
  }

  .servicos h2, .projetos-recentes h2, .sobre h2, .skills h3 {
    font-size: 2.2rem;
  }

  .texto-sobre p {
    font-size: 1.1rem;
  }
}

/* Breakpoint para Celulares Pequenos */
@media (max-width: 480px) {
  .nickname h1 {
    font-size: 1.8rem;
  }

  nav {
    grid-template-columns: 1fr 1fr; /* Força 2 colunas */
  }

  .hero h2 {
    font-size: 2.1rem;
  }

  .projetos-grid {
    /* Garante que os cards não fiquem menores que o mínimo */
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .Joel {
    height: 60px;
    width: 60px;
    right: 15px;
    bottom: 15px;
  }
}

/* ============================================================
   ANIMAÇÕES DE SCROLL REVEAL (Scroll-Triggered Animations)
============================================================ */

/*
  Classe base para todos os elementos que serão animados.
  Eles começam invisíveis e com a transição já definida.
*/
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(100px); /* Começa 100px para baixo */
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Classes de direção da animação */
.reveal-from-top {
  transform: translateY(-50px); /* Começa 50px para cima */
}

.reveal-from-bottom {
  transform: translateY(50px); /* Começa 50px para baixo */
}

.reveal-from-left {
  transform: translateX(-100px); /* Começa 100px para a esquerda */
}

.reveal-from-right {
  transform: translateX(100px); /* Começa 100px para a direita */
}

/*
  A classe 'visible' é a que o JavaScript vai adicionar.
  Ela torna o elemento 100% visível e o move para sua posição original.
*/
.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

/* Desativar animações em telas mobile para melhor performance, se desejado */
/* Você pode remover este bloco se quiser manter as animações no celular */
@media (max-width: 768px) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   RESPONSIVIDADE TOTAL — CORRIGIDA E OTIMIZADA
============================================================ */

/* LAPTOPS E TABLETS GRANDES (até 1100px) */
@media (max-width: 1100px) {
  .heromae {
    padding-top: 180px;
    gap: 40px;
  }

  .hero h2 {
    font-size: 2.8rem;
  }

  .hero-img {
    width: 300px;
  }
}

/* TABLETS (até 900px) */
@media (max-width: 900px) {
  .heromae {
    flex-direction: column;
    text-align: center;
    padding: 150px 40px 80px;
  }

  .hero {
    padding-top: 0;
    max-width: 100%;
  }

  .hero-img {
    display: block;
    width: 260px;
  }

  .hero p {
    font-size: 1.15rem;
  }

  .btns {
    justify-content: center;
  }
}

/* CELULARES GRANDES (até 768px) */
@media (max-width: 768px) {
  .header {
    padding: 20px;
  }

  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  nav a {
    padding: 8px 12px;
  }

  .heromae {
    padding: 140px 25px 60px;
  }

  .hero h2 {
    font-size: 2.2rem;
  }

  .hero-img {
    width: 230px;
  }

  .btns {
    flex-direction: column;
    gap: 15px;
  }

  .btns a {
    width: 100%;
    max-width: 300px;
    margin-right: 0;
  }
}

/* CELULARES NORMAIS (até 480px) */
@media (max-width: 480px) {

  .nickname h1 {
    font-size: 1.6rem;
  }

  nav {
    gap: 8px;
  }

  nav a {
    font-size: 0.85rem;
    padding: 7px 10px;
  }

  .heromae {
    padding: 200px 20px 50px;
  }

  .hero h2 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-img {
    width: 200px;
  }

  .projetos-grid {
    grid-template-columns: 1fr;
  }

  footer {
    font-size: 0.9rem;
  }
}

/* CELULARES PEQUENOS (até 360px) */
@media (max-width: 360px) {
  .hero h2 {
    font-size: 1.7rem;
  }

  .hero-img {
    width: 170px;
  }

  .btns a {
    font-size: 0.85rem;
    padding: 10px 15px;
  }
}

