/* ======================================================
   FUNDO (tsParticles + Overlay)
====================================================== */
#tsparticles {
  position: fixed;
  inset: 0;
  z-index: -2;
}

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
  pointer-events: none;
}

#content {
  position: relative;
  z-index: 1;
}

/* ======================================================
   VARIÃVEIS GLOBAIS
====================================================== */
:root {
  --header-height: 140px;
}

/* ======================================================
   GLOBAL
====================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;

  font-family: Arial, sans-serif;
  color: #e5e7eb;
  background: #000;

  /* Nunca bloqueie scroll vertical globalmente */
  overflow-x: hidden;
}

/* Wrapper padrão de conteúdo das sections */
.section-content {
  padding: 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
/* ======================================================
   HEADER (FIXO)
====================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  min-height: var(--header-height);
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 24px 32px;
  /* padding vertical controlado */
  gap: 32px;

  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  z-index: 10;
}

/* TEXTO ESQUERDA */
.header h1 {
  margin: 0;
  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 42px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

.header p {
  margin: 6px 0 0;
  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;

  color: rgb(160, 120, 255);
  text-shadow:
    0 0 6px rgba(160, 120, 255, .7),
    0 0 14px rgba(160, 120, 255, .5);
}

/* ======================================================
   TÃTULOS DE SEÃ‡ÃƒO (H2)
====================================================== */
.section h2 {
  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 2rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 30px;
  color: #fff;
}


/* ======================================================
   MENU
====================================================== */
.menu {
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
}

.menu button {
  padding: 14px 26px;
  font-size: 18px;
  line-height: 1;
  /* trava altura */
  color: #00eaff;
  background: rgba(0, 234, 255, .08);
  border: 1px solid rgba(0, 234, 255, .4);
  border-radius: 6px;
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease;
}

.menu button:hover {
  background: rgba(0, 234, 255, .2);
  box-shadow: 0 0 10px rgba(0, 234, 255, .4);
}

/* ======================================================
   MENU HAMBURGUER (MOBILE)
====================================================== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: rgba(0, 234, 255, .15);
  border: 2px solid rgba(0, 234, 255, .6);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .3s ease;
  box-shadow: 0 0 10px rgba(0, 234, 255, .3);
}

.menu-toggle:hover {
  background: rgba(0, 234, 255, .25);
  box-shadow: 0 0 16px rgba(0, 234, 255, .5);
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #00eaff;
  border-radius: 2px;
  transition: all .3s ease;
  box-shadow: 0 0 6px rgba(0, 234, 255, .6);
}

/* AnimaÃ§Ã£o do X quando aberto */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Menu lateral mobile */
.menu-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: rgba(0, 0, 0, .95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(0, 234, 255, .4);
  box-shadow: -5px 0 30px rgba(0, 234, 255, .2);
  z-index: 999;
  transition: right .4s cubic-bezier(.4, 0, .2, 1);
  padding: 80px 20px 20px;
  overflow-y: auto;
}

.menu-mobile.active {
  right: 0;
}

.menu-mobile button {
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 12px;
  font-size: 16px;
  color: #00eaff;
  background: rgba(0, 234, 255, .08);
  border: 1px solid rgba(0, 234, 255, .4);
  border-radius: 8px;
  cursor: pointer;
  transition: all .25s ease;
  text-align: left;
  font-family: 'Orbitron', Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.menu-mobile button:hover {
  background: rgba(0, 234, 255, .2);
  box-shadow: 0 0 12px rgba(0, 234, 255, .4);
  transform: translateX(-5px);
}

/* Overlay escuro quando menu aberto */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  z-index: 998;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ======================================================
   MAIN
====================================================== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: var(--header-height);
  padding-left: 32px;
  padding-right: 32px;
  padding-bottom: 64px;
}

/* ======================================================
   SECTIONS
====================================================== */
.section {
  display: none;
  /* Altura controlada corretamente */
  min-height: calc(100vh - var(--header-height, 96px));
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  transition:
    opacity .35s ease,
    transform .45s cubic-bezier(.4, 0, .2, 1);
}

.section.active {
  display: block;
  pointer-events: auto;
}

.section.show {
  opacity: 1;
  transform: translateY(0);
}
/* ======================================================
   SOBRE MIM
====================================================== */
#sobre {
  padding: 2.5rem 2rem;
  max-width: 900px;
}

