/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
}

html {
    scroll-behavior: smooth;
}

p {
    color: rgb(85,85,85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: center;
  align-items: center;
  height: 17vh;
  position: relative;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.9);
  gap: 8rem;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.hamburger-menu {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  z-index: 1000;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1000; /* Ensure menu links are above other elements */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional: add shadow for better visibility */
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: black;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
  padding: 0.5rem;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

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

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
  position: relative;
  z-index: 1; /* Lower z-index for sections */
  background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
    display: flex;
    height: 400px;
    width: 400px;
    margin: auto 0;
    position: relative;
    z-index: 1; /* Lower z-index for profile picture */
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

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

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  border-radius: 2rem;
  white-space: nowrap; /* Prevent text wrapping */
  text-align: center; /* Center-align text within the button */
}
/*
.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}
*/

.btn-color-1,
.btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  border-radius: 2rem;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8) !important;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

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

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  padding-top: 4rem;
  margin: 0 1rem;
  text-align: center;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem; /* Slightly reduced gap */
  margin-top: 2rem;
}

.project-card {
  background: rgb(31, 31, 31);
  border-radius: 2rem;
  width: clamp(280px, 90%, 350px); /* Increased max percentage, reduced max width */
  overflow: hidden;
}

.article-container {
  width: 100%;
  height: auto;
}

.project-img {
  width: 100%;
  border-radius: 2rem 2rem 0 0;
  display: block; /* Prevent extra space below image */
}

.project-title {
  margin: 1rem;
  color: white;
  font-size: 1.2rem; /* Slightly smaller title */
}

.btn-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem; /* Slightly reduced button gap */
  padding: 0 1rem 1rem 1rem; /* Add horizontal padding */
}

.project-btn {
  background-color: white !important;
  color: black !important;
  font-size: 0.8rem; /* Slightly smaller button text */
  padding: 0.5rem 1rem; /* Adjust button padding */
  margin-top: 10px;
}

.project-btn:hover {
  background-color: var(--color-primary) !important;
  color: white !important;
}

.arrow {
  position: relative;
  bottom: -4rem; /* Adjust arrow position */
  width: 2rem; /* Adjust arrow size if needed */
  height: auto;
}

/* Media query for small tablets and larger phones */
@media screen and (min-width: 600px) {
  .projects-container {
      justify-content: space-around;
  }

  .project-card {
      width: clamp(280px, 45%, 380px); /* Allow two columns on smaller tablets */
  }

  .arrow {
      bottom: -6rem;
  }
}

@media screen and (min-width: 900px) {
  .projects-container {
      justify-content: space-between;
  }

  .project-card {
      width: clamp(300px, 30%, 400px); /* Back to a potential three-column layout */
  }

  .arrow {
      bottom: -8rem;
  }
}

@media screen and (min-width: 1200px) {
  .project-card {
      width: 32%; /* Slightly adjusted for better three-column spacing */
  }
}


/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  gap: 0.5rem;
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
  position: relative;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background */
}

footer p {
  text-align: center;
}

/* PROJECT MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-content.landscape {
  background: white;
  margin: 2% auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  height: 90vh;
}

.modal-stack {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Gallery Section */
.gallery-section {
  background: #f8f8f8;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 60%;
  box-sizing: border-box;
}

.gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* Gallery Navigation */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.prev-slide {
  left: 1rem;
}

.next-slide {
  right: 1rem;
}

/* Project Details */
.project-details {
  margin-top: 32px;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 40%;
}

.project-details h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-description {
  line-height: 1.6;
}

.tech-stack {
  margin-top: auto;
}

.tech-stack h3 {
  margin-bottom: 1rem;
}

.tech-stack ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.tech-stack li {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* CONTAINER NAVIGATION */

.container-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1rem;
  min-height: 3rem;
  position: relative;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: black;
  padding: 0.5rem;
  transition: all 300ms ease;
  z-index: 1;
}

.nav-btn:hover {
  color: rgb(85, 85, 85);
  transform: scale(1.1);
}

.nav-btn:active {
  transform: scale(0.95);
}

.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-around;
  transition: all 300ms ease;
}

.page-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d4d4d4;
  transition: all 300ms ease;
  cursor: pointer;
}

.dot.active {
  background-color: #000000;
  transform: scale(1.2);
}

/* CERTIFICATIONS SECTION */

#certifications {
  padding-top: 4rem;
  margin: 0 1rem;
  text-align: center;
  height: auto;
  min-height: 70vh;
}

.certifications-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.certification-item {
  margin-bottom: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8) !important;
}

.certification-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.certification-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.certification-header h3 {
  font-size: 1.2rem;
  color: rgb(85, 85, 85);
  font-weight: 600;
}

.expand-icon {
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.certification-item.active .expand-icon {
  transform: rotate(45deg);
}

.certification-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.certification-item.active .certification-content {
  max-height: 1000px;
}

.certification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  text-align: left;
}

.certificate-image img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.certificate-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.certificate-date {
  font-size: 0.9rem;
  color: rgb(85, 85, 85);
}

.certificate-issuer {
  font-weight: 600;
  color: rgb(85, 85, 85);
}

.certificate-description {
  line-height: 1.6;
  color: rgb(85, 85, 85);
}

.skills-covered h4 {
  margin-bottom: 0.5rem;
  color: rgb(85, 85, 85);
}

.skills-covered ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-covered li {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  color: rgb(85, 85, 85);
}

/* Add media query for hamburger menu display */
@media screen and (max-width: 768px) {
  #hamburger-nav {
    display: flex;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 999;
  }
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  justify-content: center;
  padding: 0 15px;
}

.tech-tag {
  background-color: #cfd4d7;
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}