/* ========= RESET ========= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========= VARIÁVEIS ========= */
:root {
  --bg-1: #0b1220;
  --bg-2: #0a0a0f;
  --accent: #3b82f6;
  --muted: #94a3b8;
  --card: #0f172a;
  --glass: rgba(255,255,255,0.04);
}

/* ========= BASE ========= */
body {
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  color: #e6eef8;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* ========= HEADER ========= */
header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.brand-role {
  font-size: 12px;
  color: var(--muted);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--muted);
  font-weight: 600;
  transition: 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.cta {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent), #2563eb);
  color: white;
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
}

/* ========= HERO ========= */
.hero {
  min-height: 60vh;
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
}

.hero-left h1 {
  font-size: 40px;
  line-height: 1.1;
}

.accent {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  margin-top: 12px;
}

.skills {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 12px;
  background: var(--glass);
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,0.1);
  color: #dbeafe;
  font-weight: 700;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.card-cta {
  background: var(--card);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.meta {
  color: var(--muted);
}

.numbers {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.number {
  font-size: 20px;
  font-weight: 800;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

/* ========= SEÇÕES ========= */
section h2 {
  text-align: center;
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 20px;
}

.sobre-box {
  background: var(--glass);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.cards {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: var(--card);
  padding: 18px;
  border-radius: 12px;
  min-width: 220px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
}

/* ========= PROJETOS ========= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.project {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  transition: 0.3s;
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.4);
}

.project img {
  height: 200px;
  object-fit: cover;
}

.project h3 {
  padding: 16px 16px 6px;
  font-size: 18px;
  font-weight: 800;
}

.project p {
  padding: 0 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: justify;
  flex: 1;
}

.project .links {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.project .link {
  width: 100%;
  max-width: 220px;
  text-align: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: white;
  font-weight: 800;
  transition: 0.3s;
}

.project .link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(59,130,246,0.5);
}

/* ========= CONTATO ========= */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
}

form,
.social-box {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #071029;
  color: white;
  margin-bottom: 12px;
}

button[type=submit] {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), #2563eb);
  color: white;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.socials a {
  padding: 10px;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}

/* ========= FOOTER ========= */
footer {
  text-align: center;
  color: var(--muted);
  padding: 20px 0;
}

/* ========= RESPONSIVIDADE ========= */

/* Tablets */
@media (max-width: 1024px) {
  .hero-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .hero-left,
  .hero-buttons,
  .skills {
    text-align: center;
    justify-content: center;
  }

  .card-cta,
  .social-box {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Celulares */
@media (max-width: 768px) {

  .nav {
    flex-direction: column;
    gap: 15px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cta {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-left h1 {
    font-size: 30px;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 100%;
    max-width: 400px;
  }
}

/* Celulares pequenos */
@media (max-width: 480px) {

  .hero-left h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .project img {
    height: 170px;
  }

  .project p {
    text-align: left;
  }
}

/* ========= ANIMAÇÃO ========= */

.animate-in {
  animation: slideFadeIn 0.8s ease forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CORREÇÃO DE ALINHAMENTO MOBILE ===== */
@media (max-width: 768px) {

  /* Centraliza textos gerais das seções */
  #sobre,
  #servicos,
  #projetos,
  #contato {
    text-align: center;
  }

  /* Sobre */
  .sobre-box {
    text-align: justify;
  }

  /* Hero */
  .hero-left {
    text-align: center;
  }

  /* Projetos */
  .project {
    text-align: center;
  }

  .project p {
    text-align: justify;
  }

  /* Redes */
  .social-box {
    text-align: center;
  }

  .vertical-socials {
    align-items: center;
  }

  .vertical-socials a {
    max-width: 250px;
  }

}

/* ===== ÍCONES DAS REDES ===== */
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.3s ease;
}

.socials a i {
  font-size: 18px;
}

/* Cores no hover */
.socials a:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.socials a:hover .fa-whatsapp {
  color: #25D366;
}

.socials a:hover .fa-instagram {
  color: #E4405F;
}

.socials a:hover .fa-linkedin {
  color: #0A66C2;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: 0.3s ease;
}

.socials svg {
  width: 18px;
  height: 18px;
  transition: 0.3s;
}

.socials a:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.socials a:hover svg {
  color: var(--accent);
}

/* ========= AJUSTE REAL DO HEADER ========= */

/* Altura padrão (desktop) */
section {
  scroll-margin-top: 110px;
}

/* Tablet */
@media (max-width: 1024px) {
  section {
    scroll-margin-top: 140px;
  }
}

/* Celular */
@media (max-width: 768px) {
  section {
    scroll-margin-top: 200px; /* altura maior pois o header vira coluna */
  }
}

/* Celulares pequenos */
@media (max-width: 480px) {
  section {
    scroll-margin-top: 220px;
  }
}

/* ===== CORREÇÃO DEFINITIVA DO HEADER MOBILE ===== */
@media (max-width: 768px) {

  header {
    background: #0a0a0f; /* remove transparência */
    backdrop-filter: none; /* remove blur */
  }

}

/* ===== HEADER ANIMADO (ESCONDE AO ROLAR) ===== */

header {
  transition: transform 0.4s ease;
}

header.hide {
  transform: translateY(-100%);
}