* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden; 
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1e1e1e;
  color: #fff;
}

/* -------------------- NAVBAR -------------------- */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background: #333;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  padding-right: 40px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover {
  color: #f5c518;
}

.nav-links a.active {
  color: #f5c518;
  border-bottom: 2px solid #f5c518;
}

/* -------------------- CONTEÚDO -------------------- */
.home {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #666 50%, #000 50%);
  padding-top: 80px;
}

.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
}

.container > * {
  min-width: 0; /* importante para evitar estouro em flex */
}

.left {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.left h1 {
  font-size: 28px;
  font-family: 'Press Start 2P', monospace;
  margin-bottom: 1rem;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #fff;
  max-width: 100%;
  width: 0;
  animation:
    typing 3s steps(16, end) forwards,
    blink 0.7s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 16ch }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.left p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.btn {
  display: flex;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  text-decoration: none;
  width: 370px;
  border-radius: 25px;
  font-weight: bold;
  transition: 0.3s;
  align-items: center;
  justify-content: center;
  border: solid 1px #fff;
  margin: 0 auto;
}

.btn:hover {
  background: #f5c518;
  color: #000;
}

.right .avatar {
  width: 200px;
  height: 270px;
}

.avatar {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #fff;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

/* -------------------- RESPONSIVIDADE -------------------- */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .nav-links a {
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-block;
  }

  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
  }

  .right .avatar {
    width: 200px;
    height: 200px;
  }

  .logo {
    order: 0;
    padding-right: 0;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 10px;
    width: 100%;
  }

  .right .avatar {
    width: 200px;
    height: 200px;
  }

  .logo {
    order: 0;
    padding-right: 0;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 10px;
    gap: 15px;
    width: auto;
  }

  .right .avatar {
    width: 180px;
    height: 180px;
  }

  .logo {
    order: 0;
    padding-right: 0;
    text-align: center;
  }
}
