/* ========== VARIABLES ========== */
:root {
  --primary: #ff1a1a;
  --primary-glow: hsl(0, 100%, 65%);
  --background: #050505;
  --secondary: #0b0b0b;
  --text: #f5f5f5;
  --text-muted: #bdbdbd;
  --border: #1f1f1f;
  --surface: rgba(12, 12, 12, 0.78);
  --surface-strong: rgba(14, 14, 14, 0.92);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.55);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #ff1a1a 0%, #8b0000 100%);
  --gradient-card: linear-gradient(135deg, #161616 0%, #0a0a0a 100%);
  --gradient-hero: radial-gradient(circle at 20% 20%, rgba(255, 26, 26, 0.2), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255, 26, 26, 0.12), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(139, 0, 0, 0.18), transparent 50%);
  --gradient-ambient: linear-gradient(180deg, rgba(255, 26, 26, 0.06) 0%, transparent 35%, rgba(255, 26, 26, 0.04) 100%);

  /* Shadows */
  --shadow-glow: 0 0 30px rgba(255, 26, 26, 0.45);
  --shadow-glow-strong: 0 0 50px rgba(255, 26, 26, 0.7);
  --shadow-card: 0 12px 50px rgba(0, 0, 0, 0.55);

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255, 26, 26, 0.16), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255, 26, 26, 0.08), transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(139, 0, 0, 0.14), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, .section-title, .header-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.5px;
}

/* ========== UTILITIES ========== */
.text-gradient {
  background: linear-gradient(135deg, #ff1a1a 0%, #ff7a7a 50%, #ff1a1a 100%);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

.card-glass {
  backdrop-filter: blur(20px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.card-glass:hover {
  border-color: rgba(255, 0, 0, 0.3);
  box-shadow: 0 12px 48px rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* ========== ANIMATIONS ========== */
@keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); } 50% { box-shadow: 0 0 40px rgba(255, 0, 0, 0.6); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes scanLines { 0% { background-position: 0 0; } 100% { background-position: 0 140px; } }
@keyframes cursorBlink { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes panelSweep { 0% { transform: translateX(0); } 100% { transform: translateX(0); } }
@keyframes codeRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panelLeftIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes panelRightIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Scroll animations */
.animate-in { opacity: 0; animation: fadeInUp 0.8s ease forwards; }

/* ========== LANGUAGE TRANSITION ========== */
.language-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  background: rgba(5, 5, 5, 0.92);
  transition: opacity 0.35s ease;
}

.language-transition.active { opacity: 1; pointer-events: all; }

.transition-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(135deg, rgba(255, 26, 26, 0.18), rgba(10, 10, 10, 0.95));
  box-shadow: 0 0 40px rgba(255, 26, 26, 0.18);
  opacity: 0.85;
}

.transition-panel-left {
  left: 0;
  transform: translateX(-100%);
}

.transition-panel-right {
  right: 0;
  transform: translateX(100%);
}

.language-transition.active .transition-panel-left {
  animation: panelLeftIn 0.5s ease forwards;
}

.language-transition.active .transition-panel-right {
  animation: panelRightIn 0.5s ease forwards;
}

.transition-terminal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(540px, 80vw);
  padding: 1.5rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 26, 26, 0.35);
  background: rgba(10, 10, 10, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  font-family: 'Courier New', monospace;
  color: #f0f0f0;
  letter-spacing: 0.5px;
}

.transition-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(255, 26, 26, 0.8);
  margin-bottom: 0.75rem;
}

.transition-code {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #dcdcdc;
}

.transition-code span {
  opacity: 0;
  animation: codeRise 0.35s ease forwards;
}

.transition-code span strong {
  color: #ff4d4d;
  font-weight: 600;
}

.transition-cursor {
  width: 8px;
  height: 16px;
  margin-top: 0.6rem;
  background: #ff1a1a;
  animation: cursorBlink 0.8s steps(2) infinite;
}

/* ========== HEADER ========== */
.main-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
  backdrop-filter: blur(18px) saturate(160%);
  background: rgba(8, 8, 8, 0.76);
  border-bottom: 1px solid rgba(255, 26, 26, 0.2);
  padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  animation: fadeInUp 0.8s ease;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.main-header.scrolled {
  background: rgba(6, 6, 6, 0.95);
  border-bottom-color: rgba(255, 26, 26, 0.35);
  box-shadow: 0 8px 30px rgba(255, 26, 26, 0.2);
}

.header-content h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.header-content p { font-size: 0.875rem; color: var(--text-muted); letter-spacing: 0.2px; }

.header-nav {
  display: flex; gap: 1.5rem; align-items: center;
}

.nav-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
  opacity: 0.8;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--primary);
}

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

