/* === RESET AND GLOBAL STYLES ============================================== */

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  background-color: #F0F1F5;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  font-family: Poppins, sans-serif;
  color: #111;
  line-height: 1.5;
  min-height: 100vh;
}

h3 { text-align: center; }

a {
  text-decoration: none;
  color: #F0F5F9;
  font-size: 15px;
}

.page-container {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
}

/* === UTILITIES & COMMON STYLES ============================================ */

#about-link { scroll-margin-top: 1rem; }
#project-link, #skill-link, #educational-link, #experience-link, #contact-link { scroll-margin-top: 6rem; }

.section-heading {
  text-align: center;
  font-size: 2rem;
  margin: 2rem 0;
}

section { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}

.section-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 90%;
  padding: 0 1rem;
}

.content-card {
  padding: 1.5rem;
  border: 1px solid black;
  border-radius: 1.875rem;
  max-width: 100%;
  margin: 0 auto;
  transition: transform 0.3s ease-in-out;
}

#img-profile-educational,
#img-profile-experience {
  width: 70%;
  max-width: 250px;
  height: auto;
  padding: 0;
  display: block;
  margin: 0 auto;
  order: -1;
}

#img-profile-experience { border-radius: 10%; }

/* === MENU SECTION (HEADER / NAV) ========================================== */

.nav-list, .footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 25px;
  align-items: center;
}

.nav-list li, .footer-list li { display: inline-block; }

.nav-list a {
  color: #F0F5F9;
  padding: 5px;
  font-size: 15px;
}

.nav-list a:hover {
  background-color: rgba(255,255,255,0.1);
  border-radius: 0.3rem;
  transition: 0.2s;
}

.nav-menu {
  position: fixed;
  top: 0.5rem;
  left: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-end; 
  background-color: transparent; 
  border-radius: 0; 
  padding: 0; 
  width: auto;
}

#site-brand { 
  display: none; 
  font-weight: bolder; 
  font-size: 1.2rem; 
}

.btn-github {
  background-color: #0076B2;
  padding: 0.3rem 0.8rem;
  margin: 0.3px;
  border-radius: 25px;
  font-weight: bold;
}

.btn-github:hover { background-color: #025d8a; transition: 0.2s; }

.nav-list, .btn-github { display: none; }

.hamburger-menu {
  display: block;
  background: none;
  border: none;
  color: #333; 
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  z-index: 1002; 
  padding: 0.5rem; 
}

.close-menu {
  display: block;
  background: none;
  border: none;
  color: #F0F5F9;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  color: #fff;
  display: none;
}

.nav-list.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(75,73,73,0.95);
  z-index: 1001;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.nav-list.open .close-menu { display: block; }
.nav-list.open li { display: block; margin: 10px 0; }
.nav-list.open a { font-size: 1.5rem; color: #F0F5F9; }

@media (min-width: 993px) {
  .hamburger-menu, .close-menu {
    display: none;
  }

  .nav-list,
  .btn-github {
      display: flex;  
  }
  
  .nav-menu {
      background-color: rgb(75, 73, 73); 
      border-radius: 25px; 
      padding: 0.4rem 1.5rem; 
      top: 1rem; 
      left: 50%; 
      right: auto; 
      transform: translateX(-50%); 
      width: max-content; 
      gap: 20px; 
      justify-content: space-between; 
  }
  
  .nav-list {
    flex-direction: row;
    gap: 15px; 
    margin: 0; 
  }

  .nav-list a {
    padding: 3px 5px; 
  }
    
  .btn-github {
    padding: 0.3rem 1rem; 
    margin-left: 15px; 
  }
  
  #site-brand {
    display: block; 
    color: #F0F5F9; 
    margin-right: 20px; 
    flex-shrink: 0; 
  }
  
  #project-link,
  #skill-link,
  #educational-link,
  #experience-link,
  #contact-link {
    scroll-margin-top: 6rem;
  }
}

/* === ABOUT SECTION ======================================================== */

.about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding-top: 6rem;
  min-height: 100vh;
}

#img-profile-about { 
  height: 18rem; 
  width: 18rem; 
  border-radius: 50%; 
  margin: 0 0 2rem 0; 
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.about-content p, h1, h2 { margin: 0; }
.about-content p { margin-bottom: 2px; font-weight: 300; }
.about-content h1 { margin-bottom: 2px; font-size: 2.5rem; font-weight: 650; }
.about-content h2 { margin-bottom: 20px; color: blue; font-size: 120%; font-weight: 300; }

