* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  scroll-behavior: smooth;
  /* border: 1px solid red; */
}

.main-section {
  position: relative;
  height: 85vh;
  background-image: url(pics/blob-scene-haikei.svg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.navbar {
  display: flex;
  justify-content: flex-end;
  gap: 2vw;
  background-color: transparent;
  padding: 1.5vh 5vw;
  font-family: "Roboto Mono", monospace;
}

.links {
  font-size: clamp(0.5rem, 3vw, 1rem);
  color: #e9ecef;
  text-decoration: none;
}

.links:hover {
  text-decoration: underline;
}

#nav-icon1 {
  width: 30px; /* Reduced width */
  height: 20px; /* Reduced height */
  position: relative;
  margin: 15px auto; /* Adjusted margin */
  cursor: pointer;
  transition: 0.5s ease-in-out;
  display: none; /* Hidden on larger screens */
}

#nav-icon1 span {
  display: block;
  position: absolute;
  height: 3px; /* Thinner bars */
  width: 100%;
  background: #ffffff;
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transition: 0.25s ease-in-out;
}

/* Adjusted positioning for the bars */
#nav-icon1 span:nth-child(1) {
  top: 0px;
}

#nav-icon1 span:nth-child(2) {
  top: 8px; /* Reduced spacing */
}

#nav-icon1 span:nth-child(3) {
  top: 16px; /* Reduced spacing */
}

/* Transformations for the open state */
#nav-icon1.open span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

#nav-icon1.open span:nth-child(2) {
  opacity: 0;
  left: -30px; /* Adjusted for smaller width */
}

#nav-icon1.open span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

.hero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 1200px;
}

.introduction {
  display: flex;
  flex-direction: column;
  width: 40vw;
  max-width: 500px;
  min-width: 300px;
}

.introduction a {
  color: aliceblue;
  text-decoration: underline;
  cursor: pointer;
}

.introduction a:hover {
  color: #4f8ac5;
}

.typewriter {
  overflow: hidden;
  border-right: 0.15em solid rgb(255, 255, 255); /* Typewriter cursor */
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.15em;
  width: 0; /* Start hidden */
  animation: typing 2s steps(40, end) forwards, blink-caret 1s step-end infinite;
}

/* The typing effect */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 250px; /* Stop exactly at the text width */
  }
}

/* The typewriter cursor effect */
@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: aliceblue;
  }
}

#hello-world {
  font-size: 0.9rem;
  font-weight: 500;
  font-family: "Roboto Mono", monospace;
  color: #4f8ac5;
}

#name {
  font-size: clamp(2.5rem, 3vw, 5rem);
  width: 500px !important;
  font-weight: 500;
  color: aliceblue;
  opacity: 0; /* Start hidden */
  animation: fadeInSlideUp 0.6s ease-out forwards;
  animation-delay: 2s; /* Matches the typing duration */
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#front-end {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(1rem, 1vw, 1rem);
  color: rgb(146, 152, 158);
  font-weight: 500;
  max-width: 90%;
  opacity: 0; /* Start hidden */
  animation: fadeInSlideUp 0.6s ease-out forwards;
  animation-delay: 2.5s; /* Matches the typing duration */
}

.socials {
  display: flex;
  gap: 1vw;
  margin-top: 1.5vh;
  cursor: pointer;
  opacity: 0; /* Start hidden */
  transform: translateX(-50px); /* Start position off-screen */
  animation: slideInFromLeft 0.6s ease-out forwards;
  animation-delay: 2.8s; /* Adjust to match other animations */
}

.socials {
  display: flex;
  gap: 1vw;
  margin-top: 1.5vh;
  cursor: pointer;
}

.socials a {
  opacity: 0; /* Start hidden */
  transform: translateX(-50px); /* Start position off-screen */
  animation: slideInFromLeft 0.6s ease-out forwards;
}

/* Email Icon */
.socials a:nth-child(3) {
  animation-delay: 2.5s; /* Email appears first */
}

/* GitHub Icon */
.socials a:nth-child(2) {
  animation-delay: 2.8s; /* GitHub appears second */
}

/* LinkedIn Icon */
.socials a:nth-child(1) {
  animation-delay: 3.1s; /* LinkedIn appears last */
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.socials img {
  max-width: 30px;
}

#blob {
  max-width: 45%;
  min-width: 350px;
  filter: grayscale(100%);
}

/*ABOUT ME*/

.about-me-section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90vh;
  background-color: #e9ecef;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1vw;
}

.text h1 {
  color: #212529;
  font-family: "Roboto Mono", monospace !important;
  font-size: clamp(1.5rem, 1.5vw, 2rem); /* minimum, preferred , maximum*/
  margin-bottom: 10px;
}

.container p {
  font-size: clamp(1rem, 1vw, 1rem);
  max-width: 500px;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
}

.container img {
  width: 50vw;
  max-width: 600px;
}

.text {
  max-width: 40vw;
  min-width: 30vw;
}

span {
  /*ALL spans*/
  color: #4f8ac5;
}

/*PROJECTS SECTION*/

.projects-section {
  height: 85vh;
  background-color: #212529;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.projects-section h1 {
  color: #e9ecef;
  font-family: "Roboto Mono", monospace !important;
  font-size: clamp(1.5rem, 1.5vw, 2rem); /* minimum, preferred , maximum*/
  margin-bottom: 50px;
}

.projects-container {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
  max-width: 90%;
}

.project {
  position: relative;
  height: 50vh;
  width: 450px;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  background-color: #4f8ac509;
  color: aliceblue;
}

.project:hover {
  transform: scale(1.05);
  box-shadow: 0px 10px 20px rgba(255, 255, 255, 0.2);
}

.overlay {
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: auto; /* Adjust based on how much space you need */
  background: rgba(0, 0, 0, 0.562);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;

  opacity: 1; /* Make it always visible */
  transition: none; /* Remove fade-in effect */
}

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

.overlay h2 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.overlay p {
  font-size: 1rem;
  opacity: 0.8;
}

#project-1 {
  background-image: url("pics/projects/travel-gallery.png");
}

#project-2 {
  background-image: url("pics/projects/book-finder.png");
  background-size: contain;
  background-repeat: no-repeat;
}

@media screen and (max-width: 768px) {
  /*MAIN SECTION*/
  .navbar {
    justify-content: center;
    align-items: center;
    display: none; /* Hide navbar initially */
  }

  .navbar.show {
    display: flex; /* Show when toggled */
    justify-content: center;
    align-items: center;
  }

  .links {
    opacity: 1;
    display: block;
    text-align: center;
    padding: 10px 0;
    font-size: 1.1rem;
  }

  #nav-icon1 {
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .introduction {
    width: 100%;
    text-align: center;
    justify-content: center;
    align-items: center;
  }

  .socials {
    gap: 30px;
  }

  /*ABOUT ME*/
  .container {
    flex-direction: column-reverse;

    gap: 50px;
  }

  .container h1 {
    text-align: center;
  }
  .container img {
    width: 60%;
  }

  .text {
    max-width: 80%; /* Allow text to take up more space */
    min-width: auto;
  }

  .text p {
    font-size: 1rem;
  }

  .projects-section {
    padding: 50px;
    height: 100%;
  }

  .project {
    width: 350px;
  }

  .projects-container {
    flex-direction: column;
    align-items: center;
  }
}
