*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
    text-decoration: none;
    scroll-behavior: smooth;
    list-style: none;
}

header{
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    background-color:rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 3rem;
    z-index: 1000;
}

.logo{
    color:white;
    font-size: 1.3rem;
    font-weight: 600;
    text-wrap: nowrap;
    transition: 0.3s ease-in-out;
}

.logo:hover{
    transform: scale(1.1);
}

.nav-links{
    display: flex;
    gap: 2rem;
}

li a{
    position: relative;
    color: white;
    font-weight: 300;
}
li a::before{
    position: absolute;
    content: '';
    width: 0;
    left: 0;
    height: 5px;
    top: 25px;
    border-radius: 1rem;
    transition: 0.3s ease-in-out;
    background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));
}

li a:hover::before{
    width: 100%;
}

.visit-btn{
    padding: 0.8rem 1.5rem;
    border-radius: 3rem;
    border: none;
    font-weight: 500;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    text-wrap: nowrap;
    transition: 0.3s ease-in-out;
    background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));
}
 .visit-btn:hover{
    background: linear-gradient(to right, rgb(255, 0, 255), rgb(0, 157, 255));
    transform: scale(1.03);
 }

 #menu.icon{
    font-size: 2rem;
    display: none;
 }

 section{
    min-height: 100vh;
    padding: 8rem 12%;
    width: 100%;
    position: relative;
 }

 .about{
    display: flex;
    align-items: center;
    justify-content: center;
 }

 .about .about-container{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10rem;
 }
 .about .text p {
   margin-bottom: 1rem; /* adjust the spacing as needed */
   line-height: 1;
}
/* Add vertical spacing between sections */
section {
   margin-top: 3rem;
   margin-bottom: 3rem;
}

 .about img{
    width: 22vw;
    border-radius: 40%;
 }
 .info-box{
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
 }

 .info-box h3{
    font-size: 1.8rem;
    font-weight: 500;
    opacity: 0.8;
 }
 .info-box h1{
    font-size: 4rem;
    font-weight: 600;
 }

 .info-box span{
    background: linear-gradient(to right, rgb(255, 0, 255), rgb(0, 157, 255));
    background-clip: text;
    color: transparent;
    font-size: 2rem;
 }

 .btn-group{
    display: flex;
    gap: 1rem;
 }

 .btn{
    border-radius: 3rem;
    padding: 0.5 1.5rem;
    border: 2px solid black;
    cursor: pointer;
    font-weight: 500;
    text-wrap: nowrap;
    color: black;
    transition: 0.2s ease-in-out;
 }

 .btn:hover{
    background-color: black;
    color: white;
 }

 .socials{
    display: flex;
    gap: 2rem;
 }
 .socials i{
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.2s ease-in-out;
 }
 .socials i:hover{
   transform: scale(1.1);
 }

 .socials a i {
   color: black;
}

 .section-title{
   text-align: center;
   font-size: 4rem;
   font-weight: 600;
   margin-bottom: 3rem;
 }

 .experience-info{
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 5rem;
 }

 .experience img{
   width: 24vw;
   border-radius: 3rem;
 }
.grid{
   display: grid;
   grid-template-columns: repeat(2.1fr);
   gap: 2rem;
}
.grid-card{
   border: 2px solid black;
   border-radius: 3rem;
   padding: 3rem;
   display: flex;
   flex-direction: column;
   align-items: baseline;
   justify-content: left;
   cursor: pointer;
   transition: 0.2s ease-in-out;
}
.grid-card:hover{
   transform: scale(1.02);
   background-color: black;
   color: white;
}
grid-card i{
   font-size: 1.5rem;
   margin-bottom: 1rem;
}
.grid-card span{
   font-size: 1rem;
   font-weight: 500;
   background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));
   background-clip: text;
   color: transparent;
}

.skills-info {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 5rem;
 }

::-webkit-scrollbar{
   width: 1rem;
}
 ::-webkit-scrollbar-track{
   background-color: rgb(219, 219, 219);
} 
::-webkit-scrollbar-thumb {
   background: linear-gradient(to bottom, rgb(0, 157, 255), rgb(255, 0, 255));
   border-radius: 5rem;
 }