.cta {
  color: black;
  border: 1px solid black;
  border-radius: 14px;
  padding: 4px 10px;
  margin: 2px;
}

.cta:hover { 
  background-color: black; 
  color: white; 
  transition: 0.2s; 
}

.social-icon {
  height: 1.875rem;
  width: 1.875rem;
  margin-top: 1.375rem;
  padding: 0.375rem;
  transition: transform 0.3s ease-in-out;
}

.social-icon:hover { transform: scale(1.3); }
#icon-linkedin { border-radius: 25%; }

@media (min-width: 993px) {
  .about-section { flex-direction: row; padding-top: 0; }
  #img-profile-about { height: 25rem; width: 25rem; margin: 0 3rem 0 0; }
}

/* === PROJECTS SECTION ===================================================== */

.projects-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  padding: 10px 20px;
  text-align: center;
  min-height: 100vh;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  border: 1px solid black;
  border-radius: 12px;
  padding: 4px;
}

.project-img { 
  width: 220px; 
  height: 180px; 
  border-radius: 10%; 
  margin-top: 10px; 
}

.project-text { 
  padding: 6px 10px; 
  text-align: justify; 
  font-size: 14px; 
}

.project-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 5px 20px 5px;
  padding: 4px 10px;
  color: black;
  border: 1px solid black;
  border-radius: 30px;
  font-size: 13px;
}

.project-link a:hover { 
  background-color: black; 
  color: #F0F5F9; 
  transition: 0.2s; 
}

@media (max-width: 992px) { 
  .project-grid { grid-template-columns: repeat(2, 1fr); max-width: 90%; } 
}

@media (max-width: 768px) { 
  .project-grid { grid-template-columns: 1fr; gap: 1.5rem; max-width: 90%; } 
  .project-card { padding: 1rem; } 
}

/* === SKILL SECTION ======================================================== */

.skill-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 100vh;
}

#skill-card {
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 1.5rem 1rem; 
  padding: 1.5rem;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.skill-item {
  flex: 0 0 calc(33.33% - 1rem); 
  max-width: 120px; 

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease-in-out;
}

.skill-item:hover { transform: scale(1.1); cursor: default; }

.skill-icon { width: 3.5rem; height: 3.5rem; margin-bottom: 0.5rem; }
.skill-name { margin: 0; font-size: 0.875rem; font-weight: 500; color: #333; }

@media (min-width: 768px) {
  /* OBS: A regra original era 'grid-template-columns...', mas você mudou para flex. 
     A regra a seguir não faz sentido com 'display: flex' no #skill-card. 
     Se você quiser que ele mude a coluna/layout no desktop, use flex-basis ou 
     reverta para grid aqui. Mantive o original, mas tenha atenção a isso. */
  #skill-card { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 2.5rem; padding: 2.5rem; }
}

/* === EDUCATIONAL AND EXPERIENCE SECTIONS ================================== */

.educational-section, .experience-section { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 10px; 
  min-height: 100vh; 
}

#img-profile-experience { 
  height: 300px; 
  width: 300px; 
  border-radius: 10%; 
  padding-left: 0; 
}

@media (min-width: 993px) {
  .section-content-wrapper { flex-direction: row; max-width: 900px; gap: 40px; }
  .educational-section .section-content-wrapper { flex-direction: row-reverse; }
  .experience-section .section-content-wrapper { flex-direction: row; }
  #img-profile-educational, #img-profile-experience { width: 300px; height: auto; order: 0; }
}

/* === CONTACT SECTION ====================================================== */
#contact-box {
  display: flex;
  gap: 25px;
  align-items: center;
  border: 1px solid black;
  border-radius: 25px;
  padding: 10px 20px;
  margin-bottom: 200px;
  max-width: fit-content;
}

#contact-box a { color: black; }
#contact-box:hover { 
  background-color: #9b9a9e; 
  transition: 0.2s; 
  cursor: pointer; 
}

strong { color: #443535; }

/* === FOOTER SECTION ======================================================= */
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  padding: 10px 1rem;
  width: 100%;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 90%;
  text-align: center;
}

.footer-nav a {
  color: black;
  transition: color 0.3s;
  padding-bottom: 2px;
  font-size: 1rem;
}

.footer-nav a:hover { 
  color: #005c8a; 
  border-bottom: 1px solid #005c8a; 
  transition: 0.2s; 
}

@media (min-width: 768px) { 
  .footer-list { flex-direction: row; gap: 25px; } 
}