* {
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style: none;
  text-align: center;
}

body {
  font-family: 'Merriweather', sans-serif;
  margin: 0; /* Remove default body margin */
}

header {
  height: 100vh;
  background-image: url(../Images/code5.jpg);
  background-size: cover;
  opacity: 1;
  background-position: center;
}

.try {
  width: 100%;
  height: 100%;
}

.img-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 1 !important;
  z-index: 2;
  text-align: left;
}

.txt1 {
  font-size: 8rem;
  font-family: 'Merriweather', sans-serif;
  font-weight: bold;
  color: white;
  letter-spacing: 17px;
  text-align: left;
  margin: 0;
  text-transform: uppercase;
  transform: skew(-5deg, -5deg);
  background: linear-gradient(45deg, #fff, #eee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.txt2 {
  font-size: 1.5rem;
  font-family: 'Merriweather', sans-serif;
  font-weight: lighter;
  letter-spacing: 1.5px;
  color: rgb(255, 255, 255);
  text-align: left;
  margin: 0;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 1s forwards ease-in-out;
}

.txt2::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1%;
  width: 85%;
  height: 100%;
  background-color: rgb(22, 83, 14);
  opacity: 0.3;
  z-index: -1;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Redesigned styles for animated info items with matching colors */
.info-container {
  margin-top: 20px;
  width: 100%;
  max-width: 500px; /* Limits width for better readability */
}

.info-item:nth-child(1) {
  animation-delay: 0.5s;
}

.info-item:nth-child(2) {
  animation-delay: 1s;
}

.info-item:nth-child(3) {
  animation-delay: 1.5s;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  position: absolute;
  padding: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  z-index: 10;
}

.navbar a {
  color: white;
}

.navbar .logo {
  font-size: 2em;
  font-weight: bold;
}

.navbar .nav-links ul {
  display: flex;
}

.navbar .nav-links ul li {
  margin: 0 27px;
}

.navbar .nav-links ul .active a {
  color: rgb(0, 131, 33);
  font-weight: 600;
}

.navbar .menu-btn {
  display: none;
  position: absolute;
  top: 50px;
  right: 50px;
  width: 35px;
  cursor: pointer;
}

h1 {
  font-size: 562.5%;
  margin: 50px auto 0 auto;
  font-family: 'Sacramento', cursive;
  color: white;
}

h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  color: white;
  font-weight: normal;
  padding-bottom: 10px;
}

h3 {
  font-family: 'Montserrat', sans-serif;
  color: gray;
  line-height: 3rem;
}

.top-container {
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
}

/* Middle container */
.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E") !important;
  width: 20px;
  height: 20px;
  margin-left: -10px;
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E") !important;
  width: 20px;
  height: 20px;
  margin-right: -10px;
}

#projects {
  background-color: #bfd9ce1d;
  padding-top: 100px;
  padding-bottom: 100px;
}

.projects-text {
  font-size: 3rem;
  line-height: 1.5;
  color: gray;
}

.projects-image {
  width: 10%;
  margin: 20px;
}

.middle-container {
  margin: 100px 0;
}

.bottom-container {
  background-color: #F2D463;
  padding: 50px 0 20px;
}

.contact-me {
  width: 50%;
  margin: 30px auto 30px auto;
  text-align: justify;
}

.contact-heading {
  color: gray;
}

.profile-pic {
  width: 10%;
}

.intro {
  width: 30%;
  margin: auto;
}

.bottom-cloud {
  position: absolute;
  left: 300px;
  bottom: 70px;
  width: 8%;
}

.top-cloud {
  position: absolute;
  right: 300px;
  top: 50px;
  width: 8%;
}

p {
  line-height: 2;
}

hr {
  border: dotted #EAF6F6 6px;
  border-bottom: none;
  width: 4%;
  margin: 100px auto;
}

.contact-message {
  width: 60%;
  margin: 60px auto 60px;
  text-align: justify;
}

.btn-container {
  text-align: center;
  margin-top: 20px;
}

