/* ============================================
   CSS VARIABLES — THEMING
   ============================================ */
:root {
  /* Light mode */
  --bg: #f0f4ff;
  --bg-2: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(120, 150, 255, 0.2);
  --text: #0d1117;
  --text-muted: #555e7a;
  --accent: #5b6af0;
  --accent-2: #7c3aed;
  --accent-glow: rgba(91, 106, 240, 0.25);
  --nav-bg: rgba(240, 244, 255, 0.85);
  --border: rgba(100, 120, 200, 0.2);
  --toggle-bg: rgba(91, 106, 240, 0.1);
  --toggle-border: rgba(91, 106, 240, 0.4);
  --toggle-text: #5b6af0;
  --shadow: 0 8px 32px rgba(91, 106, 240, 0.12);
  --btn-primary: linear-gradient(135deg, #5b6af0, #7c3aed);
  --btn-primary-text: #ffffff;
  --btn-outline-border: #5b6af0;
  --btn-outline-text: #5b6af0;
  --footer-bg: #ffffff;
  --orb-1: rgba(91, 106, 240, 0.15);
  --orb-2: rgba(124, 58, 237, 0.12);
  --speed: 0.35s;
}

[data-theme="dark"] {
  --bg: #0a0a14;
  --bg-2: #11111e;
  --bg-card: rgba(20, 20, 40, 0.75);
  --glass-border: rgba(91, 106, 240, 0.2);
  --text: #e8eaf6;
  --text-muted: #8892b0;
  --accent: #7986f8;
  --accent-2: #a78bfa;
  --accent-glow: rgba(121, 134, 248, 0.3);
  --nav-bg: rgba(10, 10, 20, 0.85);
  --border: rgba(91, 106, 240, 0.2);
  --toggle-bg: rgba(121, 134, 248, 0.12);
  --toggle-border: rgba(121, 134, 248, 0.4);
  --toggle-text: #a0aaff;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  --btn-primary: linear-gradient(135deg, #7986f8, #a78bfa);
  --btn-primary-text: #ffffff;
  --btn-outline-border: #7986f8;
  --btn-outline-text: #a0aaff;
  --footer-bg: #0d0d1a;
  --orb-1: rgba(121, 134, 248, 0.12);
  --orb-2: rgba(167, 139, 250, 0.1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color var(--speed) ease, color var(--speed) ease;
  overflow-x: hidden;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--speed) ease, opacity var(--speed) ease;
}

a:hover {
  opacity: 0.75;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

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

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

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  animation: fadeInUp 0.9s ease forwards;
}

.animate-fade-in-delay {
  animation: fadeInUp 0.9s 0.2s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
#desktop-nav,
#hamburger-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--speed) ease, border-color var(--speed) ease;
}

/* Footer nav must NOT inherit fixed-nav styles */
footer nav {
  position: static;
  height: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

/* offset for fixed nav */
body {
  padding-top: 72px;
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--speed) ease;
}

.logo-accent {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  text-decoration: none;
  transition: color var(--speed) ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--speed) ease;
}

.nav-links a:hover {
  color: var(--accent);
  opacity: 1;
}

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

.nav-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ===== TOGGLE BUTTONS ===== */
.toggle-btn {
  background: var(--toggle-bg);
  color: var(--toggle-text);
  border: 1px solid var(--toggle-border);
  border-radius: 2rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--speed) ease;
  white-space: nowrap;
}

.toggle-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ============================================
   HAMBURGER NAV
   ============================================ */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
}

/* ── Ícone ── */
.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 30px;
  width: 30px;
  cursor: pointer;
  z-index: 10;
  position: relative;
}

.hamburger-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color var(--speed) ease;
  transform-origin: center;
}

.hamburger-icon span:first-child {
  transform: translateY(-8px);
}

.hamburger-icon span:nth-child(2) {
  transform: translateY(0);
}

.hamburger-icon span:last-child {
  transform: translateY(8px);
}

.hamburger-icon.open span:first-child {
  transform: translateY(0) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-icon.open span:last-child {
  transform: translateY(0) rotate(-45deg);
}

/* ── Dropdown ── */
.menu-links {
  /* posicionamento */
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  z-index: 100;

  /* visual */
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;

  /* fechado: invisível e fora do fluxo de clique */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease,
    background var(--speed) ease,
    border-color var(--speed) ease;
}

/* aberto */
.menu-links.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Itens ── */
.menu-links li {
  list-style: none;
}

.menu-links li a {
  display: block;
  padding: 0.8rem 1.4rem;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  transition: background var(--speed) ease, color var(--speed) ease;
  border-radius: 0.5rem;
  margin: 0.1rem 0.4rem;
}

.menu-links li a:hover {
  background: var(--toggle-bg);
  color: var(--accent);
  opacity: 1;
}

/* ── Controles (lang + theme) ── */
.menu-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem 0.75rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--glass-border);
}

/* ============================================
   SECTIONS — GENERAL
   ============================================ */
section {
  min-height: 100vh;
  padding: 5rem 10rem;
  position: relative;
  overflow: hidden;
}

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

.section__text__p1 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--speed) ease;
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  transition: background var(--speed) ease,
    border-color var(--speed) ease,
    box-shadow var(--speed) ease,
    transform 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px var(--accent-glow);
}

/* ============================================
   HERO / PROFILE
   ============================================ */
#profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6rem;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

/* background orbs */
.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 480px;
  height: 480px;
  top: -100px;
  left: -80px;
  background: var(--orb-1);
}

.orb-2 {
  width: 400px;
  height: 400px;
  bottom: -80px;
  right: -60px;
  background: var(--orb-2);
}

