/* ===== Reset e Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-body: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;
  --border-color: #2a2a2a;
  --text-primary: #e8e8e8;
  --text-secondary: #a8a8a8;
  --text-muted: #6b6b6b;
  --accent: #5b7cfa;
  --accent-dim: rgba(91, 124, 250, 0.15);
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0;
  position: relative;
}

/* Botão hambúrguer (mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navegação desktop */
.nav__list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  letter-spacing: 0.2px;
}

.nav__link:hover {
  color: var(--accent);
}

/* Overlay para fechar o menu lateral */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.is-active {
  display: block;
  opacity: 1;
}

/* ===== Hero ===== */
.hero {
  padding: 7rem 0 3rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0a0a0a 0%, #141414 100%);
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero__content {
  flex: 1 1 400px;
}

.hero__badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
  border: 1px solid rgba(91, 124, 250, 0.2);
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero__description {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__avatar img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  background: var(--bg-surface);
  object-fit: cover;
  box-shadow: 0 0 40px rgba(91, 124, 250, 0.08);
}

/* ===== Botões ===== */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #7a94ff;
  border-color: #7a94ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(91, 124, 250, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== Seções ===== */
.section {
  padding: 5rem 0;
}
.section--alt {
  background: var(--bg-surface);
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

/* ===== Sobre ===== */
.sobre__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}
.sobre__texto p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
}
.sobre__texto strong {
  color: var(--text-primary);
}

.info-list {
  list-style: none;
  background: var(--bg-card);
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}
.info-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.info-list li:last-child {
  border-bottom: none;
}
.info-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-list a {
  color: var(--accent);
  text-decoration: none;
}
.info-list a:hover {
  text-decoration: underline;
}

/* ===== Experiência ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.timeline__item {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  transition: border-color 0.2s;
}
.timeline__item:hover {
  border-color: var(--accent);
}
.timeline__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.timeline__item h3 {
  font-size: 1.1rem;
  margin: 0.2rem 0 0.4rem;
  color: var(--text-primary);
}
.timeline__item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Projetos (com imagens) ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.project-card__img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--bg-elevated);
}
.project-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(91, 124, 250, 0.15);
  align-self: flex-start;
}
.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  flex: 1;
}
.project-card__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}
.project-card__link:hover {
  opacity: 0.7;
}

/* ===== Habilidades ===== */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.skill-tag {
  background: var(--bg-card);
  padding: 0.4rem 1.4rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-dim);
}

/* ===== Certificações ===== */
.cert-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.cert-list li {
  background: var(--bg-card);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.cert-list li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

/* ===== Contato ===== */
.contato__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.contato__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Rodapé ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================
   RESPONSIVIDADE – MENU LATERAL (SLIDE-IN)
   ========================================================== */

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    z-index: 1000;
    background: var(--bg-card);
    flex-direction: column;
    gap: 1.5rem;
    padding: 5rem 2rem 2rem;
    transform: translateX(110%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
  }
  .nav__list.open {
    transform: translateX(0);
  }

  .nav__list li {
    width: 100%;
  }
  .nav__link {
    font-size: 1.2rem;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
  }
  .nav__link:hover {
    color: var(--accent);
  }

  .nav-overlay.is-active {
    display: block;
  }

  .hero {
    padding-top: 6rem;
    min-height: auto;
  }
  .hero__inner {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero__title {
    font-size: 2.5rem;
  }
  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__avatar img {
    width: 140px;
    height: 140px;
  }

  .sobre__grid {
    grid-template-columns: 1fr;
  }

  .contato__links {
    justify-content: center;
  }

  .project-card__img {
    height: 140px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2rem;
  }
  .container {
    padding: 0 1rem;
  }
  .timeline__item {
    padding: 1.2rem;
  }
  .nav__list {
    width: 260px;
    padding: 4rem 1.5rem 1.5rem;
  }
  .nav__link {
    font-size: 1rem;
  }
  .project-card__img {
    height: 120px;
  }
}