.btn {
  background: #F2A2A2;
  background-image: linear-gradient(to bottom, #F2A2A2, #F2A2A2);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  font-size: 16px;
  padding: 15px 30px;
  text-decoration: none;
  border: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #30e3cb;
  background-image: linear-gradient(to bottom, #30e3cb, #2bc4ad);
  text-decoration: none;
}

.skill-row {
  margin: 100px auto 100px auto;
  width: 50%;
  text-align: left;
}

.skills-imgs {
  width: 25%;
  float: left;
  margin-right: 30px;
}

.penImage {
  width: 25%;
  float: right;
  margin-left: 30px;
}

/* Enhanced Mobile Responsiveness */
@media screen and (max-width: 900px) {
  .navbar {
    padding: 20px;
    display: block;
  }

  .navbar .logo {
    position: absolute;
    top: 20px;
    left: 20px;
  }

  .navbar .menu-btn {
    display: block;
    top: 20px;
    right: 20px;
    z-index: 20; /* Above nav-links */
  }

  .nav-links {
    position: fixed;
    top: 60px; /* Changed to AI Projects position */
    left: auto; /* Not full-screen */
    right: 10px; /* Changed to AI Projects position */
    width: auto; /* Not full-screen */
    height: auto; /* Not full-screen */
    background-color: rgba(236, 236, 241, 0.692); /* Original background */
    backdrop-filter: blur(10px); /* Original blur */
    -webkit-backdrop-filter: blur(10px); /* Original blur for Safari */
    background-color: rgba(0, 0, 0, 0.5); /* Fallback darker background if blur fails */
    display: none; /* Hide by default */
    justify-content: center;
    align-items: center;
    margin-left: -100%; /* Original slide effect */
    transition: all 0.5s ease; /* Original slide effect */
    z-index: 15; /* Above navbar but below menu-btn */
    padding: 10px; /* Add padding to give the menu some space */
  }

  .nav-links.mobile-menu {
    margin-left: 0; /* Original slide effect */
    display: flex; /* Show when toggled */
  }

  .nav-links ul {
    display: flex;
    flex-direction: column; /* Vertical list from AI Projects */
    align-items: center;
    gap: 20px; /* From AI Projects */
    width: 100%; /* Ensure the ul takes full width of its parent */
  }

  .navbar .nav-links ul li {
    margin: 0; /* Reset margin for vertical layout */
    font-size: 1.1rem; /* From AI Projects */
  }

  /* Hide logo when menu is open */
  .nav-links.mobile-menu ~ .logo {
    display: none;
  }
}

/* Remove white border globally */
html, body {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
}

@media screen and (max-width: 768px) {
  .txt1 {
    font-size: 3rem;
    letter-spacing: 8px;
    text-align: center;
  }

  .txt2 {
    font-size: 1rem;
    text-align: center;
    padding: 10px;
  }

  .img-content {
    width: 90%;
    padding: 0 15px;
    text-align: center;
  }

  .info-container {
    max-width: 100%;
  }

  .info-item {
    font-size: 1rem;
    text-align: center;
    padding: 8px 10px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 2rem;
  }

  .projects-text {
    font-size: 1.8rem;
  }

  .projects-image {
    width: 15%;
    margin: 15px;
  }

  .profile-pic {
    width: 15%;
  }

  .intro {
    width: 85%;
  }

  .contact-me {
    width: 85%;
    text-align: justify;
  }

  .contact-message {
    width: 85%;
    font-size: 0.9rem;
    text-align: justify;
  }

  .skill-row {
    width: 85%;
  }

  .skills-imgs,
  .penImage {
    width: 35%;
    float: none;
    margin: 15px auto;
    display: block;
  }

  .bottom-cloud,
  .top-cloud {
    width: 12%;
    left: 10%;
    right: 10%;
  }

  .bottom-cloud {
    bottom: 20px;
  }

  .top-cloud {
    top: 20px;
  }

  .btn {
    font-size: 14px;
    padding: 10px 20px;
  }

  .carousel-control-next-icon,
  .carousel-control-prev-icon {
    width: 15px;
    height: 15px;
  }

  hr {
    width: 8%;
  }
}

@media screen and (max-width: 480px) {
  .txt1 {
    font-size: 2rem;
    letter-spacing: 5px;
  }

  .txt2 {
    font-size: 0.9rem;
  }

  .info-item {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .projects-image {
    width: 20%;
  }

  .profile-pic {
    width: 20%;
  }

  .skills-imgs,
  .penImage {
    width: 50%;
  }

  .bottom-cloud,
  .top-cloud {
    width: 10%;
  }
}