/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', sans-serif;
  color: #333;
  background-color: #f7f7f7;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: #333;
}

/* Navbar Styles */
header nav ul {
  list-style: none;
  margin: 20px 0;
  text-align: center;
  padding: 0;
}

header nav ul li {
  display: inline-block;
  margin-right: 30px;
  position: relative;
}

header nav ul li a {
  color: #333; /* Default color */
  font-size: 1.1em;
  text-decoration: none;
  padding: 8px 16px;
  transition: color 0.3s ease, transform 0.3s ease, border-bottom 0.3s ease; /* Added transition for underline effect */
}

header nav ul li a:hover {
  color: #2C3E50; /* Dark slate blue for a professional look */
  transform: scale(1.05); /* Slight scaling effect */
}

header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2C3E50; /* Matching dark slate blue for the underline */
  transition: width 0.3s ease; /* Smooth transition for the underline width */
}

header nav ul li a:hover::after {
  width: 100%; /* Underline grows on hover */
}


/* Header */
header {
  background: #f6f1e1;
  color: #2a2a2a;
  padding: 60px 20px;
  text-align: center;
  width: 100%;
}

header .hero h1 {
  font-size: 3.5em;
  font-weight: bold;
  margin-bottom: 15px;
}

header .hero p {
  font-size: 1.3em;
  margin-top: 10px;
}

header nav ul {
  list-style: none;
  margin: 20px 0;
  text-align: center;
}

header nav ul li {
  display: inline-block;
  margin-right: 30px;
}

/* About Section */
#about {
  display: flex;
  align-items: center;
  padding: 80px 20px;
  background: #e8f0f2;
  max-width: 1200px;
  margin: 0 auto;
}

.about-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.about-text {
  width: 50%;
}

.about-image {
  display: flex;
  justify-content: flex-start; /* Aligns the image to the left */
  margin-left: 20px; /* Adds a small space to the left of the image */
}

.about-image img {
  width: 100%; /* Ensures the image is responsive */
  height: auto;
  max-width: 250px; /* Reduced max-width for smaller image */
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



/* Projects Section */
#projects {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  max-width: 150px; /* Reduced size for small images */
}

.project-text {
  text-align: left;
  padding-left: 20px;
}

/* Contact Section */
#contact {
  background: #f6f1e1;
  padding: 40px 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

#contact form {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#contact form label {
  display: block;
  margin-top: 10px;
  font-size: 1em;
}

#contact form input,
#contact form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  font-size: 1em;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#contact form button {
  background: #58a6ff;
  color: #fff;
  padding: 15px;
  border: none;
  border-radius: 4px;
  font-size: 1.1em;
  cursor: pointer;
}

footer {
  background: #2a2a2a;
  color: #fff;
  padding: 20px;
  text-align: center;
}

/* Image Hover Effect */
img {
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth zoom-in and shadow effect */
}

img:hover {
  transform: scale(1.05); /* Slight zoom-in */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Soft shadow on hover */
}


html {
  scroll-behavior: smooth; /* Enables smooth scrolling */
}



/* Mobile Responsive Styles */

/* Small Screens (Mobile Portrait) */
@media screen and (max-width: 480px) {
  header .hero h1 {
    font-size: 2.4em; /* Enhanced header font size */
    font-weight: 700;
    color: #2C3E50;
  }

  header .hero p {
    font-size: 1.2em;
    color: #34495E;
    font-weight: 500;
  }

  /* Restore original transparent nav bar */
  header nav {
    background-color: transparent;
    box-shadow: none;
  }

  header nav ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    padding: 12px 0;
    gap: 15px;
    scrollbar-width: none;
    background-color: transparent;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li {
    margin: 0;
    white-space: nowrap;
  }

  header nav ul li a {
    padding: 10px 14px;
    font-size: 1.1em;
    border-radius: 20px;
    transition: background 0.3s ease;
  }

  header nav ul li a:hover {
    background: #cbd7e1;
  }

  #about {
    flex-direction: column;
    padding: 30px 10px; /* Less horizontal padding */
    width: 100%; /* Use full width on small screens */
  }
  
  .about-container {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 0 10px;
  }
  
  
  .about-text {
    font-size: 0.95em; /* Slightly smaller font for more words per line */
    line-height: 1.6;   /* Keeps good readability */
    padding: 0 5px;     /* Less horizontal padding */
    width: 100%;        /* Use full width */
    max-width: 100%;
    color: #2C3E50;
    font-weight: 500;
    text-align: center;   /* Align to left for easier reading */
  }
  
  .about-image {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
  }

  .about-image img {
    width: 60%;
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  }

  #projects {
    padding-top: 30px;
  }

  #projects h2 {
    font-size: 2em;
    color: #2C3E50;
    margin-bottom: 20px;
  }

  #projects .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .project {
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
  }

  .project:hover {
    transform: translateY(-5px);
  }

  .project h3,
  .project p {
    font-size: 1.2em;
    line-height: 1.9;
    color: #34495E;
  }

  .project-text {
    padding-left: 0;
    text-align: center;
  }

  #contact form {
    width: 92%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
  }

    #about,
    #projects,
    #contact {
    width: 95%;
    margin: 0 auto;
}

}





/* Medium Screens (Mobile Landscape / Small Tablets) */
@media screen and (min-width: 481px) and (max-width: 768px) {
  header .hero h1 {
    font-size: 2.5em; /* Adjusted for medium screens */
  }

  header .hero p {
    font-size: 1.2em;
  }

  #about {
    flex-direction: column;
    padding: 60px 20px;
  }

  .about-container {
    flex-direction: column;
    align-items: center;
  }

  .about-text {
    width: 100%;
    text-align: center;
  }

  .about-image {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.about-image img {
  width: 80%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


  #projects .projects-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
  }

  .project {
    padding: 20px;
  }

  .project-text {
    text-align: left;
  }

  #contact form {
    width: 80%;
  }
}
