/* --- GERAL E RESET --- */
:root {
  --bg-primary: #111111;
  --bg-secondary: #1e1e1e;
  --text-primary: #eaeaea;
  --text-secondary: #a0a0a0;
  --highlight: #ffffff;
  --cursor-color: var(--highlight);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  cursor: none;
}

/* --- CURSOR SUAVE --- */
#smooth-cursor {
  position: fixed;
  top: -20px;
  left: -20px;
  width: 25px;
  height: 25px;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.2s ease-out;
  display: block;
}

#smooth-cursor.clicking {
  transform: scale(0.8);
}

#smooth-cursor svg {
  width: 100%;
  height: 100%;
  transform-origin: center center;
}

/* --- BARRA DE ROLAGEM --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--highlight);
}

/* --- CABEÇALHO --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background-color: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--highlight);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--highlight);
}

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

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

/* --- SEÇÕES --- */
section {
  min-height: 100vh;
  padding: 8rem 7% 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--highlight);
  margin-top: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- SEÇÃO HERO --- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  align-items: center;
}

.hero-content {
  max-width: 900px;
  z-index: 10;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--highlight);
  animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
}

.hero h2 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 1s ease 3s forwards;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeIn 1s ease 3.5s forwards;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--text-secondary);
  border-radius: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: transparent;
  border-color: var(--highlight);
  color: var(--highlight);
}

.btn:hover {
  color: var(--highlight);
  border-color: var(--highlight);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s ease 4s forwards;
}

.social-link {
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--highlight);
  transform: translateY(-3px);
}

.social-link:visited {
  color: var(--text-secondary);
}

/* --- SEÇÃO SOBRE --- */
.about {
  background-color: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 2px;
  transition: transform 0.4s ease;
}

/* --- SEÇÃO TRAJETÓRIA (TIMELINE) --- */
.trajectory {
  background-color: var(--bg-primary);
  padding-top: 6rem;
  padding-bottom: 6rem;
  min-height: auto;
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--bg-secondary);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  background: linear-gradient(to bottom, #a855f7, #6366f1, #22d3ee);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
  transform: translateX(-50%);
  z-index: 2;
  height: 0;
}

.timeline-event {
  position: relative;
  width: 50%;
  padding: 10px 40px;
  box-sizing: border-box;
}

.timeline-event.active .timeline-dot {
  background-color: #6366f1;
}

.timeline-event--left {
  left: 0;
  text-align: right;
}

.timeline-event--right {
  left: 50%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 3px solid var(--bg-primary);
  z-index: 3;
  transition: background-color 0.3s ease;
}

.timeline-event--left .timeline-dot {
  right: -8px;
}

.timeline-event--right .timeline-dot {
  left: -8px;
}

.timeline-card {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 4px;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: #6366f1;
}

.timeline-year {
  color: #6366f1;
  font-weight: bold;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-card .timeline-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.timeline-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-card::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-event--left .timeline-card::after {
  right: -10px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--bg-secondary);
}

.timeline-event--right .timeline-card::after {
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--bg-secondary) transparent transparent;
}

/* --- SEÇÃO HABILIDADES (CARROSSEL) --- */
.skills {
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.skills-carousel-container {
  position: relative;
  width: 100%;
  height: 350px;
  perspective: 1200px;
  margin-top: 2rem;
}

.skills-carousel-track {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.skill-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 300px;
  margin-left: -120px;
  margin-top: -150px;
  background-color: var(--bg-primary);
  border-radius: 8px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border: 1px solid #333;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out,
    filter 0.6s ease-in-out;
  cursor: pointer;
  -webkit-box-reflect: below 1px
    linear-gradient(transparent, transparent, #0004);
}

.skill-card i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.skill-card h3 {
  font-size: 1.25rem;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: var(--highlight);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 20;
  cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow.prev {
  left: 10%;
}
.carousel-arrow.next {
  right: 10%;
}

.skill-info-container {
  text-align: center;
  margin-top: 2rem;
  min-height: 120px;
}

.skill-info-container h3 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--highlight);
  margin-bottom: 0.5rem;
}

.skill-info-container p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background-color: var(--highlight);
  transform: scale(1.2);
}

/* --- SEÇÃO PROJETOS --- */
.projects {
  background-color: var(--bg-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px);
}

.project-card:hover::before {
  border-color: var(--highlight);
}

.project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.project-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--highlight);
  transition: width 0.3s ease;
}

.project-links a:hover {
  color: var(--highlight);
}

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

/* --- SEÇÃO CONTATO --- */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-link {
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--highlight);
  transition: width 0.3s ease;
}

.contact-link:hover {
  color: var(--highlight);
}

.contact-link:hover::after {
  width: 100%;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background-color: transparent;
  border: 1px solid var(--text-secondary);
  border-radius: 2px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--highlight);
  outline: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.6rem;
  left: 0.8rem;
  font-size: 0.7rem;
  background-color: var(--bg-primary);
  padding: 0 0.2rem;
  color: var(--highlight);
}

/* --- RODAPÉ --- */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-secondary);
}

/* --- ANIMAÇÕES E TRANSIÇÕES --- */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--highlight);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ANIMAÇÃO DE ENTRADA SIMPLES PARA SEÇÕES */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
section.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- DESIGN RESPONSIVO --- */

/* Telas de Notebook e maiores (acima de 1024px) */
@media (min-width: 1025px) {
  body {
    cursor: none;
  }
  #smooth-cursor {
    display: block;
  }
}

/* Telas de Tablet e menores (até 1024px) */
@media (max-width: 1024px) {
  body {
    cursor: default;
  }
  #smooth-cursor {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr;
  }
  .about-image {
    order: -1;
    margin-bottom: 2rem;
    text-align: center;
  }
  .timeline-line,
  .timeline-progress {
    left: 20px;
  }
  .timeline-event,
  .timeline-event--right {
    width: 100%;
    left: 0;
    padding-left: 50px;
    padding-right: 10px;
    text-align: left;
  }
  .timeline-dot {
    left: 12px;
  }
  .timeline-card::after {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--bg-secondary) transparent transparent;
  }
  .timeline-event--left .timeline-card::after,
  .timeline-event--right .timeline-card::after {
    right: auto;
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--bg-secondary) transparent transparent;
  }
  .skills-carousel-container {
    height: 300px;
    perspective: 800px;
  }
  .skill-card {
    width: 200px;
    height: 250px;
    margin-left: -100px;
    margin-top: -125px;
  }
  .carousel-arrow.prev {
    left: 5%;
  }
  .carousel-arrow.next {
    right: 5%;
  }
}

/* Telas de Celular Grande (até 768px) */
@media (max-width: 768px) {
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Telas de Celular (até 600px) */
@media (max-width: 600px) {
  header {
    padding: 1rem 5%;
  }
  .nav-links {
    display: none;
  }

  /* CORREÇÃO DO TAMANHO DA FONTE DO TÍTULO PRINCIPAL */
  .hero h1 {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
    border-right: none;
    animation: none;
    white-space: normal;
  }
  /* Re-ativa uma animação de entrada mais simples para o H1 */
  .hero h1 {
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  .carousel-arrow {
    width: 35px;
    height: 35px;
  }
}
