* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* altura do nav */
}

body {
  background: #0f172a;
  color: #e2e8f0;
}

/* HEADER */
header {
  padding: 60px 20px;
  background: linear-gradient(135deg, #020617, #0f172a);
}

.hero {
  max-width: 1000px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-img img {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid #38bdf8;
}

.hero-text {
  text-align: left;
}

.hero-text h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
}

.hero-text p {
  color: #38bdf8;
  font-weight: 500;
}

.hero-text span {
  display: block;
  margin-top: 8px;
  color: #94a3b8;
}

.links a {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #38bdf8;
  border: 1px solid #38bdf8;
  transition: 0.3s;
}

.links a:hover {
  background: #38bdf8;
  color: #020617;
}

/* NAV */
nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  background: #020617;
  padding: 12px 60px;
  position: sticky; /* ← estava só relative, precisa de sticky */
  top: 0;
  z-index: 1000;
}

nav a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;

  padding: 8px 12px;
  border-radius: 20px;
  transition: 0.3s;

  flex: 0 0 auto;
}

nav a:hover {
  color: #7dd3fc;
}

nav a.active {
  color: #ffffff;
  background: #38bdf8;
}

/* CONTEÚDO */
.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
}

h2 {
  margin-bottom: 20px;
  border-left: 4px solid #38bdf8;
  padding-left: 10px;
}

/* CARDS */
.card {
  background: #020617;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid #1e293b;
  transition: 0.3s;
}

.card:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
}

.card span {
  display: block;
  color: #64748b;
  margin-bottom: 10px;
}

/* SKILLS */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span {
  background: #1e293b;
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #38bdf8;
  font-size: 0.9em;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background: #020617;
  color: #64748b;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero-img img {
    width: 160px;
    height: 160px;
  }

  nav {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

}

/* ANIMAÇÃO DE ENTRADA */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}