.header-buttons { display: flex; gap: 1rem; }

.btn-download,
.btn-language {
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  font-weight: 600; font-size: 0.875rem;
  border: 1px solid rgba(255, 0, 0, 0.5);
  background: transparent; color: var(--text);
  cursor: pointer; transition: var(--transition-smooth);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-download:hover, .btn-language:hover { background: rgba(255, 0, 0, 0.1); border-color: var(--primary); transform: translateY(-2px); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;

  /* Fix 1: evitar que o header fixe por cima da foto no topo */
  padding-top: 140px;
}
@media (max-width: 768px) { .hero { padding-top: 160px; } }

.hero::before {
  content: '';
  position: absolute;
  inset: -10% 0 0 0;
  background: var(--gradient-hero);
  opacity: 0.9;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 6px
  );
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: scanLines 12s linear infinite;
  z-index: 1;
  pointer-events: none;
}

#particles-canvas { position: absolute; inset: 0; z-index: 1; }

.hero-glow { position: absolute; border-radius: 50%; filter: blur(120px); animation: float 6s ease-in-out infinite; z-index: 2; }
.hero-glow-1 { top: 25%; left: 25%; width: 384px; height: 384px; background: rgba(255, 0, 0, 0.2); }
.hero-glow-2 { bottom: 25%; right: 25%; width: 384px; height: 384px; background: rgba(139, 0, 0, 0.2); animation-delay: 3s; }

.hero-content { position: relative; z-index: 10; text-align: center; padding: 2rem; max-width: 1024px; animation: fadeIn 1s ease; }

.profile-img-container { position: relative; width: 192px; height: 192px; margin: 0 auto 2rem; animation: scaleIn 1s cubic-bezier(0.68,-0.55,0.265,1.55); }
.profile-glow { position: absolute; inset: 0; border-radius: 50%; animation: glowPulse 2s ease-in-out infinite; }
.profile-img {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.2);
  object-fit: cover; box-shadow: var(--shadow-glow);
  /* proteção extra contra “corte” por overflow de contêineres */
  display: block;
}

.hero-content h2 { 
  font-size: clamp(2rem, 5vw, 3.75rem); 
  font-weight: 700; 
  margin-bottom: 1.5rem; 
  animation: fadeInUp 0.8s ease 0.3s backwards;
  text-shadow: 0 0 35px rgba(255, 26, 26, 0.3);
}
.hero-content > p { 
  font-size: clamp(1rem, 2vw, 1.5rem); 
  color: var(--text-muted); 
  margin-bottom: 4rem; 
  animation: fadeInUp 0.8s ease 0.5s backwards;
  line-height: 1.8;
}

.scroll-indicator { animation: fadeIn 1s ease 1s backwards; }
.scroll-box { width: 24px; height: 40px; border: 2px solid var(--primary); border-radius: 20px; margin: 0 auto; display: flex; justify-content: center; animation: bounce 2s ease-in-out infinite; }
.scroll-dot { width: 6px; height: 12px; background: var(--primary); border-radius: 10px; margin-top: 8px; animation: glowPulse 2s ease-in-out infinite; }

