/* Light Theme (Padrão) */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #0891b2;
  --accent-color: #06b6d4;
  --text-dark: #0f172a;
  --text-light: #475569;
  --text-lighter: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --nav-bg: #ffffff;
  --card-bg: #ffffff;
  --footer-bg: #0f172a;
  --footer-text: rgba(255, 255, 255, 0.8);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-blue: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --skill-bg: #f8fafc;
  --job-bg: #f8fafc;
  --education-bg: #f8fafc;
  --course-bg: #f8fafc;
  --modal-bg: rgba(0, 0, 0, 0.95);
  --modal-close-bg: rgba(255, 255, 255, 0.95);
  --hero-pattern-opacity: 0.3;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #06b6d4;
  --accent-color: #0891b2;
  --text-dark: #f1f5f9;
  --text-light: #cbd5e1;
  --text-lighter: #94a3b8;
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --border-color: #334155;
  --nav-bg: #1e293b;
  --card-bg: #1e293b;
  --footer-bg: #020617;
  --footer-text: rgba(241, 245, 249, 0.8);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
    0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --gradient: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
  --gradient-blue: linear-gradient(135deg, #1e40af 0%, #0e7490 100%);
  --skill-bg: #334155;
  --job-bg: #334155;
  --education-bg: #334155;
  --course-bg: #334155;
  --modal-bg: rgba(0, 0, 0, 0.97);
  --modal-close-bg: rgba(241, 245, 249, 0.95);
  --hero-pattern-opacity: 0.2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header Principal */
.hero-header {
  background: var(--gradient-blue);
  color: white;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: var(--hero-pattern-opacity);
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease;
}

.hero-content .subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 30px;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-content .info-line {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 5px;
  animation: fadeInUp 0.8s ease 0.3s backwards;
}

.contact-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: #f8fafc;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Seções */
section {
  margin: 60px 0;
}

.section-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  animation: fadeIn 0.6s ease;
  transition: all 0.3s ease;
}

.section-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 36px;
  background: var(--gradient-blue);
  border-radius: 2px;
}

/* Perfil Profissional */
.profile-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  text-align: justify;
}

/* Habilidades */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.skill-category {
  background: var(--skill-bg);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.skill-category:hover {
  border-left-color: var(--secondary-color);
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.skill-category h4 {
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.skill-category p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Experiência */
.job-card {
  background: var(--job-bg);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 25px;
  border-left: 4px solid var(--secondary-color);
  transition: all 0.3s ease;
  position: relative;
}

.job-card::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0;
  width: 4px;
  height: 0;
  background: var(--primary-color);
  transition: height 0.3s ease;
}

.job-card:hover::before {
  height: 100%;
}

.job-card:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.job-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
}

.job-company {
  color: var(--primary-color);
  font-weight: 600;
}

.job-period {
  background: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.job-description {
  color: var(--text-light);
  line-height: 1.7;
}

.job-description ul {
  margin-left: 20px;
  margin-top: 10px;
}

.job-description li {
  margin-bottom: 8px;
  position: relative;
}

.job-description li::marker {
  color: var(--primary-color);
}

/* Formação */
.education-item {
  background: var(--education-bg);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent-color);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.education-degree {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.education-institution {
  color: var(--secondary-color);
  font-weight: 600;
}

.education-period {
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
}

.education-details {
  color: var(--text-light);
  margin-top: 10px;
  font-size: 0.95rem;
}

/* Cursos */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.course-item {
  background: var(--course-bg);
  padding: 15px 20px;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-item:hover {
  background: var(--card-bg);
  border-left-color: var(--secondary-color);
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.course-item::before {
  content: "✓";
  background: var(--primary-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  flex-shrink: 0;
}

.course-name {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Certificados */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.certificate-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.certificate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-blue);
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.certificate-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.certificate-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.certificate-type {
  background: var(--skill-bg);
  color: var(--text-light);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
}

.certificate-year {
  color: var(--text-lighter);
  font-size: 0.9rem;
  font-weight: 500;
}

.certificate-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.certificate-link:hover {
  color: var(--primary-dark);
  gap: 12px;
}

.certificate-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

/* Modal de Certificado */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-bg);
  animation: fadeIn 0.3s ease;
  overflow: hidden;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  width: 95%;
  height: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--modal-close-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  font-weight: 300;
  line-height: 1;
}

.modal-close:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.modal-close span {
  display: block;
  margin-top: -2px;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Botão de Tema (Theme Toggle) */
.theme-toggle {
  position: fixed;
  top: 80px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: inline;
}

/* Transição suave do tema */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.section-card,
.skill-category,
.job-card,
.education-item,
.course-item,
.certificate-card,
.nav-bar,
.footer,
.modal-close {
  transition: all 0.3s ease;
}

/* Responsividade */
.footer {
  background: var(--footer-bg);
  color: white;
  padding: 60px 20px 30px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* Navegação */
.nav-bar {
  background: var(--nav-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content .subtitle {
    font-size: 1.2rem;
  }

  .section-card {
    padding: 25px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .skills-grid,
  .courses-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
  }

  .job-header {
    flex-direction: column;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .nav-links {
    gap: 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-header {
    padding: 60px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .subtitle {
    font-size: 1rem;
  }

  .section-card {
    padding: 20px;
  }
}