/* tÃ­tulo acima do card */
#sobre h2 {
  margin-bottom: 20px;
}

/* card â€” IGUAL ao .card */
#sobre .sobre-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(160, 120, 255, .35);
  box-shadow: 0 0 8px rgba(160, 120, 255, .25);
  background: rgba(0, 0, 0, .25);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* texto */
#sobre .sobre-card p {
  margin: 0;
  line-height: 1.7;
  color: #d1d5db;
}

/* destaque */
#sobre .highlight {
  color: rgb(160, 120, 255);
  font-weight: 600;
}

/* ======================================================
   SKILLS
====================================================== */
.skills-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

#skills {
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.skills-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  
  will-change: transform;
}

.skill-item img {
  width: 72px;
  transition: transform .2s ease, filter .2s ease;
  will-change: transform;
}

.skill-item span {
  font-size: 12px;
  color: #9ca3af;
  opacity: 0;
  transform: translateY(4px);
  transition: .2s ease;
}

/* Hover original (mantido) */
.skill-item:hover img {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, .6));
}

.skill-item:hover span {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================================
   SONIC RUNNER
====================================================== */

.skills-runner {
  position: absolute;
  top: -68px; /* sobe o Sonic */
  left: 0;
  width: 100%;
  height: 68px;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.skills-runner img {
  position: absolute;
  left: 0;
  bottom: 0;

  height: 56px;

  animation-name: sonic-run;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}


@keyframes sonic-run {
  from {
    transform: translateX(var(--sonic-start));
  }
  to {
    transform: translateX(var(--sonic-end));
  }
}

/* ======================================================
   CARD DE ESTATÃSTICAS
====================================================== */
.stats-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
.stats-card {
  margin-top: 60px; /* espaço para o Sonic */
  padding: 20px 20px 30px;
  width: 100%;
  background: rgba(0, 0, 0, .25);
  border-radius: 16px;
  border: 1px solid rgba(160, 120, 255, .35);
  box-shadow: 0 0 8px rgba(160, 120, 255, .25);
  display: flex;
  flex-direction: column;
  position: relative;
}


/* TÃTULO */
.stats-card h3 {
  margin-bottom: 32px;
  text-align: center;

  font-family: 'Orbitron', Arial, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;

  color: #a78bfa;
}

/* MESMA ORIENTAÃ‡ÃƒO DAS SKILLS */
.donut-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

/* DONUT */
.donut {
  --size: 110px;
  --thickness: 10px;

  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  position: relative;

  background: conic-gradient(#a78bfa calc(var(--percent) * 1%),
      rgba(255, 255, 255, .08) 0);

  box-shadow: 0 0 18px rgba(167, 139, 250, 0.35);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* HOVER (mesmo feeling das skills) */
.donut:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.55);
}

/* CENTRO */
.donut::before {
  content: "";
  position: absolute;
  inset: var(--thickness);
  background: rgba(0, 0, 0, .85);
  border-radius: 50%;
}

/* TEXTO CENTRAL */
.donut span {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
  z-index: 1;
  pointer-events: none;
}

.donut::after {
  content: attr(data-percent) "%";
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;

  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.donut:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===============================
   SECTION PROJETOS
================================ */
#projetos {
  padding: 2rem;
}

#projetos h2 {
  margin-bottom: 24px;
}

/* GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* CARD */
.projects-grid .card {
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(160, 120, 255, .35);
  background: rgba(0, 0, 0, .28);
  box-shadow: 0 0 10px rgba(160, 120, 255, .25);

  display: flex;
  flex-direction: column;

  transition: transform .25s ease, box-shadow .25s ease;
}

.projects-grid .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 18px rgba(160, 120, 255, .55);
}

/* TEXTO */
.projects-grid .card h3 {
  margin: 0 0 10px;
  color: #fff;
}