/* ========== SECTIONS ========== */
.section { 
  position: relative; 
  padding: 7rem 0; 
  overflow: hidden;
  background-image: var(--gradient-ambient);
}
.section-primary { background: var(--background); }
.section-secondary { 
  background: var(--secondary);
  position: relative;
}
.section-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,0,0,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.section-line { 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  height: 1px; 
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: shimmer 3s ease-in-out infinite;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.section-title {
  text-align: center; 
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; 
  margin-bottom: 4rem; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 1rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.section-title i { 
  font-size: 2.5rem; 
  color: var(--primary);
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
  animation: glowPulse 2s ease-in-out infinite;
}

/* ========== SKILLS (Fix 2: simétricas e centralizadas) ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  justify-items: center;       /* centra os cards no grid */
  align-items: stretch;        /* mesma altura */
}
.skill-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; cursor: pointer; transition: var(--transition-smooth);
  min-height: 140px;           /* altura uniforme */
  width: 100%; max-width: 180px; /* largura consistente para simetria */
  opacity: 0; animation: fadeInUp 0.6s ease forwards;
  text-align: center;
}
.skill-card[data-delay="0"] { animation-delay: 0s; }
.skill-card[data-delay="1"] { animation-delay: 0.1s; }
.skill-card[data-delay="2"] { animation-delay: 0.2s; }
/* ... continue até 13 */
.skill-card:hover { transform: translateY(-10px) scale(1.05) rotate(2deg); }
.skill-glow { position: absolute; inset: 0; background: rgba(255, 0, 0, 0); border-radius: 1rem; filter: blur(20px); transition: var(--transition-smooth); }
.skill-card:hover .skill-glow { background: rgba(255, 0, 0, 0.3); }
.skill-card img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255,0,0,0.5)); transition: var(--transition-smooth); }
.skill-card:hover img { filter: drop-shadow(0 0 25px rgba(255,0,0,0.9)); transform: scale(1.1) rotate(5deg); }
.skill-card span { font-size: 0.875rem; font-weight: 600; transition: var(--transition-smooth); }
.skill-card:hover span { color: var(--primary); transform: scale(1.05); }

/* ========== PROJECTS ========== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.project-card { 
  position: relative; 
  border-radius: 1.5rem; 
  overflow: hidden; 
  cursor: pointer; 
  transition: var(--transition-smooth);
  background: var(--surface-strong);
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,0,0,0.3), rgba(255,0,0,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition-smooth);
}
.project-card:hover::before {
  opacity: 1;
}
.project-card:hover { 
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 20px 60px rgba(255, 0, 0, 0.3);
}
.project-glow { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,0,0,0), rgba(255,0,0,0)); filter: blur(40px); transition: var(--transition-smooth); }
.project-card:hover .project-glow { background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), transparent); }
.project-image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--secondary); position: relative; }
.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
  opacity: 0;
  transition: var(--transition-smooth);
}
.project-card:hover .project-image::after {
  opacity: 1;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition-smooth); }
.project-card:hover .project-image img { transform: scale(1.15); }
.project-content { padding: 1.5rem; position: relative; z-index: 1; }
.project-content h3 { font-size: 1.5rem; margin-bottom: 0.75rem; transition: var(--transition-smooth); }
.project-card:hover .project-content h3 { color: var(--primary); transform: translateX(5px); }
.project-content p { color: var(--text-muted); margin-bottom: 1rem; transition: var(--transition-smooth); }
.project-card:hover .project-content p { color: var(--text); }
.tech-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-badge { 
  padding: 0.25rem 0.75rem; 
  background: rgba(255, 0, 0, 0.2); 
  border-radius: 1rem; 
  font-size: 0.75rem; 
  font-weight: 600; 
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}
.tech-badge:hover { 
  background: rgba(255, 0, 0, 0.4); 
  border-color: rgba(255, 0, 0, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* ========== MODAL ========== */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.modal.active { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); animation: fadeIn 0.3s ease; }
.modal-content { position: relative; max-width: 800px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 2rem; animation: scaleIn 0.4s cubic-bezier(0.68,-0.55,0.265,1.55); }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border: none; background: rgba(255,0,0,0.2); color: var(--text); font-size: 1.5rem; border-radius: 50%; cursor: pointer; transition: var(--transition-smooth); z-index: 10; }
.modal-close:hover { background: var(--primary); transform: rotate(90deg); }
.modal-image { aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; margin-bottom: 1.5rem; }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-body h3 { font-size: 2rem; margin-bottom: 1rem; }
.modal-body p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }

/* ========== TIMELINE / EXPERIENCE (Fix 5: ícone/logo enormes) ========== */
.experience-container { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.company-section { display: flex; flex-direction: column; gap: 1.5rem; }
.company-header { display: flex; align-items: center; gap: 0.75rem; }
.company-header img {
  width: 42px; height: 42px; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255,0,0,0.4));
}
.company-header h3 { font-size: 1.5rem; }

