* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    max-width: 100%;
    overflow-x: hidden; 
    /* Prevent horizontal scroll */
}
/* --- Container Wrapper --- */
.container {
  position: relative;
  width: 100%;
  margin-top: 10px;
}

/* --- Hero Section (Home) --- */
section#home {
  background-image: url("pics/banner1.jpg");
  background-color: deeppink;
  background-blend-mode: multiply;
  text-align: center;
  opacity: 0.8;
  height: 420px;
  padding: 20px 10px; /* Adjusted for responsiveness */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --- Name Text (Above Skills Text) --- */
.name {
  font-size: 30px;
  font-weight: bold;
  color: white;
  text-align: center;
  margin-bottom: 2px; /* Added space between name and skills */
}

/* --- Text Wrapper (Prevents Button Movement) --- */
.text-wrapper {
  height: 40px; /* Fixed height to prevent button shifting */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevents flickering */
}

/* --- Skills Section (Typing Animation Text) --- */
#skills {
  font-size: 32px;
  font-weight: bold;
  color: yellow;
  font-family: Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
}

/* --- Button Styling --- */
#button {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px; /* Adjusted for better spacing */
  border: none;
  border-radius: 40px;
  background-color: blue;
  color: white;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative; /* Ensures it stays in place */
}

#button a {
  text-decoration: none;
  color: white;
  font-size: 18px;
}

#button:hover {
  background-color: darkblue;
}

#button a:hover {
  color: yellow;
}


/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #333;
    text-align: center;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar ul {
    list-style: none;
    margin-left: 100px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: left 0.5s ease-in-out;
}

.navbar li {
    margin: 0 50px;
}

.navbar a {
    color: #fff; /* Default color for navbar links */
    padding: 10px 15px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s ease, background-color 0.3s ease;
    border-radius: 5px;
    display: inline-block;
}

/* Active link (clicked or scrolled section) */
.navbar a.active {
    color: yellow;
    font-weight: bold;
}
.navbar a:not(.active) { color: white; }
/* Hover effect (should still work) */
.navbar a:hover {
    color: cyan;
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: ;
    background: none;
    border: none;
}
section {
  scroll-snap-align: start;
}


/* Dark Mode Toggle Button */
.toggle-container {
    position: fixed;
    top: -2px;
    right: 20px;
    z-index: 1200;
}

#darkModeToggle {
    background: transparent;
    border: none;
    font-size: 24px;
    color: red; /* Icon color */
    cursor: pointer;
    padding: 10px;
}

#darkModeToggle:hover {
    color: yellow;
}
.dark-mode #darkModeToggle {
    color: yellow;
}
.dark-mode #darkModeToggle:hover {
    color: red;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #121212;
    color: white;
}

.dark-mode .navbar {
    background-color: #222;
}

.dark-mode .nav-link {
    color: white;
}

.dark-mode .btn-custom {
    background-color: yellow;
    color: black;
}
.dark-mode .hamburger{
    color: greenyellow;
}
.dark-mode footer {
    background: #111;
}

.dark-mode .footer-section ul li a, .dark-mode .footer-section, .dark-mode .social-icons a {
color: white;
}

.dark-mode #about-head, .dark-mode #service-head, .dark-mode #blog-head, .dark-mode #contact-head{
    color: white;
}
 .dark-mode .right{
    color: black;
 }
/* --- below 1024px Adjustments --- */


@media screen and (max-width: 1024px) {
   .navbar {
        background: none;
    }

    .navbar ul {
        position: absolute;
        top: -15px;
        left: -120px; /* Keeping original position */
        width: 30%; /* Keeping original width */
        max-width: 90vw; /* Ensures it does not exceed screen width */
        background-color: darkred;
        flex-direction: column;
        align-items: center;
        padding: 50px 0px 20px 0px;
        max-height: 0; /* Initially hidden */
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.7s ease-in-out, opacity 0.5s ease-in-out, transform 0.7s ease-in-out;
        transform: translateY(-20px);
        display: flex;
    }


   .navbar ul li {
        text-align: center; /* Center text inside each list item */
        width: 100%; /* Ensure equal width for all */
        padding: 2px 0px 8px 0px;
    }

    .navbar ul li a {
        color: white;
        display: block;
        text-align: center;
        font-size: 18px;
        width: 100%; /* Helps align text properly */
        padding: 8px 0;
    }

    .navbar ul.show {
        max-height: 500px; /* Adjust based on content */
        opacity: 1;
        transform: translateY(0);
    }

    /* When menu is closing (slowly sliding up) */
    .navbar ul.hide {
        max-height: 0;
        opacity: 0;
        transform: translateY(-20px);
    }

    /* Hamburger button */
   .hamburger {
    display: block;
    font-size: 24px;
    cursor: pointer;
    border: none;
    outline: none;
    position: fixed; /* Ensures it stays visible on scroll */
    top: 10px;
    margin-left: 20px;
    z-index: 9999;
    transition: color 0.3s ease-in-out;
}
    /* When the menu is active, make ✖ yellow */
.navbar ul.show ~ .hamburger {
    color: yellow !important; /* Ensure ✖ turns yellow */
}

.profile-pic.sticky{
    display: none;
}

     /* Style for the hr divider */
    .menu-divider {
    width: 60%; /* Keep it within a controlled width */
    max-width: 180px; /* Set a max width */
    border: none;
    height: 2px;
    background-color: yellow;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    margin: 30px auto 20px auto; /* Ensures perfect centering */
    display: block; /* Ensures correct centering behavior */
}


    /* Show hr when menu is active */
    .navbar ul.show + .menu-divider {
        opacity: 1;
        transform: scaleX(1);
    }
}
    