.projects-grid{
   display: grid;
   grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
   gap: 2rem;
}
.project-card{
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  border: 2px solid black;
  border-radius: 3rem;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.project-card:hover{
   background-color: black;
   color:white;
   transform: translateY(-10px)scale(1.02);
}
.project-card img{
   width: 20vw;
   height: 200px;
   object-fit: cover;
   border-radius: 1rem;
}
.project-card:hover .btn{
   border: 2px solid white;
   color: white;
}
.project-card:hover .btn:hover{
   border: 2px solid white;
   background-color: white;
   color: black;
}
.project-card h3{
   font-size: 2rem;
   font-weight: 500;
}

.input-row {
   display: flex;
   gap: 1rem;
   flex-wrap: wrap;
   justify-content: center;
   width: 100%;
   margin-bottom: 1rem;
}

.input-row input {
   flex: 1;
   padding: 1rem 2rem;
   font-size: 1.2rem;
   border: 2px solid black;
   border-radius: 3rem;
   width: 100%;
}

.input-box textarea {
   width: 100%;
   padding: 1rem 2rem;
   font-size: 1.2rem;
   border: 2px solid black;
   border-radius: 2rem;
   resize: vertical;
}

.input-box button.btn {
   margin-top: 1rem;
   padding: 1rem 3rem;
   font-size: 1.2rem;
   background-color: var(--link-color); /* Give it a visible background */
   color: #fff;                         /* White text for contrast */
   border: none;                       /* Remove border (optional) */
   border-radius: 3rem;               /* More pronounced rounding */
   transition: 0.3s ease-in-out;
   display: block;
   margin: 1rem auto 0;
   
 }
 
 .input-box button.btn:hover {
   background-color: #020950; /* Hover color */
   transform: scale(1.05); 
 }

footer{
   background: linear-gradient(to right, #ffffff, #696363);
   box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
   bottom: 0;
   left: 0;
   padding: 1.5rem 0.5rem;
   width: 100%;
   display: flex;
   flex-direction: column;
   gap: 1rem;
   align-items: center;
   justify-content: center;
}

footer ul{
   display: flex;
   align-items: center;
   gap: 2rem; /* Reduced gap for a more refined look */
}

footer ul li a{
   color: #333;  /* Darker, more legible text */
   font-weight: 600;
   font-size: 1.1rem;
}

footer .copyright{
   font-size: 1rem; /* Valid measurement replacing '300' */
   color: #666;
   margin-top: 1rem;
}

@media(max-width:1280px){
   header{
      padding: 1rem 2rem;
      gap: 2rem;
   }
   .about .about-container{
      gap: 3rem;
   }
   .experience-info{
      flex-direction: column;
   }
   .input-box input{
      padding: 2rem 5rem;
      font-size: 2.5rem;
   }
   .input input::placeholder{
      font-size: 2.5rem;
   }
   .input-box i{
      font-size: 2.5rem;
   }
}

@media(max-width:768px){
   header{
      gap: 1rem;
      padding: 1rem 1rem;
   }
   header .logo{
      font-size: 1rem;
   }
   header .visit-btn{
     display: none;
   }

   .about-container{
      flex-direction: column;
   }
   .input-box input{
      padding: 1rem 2rem;
      font-size: 1.8rem;
   }
   .input-box input::placeholder{
      font-size: 1.5rem;
   }
   .input-box i{
      display: none;
   }
   .grid{
      grid-template-columns: repeat(1,1fr);
   }
   .experience-info img{
      width: 70vw;
   }
}

@media(max-width:600px){
   header #menu-icon{
      display: block;
   }
   .nav-links{
      position: absolute;
      top: 100%;
      margin-top: 1rem;
      width: 100%;
      padding: 1rem;
      color: white;
      display: flex;
      flex-direction: column;
      text-align: center;
      background-color: rgba(0, 0, 0, 0.9);
      border-radius: 3rem;
      display: none;
   }
   .nav-links li{
      margin-top: 1.5rem;
      padding: 1rem;
   }
   .nav-links.active{
      display: block;
   }
   header{
      padding: 1rem 5rem;
      gap: 8rem;
   }
   header .logo{
      font-size: 1.5rem;
   }

   .about-container img{
      width: 80vw;
   }
   .input-box input{
      padding: 0.5rem 3rem;
      width: 80%;
      font-size: 1.5rem;
   }

   .input-box input::placeholder{
      font-size: 1.5rem;
   }

   footer ul{
      gap: 1rem;

   }
}

/* Dark mode */
:root {
   --bg-color: #ffffff;
   --text-color: #333;
   --header-bg: rgba(0, 0, 0, 0.8);
   --header-text: #ffffff;
   --footer-bg: linear-gradient(to right, #ffffff, #f7f7f7);
   --link-color: rgb(0, 157, 255);
}

:root.dark {
   --bg-color: #121212;
   --text-color: #e0e0e0;
   --header-bg: #333333;
   --header-text: #e0e0e0;
   --footer-bg: linear-gradient(to right, #1e1e1e, #2a2a2a);
   --link-color: #f700ff;
}

body {
   background-color: var(--bg-color);
   color: var(--text-color);
}

li a {
   color: var(--header-text);
}

li a::before {
   background: var(--link-color);
}

footer {
   background: var(--footer-bg);
}

.section-title {
   color: var(--text-color);
}

:root.dark .btn {
   border: 2px solid var(--text-color);   /* replace black border with light color */
   color: var(--text-color);
}

:root.dark .btn:hover {
   background-color: var(--text-color);
   color: var(--bg-color);
}

:root.dark .visit-btn {
   background: linear-gradient(to right, var(--link-color), var(--link-color));
   color: var(--header-text);
}
:root.dark .visit-btn:hover {
   background: linear-gradient(to right, var(--link-color), var(--link-color));
   transform: scale(1.03);
}
:root.dark .socials a i {
   color: var(--text-color);
}

.dark-mode-btn {
   background-color: var(--header-bg);
   border: none;
   border-radius: 50%;
   padding: 0.5rem;
   cursor: pointer;
   transition: background-color 0.3s ease;
   font-size: 1.8rem;
}
.dark-mode-btn i {
   color: var(--header-text);
   transition: color 0.3s ease;
}
:root.dark .dark-mode-btn i {
   color: var(--text-color);
}

:root.dark footer .copyright {
   color: var(--text-color); /* ensure contrasting light color */
}
:root.dark li a {
   color: #ffffff; /* set links to white in dark mode */
}

:root.dark .grid-card:hover,
:root.dark .project-card:hover {
    background-color: #ffffff; /* White background on hover */
    color: #333333;            /* Dark text for readability */
    transform: scale(1.02);    /* Keep the hover scale effect */
}

:root.dark .project-card:hover .btn {
   border: 2px solid rgb(0, 0, 0);
   color: rgb(0, 0, 0);
}

:root.dark .project-card:hover .btn:hover {
   background-color: rgb(250, 250, 250);
   color: rgb(199, 8, 167);
}

/* Recommendation Card Styling */
.recommendation-card {
   padding: 2rem;
   border: 2px solid black;
   border-radius: 3rem;
   display: flex;
   flex-direction: column;
   gap: 1rem;
   transition: 0.3s ease-in-out;
   cursor: pointer;
   background-color: #fff;
   color: #333;
}

.recommendation-card:hover {
   background-color: black;
   color: white;
   transform: translateY(-10px) scale(1.02);
}

.recommendation-card h3 {
   font-size: 2rem;
   font-weight: 600;
}

.recommendation-card p {
   font-size: 1rem;
   line-height: 1.5;
}

/* Dark mode adjustments */
:root.dark .recommendation-card {
   border: 2px solid var(--text-color);
   background-color: var(--bg-color);
   color: var(--text-color);
}

:root.dark .recommendation-card:hover {
   background-color: #ffffff;
   color: #333;
}
.recommendations-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   gap: 2rem;
}
@media (max-width: 768px) {
   .recommendations-grid {
     grid-template-columns: 1fr; /* Force a single column layout */
     gap: 1rem;
     padding: 0 1rem;
   }
 }

 @media (max-width: 768px) {
   .section-title {
       font-size: 3rem;
       margin-bottom: 2rem;
       padding: 0 1rem;
   }
}

@media (max-width: 480px) {
   .section-title {
       font-size: 2.5rem;
       margin-bottom: 1.5rem;
   }
}
.recommendation-title {
   text-align: center;
   font-size: 2rem;
   font-weight: 600;
   margin-bottom: 1rem;
 }
 .form-message {
   margin-top: 1rem;
   text-align: center;
   font-size: 1rem;
   opacity: 0.9;
 }
 
 .form-message.success {
   color: #28a745;  /* green */
 }
 
 .form-message.error {
   color: #dc3545;  /* red */
 }

 .modal {
   display: none; /* Hidden by default */
   position: fixed;
   z-index: 1000;
   left: 0;
   top: 0;
   width: 100%; 
   height: 100%; 
   overflow: auto; 
   background-color: rgba(0,0,0,0.5); /* Black with opacity */
 }
 
 /* Modal content */
 .modal-content {
   background-color: #fefefe;
   margin: 10% auto;  /* 10% from the top and centered */
   padding: 2rem;
   border: 1px solid #888;
   width: 80%;
   max-width: 500px;
   border-radius: 0.5rem;
   text-align: center;
 }
 
 /* Close button */
 .modal-content .close {
   color: #aaa;
   float: right;
   font-size: 2rem;
   font-weight: bold;
   cursor: pointer;
 }
 
 .modal-content .close:hover,
 .modal-content .close:focus {
   color: black;
 }
 .btn {
   display: inline-block;
   text-align: center;
   border-radius: 3rem;
   padding: 0.5rem 1.5rem;
   border: 2px solid black;
   cursor: pointer;
   font-weight: 500;
   font-size: 1rem; /* Set a consistent font size */
   text-wrap: nowrap;
   color: black;
   background: none;
   transition: 0.2s ease-in-out;
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
}

.btn:hover {
   background-color: black;
   color: white;
}
:root.dark .modal-content {
   background-color: var(--bg-color); /* Ensure proper contrast */
   color: var(--text-color);           /* Set text to the dark mode text color */
 }
:root {
   --bg-color: #f0f0f0; /* new light background color */
   --text-color: #333;
   --header-bg: rgba(0, 0, 0, 0.8);
   --header-text: #ffffff;
   --footer-bg: linear-gradient(to right, #ffffff, #f7f7f7);
   --link-color: rgb(0, 157, 255);
}
.project-card {
   background-color: #ffffff;
}
/* For experience cards */
.grid-card {
   background-color: #ffffff;
}

/* For skills cards (make sure your HTML uses the .skills-card class) */
.skills-card {
   background-color: #ffffff;
}
:root.dark .project-card,
:root.dark .grid-card,
:root.dark .skills-card {
   color: #333333; /* Dark text for visibility on a white background */
}
:root.dark .project-card .btn,
:root.dark .grid-card .btn,
:root.dark .skills-card .btn {
    color: #333333;          /* Dark text */
    border-color: #333333;   /* Dark border */
}

.project-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   padding: 2rem;
   border: 2px solid black;
   border-radius: 3rem;
   background-color: #ffffff;
   transition: transform 0.3s ease-in-out;
}

.project-card img {
   width: 100%;
   height: auto;
   max-width: 280px;
   border-radius: 1rem;
   margin-bottom: 1.5rem;
}

.skills-section {
   max-width: 1200px;
   margin: 3rem auto;  /* consistent vertical spacing */
   padding: 0 1.5rem;  /* slightly reduced padding for a cleaner look */
}

.skills-section h2 {
   text-align: center;
   font-size: 4rem;
   font-weight: 600;
   margin-bottom: 3rem;
}

.skills-section .text {
   text-align: center;
   margin-bottom: 30px;
   font-size: 1.1rem;
}

.skills-section .cells {
   display: flex;
   justify-content: center;
   flex-wrap: wrap;
   gap: 20px;  /* adds uniform space between cells */
}

.skills-section .cells .cell {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 200px;
   padding: 10px 20px;
   background-color: white;
   border: 1.5px solid #d3d3d3;
   border-radius: 5px;
   gap: 10px;
}

.skills-section .cells .cell img {
   width: 30px;
   height: 30px;
   object-fit: contain;
   border-radius: 2px;
}

.skills-section .cells .cell span {
   font-size: 18px;
}

:root.dark .skills-section .cells .cell span {
   color: black;
}
@media(max-width:600px){
   section {
       max-width: 100%;
       margin-left: auto;
       margin-right: auto;
       padding: 2rem 5%;
       text-align: center;
   }
}

footer{
   background: linear-gradient(to right, #ffffff, #696363);
   background-size: 100% 100%;
   background-repeat: no-repeat;
   /* ...existing styles... */
}


html, body {
   margin: 0;
   padding: 0;
   width: 100%;
   overflow-x: hidden;
}


@media (max-width: 600px) {
  /* Keep header centered */
  header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin: 0;
    gap: 2rem;
    padding: 0.5rem 1rem;
  }

  /* Let nav-links wrap if needed */
  .nav-links {
    /* display: flex; */
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* Ensure footer links fit on screen */
  footer ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Slightly narrower section padding */
  section {
    padding: 7rem 5%; /* top gap for the fixed header */
    text-align: center;
    margin: 0 auto;
    box-sizing: border-box;
  }
 }
 
 :root.dark footer,
:root.dark footer ul li a,
:root.dark footer p {
    color: #000 !important;
}