/* Reset e configurações base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --preto: #0d0d0d;
  --cinza-escuro: #1c1c1c;
  --cinza-medio: #4f4f4f;
  --cinza-claro: #bdbdbd;
  --azul-escuro: #0a3d62;
  --azul-medio: #1e5fa3;
  --azul-claro: #74b9ff;
  --azul-gelo: #d6eaf8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--cinza-claro);
  background-color: var(--preto);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Loader inicial */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--preto);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader-content {
  text-align: center;
}

.loader-circle {
  width: 60px;
  height: 60px;
  border: 3px solid var(--cinza-medio);
  border-top: 3px solid var(--azul-claro);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loader-text {
  color: var(--azul-claro);
  font-weight: 600;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Cursor customizado */
.cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--azul-claro);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
  transition: all 0.3s ease;
}

.cursor-follower {
  width: 8px;
  height: 8px;
  background: var(--azul-claro);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  transition: all 0.1s ease;
}

/* Partículas flutuantes */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--azul-claro);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-particle 6s infinite linear;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0px);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10px) translateX(100px);
    opacity: 0;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-medio), var(--azul-claro));
  z-index: 9999;
  transition: width 0.3s ease;
}

/* Header melhorado */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(116, 185, 255, 0.1);
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--azul-claro), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header.scrolled::before {
  opacity: 1;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--azul-claro);
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.logo::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 ease;
}

.logo:hover::before {
  left: 100%;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--cinza-claro);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--azul-medio), var(--azul-claro));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--azul-claro);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--azul-claro);
}

.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--azul-claro);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section melhorado */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--preto) 0%, var(--cinza-escuro) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, var(--azul-escuro) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, var(--azul-medio) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, var(--azul-claro) 0%, transparent 30%);
  opacity: 0.1;
  z-index: 1;
  animation: gradient-shift 8s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-20px) translateY(-10px); }
  50% { transform: translateX(20px) translateY(10px); }
  75% { transform: translateX(-10px) translateY(20px); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
}

.glow-text {
  background: linear-gradient(45deg, #ffffff, var(--azul-claro), #ffffff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow-animation 3s ease-in-out infinite;
}

@keyframes glow-animation {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--azul-claro);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--azul-claro); }
}

.subtitle {
  font-size: 1.5rem;
  color: var(--azul-claro);
  margin-bottom: 1rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

.description {
  font-size: 1.2rem;
  color: var(--cinza-claro);
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInUp 1s ease 1s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.btn {
  padding: 14px 32px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn::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 ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--azul-medio), var(--azul-claro));
  color: white;
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(116, 185, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--azul-claro);
  border-color: var(--azul-claro);
  position: relative;
  overflow: hidden;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--azul-claro);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-secondary:hover::after {
  left: 0;
}

.btn-secondary:hover {
  color: var(--preto);
  transform: translateY(-3px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.profile-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul-medio), var(--azul-claro));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  color: white;
  position: relative;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 0 50px rgba(116, 185, 255, 0.3);
}

.profile-circle::before {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul-claro), var(--azul-medio));
  z-index: -1;
  opacity: 0.5;
  filter: blur(25px);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(2deg); }
  50% { transform: translateY(-20px) rotate(0deg); }
  75% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* About Section melhorado */
.about {
  padding: 100px 0;
  background: var(--cinza-escuro);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%2374b9ff" fill-opacity="0.03"><circle cx="30" cy="30" r="1"/></g></g></svg>');
  animation: pattern-move 20s linear infinite;
}

@keyframes pattern-move {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(60px) translateY(60px); }
}

.about h2 {
  font-size: 2.5rem;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.about h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-medio), var(--azul-claro));
  border-radius: 2px;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 2;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--cinza-claro);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

.about-text p:nth-child(2) {
  animation-delay: 0.2s;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1rem;
  background: var(--cinza-medio);
  border-radius: 10px;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--azul-claro);
}

.stat-label {
  color: var(--cinza-claro);
  font-size: 0.9rem;
}

.about-education h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.education-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(79, 79, 79, 0.3);
  border-radius: 15px;
  border-left: 4px solid var(--azul-claro);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(50px);
  animation: slideInRight 1s ease 0.5s forwards;
}