.projects-grid .card p {
  font-size: 14px;
  line-height: 1.6;
  color: #d1d5db;
}

/* LISTA */
.project-features {
  margin: 12px 0;
  padding-left: 18px;
  font-size: 14px;
  color: #cbd5f5;
}

/* STACK */
.projects-grid .card small {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
}

/* BOTÃƒO */
.project-button {
  margin-top: auto;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;
  width: fit-content;

  font-size: 13px;
  font-weight: 600;
  text-decoration: none;

  border-radius: 6px;
  background-color: rgba(36, 41, 47, .9);
  color: #fff;

  transition: background .25s ease, box-shadow .25s ease;
}

.project-button:hover {
  background-color: #444c56;
  box-shadow: 0 0 10px rgba(160, 120, 255, .6);
}

/* ======================================================
   CONTATO
====================================================== */
#contato {
  padding: 1rem;
}

.contact-layout {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.contact-profile {
  flex-shrink: 0;
}

.profile-glass {
  width: 180px;
  height: 180px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;

  border: 1px solid rgba(160, 120, 255, .65);
  box-shadow: 0 0 8px rgba(160, 120, 255, .45);
  transition: transform .3s ease, box-shadow .3s ease;
}

.profile-glass img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.profile-glass:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(160, 120, 255, .85);
}

.contact-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

.contact-icons img {
  width: 70px;
  height: 70px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(90, 0, 255, .08);
  border: 1px solid rgba(160, 120, 255, .65);
  box-shadow: 0 0 8px rgba(160, 120, 255, .45);
  transition: all .25s ease;
}

.contact-icons img:hover {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(160, 120, 255, .85);
}

.contact-phone {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.phone-number {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  margin-top: 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: .12em;
  color: #a78bfa;
  opacity: 0;
  transition: all .25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.contact-phone:hover .phone-number {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.contact-whatsapp img {
  background: rgba(90, 0, 255, .08);
  border: 1px solid rgba(160, 120, 255, .65);
  box-shadow: 0 0 8px rgba(160, 120, 255, .45);
}

.contact-whatsapp:hover img {
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(160, 120, 255, .85);
}

/* ======================================================
   RESPONSIVIDADE
====================================================== */

@media (max-width: 1024px) {

  .header {
    padding: 20px 24px;
  }

  .header h1 {
    font-size: 30px;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .donut {
    --size: 100px;
  }

  .profile-glass {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 768px) {

  /* =========================
     SCROLL (SÓ MOBILE)
  ========================= */

  html, body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  main {
    height: auto;
  }

  /* =========================
     HEADER + MENU
  ========================= */

  .menu {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-mobile,
  .menu-overlay {
    display: block;
  }

  .header {
    padding: 16px 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  /* =========================
     SECTIONS
  ========================= */

  .section {
    min-height: auto;
    padding: 48px 0;
  }

  .section-content {
    padding: 24px 16px;
  }

  .section h2 {
    font-size: 1.4rem;
  }

  /* =========================
     SKILLS
  ========================= */

  #skills {
    gap: 64px;
  }

  .skills-icons {
    gap: 1.2rem;
  }

  .skill-item img {
    width: 52px;
    backface-visibility: hidden;
  }

  .skill-item span {
    font-size: 11px;
    opacity: 1;
    transform: none;
  }

  .skills-runner {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
  }

  .skills-runner img {
    height: 48px;
  }

  .stats-card {
    margin-top: 48px;
    padding: 16px;
    transform: none;
  }

  .skill-item:hover img {
    transform: none;
    filter: none;
  }

  /* =========================
     CONTATO
  ========================= */

  .contact-layout {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
  }

  .profile-glass {
    width: 140px;
    height: 140px;
  }

  .contact-icons {
    gap: 20px;
    justify-content: center;
  }

  .contact-icons img {
    width: 56px;
    height: 56px;
    padding: 10px;
  }

  .phone-number {
    position: static;
    opacity: 1;
    transform: none;
    margin-top: 6px;
    font-size: 11px;
  }
}

