:root {
  --text-color: #1a1c20;
  --link-color: #ffffff;
  --background-color: #eeeff1;
  font-size: 17px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
}

a {
  color: var(--text-color);
  text-decoration: none;
}

nav {
  display: flex;
  justify-content: space-between;
  padding: 0 3.125rem;
  height: 5rem;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #bfd6c4;
  backdrop-filter: blur(5px);
}

nav .left a {
  color: var(--text-color);
  font-size: 1.5rem;
  font-weight: 600;
}

nav .right a {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0.625rem;
}

nav .right a:hover {
  color: var(--link-color);
  transition: color 0.2s ease-in-out;
}

/* Hide burger by default */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 2px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  nav .right {
    display: none; /* hide menu initially */
    position: absolute;
    top: 5rem; /* below navbar */
    right: 0;
    background-color: #bfd6c4f8;
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding: 2rem 0;
    gap: 1.5rem;
  }

  nav .right a {
    margin: 0;
    padding: 1rem 0;
    display: block;
    font-size: 1.5rem;
  }

  .burger {
    display: flex; /* show burger on mobile */
  }

  nav.active .right {
    display: flex; /* show menu when active */
  }
}

section {
  padding: 8rem 2rem;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

section:nth-of-type(odd) {
  background-color: #f8f8f8;
}

section:nth-of-type(even) {
  background-color: #ffffff;
}

section h2 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  letter-spacing: 1px;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 4px;
  background-color: #bfd6c4;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* About Section */
#about {
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2rem;
  display: flex;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

#about h2 {
  margin-bottom: 1rem;
  font-size: 2.75rem;
  font-weight: 700;
}

#about .hero {
  width: 20rem;
  height: 20rem;
  overflow: hidden;
  margin-top: 1rem;
  margin-bottom: 37px;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#about .hero img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

#about .hero img:hover {
  transform: scale(1.2);
}

#about .bio {
  margin-bottom: 2rem;
  padding: 0 2rem;
  max-width: 56.25rem;
}

#about .bio p {
  font-size: 1.25rem;
  font-weight: 300;
}

#about .social-links {
  font-size: 2.25rem;
}

#about .social-links a {
  padding: 0;
  margin: 0 0.75rem;
}

#about .social-links a i {
  transition: transform 0.3s, color 0.3s;
}

#about .social-links a:hover i {
  color: #a5d6b0;
  transform: scale(1.2);
}

#about .social-links i {
  color: #588061;
  font-weight: 500;
}

/* Projects Section */
#projects {
  width: 100%;
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

#projects h2 {
  margin-bottom: 1rem;
  font-size: 2.75rem;
  font-weight: 700;
}

#projects h3 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: underline;
}

.project-subsection {
  width: 100%;
  margin-bottom: 4rem;
}

.projects-scroll-container {
  display: flex;
  gap: 1.5rem;
  padding: 1rem;
  width: 100%;
  max-width: 1600px;
  overflow-x: auto; 
  margin: 0 auto;
}

.project-box {
  width: 18rem;
  flex: 0 0 16rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  border: 1px solid #d7dbd8;
  border-radius: 0.5rem;
  padding: 1rem;
  background-color: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-box:hover {
  transform: scale(0.95);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.project-box img {
  width: 100%;
  height: auto;
  max-height: 20rem;
  object-fit: contain;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

.project-box h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.project-box h5 {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.project-box p {
  font-size: 1rem;
  font-weight: 300;
  color: #494a4a;
}

/* Skills Section */
#skills {
  min-height: 30vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

#skills h2 {
  margin-bottom: 1rem;
  font-size: 2.75rem;
  font-weight: 700;
}

#skills .skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

#skills i {
  font-size: 3rem;
  color: #588061;
  transition: transform 0.3s ease, color 0.3s ease;
  margin: 1rem 0;
}

#skills i:hover {
  color: #a5d6b0;
  transform: scale(1.2);
}

footer {
  background-color: #909090;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.875rem;
}

/* Cards Swiper */
.swiper {
  width: 100%;
  overflow-x: scroll !important;
}

.swiper-slide {
  width: 272px !important;
}

.swiper-slide > a {
  display: block;
  transform: scale(0.9);
  width: 272px;
}

/* Media Queries for Responsiveness */
@media (min-width: 1690px) {
  .swiper-wrapper {
    justify-content:center;
  }
}

@media (max-width: 992px) {
  nav .left a {
    font-size: 1.25rem;
  }

  nav .right a {
    font-size: 1rem;
    margin: 0 0.5rem;
  }

  #about-section .headshot {
    width: 18rem;
    height: 18rem;
  }

  #projects-section .project-box {
    flex: 0 0 14rem; /* Adjust width for smaller screens */
  }

  #skills-section i {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  nav .left a {
    font-size: 1.25rem;
  }

  nav .right a {
    font-size: 1.1rem;
    margin: 0 0.375rem;
  }

  #about-section .headshot {
    width: 16rem;
    height: 16rem;
  }

  #projects-section .project-box {
    flex: 0 0 14rem;
  }

  #skills-section i {
    font-size: 2rem;
  }

  #skills-section .skills-container {
    gap: 1.25rem;
  }
}

@media (max-width: 576px) {
  nav {
    padding: 0 1rem;
  }

  nav .left a {
    font-size: 1.1rem;
  }

  nav .right a {
    font-size: 0.8rem;
    margin: 0 0.25rem;
  }

  #about-section .social-links {
    font-size: 1.75rem;
  }

  #about-section h2 {
    font-size: 2.4rem;
  }

  #about-section .headshot {
    width: 12rem;
    height: 12rem;
  }

  #projects-section .project-box {
    flex: 0 0 14rem;
  }

  #skills-section i {
    font-size: 1.5rem;
  }

  #skills-section .skills-container {
    gap: 1rem;
  }

  section {
    padding: 6rem 1rem; /* Adjust padding for smaller screens */
  }

  #projects-section {
    padding: 6rem 1rem; /* Adjust padding for smaller screens */
  }

  #leave-message-section {
    padding: 3rem 1rem; /* Adjust padding for smaller screens */
  }
}