/* Reset e Estilos Gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

[data-theme="dark"] {
  color: #e0e0e0;
  background-color: #1a1a1a;
}

/* Melhorias para Ícones no Modo Escuro */
.tech-badge i {
  transition: all 0.3s ease;
}

/* Ícones Font Awesome */
[data-theme="dark"] .tech-badge i.fab,
[data-theme="dark"] .tech-badge i.fas {
  color: #e2e8f0;
}

/* Ícones Devicon - mantém cores originais com melhor contraste */
[data-theme="dark"] .tech-badge i[class^="devicon-"] {
  filter: brightness(1.2) saturate(1.1);
}

/* Ícones coloridos (com classe colored) */
[data-theme="dark"] .tech-badge i[class^="devicon-"].colored {
  opacity: 0.9;
  filter: brightness(1.1);
}

/* Ícones de contato */
[data-theme="dark"] .contact-icon i {
  color: #e2e8f0;
}

/* Ícones no footer */
[data-theme="dark"] .back-to-top i {
  color: #e2e8f0;
}

/* Acessibilidade */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  padding: 10px;
  background: #fff;
  color: #000;
  z-index: 1000;
}

.skip-link:focus {
  top: 10px;
  left: 10px;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  z-index: 1000;
}

[data-theme="dark"] .main-header {
  background: #2a2a2a;
}

.main-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
}

.logo-link img {
  display: block;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 10px;
}

[data-theme="dark"] .nav-link {
  color: #e0e0e0;
}

.nav-link:hover {
  color: #007bff;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #333;
  visibility: visible;
  opacity: 1;
}

[data-theme="dark"] .theme-toggle {
  color: #e0e0e0;
}

/* Hero Section */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  background: linear-gradient(135deg, #007bff, #00c4b4);
  text-align: center;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .hero-section {
  background: #0f172a;
}

.hero-content {
  padding: 20px;
}

.hero-content h1 {
  font-size: 2.5rem;
  color: #fff;
}

.hero-content .highlight {
  color: #ffd700;
}

.typing-text {
  font-size: 1.5rem;
  color: #fff;
  min-height: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 10px 20px;
  background: #ffd700;
  color: #000;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  margin-top: 20px;
}

.cta-button:hover {
  background: #e6c200;
}

/* About Section */
.about-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  opacity: 1;
  visibility: visible;
}

/* Tech Stack Section */
.tech-stack-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  opacity: 1;
  visibility: visible;
}

/* Contact Section */
.contact-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  text-align: center;
}

.about-container {
  display: flex;
  gap: 20px;
}

.about-image img {
  border-radius: 50%;
  max-width: 100%;
}

.about-content {
  flex: 1;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
}

[data-theme="dark"] .section-subtitle {
  color: #aaa;
}

.tech-stack-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.tech-category {
  flex: 1;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 10px;
}

.tech-badge {
  font-size: 2rem;
  text-align: center;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  position: relative;
}

[data-theme="dark"] .tech-badge {
  background: #2a2a2a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.tech-badge:hover {
  transform: scale(1.1);
}

.tech-badge[aria-label]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
  white-space: nowrap;
}

[data-theme="dark"] .tech-badge[aria-label]::after {
  background: #444;
}

.tech-badge:hover::after {
  display: block;
}

.contact-icons-container {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-icon {
  font-size: 2rem;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

[data-theme="dark"] .contact-icon {
  color: #e0e0e0;
}

.contact-icon:hover {
  color: #007bff;
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 20px;
  background: #fff;
}

[data-theme="dark"] .main-footer {
  background: #2a2a2a;
}

.back-to-top {
  display: inline-block;
  margin-top: 10px;
  color: #333;
}

[data-theme="dark"] .back-to-top {
  color: #e0e0e0;
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Particles.js */
#particles-js canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Media Queries */
@media (max-width: 768px) {
  .header-container {
    padding: 10px;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%);
    z-index: 999;
  }

  .main-nav.open {
    display: block;
    transform: translateX(0);
  }

  [data-theme="dark"] .main-nav {
    background: #2a2a2a;
  }

  .nav-list {
    flex-direction: column;
    padding: 20px;
    align-items: center;
  }

  .nav-link {
    padding: 15px;
    font-size: 1.2rem;
  }

  .theme-toggle {
    padding: 15px;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .typing-text {
    font-size: 1.2rem;
  }

  .about-container {
    flex-direction: column;
    align-items: center;
  }

  .about-image img {
    max-width: 200px;
  }

  .tech-stack-container {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .header-container {
    padding: 10px 20px;
  }

  .nav-list {
    gap: 15px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .about-container {
    flex-direction: row;
    gap: 15px;
  }

  .tech-stack-container {
    flex-direction: row;
    gap: 15px;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }
}

@media (min-width: 1025px) {
  .mobile-menu-toggle {
    display: none;
  }

  .main-nav {
    display: block;
    transform: none;
  }
}