* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f9fafb;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.dark header {
  background: #020617;
}

.logo {
  font-weight: 700;
  color: #2563eb;
  font-size: 1.6rem;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin: 0 14px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: "";
  width: 0;
  height: 2px;
  background: #2563eb;
  position: absolute;
  bottom: -4px;
  left: 0;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle div {
  width: 25px;
  height: 3px;
  background: currentColor;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: 20px;
}

#theme-toggle i {
  color: #1f2937; /* tema claro */
  transition: color 0.3s ease, transform 0.3s ease;
}

body.dark #theme-toggle i {
  color: #ffffff; /* lua/sol branco no dark */
}

#theme-toggle:hover i {
  transform: rotate(15deg) scale(1.1);
}

.home {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.home-img img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #2563eb;
}

.home-content {
  max-width: 520px;
}

.home-content h1 {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

.home-content h1 span {
  color: #2563eb;
}

.home-content h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 18px;
  color: #4b5563;
}

body.dark .home-content h3 {
  color: #cbd5f5;
}

.home-content p {
  font-size: 1.05rem;
  margin-bottom: 25px;
  color: #6b7280;
}

body.dark .home-content p {
  color: #d1d5db;
}

.social-icons a {
  margin-right: 18px;
  font-size: 1.6rem;
  color: #6b7280;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #2563eb;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 60px;
}

.skills {
  padding: 80px 20px;
}

.skills-container {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 40px;
}

.skill-box {
  background: rgba(37, 99, 235, 0.1);
  padding: 30px 20px;
  border-radius: 14px;
  text-align: center;
  transition: 0.35s ease;
}

.skill-box i {
  font-size: 2.4rem;
  color: #2563eb;
  margin-bottom: 16px;
  display: block;
}

.skill-box span {
  font-weight: 500;
}

.skill-box:hover {
  transform: translateY(-8px) scale(1.03);
  background: #2563eb;
  color: #ffffff;
}

.skill-box:hover i {
  color: #ffffff;
}

body.dark .skill-box {
  background: rgba(99, 102, 241, 0.18);
}

body.dark .skill-box:hover {
  background: #6366f1;
}

.projects {
  padding: 80px 20px;
}

.projects-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
}

.project-box {
  background: rgba(37, 99, 235, 0.08);
  padding: 28px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  transition: 0.4s ease;
}

.project-box h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.project-box p {
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.badges {
  margin-bottom: 18px;
}

.badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  margin-right: 6px;
}

.project-box a.btn {
  margin-top: auto;
  background: #020617;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
}

.project-box:hover {
  transform: translateY(-10px);
  background: #2563eb;
  color: #ffffff;
}

.project-box:hover a.btn {
  background: #ffffff;
  color: #2563eb;
}

.contact {
  padding: 80px 20px;
}

.contact-info {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-info a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(37, 99, 235, 0.08);
  transition: 0.35s ease;
}

.contact-info a i {
  font-size: 1.5rem;
  color: #2563eb;
}

.contact-info a:hover {
  transform: translateY(-6px);
  background: #2563eb;
  color: #ffffff;
}

.contact-info a:hover i {
  color: #ffffff;
}

body.dark .contact-info a {
  background: rgba(99, 102, 241, 0.25);
}

@media (max-width: 900px) {
  .home {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 65px;
    right: 20px;
    background: #ffffff;
    flex-direction: column;
    padding: 12px;
    border-radius: 10px;
  }

  body.dark nav {
    background: #020617;
  }

  nav.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }
}
