/* ===== VARIÁVEIS CSS ===== */
:root {
  /* Cores principais */
  --primary-color: #6f42c1;
  --primary-light: #9f79ee;
  --primary-dark: #5a2d91;
  --secondary-color: #bb86fc;
  --accent-color: #e0b3ff;
  
  /* Cores de fundo */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-card: #333333;
  --bg-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  
  /* Cores de texto */
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(159, 121, 238, 0.3);
  
  /* Transições */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Espaçamentos responsivos */
  --spacing-xs: clamp(0.25rem, 2vw, 0.5rem);
  --spacing-sm: clamp(0.5rem, 3vw, 1rem);
  --spacing-md: clamp(1rem, 4vw, 2rem);
  --spacing-lg: clamp(1.5rem, 5vw, 3rem);
  --spacing-xl: clamp(2rem, 6vw, 4rem);
}

/* ===== LIGHT MODE ===== */
:root[data-theme="light"] {
  /* Cores principais - Roxo mais vibrante e escuro para contraste */
  --primary-color: #5d3a8a;
  --primary-light: #7c3aed;
  --primary-dark: #4c2a6b;
  --secondary-color: #6d28d9;
  --accent-color: #8b5cf6;
  
  /* Cores de fundo - Branco puro e cinza claro */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-card: #f3f4f6;
  --bg-gradient: linear-gradient(135deg, #5d3a8a, #6d28d9);
  
  /* Cores de texto - Preto/Cinza escuro para máximo contraste */
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  
  /* Sombras - Mais suaves e sutis */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(93, 58, 138, 0.3);
}

/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Força todos os elementos a respeitarem a largura da viewport */
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Previne zoom horizontal em iOS */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  /* Força largura máxima */
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  /* Previne scroll horizontal */
  max-width: 100vw;
  position: relative;
  width: 100%;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Força todos os elementos a respeitarem a viewport */
*, *::before, *::after {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Containers específicos */
.container, .container-fluid {
  max-width: 100vw;
  overflow-x: hidden;
  padding-left: var(--spacing-sm);
  padding-right: var(--spacing-sm);
}

/* Força elementos do Bootstrap a respeitarem a viewport */
.row {
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-x: hidden;
}

.col, .col-*, [class*="col-"] {
  max-width: 100%;
  padding-left: var(--spacing-xs);
  padding-right: var(--spacing-xs);
  overflow-x: hidden;
}

/* ===== TIPOGRAFIA RESPONSIVA ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

/* ===== EFEITOS DE BRILHO ===== */
.glow {
  color: var(--accent-color);
  text-shadow: 
    0 0 px var(--primary-light),
    0 0 20px var(--secondary-color),
    0 0 30px var(--secondary-color);
}

.text-gradient {
  background: var(--bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVEGAÇÃO OTIMIZADA ===== */
.navbar {
  padding: var(--spacing-sm) 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  /* Garante que não vaze */
  width: 100%;
  max-width: 100vw;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--bg-gradient);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(20deg);
  box-shadow: 0 0 30px rgba(111, 66, 193, 0.5);
}

.theme-toggle:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .theme-toggle {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}

.navbar.scrolled {
  background-color: rgba(47, 45, 45, 0.95) !important;
  box-shadow: var(--shadow-md);
}

:root[data-theme="light"] .navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e5e7eb;
}

/* ===== LIGHT MODE - AJUSTES DE CONTRASTE ===== */
:root[data-theme="light"] .bg-dark {
  background-color: #f9fafb !important;
}

:root[data-theme="light"] .bg-roxo {
  background: linear-gradient(135deg, #5d3a8a, #6d28d9) !important;
}

:root[data-theme="light"] .text-white {
  color: #111827 !important;
}

:root[data-theme="light"] .timeline::before {
  background: linear-gradient(180deg, #5d3a8a, #6d28d9);
}

:root[data-theme="light"] .timeline-marker {
  background: #6d28d9;
  border-color: #f9fafb;
}

:root[data-theme="light"] .timeline-content {
  background: #f3f4f6;
  box-shadow: 0 2px 8px rgba(93, 58, 138, 0.1);
}

:root[data-theme="light"] .timeline-content h4 {
  color: #5d3a8a;
}

:root[data-theme="light"] .skill-bar {
  background-color: #e5e7eb;
}

:root[data-theme="light"] .skill-progress {
  background: linear-gradient(90deg, #5d3a8a, #6d28d9);
}

:root[data-theme="light"] .project-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

:root[data-theme="light"] .project-card:hover {
  box-shadow: 0 10px 25px rgba(93, 58, 138, 0.15);
}

:root[data-theme="light"] .form-control {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

:root[data-theme="light"] .form-control:focus {
  background-color: #ffffff;
  border-color: #6d28d9;
  color: #111827;
  box-shadow: 0 0 0 0.2rem rgba(109, 40, 217, 0.25);
}

:root[data-theme="light"] .form-label {
  color: #111827;
}

:root[data-theme="light"] .glow {
  color: #5d3a8a;
  text-shadow: none;
}

:root[data-theme="light"] .section-title {
  color: #111827;
}

:root[data-theme="light"] .hero-title {
  color: #111827;
}

.bg-roxo {
  background: var(--bg-gradient) !important;
}

.navbar-brand {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 700;
  transition: all var(--transition-normal);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  margin: 0 var(--spacing-xs);
  position: relative;
  transition: all var(--transition-normal);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--bg-gradient);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

:root[data-theme="light"] .nav-link {
  color: #111827 !important;
}

:root[data-theme="light"] .nav-link:hover {
  color: #5d3a8a !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== HERO SECTION RESPONSIVA ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh; /* Para mobile */
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  padding: var(--spacing-md);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.1;
}

.hero-title {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  word-break: break-word;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-description {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 100%;
  line-height: 1.6;
}

.hero-buttons {
  margin-top: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: flex-start;
}

.profile-img {
  width: clamp(200px, 40vw, 300px);
  height: clamp(200px, 40vw, 300px);
  object-fit: cover;
  border: 4px solid var(--secondary-color);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
  max-width: 90vw;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(159, 121, 238, 0.5);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: var(--secondary-color);
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

.floating-icon:nth-child(1) { top: 10%; right: 10%; }
.floating-icon:nth-child(2) { top: 60%; left: 10%; }
.floating-icon:nth-child(3) { bottom: 20%; right: 20%; }
.floating-icon:nth-child(4) { top: 30%; left: 80%; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  justify-content: flex-start;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  background: var(--bg-gradient);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: clamp(1rem, 3vw, 1.2rem);
  flex-shrink: 0;
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  color: white;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-down {
  display: inline-block;
  color: var(--secondary-color);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  animation: bounce 2s infinite;
  text-decoration: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===== BOTÕES RESPONSIVOS ===== */
.btn-brilhante {
  background: var(--bg-gradient);
  color: white;
  border: none;
  padding: clamp(10px, 3vw, 12px) clamp(20px, 5vw, 30px);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  white-space: nowrap;
}

.btn-brilhante::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-brilhante:hover::before {
  left: 100%;
}

.btn-brilhante:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(159, 121, 238, 0.4);
  color: white;
}

.btn-outline-light {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  background: transparent;
  padding: clamp(8px, 2.5vw, 10px) clamp(18px, 4.5vw, 28px);
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition-normal);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  white-space: nowrap;
}

.btn-outline-light:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

/* ===== SEÇÕES RESPONSIVAS ===== */
section {
  padding: var(--spacing-xl) var(--spacing-sm);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: visible;
}

.bg-dark {
  background-color: var(--bg-secondary) !important;
}

/* ===== CONTAINER RESPONSIVO ===== */
.container {
  max-width: 100%;
  padding-left: var(--spacing-sm);
  padding-right: var(--spacing-sm);
  overflow-x: hidden;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ===== SOBRE RESPONSIVO ===== */
.about-content {
  padding: var(--spacing-md);
}

.about-stats {
  margin-top: var(--spacing-md);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-sm);
}

.stat-number {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0;
}

.stat-label {
  color: var(--text-secondary);
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  margin-bottom: 0;
}

.timeline {
  position: relative;
  padding-left: clamp(20px, 5vw, 30px);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg-gradient);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.timeline-marker {
  position: absolute;
  left: clamp(-22px, -5vw, -17px);
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--secondary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
}

.timeline-content {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.timeline-content h4 {
  color: var(--secondary-color);
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  margin-bottom: 5px;
}

.timeline-content h5 {
  margin-bottom: 10px;
  font-size: clamp(1rem, 3vw, 1.2rem);
}

/* ===== HABILIDADES RESPONSIVAS ===== */
.skill-item {
  margin-bottom: var(--spacing-md);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.skill-percentage {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.skill-bar {
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.skill-progress {
  height: 100%;
  background: var(--bg-gradient);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* Cores para ícones */
.text-orange { color: #ff6b35; }
.text-blue { color: #1572b6; }
.text-yellow { color: #f7df1e; }
.text-purple { color: #7952b3; }
.text-green { color: #4caf50; }
.text-cyan { color: #00bcd4; }
.text-red { color: #f44336; }

/* ===== PROJETOS RESPONSIVOS ===== */
#projects-container {
  overflow-x: hidden;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#projects-container .project-item {
  overflow-x: hidden;
}

/* Remove scrollbars indesejadas */
#projetos::-webkit-scrollbar {
  display: none;
}

section::-webkit-scrollbar {
  display: none;
}

.container::-webkit-scrollbar {
  display: none;
}

.row::-webkit-scrollbar {
  display: none;
}

/* ===== PROJETOS RESPONSIVOS ===== */
.project-filters {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: clamp(6px, 2vw, 8px) clamp(15px, 4vw, 20px);
  border-radius: 25px;
  font-weight: 500;
  transition: all var(--transition-normal);
  cursor: pointer;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-color);
  color: white;
  margin-bottom: var(--spacing-md);
}

.project-card {
  background: var(--bg-card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
}

.project-image {
  position: relative;
  overflow: hidden;
  height: clamp(150px, 30vw, 200px);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-normal);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: var(--spacing-sm);
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  background: var(--bg-gradient);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.project-link:hover {
  transform: scale(1.1);
  color: white;
}

.project-content {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-tag {
  background: var(--bg-gradient);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: clamp(0.7rem, 2vw, 0.8rem);
  font-weight: 500;
  white-space: nowrap;
}

/* Projetos não responsivos */
#projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.project-item {
  width: 300px;
  margin-bottom: 20px;
}

/* ===== CONTATO RESPONSIVO ===== */
.contact-info {
  padding: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.contact-icon {
  width: clamp(50px, 10vw, 60px);
  height: clamp(50px, 10vw, 60px);
  background: var(--bg-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  color: white;
  flex-shrink: 0;
}

.contact-details h5 {
  margin-bottom: 5px;
  color: var(--text-primary);
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.contact-details p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.social-links-contact {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.social-link-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  background: var(--bg-card);
  color: var(--secondary-color);
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.social-link-contact:hover {
  background: var(--bg-gradient);
  color: white;
  transform: translateY(-5px);
}

.contact-form {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
}

.form-control {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  color: var(--text-primary);
  padding: clamp(10px, 3vw, 12px) clamp(12px, 3vw, 15px);
  border-radius: 10px;
  transition: all var(--transition-normal);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  width: 100%;
}

.form-control:focus {
  background: var(--bg-secondary);
  border-color: var(--secondary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(187, 134, 252, 0.25);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ===== FOOTER RESPONSIVO ===== */
footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md);
}

/* ===== BACK TO TOP RESPONSIVO ===== */
.back-to-top {
  position: fixed;
  bottom: clamp(100px, 15vw, 120px);
  right: clamp(20px, 5vw, 30px);
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  background: var(--bg-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: clamp(1rem, 3vw, 1.2rem);
  cursor: pointer;
  transition: all var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

/* ===== MEDIA QUERIES ESPECÍFICAS ===== */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero {
    padding: var(--spacing-sm);
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .floating-icon {
    display: none; /* Remove ícones flutuantes em telas muito pequenas */
  }
  
  .timeline {
    padding-left: 15px;
  }
  
  .timeline-marker {
    left: -12px;
  }
  
  .project-filters {
    gap: 8px;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-form {
    padding: var(--spacing-md);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-buttons {
    justify-content: flex-start;
  }
  
  .floating-icon {
    font-size: 1.5rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .profile-img {
    width: 280px;
    height: 280px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .profile-img {
    width: 300px;
    height: 300px;
  }
  
  .floating-icon {
    font-size: 2rem;
  }
}

/* Landscape orientation específico para mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: var(--spacing-sm);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .profile-img {
    width: 150px;
    height: 150px;
  }
  
  .floating-icon {
    display: none;
  }
}

/* ===== ANIMAÇÕES PERSONALIZADAS ===== */
.glow-on-hover {
  transition: all var(--transition-normal);
}

.glow-on-hover:hover {
  box-shadow: 
    0 0 15px rgba(187, 134, 252, 0.4),
    0 0 30px rgba(159, 121, 238, 0.3);
  transform: translateY(-5px);
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--secondary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== OTIMIZAÇÕES ESPECÍFICAS PARA MOBILE ===== */

/* Previne zoom em inputs no iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input[type="text"],
  input[type="password"],
  input[type="datetime"],
  input[type="datetime-local"],
  input[type="date"],
  input[type="month"],
  input[type="time"],
  input[type="week"],
  input[type="number"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="tel"],
  input[type="color"] {
    font-size: 16px;
  }
}

/* Melhora performance em mobile */
.project-card,
.social-link,
.btn-brilhante,
.btn-outline-light {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Otimiza scroll em mobile */
.hero,
section {
  -webkit-overflow-scrolling: touch;
}

/* Remove outline em mobile */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: none;
}

/* Melhora tap targets */
.nav-link,
.social-link,
.project-link,
.filter-btn,
.btn-brilhante,
.btn-outline-light {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}



/* ===== CORREÇÕES FINAIS PARA RESPONSIVIDADE MÓVEL ===== */

/* Força todos os elementos Bootstrap a respeitarem a viewport */
.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
  max-width: 100vw !important;
  width: 100% !important;
  padding-left: var(--spacing-sm) !important;
  padding-right: var(--spacing-sm) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Força elementos específicos que podem causar overflow */
.navbar, .hero, section, .row, .col, [class*="col-"] {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Força imagens e mídia a respeitarem a viewport */
img, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto !important;
}

/* Força elementos posicionados a respeitarem a viewport */
.floating-elements, .floating-icon {
  max-width: 100vw !important;
  overflow: hidden !important;
}

/* Força elementos de texto a quebrar linha */
h1, h2, h3, h4, h5, h6, p, span, div {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  hyphens: auto !important;
}

/* Força elementos flex a respeitarem a viewport */
.d-flex, .hero-buttons, .social-links, .project-links {
  max-width: 100% !important;
  flex-wrap: wrap !important;
}

/* Correção específica para mobile */
@media (max-width: 768px) {
  /* Força largura máxima em mobile */
  * {
    max-width: 100vw !important;
  }
  
  /* Remove margens negativas que podem causar overflow */
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Ajusta padding em mobile */
  .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  
  /* Força elementos hero a respeitarem mobile */
  .hero {
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-top: 80px !important;
  }
  
  /* Ajusta botões para mobile */
  .hero-buttons {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .btn-brilhante, .btn-outline-light {
    max-width: 100% !important;
    margin-bottom: 10px !important;
  }
}

/* Correção para telas muito pequenas */
@media (max-width: 400px) {
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .hero {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Força viewport em JavaScript também */
html {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  width: 100vw !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}



/* ===== PARALLAX EFFECTS ===== */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  will-change: transform;
}

.parallax-layer-1 {
  background: radial-gradient(circle at 20% 50%, rgba(159, 121, 238, 0.15) 0%, transparent 50%);
  transform: translateY(0px);
}

.parallax-layer-2 {
  background: radial-gradient(circle at 80% 80%, rgba(111, 66, 193, 0.1) 0%, transparent 50%);
  transform: translateY(0px);
}

.parallax-layer-3 {
  background: radial-gradient(circle at 50% 0%, rgba(187, 134, 252, 0.08) 0%, transparent 50%);
  transform: translateY(0px);
}

.parallax-content {
  position: relative;
  z-index: 1;
}

/* Parallax effect para a imagem de perfil */
.hero-image {
  transform: translateY(0px);
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Light mode parallax adjustments */
:root[data-theme="light"] .parallax-layer-1 {
  background: radial-gradient(circle at 20% 50%, rgba(93, 58, 138, 0.1) 0%, transparent 50%);
}

:root[data-theme="light"] .parallax-layer-2 {
  background: radial-gradient(circle at 80% 80%, rgba(109, 40, 217, 0.08) 0%, transparent 50%);
}

:root[data-theme="light"] .parallax-layer-3 {
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}