/* --- Further Adjustments for Mobile (768px and below) --- */
@media screen and (max-width: 768px) {
  
    .navbar ul {
        width: 40%;
    }
   .hamburger{
    margin-left: 10px;
   }
    .name {
        font-size: 24px;
    }

    #skills {
        font-size: 24px;
    }

    #button {
        padding: 8px 16px;
        font-size: 16px;
    }
}


@media (max-width: 500px) {
        .navbar ul {
        width: 50%;
    }
    .hamburger{
    margin-left: 10px;
   }
}
@media (max-width: 450px) {
       
    .hamburger {
    margin-left: 10px;
   }
  #skills{
    font-size: 20px;
  }
}

@media (max-width: 400px) {
       #skills{
    font-size: 16px;
  }
   .navbar ul {
        width: 50%;
    }
    .hamburger {
    margin-left: 2px;
   }
}
@media (max-width: 400px) {
       #skills{
    font-size: 14px;
 }
}


.content {
  padding-top: 60px; /* Adjust this value based on the height of your navbar */
}

#about-head{
   margin-top: 40px;
   font-weight: bold; 
   color: darkred;
   font-size: 30px;
}
.mycontainer {
  display: flex;
  width: 90%;
  margin: 35px 100px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: visible; /* Ensure no overflow constraints */
  height: auto;
}

/* Left Section */
.left-section {
  
  flex: 1;
  padding:10px 40px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

 .profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: fill;
  z-index: 1100; /* Ensure it's above the navbar */
  animation: float 3s ease-in-out infinite;
  position: sticky;
  margin-top: 20px;
  transition: all 1s ease-in-out;
}

/* When profile-pic sticks, move it to the left */
.profile-pic.sticky {
  position: fixed;
  left: 100px;
  top: -15px; /* Adjusted to ensure visibility */
  width: 40px; /* Optional: Resize when stuck */
  height: 40px;
  animation: none;
  z-index: 1100; /* Keep it above the navbar */
}


.description {
  font-size: 1rem;
  margin-top: 20px;
  line-height: 1.6;
  opacity: 0;
  text-align: left;
  animation: fadeIn 3s ease-in-out forwards;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.right {
            flex: 1;
            padding: 20px;
        }
        h2 {
            margin-bottom: 10px;
            font-size: 22px;
        }
        .skill-bar {
            margin: 10px 0;
        }
        .skill-name {
            font-weight: bold;
            margin: 5px;
            text-align: left;
        }
        .progress {
            width: 100%;
            background: darkblue;
            height: 14px;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }
        .progress-bar {
            height: 100%;
            width: 0;
            background: linear-gradient(90deg, #6a11cb, #2575fc);
            transition: width 2s ease-in-out, transform 0.5s ease-in-out;
            animation: fillProgress 2s forwards;
            position: relative;
        }
        @keyframes fillProgress {
            from { width: 0; }
            to { width: var(--progress-width); }
        }
              
        .progress-bar::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transform: translateX(-100%);
            animation: shine 2s infinite linear;
        }
        @keyframes shine {
            from { transform: translateX(-100%); }
            to { transform: translateX(100%); }
        }

    @media (max-width: 1024px) {
    .profile-pic {
        position: static; /* Remove sticky behavior */
        width: 80px; /* Adjust size */
        height: 80px;
        margin-top: 10px;
        animation: none;
        transition: none;
}

    .mycontainer {
        flex-direction: column; /* Stack sections vertically */
        align-items: center; 
        width: 95%; /* Adjust width */
        padding: 20px;
        margin: auto;
        overflow: hidden; /* Prevent overflow */
    }

    .left-section, .right {
        width: 100%; /* Full width */
        text-align: center; /* Center content */
        padding: 15px;
    }


    .description {
        font-size: 0.95rem;
        text-align: justify;
        padding: 10px;
    }


    h2 {
        font-size: 20px;
        text-align: center;
    }

    .skill-bar {
        margin: 8px 0;
    }

    .progress {
        height: 12px;
    }

    .progress-bar {
        transition: width 1.5s ease-in-out;
    }
    #service-head{
        margin-top: 20px;
    }
}

