/* ======================= */
/* VARIÁVEIS DE TEMA */
/* ======================= */
:root {
  --bg-color: #e9f1fa;
  --text-color: #0a192f;
  --accent-color: #00abe4;
  --card-color: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --button-bg: var(--accent-color);
  --button-text: #ffffff;
  --button-hover: #0096c9;
}

[data-theme="dark"] {
  --bg-color: #0b1729;
  --text-color: #e9f1fa;
  --accent-color: #e9f1fa;
  --card-color: #12263f;
  --header-bg: rgba(11, 23, 41, 0.95);
  --button-bg: #d9e7f5;
  --button-text: #0a192f;
  --button-hover: #bcd8f0;
}

/* ======================= */
/* RESET */
/* ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  transition: background 0.4s ease, color 0.4s ease;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ======================= */
/* HEADER */
/* ======================= */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  gap:1rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-section .avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
}

.logo-section .avatar-text {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ======================= */
/* NAVBAR */
/* ======================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
 
}

.navbar ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.navbar a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: color 0.3s ease, transform 0.2s ease;
  font-size: 0.9rem;
}

.navbar a:hover {
  color: var(--accent-color);
  transform: translateY(-1px);
}

.nav-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  transition: filter 0.3s ease;
}

[data-theme="dark"] .nav-icon {
  filter: invert(1) hue-rotate(180deg);
}

/* ======================= */
/* NAVBAR - CORREÇÃO PARA DARK MODE */
/* ======================= */
[data-theme="dark"] .navbar a {
  color: var(--text-color);
}

[data-theme="dark"] .navbar a:hover {
  color: #00abe4;
  transform: translateY(-1px);
}

[data-theme="dark"] .navbar a:hover .nav-icon {
  filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

/* ======================= */
/* SWITCH DARK/LIGHT */
/* ======================= */
.theme-slot {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-label {
  display: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 34px;
  transition: background-color 0.4s;
}

.slider::before {
  position: absolute;
  content: "☀️";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 13px;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider::before {
  transform: translateX(22px);
  content: "🌙";
}

/* ======================= */
/* IDIOMA */
/* ======================= */
.language-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-switch label {
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.language-switch select {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--accent-color);
  background-color: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-switch select:hover {
  background-color: var(--button-hover);
  box-shadow: 0 0 6px rgba(0, 171, 228, 0.3);
}

[data-theme="dark"] .language-switch select {
  background-color: var(--button-bg);
  color: var(--button-text);
  border-color: #bcd8f0;
}

/* ======================= */
/* INTRODUÇÃO */
/* ======================= */
.intro-section {
  position: relative;
  width: 100%;
  color: var(--text-color);
}

.background-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  filter: brightness(0.55);
}

.intro-content {
  position: relative;
  margin-top: -60px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 20%;
  z-index: 2;
}

.intro-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--accent-color);
  object-fit: cover;
  background-color: var(--card-color);
  margin-bottom: 0.6rem;
}

.intro-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.4rem;
}

/* ======================= */
/* BIO */
/* ======================= */
.bio {
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.intro-wrapper {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;
}

.intro-bio {
  flex: 1;
  background-color: var(--card-color);
  padding: 1.4rem 1.6rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 171, 228, 0.1);
  line-height: 1.6;
  text-align: left;
  font-size: 0.93rem;
  color: var(--text-color);
}

.intro-bio strong {
  color: var(--accent-color);
}

.intro-photo {
  flex: 0 0 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-photo img {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 171, 228, 0.25);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.intro-photo img:hover {
  transform: scale(1.02);
}

/* ======================= */
/* SEÇÕES */
/* ======================= */
.section {
  max-width: 650px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.section h2 {
  color: var(--accent-color);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0, 171, 228, 0.3);
  padding-bottom: 0.4rem;
}

.section p,
.section ul {
  font-size: 0.92rem;
  line-height: 1.75;
}

.section ul li {
  margin-bottom: 0.6rem;
  margin-left: 1rem;
}

/* LINKS */
.section a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.section a:hover {
  color: #007bbd;
  text-shadow: 0 0 6px rgba(0, 171, 228, 0.25);
}

[data-theme="dark"] .section a {
  color: #a8dfff;
  text-shadow: 0 0 6px rgba(168, 223, 255, 0.2);
}

[data-theme="dark"] .section a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* ======================= */
/* ARTIGOS COM PIN */
/* ======================= */
.pin-article {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 30px;
}

.pin-line {
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-color);
  z-index: 1;
}

.pin-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  background-color: var(--accent-color);
  border-radius: 50%;
  z-index: 2;
  border: 3px solid var(--bg-color);
}

