html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: auto;
}

*, *::before, *::after {
  box-sizing: inherit;
}

:root {
  --color: #667dff;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --accent: #00aeac;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: none;
}

a, button, .cta-button, .theme-toggle, .menu-toggle {
  cursor: none;
}

/* Nesses itens específicos, queremos o cursor "mãozinha" nativo do navegador
   por cima do cursor personalizado, para reforçar que são clicáveis */
.nav-links a,
.mobile-menu a,
.cta-button,
.contact-item {
  cursor: pointer;
}

/*Carreagamento de tela*/
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
}

.loader-text {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  opacity:0 ;
}

.loader-bar {
  width: 300px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color), var(--accent));
}

/*Custom cursor*/
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.2s ease;
}



/* Navegação */
nav {
  position: fixed;
  top: 0;
  width: 100vw;  
  padding: 1.5rem 2rem; 
  background-color: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(20px);
  z-index: 1000;
  transition: background-color 0.3s ease;
  transform: translateY(-100%);

}

[data-theme="light"] nav {
  background-color: rgba(255, 255, 255, 0.5);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  transition: transform 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  color: var(--accent)
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Botão Currículo no menu */
.nav-links a.nav-cv {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 50px;
  padding: 0.4rem 1.2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a.nav-cv::after {
  display: none; /* remove o sublinhado animado, que não combina com o botão */
}

.nav-links a.nav-cv:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
}

/*Tema Toggle*/ 
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: var(--bg-secondary);
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: 2px solid var(--border-color);
  margin-left: 1rem;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background-color: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 229, 0.7);
}

[data-theme="light"] .theme-toggle::before {
  transform: translate(28px);
  background: var(--color);
  box-shadow: 0 0 10px rgba(25, 117, 255, 0.7);
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  transition: opacity 0.3s ease;
}

.theme-toggle-icon.sun {
  right: 6px;
  opacity: 0;
}

.theme-toggle-icon.moon {
  left: 5px;
  opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.sun {
  opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.moon {
  opacity: 0;
}

/* Mobile Menu */

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}


.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0%);
}

.mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 600;
  margin: 1rem 0;
  font-family: 'Playfair Display', serif;
  transform: translateY(20px);
  transition: all 0.3s ease;
  opacity: 0;
}

.mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-menu a:nth-child(2) {
  transition-delay: 0.2s;
}     

.mobile-menu a:nth-child(3) {
  transition-delay: 0.3s;
} 

.mobile-menu a:nth-child(4) {
  transition-delay: 0.4s;
}

.mobile-menu a:nth-child(5) {
  transition-delay: 0.5s;
}

.mobile-menu a:nth-child(6) {
  transition-delay: 0.6s; /* continua a sequência de entrada dos itens */
}

.mobile-menu a.mobile-cv {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 50px;
  padding: 0.5rem 1.8rem;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 2rem; /* espaço pro nav */
  gap: 3rem;
  flex-wrap: wrap; /* responsivo */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
  z-index: -2;
}

.hero-img {
  flex: 1;
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.hero-content {
  flex: 1;
  min-width: 300px;
  max-width: 600px;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  text-align: left; 
}

.hero-title {
  font-size: clamp(3rem,8vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  filter: blur(10px);
  transform: translateY(30px);
  opacity: 0;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  filter: blur(10px);
  transform: translateY(30px);
  opacity: 0;
}

.hero-3d-model {
  position: absolute;
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90%;
  z-index: -1;
  pointer-events: none;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  filter: blur(10px);
  transform: translateY(30px);
  opacity: 0;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--color), var(--accent));
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s ease;
  filter: blur(10px);
  transform: translateY(30px);
  opacity: 0;
}

.cta-button:hover {
  transform: translateY(-3px);
}

/* Responsividade */

@media (max-width: 1080px) {
  .hero-img {
    height: 38%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .cursor, .cursor-follower {
    display: none;
  }

  .hero {
    display: flex;
    flex-direction: column-reverse;
  }

  .hero-img {
    height: 30%;
    margin: 0;
  }
}

.hero-content {
  padding: 0 1rem;
}

.nav-container {
  padding: 0 1rem;
}

/* ==========================================================
   Seções novas (Sobre, Habilidades, Projetos, Contato)
   Reaproveitam as mesmas variáveis de cor do tema dark/light
   ========================================================== */

.section {
  scroll-margin-top: 90px; /* evita que o menu fixo cubra o topo da seção ao clicar em um link do menu */
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
}

/* Sobre */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.about-highlights {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.highlight-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.highlight-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 160px;
  text-align: center;
}

/* Habilidades */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.skill-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.skill-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Projetos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.project-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-family: 'Playfair Display', serif;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Contato */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.contact-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* Rodapé */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .about-highlights {
    gap: 2rem;
  }
}