.timeline { position: relative; border-left: 2px solid rgba(255, 0, 0, 0.3); margin-left: 1.5rem; padding-left: 2rem; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot {
  position: absolute; left: -2.625rem; top: 0.5rem;
  width: 16px; height: 16px; background: var(--primary);
  border: 4px solid var(--background); border-radius: 50%;
  transition: var(--transition-smooth); box-shadow: var(--shadow-glow);
}
.timeline-item:hover .timeline-dot { 
  transform: scale(1.5);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}
.timeline-content { 
  padding: 1.5rem; 
  transition: var(--transition-smooth);
  position: relative;
}
.timeline-content::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
}
.timeline-content:hover::before {
  opacity: 1;
}
.timeline-content:hover { 
  border-color: rgba(255, 0, 0, 0.5);
  transform: translateX(5px);
}
.timeline-content h4 { font-size: 1.25rem; margin-bottom: 0.5rem; transition: var(--transition-smooth); }
.timeline-item:hover .timeline-content h4 { color: var(--primary); }
.timeline-date { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }

/* ========== ABOUT (Fix 3: padronização) ========== */
.about-card {
  max-width: 900px; margin: 0 auto;
  padding: 2rem 2.5rem; position: relative;
}
.about-glow { position: absolute; inset: 0; border-radius: 24px; box-shadow: var(--shadow-glow); pointer-events: none; }
.about-card p { color: #e2e2e2; font-size: 1rem; margin-bottom: 1.25rem; }
.hobbies { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.hobby-badge {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  padding: 0.5rem 0.9rem; 
  border-radius: 999px;
  background: rgba(255,0,0,0.15); 
  border: 1px solid rgba(255,0,0,0.25);
  font-weight: 600; 
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  cursor: default;
}
.hobby-badge:hover {
  background: rgba(255,0,0,0.25);
  border-color: rgba(255,0,0,0.4);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}
.hobby-badge i { 
  color: var(--primary);
  filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
}

/* ========== PROGRESS / EDUCATION (Fix 4: padronização + animação) ========== */
.education-card { max-width: 900px; margin: 0 auto; padding: 2rem; position: relative; }
.education-glow { position: absolute; inset: 0; border-radius: 24px; box-shadow: var(--shadow-glow); pointer-events: none; }
.progress-bar-container { position: relative; margin: 1rem 0 1.5rem 0; }
.progress-bar {
  height: 10px; background: #0f0f0f; border-radius: 1rem; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 1rem;
  box-shadow: var(--shadow-glow);
  transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
  width: 0; /* inicia em 0 para animar até o data-progress */
}
.progress-marker {
  position: absolute; top: -14px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.progress-marker i { color: var(--primary); }
.progress-marker span { font-size: 0.85rem; color: var(--text-muted); }
.progress-labels { display: flex; justify-content: space-between; color: var(--text-muted); }

/* ========== CERTIFICAÇÕES (Fix 6: layout) ========== */
.certifications-card { max-width: 900px; margin: 0 auto; padding: 1rem; }
.cert-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cert-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 1.1rem; border-radius: 14px;
  text-decoration: none; color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition-smooth);
}
.cert-item .cert-info { display: inline-flex; align-items: center; gap: 0.75rem; }
.cert-item i { color: var(--primary); }
.cert-item:hover { transform: translateY(-2px); border-color: rgba(255,0,0,0.35); background: rgba(255,0,0,0.08); }

/* ========== CURSOS (Fix 7: barras de progresso + animação) ========== */
.courses-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.course-card { padding: 1rem 1.25rem; }
.course-info { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.course-info h4 { font-size: 1rem; }
.course-info span { font-size: 0.85rem; color: var(--text-muted); }
.course-progress-bar {
  height: 8px; background: #0f0f0f; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.course-progress-fill {
  height: 100%; background: var(--gradient-primary);
  border-radius: 999px; box-shadow: var(--shadow-glow);
  width: 0; /* inicia em 0 e o JS anima até data-progress */
  transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ========== CONTACT ========== */
.contact-card { max-width: 672px; margin: 0 auto; padding: 3rem; }
.contact-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 1rem;
  border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: var(--transition-smooth);
  background: rgba(15, 15, 15, 0.6);
}
.contact-item:hover { 
  border-color: rgba(255, 0, 0, 0.5); 
  transform: translateX(10px) scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 0, 0, 0.2);
}
.contact-icon { 
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  background: rgba(255, 0, 0, 0.1); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: var(--transition-smooth);
  position: relative;
}
.contact-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
}
.contact-item:hover .contact-icon::before {
  opacity: 0.2;
}
.contact-item:hover .contact-icon { 
  background: rgba(255, 0, 0, 0.2);
  transform: rotate(360deg) scale(1.1);
}
.contact-icon i { font-size: 1.5rem; color: var(--primary); position: relative; z-index: 1; }
.social-links { display: flex; justify-content: center; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.social-btn { 
  width: 64px; 
  height: 64px; 
  border-radius: 50%; 
  background: rgba(255,0,0,0.1); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  text-decoration: none; 
  color: var(--text); 
  font-size: 1.75rem; 
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}
.social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}
.social-btn:hover::before {
  opacity: 1;
}
.social-btn:hover { 
  background: var(--primary); 
  transform: scale(1.2) rotate(360deg); 
  box-shadow: 0 0 40px rgba(255,0,0,0.7);
  border-color: var(--primary);
}

