:root {
  --bg-color: #0a0f1a;
  --bg-color-alt: #111b2d;
  --bg-color-dark: #000814;
  --text-color: #fff;
  --accent-color: #00ffff;
  --tag-bg: #00bfff;
  --border-avatar: #003366;
  --transition: 0.3s ease;
}

body.dark-mode {
  --bg-color: #000814;
  --bg-color-alt: #0a1a2f;
  --bg-color-dark: #000;
  --text-color: #eee;
  --accent-color: #00e0ff;
  --tag-bg: #007acc;
  --border-avatar: #002244;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* BODY */
body {
  font-family: "Segoe UI", sans-serif;
  background: radial-gradient(
    circle at top left,
    var(--bg-color),
    var(--bg-color-alt),
    var(--bg-color-dark)
  );
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.navbar .brand {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--accent-color);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.navbar ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background var(--transition);
}

.navbar ul li a:hover {
  background: var(--accent-color);
  color: black;
}

/* MENU HAMBÚRGUER */
.hamburger {
  display: none;
  font-size: 1.8rem;
  color: var(--text-color);
  cursor: pointer;
  z-index: 1100;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color-alt);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar ul li a {
    text-align: center;
    width: 100%;
    display: block;
    padding: 10px 0;
  }

  .navbar {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ÍCONE DEV */
.dev-icon {
  width: 34px;
  height: 34px;
  vertical-align: middle;
  margin-right: 8px;
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  background: linear-gradient(
    135deg,
    var(--bg-color-alt),
    var(--bg-color-dark)
  );
  border-radius: 20px;
}

/* HERO CONTENT */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* AVATAR */
.avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border-avatar);
  box-shadow: 0 0 30px var(--border-avatar);
  margin-bottom: 1.5rem;
  background: #444; /* fallback visual se imagem não carregar */
}

/* INTRO / TYPING */
.intro h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.intro h2 {
  font-size: 2.5rem;
  margin: 0.5rem 0;
}

.typing {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 3px solid var(--accent-color);
  box-sizing: content-box;
  animation: typing 2.4s steps(30, end) forwards, blink 0.7s step-end infinite;
  animation-play-state: paused;
}

.revealed .typing,
.hero.revealed .typing {
  animation-play-state: running;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* HIGHLIGHT */
.highlight {
  background: linear-gradient(to right, var(--accent-color), #3399ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* TAG */
.tag {
  background-color: var(--tag-bg);
  padding: 6px 16px;
  border-radius: 999px;
  margin-top: 1rem;
  color: #000;
  font-weight: bold;
  font-size: 0.9rem;
}

/* REDES SOCIAIS */
.social-icons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icons a {
  color: var(--text-color);
  font-size: 1.4rem;
  border: 1px solid var(--text-color);
  border-radius: 50%;
  padding: 10px;
  transition: transform var(--transition), color var(--transition),
    border-color var(--transition);
}

.social-icons a:hover {
  transform: scale(1.15);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* SOBRE */
.about {
  margin: 4rem 0;
  text-align: center;
}
.about p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.1rem;
}

/* PROJETOS */
.repos {
  margin-top: 4rem;
}
.repos h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.repo-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition);
}

.repo-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.repo-card h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}
.repo-card a {
  color: var(--accent-color);
  text-decoration: none;
}
.repo-card a::after {
  content: " ↗";
}

/* BOTÕES */
.toggle-mode {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent-color);
  color: black;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
  transition: background var(--transition), transform 0.2s ease;
}

#backToTop {
  bottom: 80px;
  display: none;
}

/* REVEAL ANIMATION */
section,
footer,
.hero {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: center;
  }

  .navbar .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.8rem;
  }

  .hero {
    flex-direction: column;
    padding: 2rem 1rem;
  }

  .intro h1 {
    font-size: 1.5rem;
  }
  .intro h2 {
    font-size: 1.8rem;
  }

  .avatar img {
    width: 120px;
    height: 120px;
  }
  .repo-list {
    grid-template-columns: 1fr;
  }

  .whatsapp-float img {
    width: 40px;
    height: 40px;
  }
}

/* Botão flutuante WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 2000;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.whatsapp-float img {
  width: 30px;
  height: 30px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-text {
  background: #25d366;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  margin-left: 10px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

/* Footer*/

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}

/* teCnologia */


.tech {
  margin: 4rem 0;
  text-align: center;
}

.tech h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.tech-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--transition);
}

.tech-item img {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
}

.tech-item span {
  font-size: 1rem;
  color: var(--text-color);
}

.tech-item:hover {
  transform: scale(1.1);
}
