/* ============================================
   VARIÁVEIS E RESET
   ============================================ */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #93c5fd;
  --secondary: #1e293b;
  --text: #0f172a;
  --text-light: #475569;
  --bg: #ffffff;
  --gray-light: #f8fafc;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 0.75rem 0;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 8rem 0 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 500px;
  margin-bottom: 2rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn-outline:hover {
  background: var(--text);
  color: white;
  transform: translateY(-2px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-fallback {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.avatar-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   SEÇÕES
   ============================================ */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.section-hidden.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PROJETOS
   ============================================ */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--primary-light);
  background: transparent;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay a {
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: 2px solid white;
  border-radius: 50px;
  transition: all var(--transition);
}

.project-overlay a:hover {
  background: white;
  color: var(--text);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tech span {
  background: var(--gray-light);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  font-size: 1.25rem;
  color: var(--text-light);
  transition: color var(--transition);
}

.project-links a:hover {
  color: var(--primary);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.skill-item {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.skill-item:hover {
  transform: scale(1.02);
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.skill-info i {
  font-size: 1.5rem;
  color: var(--primary);
  width: 30px;
}

.skill-info span:first-of-type {
  flex: 1;
  font-weight: 600;
}

.skill-percentage {
  font-weight: 700;
  color: var(--primary);
}

.skill-bar {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 4px;
  width: 0%;
  transition: width 1s ease;
}

/* ============================================
   CONTATO
   ============================================ */
.contact-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--text-light);
}

.contact-info p i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info p a[href^="mailto"] {
  color: var(--text-light);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--secondary);
  color: #94a3b8;
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
}

footer p {
  font-size: 0.95rem;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 2rem;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 2rem;
    min-height: auto;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-desc {
    margin: 0 auto 2rem;
  }
  
  .btn-group {
    justify-content: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .avatar-fallback {
    width: 250px;
    height: 250px;
  }

  .contact-flex {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-badge {
    font-size: 0.75rem;
  }
  
  .btn {
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
  }
  
  .avatar-fallback {
    width: 200px;
    height: 200px;
  }
}

/* ============================================
   ANIMAÇÕES E UTILIDADES
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible para acessibilidade */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}