/* Medium Screens (Tablets) */
@media (max-width: 992px) {
    #about-head {
        font-size: 28px;
        text-align: center;
    }

    .mycontainer {
        flex-direction: column;
        padding: 15px;
    }

    .profile-pic {
        width: 80px;
        height: 80px;
    }
       .profile-pic.sticky {
        display: none;
      }

    .description {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 18px;
    }
}

/* Small Screens (Mobile) */
@media (max-width: 768px) {
    .left-section, .right {
        width: 100%;
        text-align: center;
        padding: 10px;
    }

    .profile-pic {
        width: 70px;
        height: 70px;
        margin: 5px auto;
    }
       .profile-pic.sticky {
        display: none;
      }

    .description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    h2 {
        font-size: 16px;
    }

    .skill-name {
        font-size: 14px;
    }

    .progress {
        height: 10px;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    #about-head {
        font-size: 24px;
    }

    .profile-pic {
        width: 60px;
        height: 60px;
    }
       .profile-pic.sticky {
        display: none;
      }

    .description {
        font-size: 0.8rem;
        padding: 5px;
    }

    h2 {
        font-size: 14px;
    }

    .progress {
        height: 8px;
    }
}

        #project-head{
          text-align: center;
          color: yellow;
          background-color: red; 
        }
        .project-pic{
          width: 150px;
  height: 150px;
  border-radius: 50%;
        }


        body {
            text-align: center;
        }
        #service-head{
        font-weight: bold; 
   color: darkred;
   font-size: 30px;
}
        .service-container {
            width: 90%;
            max-width: 1200px;
            margin: -50px auto;
            padding: 50px 0;
        }

        .service-para {
            font-size: 18px;
            margin-bottom: 40px;
            opacity: 0.8;
        }

        /* Services Section */
        .services {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .service-box {
            background: linear-gradient(135deg, #1e3c72, #2a5298);
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease, scale 0.3s ease;
            color: #fff;
        }

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

        .service-icon {
            font-size: 40px;
            margin-bottom: 15px;
            transition: color 0.3s ease;
        }

        .service-title {
            font-size: 22px;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .service-description {
            font-size: 16px;
            opacity: 0.9;
        }

        /* Blog Section */
        #blog-head{
   font-weight: bold; 
   color: darkred;
   font-size: 30px;
}
        .blog-section {
            margin:40px 50px;
        }
     
        .blogs {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .blog-box {
            background: linear-gradient(135deg, #1e3c72, #2a5298);
            padding: 40px;
            border-radius: 10px;
            color: #fff;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
        }

        .blog-box:hover {
            transform: scale(1.05);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
        }

        .blog-title {
            font-size: 22px;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .blog-description {
            font-size: 16px;
            margin-bottom: 15px;
        }

        .read-more {
            display: inline-block;
            padding: 10px 20px;
            background: #ffcc00;
            color: #333;
            text-decoration: none;
            border-radius: 5px;
            transition: background 0.3s ease;
        }

        .read-more:hover {
            background: #ff9900;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .services, .blogs {
                grid-template-columns: 1fr;
            }
        }

   .contact-container {
            background: linear-gradient(135deg, #667eea, #764ba2);
            padding: 5px 30px 30px 30px;
            border-radius: 10px;
            width: 500px;
            backdrop-filter: blur(10px);
            animation: fadeIn 0.8s ease-in-out;
            position: relative;
          margin-top:25px;
          z-index: 2;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }
section#contact{
  justify-items:center;
}
               #contact-head{
   font-weight: bold; 
   color: darkred;
   font-size: 30px;
}
     
        #contactForm{
            margin-top:30px;

        }
        .form-control {
            background: transparent;
            border: none;
            border-bottom: 2px solid #ffea88;
            color: white;

        }
        .form-control::placeholder {
             color: yellow;
        }
        .form-control:focus::placeholder{
            color: seagreen;
        }
        .form-control:focus{
            background-color: white;
             outline: none;
            box-shadow: none;
             color: black;
        border-bottom: none;

        }
       
        .btn-custom {
            background: blue;
            padding:8px;
            border-radius: 35px;
            font-size:13px;
            text-align: center;
            margin-left:220px;
            color: white;
        }
        .btn-custom:hover {
             color: white;
            background: seagreen;

        }
        .success-msg {
            color: white;
            background: rgba(0, 0, 0, 0.7);
            padding: 8px 12px;
            border-radius: 5px;
            text-align: left;
            position: absolute;
            bottom: 10px;
            left: 10px;
            font-size: 0.9em;
        }
        .button-container {
            display: flex;
            justify-content: space-between;
            margin-left:110px;
            margin-top: 15px;
        }

.message {
    position: fixed;
    left: 50px;
    opacity: 0;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 9999;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease-in-out;
}

.show-message {
    opacity: 1;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Align error messages to the left */
.error-message {
    text-align: left;
    margin-left: 5px;
}



            @media (max-width: 768px) {
    .contact-container {
        width: 90%; /* Prevent overflow */
        margin: auto;
        padding: 15px;
    }

    #contact-head {
        font-size: 24px; /* Reduce heading size for smaller screens */
        text-align: center;
    }

    .form-control {
        width: 100%; /* Ensure inputs take full width */
    }

    .error-msg {
        margin-left: 0; /* Reset alignment */
        display: block;
        text-align: left;
        font-size: 0.8em;
    }

    .button-container {
        justify-content: center; /* Center align the button */
        margin-left: 0;
    }

    .btn-custom {
        margin-left: 0; /* Center button properly */
        /* Make button responsive */
        text-align: center;
    }
}


.footer {
  background: linear-gradient(135deg, #a8e6cf, #dcedc1);
  color: #333;
  margin-top: 20px;
  padding: 20px 20px 0px 0px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 10px 10px 30px 10px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px; /* Reduced gap between elements */
}
.contactul {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Ensures proper left alignment */
  gap: 5px;
  margin: 0; /* Remove extra margin */
  padding: 0; /* Remove any default padding */
}

.footer-section ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  display: flex;
  align-items: center;
  gap: 8px; /* Uniform spacing between icon and text */
  justify-content: flex-start;
  width: 100%; /* Ensures full width alignment */
}
.footer-section ul li a {
    color: darkblue;
    margin: 2px 10px;
    padding-top: 2px;
    text-decoration: none;
}
.footer-section ul li a:hover{
    color: red;
}
.footer-section ul li i {
  margin-right: 5px; /* Reduce unnecessary spacing */
  font-size: 1.2rem;
  display: flex;
  align-items: center; /* Ensures icons align properly */
}
.footer-section h3 {
  font-size: 1.5rem;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-right:30px; /* Reduced bottom margin */
  text-align: center;
}

.footer-section h3::after {
  content: '';
  display: block;
  width: 0px;
  height: 2px;
  background: darkred;
  margin-top: 3px;
  margin-left:2px; /* Reduced spacing after underline */
  animation: slideIn 3s ease-in-out forwards;
}

 @keyframes slideIn {
  from {
    width: 0;
  }
  to {
    width: 60px; /* Expands to 60px */
  }
}

.contactul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; /* Reduced gap between contact details */
}

.social-icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px; /* Reduced gap between icons */
  margin-top: 2px;
  margin-left:10px; /* Reduced top margin */
}

