/* Reset e base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050607;
  --card: #0b1310;
  --muted: #9ea8a0;
  --neon-start: #58ff4a;
  --neon-end: #00d25a;
  --glass: rgba(255, 255, 255, 0.03);
  --container: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .9, .3, 1);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background: #020302;
  color: #e6efe9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Canvas background */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Watermark com animação de glow */
.watermark {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.glow-container {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(88, 255, 74, 0.4) 0%, rgba(88, 255, 74, 0) 70%);
  animation: glow-pulse 6s ease-in-out infinite;
}

.glow-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 210, 90, 0.3) 0%, rgba(0, 210, 90, 0) 70%);
  animation: glow-pulse 8s ease-in-out infinite 1s;
}

.glow-3 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(88, 255, 74, 0.25) 0%, rgba(88, 255, 74, 0) 70%);
  animation: glow-pulse 10s ease-in-out infinite 2s;
}

@keyframes glow-pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.25;
  }
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 5;
}

/* Header/Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5); /* OPACIDADE DO FUNDO: 0.5 */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(88, 255, 74, 0.08);
  transition: all 0.4s ease-out;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: center; /* Centraliza a navegação principal */
  gap: 40px;
  height: 80px;
  position: relative;
  z-index: 1001;
}

/* Logo + nome (Marca) */
.brand {
  position: absolute;
  left: 40px; /* Fixo à esquerda */
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(88, 255, 74, 0.6));
  transition: all 0.3s;
  will-change: transform, opacity, filter, box-shadow;
}

.mark:hover {
  filter: drop-shadow(0 0 35px rgba(88, 255, 74, 0.8));
}

.brand-name {
  color: var(--neon-start);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 16px;
}

/* Navegação central */
.nav {
  display: flex;
  gap: 30px; /* Ajustado de 28px para 30px, conforme a parte final */
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 0;
  transition: color .3s;
  cursor: pointer;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-start), var(--neon-end));
  transition: width .3s;
}

.nav a:hover::after {
  width: 100%;
}

.nav a:hover {
  color: var(--neon-start);
}

/* --- ANIMAÇÕES DE CLIQUE (TREMELIQUE E EXPLOSÃO) --- */
/* Animação de Tremor (Shake) */
@keyframes jiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  20%, 60% {
    transform: rotate(-4deg);
  }
  40%, 80% {
    transform: rotate(4deg);
  }
}

/* Animação de Explosão de Brilho (Neon Pop/Pulse) */
@keyframes neon-pop {
  0% {
    text-shadow: 0 0 6px rgba(88, 255, 74, 0.4);
    opacity: 1;
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 30px rgba(88, 255, 74, 1), 0 0 60px rgba(0, 210, 90, 0.8);
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    text-shadow: 0 0 12px rgba(88, 255, 74, 0.7);
    opacity: 1;
    transform: scale(1);
  }
}
/* ---------------------------------------------------- */

/* Ícones Sociais na Topbar */
.topbar-social {
  position: absolute;
  right: 40px; /* Fixo à direita */
  display: flex;
  align-items: center;
  gap: 22px; /* Ajustado para 22px, conforme a parte final */
}

.topbar-social .social-link {
  color: var(--neon-start);
  font-size: 20px;
  text-decoration: none;
  opacity: 0.9;
  text-shadow: 0 0 6px rgba(88, 255, 74, 0.4);
  transition: text-shadow 0.3s ease, opacity 0.3s ease, transform 0.1s ease; /* Adicionado transform para suavizar o jiggle */
}

.topbar-social .social-link:hover {
  text-shadow: 0 0 12px rgba(88, 255, 74, 0.7);
  opacity: 1;
}

/* EFEITOS DE CLIQUE/TOQUE (TREMELIQUE E EXPLOSÃO) */
.topbar-social .social-link:active, /* Ao clicar ou tocar */
.topbar-social .social-link:focus { /* Ao focar (para acessibilidade) */
  animation: jiggle 0.4s ease-in-out, neon-pop 0.4s ease-out;
  opacity: 1;
}

/* Hamburger Menu (desktop: oculto) */
.hamburger {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--neon-start);
}

/* Logo Icon (Extra style) */
.logo-icon {
  transition: all 0.3s;
  filter: drop-shadow(0 0 20px rgba(88, 255, 74, 0.7)) drop-shadow(0 0 40px rgba(88, 255, 74, 0.3));
}