/* ── Section orbs (subtler than hero) ── */
.section-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* About: orb top-right — azul */
.about-orb {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -100px;
  background: rgba(91, 106, 240, 0.35);
}

[data-theme="dark"] .about-orb {
  background: rgba(121, 134, 248, 0.28);
}

/* Projects: orb bottom-left — roxo */
.projects-orb {
  width: 400px;
  height: 400px;
  bottom: -80px;
  left: -100px;
  background: rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .projects-orb {
  background: rgba(167, 139, 250, 0.25);
}

/* Contact: orb centralizado — azul suave */
.contact-orb {
  width: 380px;
  height: 380px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(91, 106, 240, 0.28);
}

[data-theme="dark"] .contact-orb {
  background: rgba(121, 134, 248, 0.22);
}

.section__pic-container {
  position: relative;
  width: 320px;
  height: 320px;
  flex-shrink: 0;
  z-index: 1;
}

/* circular ring behind photo */
.pic-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--btn-primary);
  opacity: 0.5;
  animation: spinRing 6s linear infinite;
}

@keyframes spinRing {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.section__pic-container img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  z-index: 2;
}

.section__text {
  text-align: center;
  z-index: 1;
}

.section__text__p1 {
  margin-bottom: 0.25rem;
}

.hero-name {
  font-size: 3.5rem;
  background: var(--btn-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.4rem 0;
}

.section__text__p2 {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--btn-primary);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--btn-outline-text);
  border: 2px solid var(--btn-outline-border);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  background: var(--btn-primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ============================================
   SOCIALS
   ============================================ */
#socials-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  opacity: 1;
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
  opacity: 1;
}

.social-icon {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ICONS */
.icon {
  cursor: pointer;
  height: 2rem;
}

.check-icon {
  cursor: default;
  height: 1.4rem;
  filter: hue-rotate(200deg) saturate(2) brightness(1.2);
}

.card-icon {
  height: 2.2rem;
  margin-bottom: 0.4rem;
  display: block;
  margin-inline: auto;
}

[data-theme="dark"] .social-icon,
[data-theme="dark"] .card-icon,
[data-theme="dark"] .arrow {
  filter: invert(0.85) brightness(2);
}

[data-theme="dark"] .check-icon {
  filter: hue-rotate(200deg) saturate(2) brightness(1.8);
}

[data-theme="dark"] .contact-icon {
  filter: invert(0.85) brightness(2);
}

/* Next.js devicon is black — invert on dark mode */
[data-theme="dark"] .devicon-nextjs-plain {
  filter: invert(1);
}

.arrow-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.arrow {
  height: 2rem;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  padding: 5rem 10rem;
}

.section-container {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

#about .section__pic-container {
  width: 320px;
  height: 380px;
  flex-shrink: 0;
  border-radius: 1.5rem;
  overflow: hidden;
}

#about .section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}

.about-details-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.about-containers {
  display: flex;
  gap: 1.5rem;
}

.details-container {
  padding: 1.75rem;
  flex: 1;
  text-align: center;
}

.details-container h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
  color: var(--text);
}

.details-container p {
  font-size: 0.88rem;
}

.period {
  font-size: 0.8rem !important;
  color: var(--accent) !important;
  margin-top: 0.2rem;
  font-weight: 500;
}

.company-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
  border-radius: 2rem;
  padding: 0.15rem 0.65rem;
  margin: 0.35rem 0 0.1rem;
  transition: background var(--speed) ease, color var(--speed) ease, opacity var(--speed) ease;
  opacity: 1;
}

.company-link:hover {
  background: var(--accent-2);
  color: #fff;
  opacity: 1;
}

.career-track {
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.3rem;
  letter-spacing: 0.03em;
  font-style: italic;
}

.text-container {
  padding: 1.75rem;
}

.text-container p {
  line-height: 1.8;
  font-size: 0.95rem;
}

.bio-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  transition: color var(--speed) ease, opacity var(--speed) ease;
}

.bio-link:hover {
  color: var(--accent-2);
  opacity: 1;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
#experience {
  padding: 5rem 10rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
}

#experience .about-containers {
  gap: 2rem;
  width: 100%;
}

.experience-sub-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-align: center;
}

.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  cursor: default;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px var(--accent-glow);
  border-color: var(--accent);
}

/* Devicon <i> size */
.skill-icon {
  font-size: 3.2rem;
  line-height: 1;
}

/* SVG custom icons (Apex) */
article.skill-item svg.skill-icon {
  width: 3.2rem;
  height: 3.2rem;
  font-size: unset;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
#projects {
  padding: 5rem 10rem;
}

.projects-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.project-img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0 0;
  height: 200px;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 30, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 1.25rem 1.25rem 0.25rem;
  transition: color var(--speed) ease;
}

.project-tech {
  font-size: 0.78rem;
  color: var(--accent) !important;
  font-weight: 500;
  padding: 0 1.25rem 1.25rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 5rem 10rem;
}

.contact-info-upper-container {
  display: flex;
  align-items: center;
  padding: 2rem 3rem;
  gap: 2rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-info-container p {
  font-size: 1rem;
  color: var(--text-muted);
}

.contact-info-container a {
  color: var(--text);
  font-weight: 500;
}

.contact-info-container a:hover {
  color: var(--accent);
  opacity: 1;
}

.contact-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--glass-border);
}

.contact-icon {
  cursor: default;
  height: 2rem;
}

.email-icon {
  height: 2.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--glass-border);
  padding: 2.5rem 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: background var(--speed) ease;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--speed) ease;
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted) !important;
}