.social-icons a {
  color: darkblue;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.social-icons a:hover {
  transform: scale(1.2);
}

.footer-bottom {
  width: 100%;
  text-align: center;
  padding: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background-color: black;
  color: white;
  margin: 0px; /* Removed all margins */
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(-45deg);
  animation: moveBackground 10s infinite linear;
  pointer-events: none; /* Add this line */
}

    @keyframes moveBackground {
      0% {
        transform: translateX(-50%) rotate(-45deg);
      }
      100% {
        transform: translateX(50%) rotate(-45deg);
      }
    }

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    margin-bottom: 5px;
    gap: 8px; /* Adjusted spacing for smaller screens */
  }

  .footer-section h3 {
    text-align: center;
    margin-bottom: 3px;
    font-size:20px; /* Further reduced margin */
  }

  .footer-section ul li{
    font-size: 14px;
  }

  .social-icons {
    margin-top: 3px; /* Further reduced top margin */
  }
  .footer-bottom{
    font-size: 15px;
    padding: 12px;
  }
}@media (max-width: 530px){
.footer-bottom{
    font-size: 14px;
  }
@media (max-width: 500px) {
  .footer-section h3 {
    font-size:18px; 
  }
}
}
@media (max-width: 500px) {
.footer-bottom{
    font-size: 13px;
  }
}
@media (max-width: 500px) {
.footer-bottom{
    font-size: 12px;
  }
  .footer-section h3 {
    font-size:17px; 
  }
}

@media (max-width: 300px) {
 .footer-section ul li{
    font-size: 10px;
 }

}
@media (max-width: 300px) {
    .footer-bottom{
    font-size: 10px;
  }
  .footer-section h3 {
    font-size:16px; 
  }
}