.logo-icon:hover {
  filter: drop-shadow(0 0 30px rgba(88, 255, 74, 0.9)) drop-shadow(0 0 60px rgba(88, 255, 74, 0.5));
}

.logo-particle {
  pointer-events: none;
  box-shadow: 0 0 20px rgba(88, 255, 74, 0.8);
  will-change: transform, opacity;
}

/* Seções */
section {
  padding: 120px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
  scroll-margin-top: 80px;
  background-color: rgba(0, 0, 0, 0.5);
}

.section-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* Hero */
.hero {
  padding: 0;
}

.hero .container {
  text-align: center;
  padding: 120px 28px;
}

.hero-title {
  font-size: 72px;
  line-height: 1.1;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px var(--neon-start);
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.hero-sub {
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
  margin: 0 auto 40px;
  font-weight: 300;
}

/* Botão Hero com animação */
.hero .btn {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 38px;
  margin-top: 30px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, var(--neon-start), var(--neon-end));
  color: #07110b;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(88, 255, 74, 0.4);
  position: relative;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInHeroBtn 1.2s ease forwards 2s;
}

/* animação de aparição */
@keyframes fadeInHeroBtn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* brilho e pulso neon */
.hero .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon-start), var(--neon-end));
  filter: blur(15px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.hero .btn:hover::before {
  opacity: 0.9;
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0%,
  100% {
    filter: blur(15px) brightness(1);
  }
  50% {
    filter: blur(25px) brightness(1.5);
  }
}

.hero .btn:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 40px rgba(88, 255, 74, 0.6);
}

/* Projetos */
.section-title {
  font-size: 48px;
  color: var(--neon-start);
  margin-bottom: 40px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 0 60px;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(88, 255, 74, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.7s var(--ease);
}

.project-card {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(88, 255, 74, 0.08);
  box-sizing: border-box;
}

.project-card h3 {
  font-size: 26px;
  color: var(--neon-start);
  font-weight: 700;
}

.project-card p {
  color: var(--muted);
  line-height: 1.8;
  font-weight: 300;
}

/* Setas do Carousel (Desktop) */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(88, 255, 74, 0.2);
  color: var(--muted);
  border-radius: 10px; /* Mantido quadrado/arredondado para desktop */
  cursor: pointer;
  font-size: 24px;
  width: 52px;
  height: 52px;
  transition: all 0.3s var(--ease);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

/* Efeito Hover das Setas: TOTALMENTE VERDE (NEON) */
.carousel-btn:hover {
  transform: translateY(-50%) scale(1.05); /* Escala suavemente no hover */
  border: none;
  color: var(--bg);
  background: linear-gradient(90deg, var(--neon-start), var(--neon-end));
  box-shadow: 0 0 25px rgba(88, 255, 74, 0.8);
}

/* Dots do Carousel */
.carousel-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.24s;
  border: 1px solid rgba(88, 255, 74, 0.2);
}

.carousel-dot.active {
  background: linear-gradient(90deg, var(--neon-start), var(--neon-end));
  box-shadow: 0 0 20px rgba(88, 255, 74, 0.4);
  transform: scale(1.2);
}

/* Sobre */
.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.8;
  font-size: 18px;
  font-weight: 300;
}

/* Contato */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(88, 255, 74, 0.15);
  padding: 14px;
  border-radius: 10px;
  color: inherit;
  font-family: inherit;
  margin-bottom: 16px;
  font-weight: 300;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(158, 168, 160, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--neon-start);
  background: rgba(88, 255, 74, 0.05);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Botão geral */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  background: linear-gradient(180deg, var(--neon-start), var(--neon-end));
  color: #07110b;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 50px rgba(88, 255, 74, 0.3);
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(88, 255, 74, 0.08);
  padding: 40px 0;
  position: relative;
  z-index: 5;
  margin-top: 0;
}

.footer .container {
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
}

.social-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all .3s;
  position: relative;
}

.social-link:hover {
  color: var(--neon-start);
  text-shadow: 0 0 20px rgba(88, 255, 74, 0.5);
}

.footer-phone {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
  font-weight: 300;
}

.footer-copy {
  color: rgba(158, 168, 160, 0.7);
  font-size: 14px;
  font-weight: 300;
}

