/* ========== Variáveis ==========
   Modo Claro e Escuro organizados no :root e body.dark-mode */
:root {
  --primary-color: #6c63ff;
  --secondary-color: #333;
  --light-color: #f9f9f9;
  --dark-color: #222;
  --background: #ffffff;
  --text: #333;
  --card-bg: #ffffff;
}

body.dark-mode {
  --background: #121212;
  --text: #f0f0f0;
  --card-bg: #222;
}

html {
  scroll-behavior: smooth;
}

/* ========== Reset e Globais ========== */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* ========== Header ========== */
header {
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cor scrollbar */

/* width */
::-webkit-scrollbar {
  width: 7px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #6c63ff;
  border-radius: 7px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #5951eb;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s;
}

.menu a:hover,
.menu li a.active {
  color: var(--primary-color) !important;
}

.menu li a.active {
  font-weight: 600;
  position: relative;
}

.menu li a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  animation: underline 0.3s ease;
}

@keyframes underline {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s;
}

.mobile-menu-icon {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== Hero Section ========== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12rem 2rem 5%;
  background-color: var(--background);
  min-height: 50vh;
  transition: background 0.3s;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content span {
  color: var(--primary-color);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-image img {
  border-radius: 50%;
  width: 300px;
  height: 300px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about {
  max-width: 800px;
  text-align: center;
}

/* ========== Botões ========== */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  will-change: transform;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

/* ========== Seções ========== */
section {
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

/* ========== Habilidades ========== */
.skills-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.skill-item {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, background 0.3s;
  text-align: center;
  width: 120px;
  will-change: transform;
}

.skill-item:hover {
  transform: translateY(-10px);
}

.skill-item i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* ========== Projetos ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.project-card h3 {
  padding: 1rem;
  margin: 0;
}

.project-card p {
  padding: 0 1rem 1rem;
  margin: 0;
}

.project-card button {
  margin: 0.3rem 1rem 1rem;
}

/* ========== Contato ========== */
form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input,
form textarea {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  background: var(--background);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

form textarea {
  min-height: 150px;
}

/* ========== Rodapé ========== */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--card-bg);
  margin-top: 3rem;
  transition: background 0.3s;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--text);
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--primary-color);
}

/* ========== Foco e Acessibilidade ========== */
button:focus {
  outline: 2px dashed var(--primary-color);
  outline-offset: 4px;
}

/* ========== Responsividade ========== */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .skills-grid {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .menu li a.active {
    background: rgba(108, 99, 255, 0.1);
    border-radius: 4px;
  }

  .menu.active {
    display: flex;
  }

  .mobile-menu-icon {
    display: block;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 10rem;
  }

  .hero-image {
    margin-top: 2rem;
  }
}
