/* ========== VARIÁVEIS ========== */
:root {
  --dark: #0f0f0f;
  --primary: #6a0dad;
  --secondary: #4682b4;
  --light: #f1f1f1;
  --text-light: #ddd;
  --text-dark: #222;

  /* Mensagens */
  --success-bg: #d4edda;
  --success-text: #155724;
  --error-bg: #f8d7da;
  --error-text: #721c24;
  --info-bg: #cce5ff;
  --info-text: #004085;

  /* Adicionados */
  --background-alt: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.2);
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  --text: var(--text-light);
}

/* ========== RESET & GLOBAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--dark);
  color: var(--text-light);
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.light-mode {
  background-color: var(--light);
  color: var(--text-dark);
}

/* ========== HERO / HEADER ========== */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 3rem 1rem;
  text-align: center;
  position: relative;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 2rem;
  flex-wrap: wrap;
}

.top-bar h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.8rem;
  color: white;
}

#toggle-theme {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 0 5px var(--primary);
  transition: color 0.3s ease;
}

#toggle-theme:hover,
#toggle-theme:focus-visible {
  color: #ddd;
  outline: none;
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  color: white;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid white;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 0 10px var(--light);
}

.hero p {
  font-size: 1.25rem;
  font-weight: 500;
}

/* ========== NAV ========== */
nav {
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(5px);
  z-index: 100;
  padding: 1rem 0;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--light);
  outline: none;
}

/* ========== MAIN / SECTIONS ========== */
main {
  padding: 3rem 1.5rem;
  max-width: 1100px;
  margin: auto;
}

.section {
  margin-bottom: 4rem;
}

h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

#sobre {
  background: rgba(255, 255, 255, 0.02);
  padding: 3rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(106, 13, 173, 0.2);
}

/* ========== GRID DE HABILIDADES & PROJETOS ========== */
.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.skills-grid span {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  font-size: 1.1rem;
  text-align: center;
  transition: background 0.3s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.skills-grid span i {
  font-size: 2rem;
  color: var(--secondary);
}

.skills-grid span:hover,
.skills-grid span:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}

/* ========== PROJETOS COM SCROLL HORIZONTAL ========== */
.projects-scroll-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  overflow-x: auto;
  display: flex;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.projects-scroll-container .card {
  flex: 0 0 80%;
  scroll-snap-align: start;
  background: linear-gradient(to bottom right,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.1));
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2rem;
  text-align: left;
  box-shadow: 0 5px 15px rgba(70, 130, 180, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
  cursor: pointer;
}

.projects-scroll-container .card:hover,
.projects-scroll-container .card:focus-visible {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(70, 130, 180, 0.6);
  outline: none;
}

.projects-scroll-container h3 {
  margin-bottom: 0.8rem;
  color: var(--primary);
}

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 2rem;
  border-left: 3px solid var(--primary);
}

.timeline-item {
  padding: 1rem 2rem;
  position: relative;
  background: var(--background-alt);
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--light);
  box-shadow: 0 0 5px var(--primary);
}

.timeline-item h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

/* ========== FORMULÁRIO DE CONTATO ========== */
#contato {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#contato .contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

#contato form.contact-form {
  background: var(--background-alt);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

#contato .form-group {
  display: flex;
  flex-direction: column;
}

#contato label {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#contato input,
#contato textarea {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  resize: vertical;
}

#contato input:focus,
#contato textarea:focus {
  outline: 3px solid var(--primary);
  background-color: var(--light);
  color: var(--text-dark);
}

#contato button.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#contato button.btn-submit:hover,
#contato button.btn-submit:focus-visible {
  background: var(--secondary);
  outline: none;
}

/* Mensagem do form */
#form-message {
  margin-top: 1rem;
  font-weight: 600;
  position: relative;
  padding: 0.8rem 2rem 0.8rem 1rem;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#form-message i {
  font-size: 1.3rem;
}

/* Informações de contato */
#contato .contact-info {
  background: var(--background-alt);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: left;
}

#contato .contact-info p {
  margin-bottom: 1rem;
  font-weight: 500;
}

#contato .info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#contato .info-item i {
  font-size: 1.25rem;
  color: var(--primary);
}

#contato .info-item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

#contato .info-item a:hover,
#contato .info-item a:focus-visible {
  color: var(--primary);
  outline: none;
}

#contato .contact-info .social {
  justify-content: flex-start;
  margin-top: 1rem;
}

/* ========== ÍCONES SOCIAIS GERAIS ========== */
.social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.social a {
  color: var(--primary);
  transition: color 0.3s ease;
}

.social a:hover,
.social a:focus-visible {
  color: var(--secondary);
  outline: none;
}

/* ========== SPINNER ========== */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
  #contato .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .profile-photo {
    width: 110px;
    height: 110px;
  }
}
/* Cards escuros padronizados */
.dark-card {
  background: #1a1a1a;
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

/* Seção Currículo */
#curriculo h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.cv-card {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.cv-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cv-icon {
  font-size: 3rem;
  color: var(--primary);
}

.cv-info h3 {
  margin: 0;
  color: var(--light);
}

.cv-info p {
  margin: 0.25rem 0 0;
  color: var(--text-light);
}

/* Botão de download */
.btn-download {
  align-self: center;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-download:hover,
.btn-download:focus-visible {
  background: #4b0082; /* tom de roxo mais escuro */
  transform: translateY(-2px);
  outline: none;
}

/* Seção Contato */
#contato h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  color: var(--light);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  background: #262626;
  border: 1px solid var(--border);
  color: var(--text-light);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-submit:hover,
.btn-submit:focus-visible {
  background: #4b0082;
  outline: none;
}

.contact-info {
  padding-top: 0.5rem;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.info-item i {
  color: var(--primary);
}

.info-item a {
  color: var(--text-light);
  text-decoration: none;
}

.info-item a:hover {
  color: var(--primary);
}

.contact-info .social {
  justify-content: flex-start;
  margin-top: 1rem;
}

/* Responsivo */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}