/* Animação de piscar para telefone */
@keyframes blink-green {
  0%,
  100% {
    color: var(--muted);
    text-shadow: none;
  }
  25%,
  75% {
    color: var(--neon-start);
    text-shadow: 0 0 12px rgba(88, 255, 74, 0.9), 0 0 30px rgba(88, 255, 74, 0.6);
  }
}

footer .footer-phone.blink,
.footer .footer-phone.blink a {
  animation: blink-green 1.3s ease-in-out 2;
}

/* Scrollbar */
/* Webkit (Chrome, Safari) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-start), var(--neon-end));
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(88, 255, 74, 0.7);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #58ff4a, #00d25a);
  box-shadow: 0 0 20px rgba(88, 255, 74, 1);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-start) transparent;
}


/* ========================================= */
/* RESPONSIVO 			 	 	 	 	 	 */
/* ========================================= */

@media (max-width: 768px) {
  /* Topbar */
  .topbar .container {
    justify-content: space-between; /* Volta ao padrão para usar os absolutos */
    gap: 0;
  }

  /* Marca (Logo + Nome) centralizada no mobile */
  .brand {
    position: relative;
    left: 0;
    margin: 0 auto;
  }

  /* Ícones sociais à esquerda (junto ao menu, como no código original) */
  .topbar-social {
    position: absolute;
    right: auto;
    left: 20px; /* Movido para a esquerda */
    top: 50%;
    transform: translateY(-50%);
    gap: 18px; /* Ajustado para 18px, conforme o código responsivo */
  }
  
  .topbar-social .social-link {
    font-size: 20px;
    color: var(--neon-start);
    text-shadow: 0 0 8px rgba(88, 255, 74, 0.6);
  }

  /* EFEITOS DE CLIQUE/TOQUE (TREMELIQUE E EXPLOSÃO) - MOBILE */
  .topbar-social .social-link:active,
  .topbar-social .social-link:focus {
    animation: jiggle 0.4s ease-in-out, neon-pop 0.4s ease-out;
    opacity: 1;
  }

  /* Hamburger Menu (mobile: visível) */
  .hamburger {
    display: block;
    z-index: 1100;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Animação Hamburger */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Navegação (Menu Mobile) */
  .nav {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 6, 7, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: left 0.5s var(--ease);
  }

  .nav.active {
    left: 0;
  }

  .nav a {
    font-size: 20px;
  }

  /* Hero Section */
  .hero .container {
    padding: 80px 28px;
  }

  .hero-title {
    font-size: 42px;
    -webkit-text-stroke: 1.5px var(--neon-start); /* Mantém o contorno */
    letter-spacing: 2px;
  }

  .hero-sub {
    font-size: 16px;
  }

  /* Seções */
  section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 36px;
  }

  /* Carousel */
  .carousel {
    padding: 0 10px;
    gap: 10px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 50%; /* Tornando o botão redondo no mobile */
  }

  .carousel-btn.prev {
    left: -5px;
  }

  .carousel-btn.next {
    right: -5px;
  }

  /* Efeito Hover das Setas no Mobile */
  .carousel-btn:hover {
    transform: translateY(-50%) scale(1.1); /* Escala suavemente para 1.1 para destacar */
    /* Outros estilos de hover vêm do bloco principal e permanecem */
  }

  /* Cards de Projeto */
  .project-card h3 {
    font-size: 22px;
  }

  .project-card p {
    font-size: 15px;
    line-height: 1.7;
  }

  /* Sobre */
  .about-text {
    font-size: 16px;
  }

  /* Footer */
  .footer-socials {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .footer-copy {
    font-size: 12px;
  }
}

/* Tremelique da logo quando a página carrega */
@keyframes logo-shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

/* Brilho pulsante contínuo da logo */
@keyframes logo-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(88, 255, 74, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 25px rgba(88, 255, 74, 1));
  }
}

/* Aplica ambas as animações na logo */
.mark {
  animation: logo-shake 0.8s ease-in-out 1, logo-glow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(88, 255, 74, 0.7));
  transition: filter 0.3s ease;
}

/* Efeito de explosão após o tremelique (opcional, suave) */
@keyframes logo-pop {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(88, 255, 74, 0.6));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 35px rgba(88, 255, 74, 1));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 15px rgba(88, 255, 74, 0.6));
  }
}

/* Executa o pop logo após o tremelique */
.mark.loaded {
  animation: logo-pop 0.5s ease-out 1;
}