.education-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(116, 185, 255, 0.2);
  background: rgba(79, 79, 79, 0.5);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.education-item i {
  font-size: 2rem;
  color: var(--azul-claro);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.education-item h4 {
  color: white;
  margin-bottom: 0.5rem;
}

.education-item p {
  color: var(--cinza-claro);
  margin-bottom: 0.5rem;
}

.year {
  background: linear-gradient(135deg, var(--azul-medio), var(--azul-claro));
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(116, 185, 255, 0.3);
}

/* Skills Section melhorado */
.skills {
  padding: 100px 0;
  background: var(--preto);
  position: relative;
}

.skills h2 {
  font-size: 2.5rem;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.skills h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-medio), var(--azul-claro));
  border-radius: 2px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-card {
  background: linear-gradient(135deg, rgba(28, 28, 28, 0.8), rgba(79, 79, 79, 0.3));
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  transition: all 0.4s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 0.8s ease forwards;
}

.skill-card:nth-child(1) { animation-delay: 0.1s; }
.skill-card:nth-child(2) { animation-delay: 0.2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s; }
.skill-card:nth-child(4) { animation-delay: 0.4s; }
.skill-card:nth-child(5) { animation-delay: 0.5s; }
.skill-card:nth-child(6) { animation-delay: 0.6s; }
.skill-card:nth-child(7) { animation-delay: 0.7s; }
.skill-card:nth-child(8) { animation-delay: 0.8s; }
.skill-card:nth-child(9) { animation-delay: 0.9s; }

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(116, 185, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(45deg, var(--azul-claro), var(--azul-medio));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.skill-card:hover {
  transform: translateY(-15px) scale(1.05);
  border-color: var(--azul-claro);
  box-shadow: 0 25px 50px rgba(116, 185, 255, 0.3);
}

.skill-card:hover::after {
  opacity: 0.1;
}

.skill-card i {
  font-size: 3.5rem;
  color: var(--azul-claro);
  margin-bottom: 1.5rem;
  display: block;
  transition: all 0.4s ease;
}

.skill-card:hover i {
  transform: rotateY(360deg) scale(1.2);
  filter: drop-shadow(0 0 20px var(--azul-claro));
}

.skill-card h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  transition: color 0.4s ease;
}

.skill-card:hover h3 {
  color: var(--azul-claro);
}

.skill-card p {
  color: var(--cinza-claro);
  line-height: 1.6;
  transition: color 0.4s ease;
}

.skill-card:hover p {
  color: white;
}

/* Efeito Tilt para os cards */
.skill-card[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

.skill-card[data-tilt]:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05) translateY(-15px);
}

/* Contact Section melhorado */
.contact {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--cinza-escuro) 0%, var(--azul-escuro) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(116, 185, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.contact h2 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.contact p {
  font-size: 1.2rem;
  color: var(--cinza-claro);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.contact-buttons .btn {
  min-width: 160px;
  transition: all 0.4s ease;
}

.contact-buttons .btn:hover {
  transform: translateY(-5px) scale(1.05);
}

/* Footer melhorado */
.footer {
  background: var(--preto);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--cinza-escuro);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--azul-claro), transparent);
}

.footer p {
  color: var(--cinza-claro);
  opacity: 0;
  animation: fadeIn 1s ease 0.5s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sistema de notificações */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: slideIn 0.3s ease;
  max-width: 350px;
  font-family: inherit;
}

.notification-success {
  background: var(--azul-medio);
  color: white;
}

.notification-error {
  background: #e74c3c;
  color: white;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 10px;
  padding: 0;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 2rem 0;
    border-top: 1px solid rgba(116, 185, 255, 0.2);
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.3rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .profile-circle {
    width: 220px;
    height: 220px;
    font-size: 4rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cursor, .cursor-follower {
    display: none;
  }

  .particles {
    display: none;
  }

  /* Desativa efeitos pesados em mobile */
  .skill-card[data-tilt]:hover {
    transform: translateY(-10px) scale(1.05);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .nav {
    padding: 1rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .description {
    font-size: 1rem;
  }

  .about h2,
  .skills h2,
  .contact h2 {
    font-size: 2rem;
  }

  .skill-card {
    padding: 1.5rem;
  }

  .btn {
    min-width: 180px;
    padding: 12px 24px;
  }
}