:root {
        --bg-color: #f5f5f5;
        --text-color: #333;
        --header-bg: linear-gradient(135deg, #1d4be4, #0e5c31);
        --section-bg: white;
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        --h2-color: #0f309c;
        --interactive-bg: #f0f8ff;
        --footer-bg: #333;
        --footer-text: white;
      }
      .dark-mode {
        --bg-color: #222;
        --text-color: #f0f0f0;
        --header-bg: linear-gradient(135deg, #0f309c, #05361b);
        --section-bg: #333;
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        --h2-color: #3498db;
        --project-item-bg: #ddd;
        --interactive-bg: #1a2a3a;
        --footer-bg: #111;
        --footer-text: #ddd;
      }
      body {
        font-family: "Arial", sans-serif;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        background-color: var(--bg-color);
        color: var(--text-color);
        transition: all 0.3s ease;
      }
      header {
        background: var(--header-bg);
        color: white;
        text-align: center;
        padding: 3rem;
        margin-bottom: 3rem;
        position: relative;
      }
      #navbar {
        display: flex;
        gap: 1.5rem;
      }

      .nav-item {
        position: relative;
        display: inline-block;
        margin-left: 1em;
      }

      .navButton {
        position: relative;
        z-index: 2;
        padding: 0.5em;
        color: beige;
        text-decoration: none;
        transition: color 0.3s ease;
      }

      .underline-box {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #3498db;
        z-index: 1;
        transform-origin: bottom;
        transition: all 0.4s ease-in-out;
      }

      .nav-item:hover .underline-box {
        height: 100%;
      }

      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
      }

      .profile-img {
        width: 200px;
        height: 200px;
        border-radius: 50%;
        object-fit: cover;
        border: 5px solid white;
        box-shadow: var(--shadow);
        margin: 0 auto;
        display: block;
      }

      #about p {
    text-align: justify;
}

      section {
        background: var(--section-bg);
        padding: 2rem;
        margin-bottom: 2rem;
        border-radius: 8px;
        box-shadow: var(--shadow);
      }

      h2 {
        color: var(--h2-color);
        border-bottom: 2px solid #eee;
        padding-bottom: 0.5rem;
      }

      .projects {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        padding: 1rem 0;
      }

      .project-container {
        text-align: center;
      }

      .project-description {
        margin-top: 10px;
        text-align: left;
      }

      .project-item {
        color: #111;
        background: var(--project-item-bg, var(--section-bg));
        border: 3px solid transparent;
        border-radius: 12px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
        padding: 20px;
        margin: 15px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        transform: translateY(0);
        max-width: auto;
        height: 8rem;
      }

      .project-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
        border: 3px solid var(--h2-color);
      }

      footer {
        text-align: center;
        padding: 4rem 2rem;
        background: var(--footer-bg);
        color: var(--footer-text);
      }
      .animated-text {
        animation: colorChange 3s infinite alternate;
      }
      @keyframes colorChange {
        from {
          color: beige;
        }
        to {
          color: yellow;
        }
      }
      .contact-form input,
      .contact-form textarea {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: var(--section-bg);
        color: var(--text-color);
      }
      .contact-form button {
        background: #6e8efb;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.3s;
      }
      .contact-form button:hover {
        background: #5a7df4;
      }
      .theme-toggle {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        padding: 8px 15px;
        border-radius: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
      }
      .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.3);
      }
      .toggle-icon {
        font-size: 18px;
      }
      #backToTopBtn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        padding: 10px 15px;
        font-size: 16px;
        border: none;
        border-radius: 6px;
        background-color: #333;
        color: white;
        cursor: pointer;
        display: none;
      }

      #backToTopBtn:hover {
        background-color: #555;
      }

      a {
        text-decoration: none;
    }
    a:hover {
        text-decoration: underline;
    }

      /* code from AI starts here, some adjustments made by designer*/
      /* Mobile Responsive Adjustments */
      @media (max-width: 768px) {
        /* Move theme toggle to top-left on mobile */
        .theme-toggle {
          position: fixed;
          top: 10px;
          left: 10px;
          right: auto;
          z-index: 100;
          padding: 6px 12px;
          font-size: 14px;
        }

        /* Adjust navbar for mobile */
        #navbar {
          flex-direction: column;
          gap: 0.5rem;
          margin-top: 50px; /* Make space for the toggle */
        }

        /* Stack projects vertically on mobile */
        .projects {
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 1rem;
          padding: 1rem 0;
        }

        /* Make project items full width on mobile */
        .project-item {
          width: 100%;
          margin: 10px 0;
          box-sizing: border-box;
          height: 35vh;
          }

        /* Reduce hover effect intensity on mobile */
        .project-item:hover {
          transform: translateY(-3px) scale(1.05);
        }

        /* Adjust header padding */
        header {
          padding: 1.5rem 0;
        }

        /* Make profile image smaller */
        .profile-img {
          width: 150px;
          height: 150px;
        }

        /* Adjust section padding */
        section {
          padding: 1.5rem;
        }
      }

      /* For very small screens */
      @media (max-width: 480px) {
        .theme-toggle span:not(.toggle-icon) {
          display: none; /* Hide text, keep only icon */
        }

        .theme-toggle {
          padding: 8px;
          border-radius: 50%;
        }

        .container {
          padding: 0 15px;
        }

        .project-item {
          padding: 15px;
        }
      }
      @media (max-width: 768px) {
        .project-item {
          width: 100%; /* Full width on mobile */
          margin: 10px 0; /* Vertical spacing only */
        }

        .project-item:hover {
          transform: translateY(-5px); /* Smaller lift on mobile */
        }
      }
      /* code from AI ends here*/