.article-content {
  position: relative;
  z-index: 3;
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 0.8rem;
}

.article-content ul {
  margin-left: 1rem;
}

/* ======================= */
/* HABILIDADES COM PIN */
/* ======================= */
.skills-container {
  position: relative;
  padding-left: 30px;
}

.skills-list {
  list-style: none;
  margin-left: 0;
  position: relative;
  z-index: 3;
}

.skills-list li {
  margin-bottom: 0.8rem;
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
}

.skill-text {
  font-weight: 500;
  color: var(--text-color);
}

/* Pin específico para habilidades */
#habilidades .pin-line {
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-color);
  z-index: 1;
}

#habilidades .pin-dot {
  left: 0;
  top: 10px;
  width: 18px;
  height: 18px;
  background-color: var(--accent-color);
  border-radius: 50%;
  z-index: 2;
  border: 3px solid var(--bg-color);
}



/* ======================= */
/* EDUCAÇÃO */
/* ======================= */
.education-item {
  margin-bottom: 2rem;
}

.education-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.education-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 6px;
  background-color: var(--card-color);
  box-shadow: 0 0 6px rgba(0, 171, 228, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.education-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0, 171, 228, 0.3);
}

.education-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

/* ======================= */
/* PROJETOS */
/* ======================= */
.project-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.project-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 6px;
  background-color: var(--card-color);
  box-shadow: 0 0 6px rgba(0, 171, 228, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0, 171, 228, 0.3);
}

[data-theme="dark"] .project-logo {
  filter: invert(1) brightness(1);
  background-color: #fff;
}

/* ======================= */
/* CONTATOS */
/* ======================= */
.contact-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}

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

.contact-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
  background-color: var(--card-color);
  box-shadow: 0 0 6px rgba(0, 171, 228, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}

[data-theme="dark"] .contact-logo {
  background-color: #ffffff;
  border: 2px solid rgba(0, 171, 228, 0.6);
  padding: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.contact-item:hover .contact-logo {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(0, 171, 228, 0.3);
}

/* ======================= */
/* FOOTER */
/* ======================= */
footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-color);
  font-size: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

footer span {
  color: var(--accent-color);
  font-weight: 600;
}

/* ======================= */
/* RESPONSIVIDADE */
/* ======================= */
@media (max-width: 600px) {
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .education-logo {
    width: 35px;
    height: 35px;
  }

  .contact-logo {
    width: 38px;
    height: 38px;
  }

  .project-logo {
    width: 45px;
    height: 45px;
  }

  /* Ajustes para pin em mobile */
  .pin-article {
    padding-left: 25px;
  }

  .skills-container {
    padding-left: 25px;
  }

  .pin-dot {
    width: 16px;
    height: 16px;
  }
}

/* 🔹 Quebra da introdução aos 500px */
@media (max-width: 545px) {
  .intro-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }

  .intro-photo {
    order: 2;
  }

  .intro-bio {
    order: 1;
    font-size: 0.88rem;
    padding: 1rem 1.2rem;
  }

  .intro-name {
    font-size: 1.3rem;
  }

  .intro-content {
    padding-left: 10%;
  }
}

/* ======================= */
/* MENU RESPONSIVO */
/* ======================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 35px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 958px) {
  .main-header {
    display: flex;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
  }

  #themeSlotHeader {
    display: none;
  }

  .navbar {
    position: fixed;
    top: 55px;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: var(--card-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    border-top: 1px solid rgba(0, 171, 228, 0.2);
    z-index: 1000;
  }

  .navbar.active {
    max-height: 60vh;
    opacity: 1;
    padding: 1rem 0;
  }

  .navbar ul {
    flex-direction: column;
    gap: 1.6rem;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .navbar a {
    font-size: 1.1rem;
    font-weight: 700;
  }

  .navbar.active .theme-label {
    display: block;
  }

  #themeSlotNav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }

  .theme-toggle {
    justify-content: center;
  }

  .language-switch {
    justify-content: center;
    margin-bottom: 1rem;
  }
}