/* ========== FOOTER ========== */
.footer { padding: 2rem; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(20px); border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center; }
.footer p { color: var(--text-muted); font-size: 0.875rem; }
.footer .fa-heart { color: var(--primary); animation: glowPulse 2s ease-in-out infinite; }
.copyright { margin-top: 0.5rem; font-size: 0.75rem; opacity: 0.7; }

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.2);
  border: 2px solid rgba(255, 0, 0, 0.5);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-header { flex-direction: column; gap: 1rem; padding: 1rem; }
  .header-nav { display: none; }
  .skills-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .timeline { margin-left: 0.5rem; padding-left: 1.5rem; }
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

/* === Contorno vermelho nos cards de projetos === */
.project-card {
  border: 1px solid rgba(255, 0, 0, 0.35); /* vermelho suave */
}
.project-card:hover {
  border-color: var(--primary); /* intensifica no hover */
}

/* === Extras: botões do modal (padrão do portfólio) === */
.modal-body .btn-primary,
.modal-body .btn-disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* "Ver repositório" – mesmo padrão dos botões do header */
.modal-body .btn-primary {
  border: 1px solid rgba(255, 0, 0, 0.5);
  background: transparent;
  color: var(--text);
}
.modal-body .btn-primary:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* "Repositório indisponível" – desabilitado no mesmo estilo */
.modal-body .btn-disabled {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* === Alinhamento: tecnologias à esquerda e botão à direita === */
.project-card .project-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Garante que o botão do repositório vá para o lado oposto */
.project-card .project-tags .btn-primary,
.project-card .project-tags .btn-disabled {
  margin-left: auto;
}

/* === Linha: tecnologias à esquerda | botão à direita (cards) === */
.project-content .tech-badges {
  display: inline-flex;          /* vira conteúdo “em linha” */
  flex-wrap: wrap;
  gap: 0.5rem;
  vertical-align: middle;
}

/* empurra o botão para a direita, na mesma linha */
.project-content .btn-primary,
.project-content .btn-disabled {
  float: right;
  margin-left: auto;
}

/* clearfix para não colapsar por causa do float */
.project-content::after {
  content: "";
  display: block;
  clear: both;
}


/* === Mesma ideia dentro do MODAL (se houver) === */
.modal-body .tech-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  vertical-align: middle;
}

.modal-body .btn-primary,
.modal-body .btn-disabled {
  float: right;
  margin-left: auto;
}

.modal-body::after {
  content: "";
  display: block;
  clear: both;
}

/* Animação suave da seta no marcador de progresso */
@keyframes markerFloatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* aplica a animação só no ícone, sem mexer no layout do marcador */
.progress-marker i {
  animation: markerFloatY 1.8s ease-in-out infinite;
}

/* respeita usuários com redução de movimento */
@media (prefers-reduced-motion: reduce) {
  .progress-marker i { animation: none; }
}

/* ==== Scroll Reveal (estável, sem jitter) ==== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

/* variações opcionais por data-animate (se você usa) */
.scroll-reveal[data-animate="slide-in-left"]  { transform: translateX(-16px); }
.scroll-reveal[data-animate="slide-in-right"] { transform: translateX(16px);  }

.scroll-reveal.in-view {
  opacity: 1;
  transform: none;
}

/* respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .hero::after,
  .hero-glow,
  .scroll-box,
  .text-gradient {
    animation: none !important;
  }
  .transition-panel-left,
  .transition-panel-right,
  .transition-code span,
  .transition-cursor {
    animation: none !important;
  }
}
