@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&display=swap');

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none; border: none;
  text-transform:capitalize;
  transition: all .2s linear;
}
html{
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body{
  background: #f7f7f7;
  font-family: 'Poppins', sans-serif;
}

*::selection{
  background: #2b3dda;
  color: #fff;
}

html{
  font-size: 62.5%;
  overflow-x: hidden;
}
html::-webkit-scrollbar{
  width: .8rem;
}
html::-webkit-scrollbar-track{
  background: rgb(235, 202, 245);
}
html::-webkit-scrollbar-thumb{
  background: #420177;
}
/* navbar starts */
header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.7rem 10%;
  height: 6.5rem;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(146,161,176,.3);
}
section{
  min-height: 100vh;
  padding: 2rem 9%;
}
.logo-container {
  flex-grow: 1;
  display: flex;
  justify-content: space-between; /* Center the logo */
}

header .logo {
  display: flex;
  align-items: center; /* Center the content vertically */
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
  color: #0e2431;
}

header .logo i {
  font-size: 2.2rem;
  margin-right: 0.5rem; /* Add some space between icon and text */
}

header .logo:hover {
  color: #fc8c05;
}

.heading{
  font-size: 3.5rem;
  color: rgb(20, 20, 20);
  font-weight: 800;
  text-align: center;
}
.heading span{
  color: rgb(115, 3, 167);
}
header .logo{
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
  color: #0E2431;
}
header .logo i {
  font-size: 2.2rem;
}
header .logo:hover {
  color: #fc8c05;
}
header .navbar ul{
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}
header .navbar li{
  margin-left: 2.5rem;
}
header .navbar ul li a{
  font-size: 1.57rem;
  color: #0E2431;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04rem;
}
header .navbar ul li a.active,
header .navbar ul li a:hover{
  color: #011aff;
  border-bottom: .2rem solid #011aff;
  padding: .5rem 0;
}

  .toggle-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
  }

  #mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  #mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
  }

  #mode-toggle-img {
    width: 25px;
    height: 25px;
  }

#mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mode-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

#mode-toggle-img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

#mode-toggle:hover #mode-toggle-img {
  transform: scale(1.1);
}
/* navbar ends */

/* hamburger icon starts*/
#menu{
  font-size: 3rem;
  cursor: pointer;
  color: rgb(24, 2, 63);
  display: none;
}
@media(max-width:768px){
  #menu{
      display: block;
  }
  header .navbar{
    position: fixed;
    top: 6.5rem; right: -120%;
    width: 75%;
    height: 100%;
    text-align: left;
    align-items: flex-start;
    background-color: #0e0f31;
  }
  header .navbar ul{
    flex-flow: column;
    padding: 1rem;
  }
  header .navbar ul li{
    text-align: center;
    width: 100%;
    margin: 1rem 0;
    border-radius: .5rem;
    width: 26rem;
  }
  header .navbar ul li a{
    display: block;
    padding: 1rem;
    text-align: left;
    color: #fff;
    font-size: 2rem;
  }
  header .navbar ul li a.active,
  header .navbar ul li a:hover{
    padding: 1rem;
    color: #fff;
    border-radius: .5rem;
    border-bottom: .5rem solid #011aff;
  }
  .fa-times{
    transform: rotate(180deg);
  }
  header .navbar.nav-toggle{
    right: 0;
  }
}
/* hamburger icon ends */
/* work section starts */
.project{
  /* background: #010124; */
  background: linear-gradient(to bottom, #010136, #3f9761);
  margin-top: 5rem;
}
.day-mode .project{
  background: linear-gradient(to bottom, #e5ecfb, #ffffc5);
  margin-top: 5rem;
}
.night-mode .project h2{
  color: #fff;
  padding: 1rem;
}
.night-mode .project .heading span{
  color: rgb(255, 230, 0);
}
.project .button-group{
  display: flex;
  flex-wrap: wrap;
  gap:1rem;
  margin: 2rem auto;
  width: 50%;
  justify-content: center;
  align-items: center;
}
.project .button-group .btn{
  outline: none;
  padding: 1rem 2rem;
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 500;
}
.day-mode .project .button-group .btn{
  color: #000;
  border: 1px solid #000;
}
.project .button-group .btn:hover{
  background-color: #fff;
  color: #000;
}
.day-mode .project .button-group .btn:hover{
  background-color: #000;
  color: #fff;
}
.project .button-group .btn.is-checked{
  background-color: #fff;
  color: #000;
}
.day-mode .project .button-group .btn.is-checked{
  background-color: #000;
  color: #fff;
}
.project .box-container{
  display: flex;
  flex-wrap: wrap;
  gap:1.5rem;
  margin: 2rem;
}
.project .box-container .box{
  flex:1 1 30rem;
  border-radius: .5rem;
  box-shadow: 0 .7rem 1rem rgba(0,0,0,.3);
  position: relative;
  overflow:hidden;
  height:30rem;
  background: #fff;
  border: none;
}

.project .box-container .box img{
  height: 100%;
  width:100%;
  object-fit: cover;
}
.project .box-container .box .content{
  height: 100%;
  width:100%;
  position: absolute;
  top:85%; left:0;
  background:rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
}
.project .box-container .box .content .tag{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  height: 4.5rem;
  width: 100%;
  padding-left: 1rem;
  background: #ffd900;
}
.day-mode .project .box-container .box .content .tag{
  background: #00fbff;
}
.project .box-container .box .content .tag h3{
  font-size: 2rem;
}
.project .box-container .box:hover .content{
  top: 25%;
}
.project .desc {
  margin: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project .desc p{
  font-size: 1.5rem;
}
.project .desc .btns{
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 2rem;
}
.project .desc .btns .btn{
  line-height: 0;
  display: inline;
  padding: 1.5rem 2.5rem;
  border-radius: .5rem;
  font-size: 1.5rem;
  color: #fff;
  background: rgb(12, 12, 12);
  margin-right: 2rem;
}
.day-mode .project .desc .btns .btn{
  line-height: 0;
  display: inline;
  padding: 1.5rem 2.5rem;
  border-radius: .5rem;
  font-size: 1.5rem;
  color: #000;
  background: rgb(243, 243, 243);
  margin-right: 2rem;
}
.project .desc .btns .btn:hover{
  background: #310ae0f5;
}

@media screen and (max-width: 450px) {
    /* --- Project Section General Adjustments --- */
    .project {
        padding: 0 1rem; /* Add horizontal padding to the whole section */
    }

    /* --- Button Group (Category Filters) Adjustments --- */
    .project .button-group {
        width: 100%; /* Ensure filter buttons span the full width */
        display: flex; 
        flex-wrap: wrap; /* Allow buttons to wrap */
        justify-content: center; 
        margin: 1rem 0; /* Vertical margin for spacing */
    }
    
    .project .button-group .btn {
        font-size: 1.4rem;
        margin: 0.5rem 0.3rem; /* Space between buttons */
        padding: 0.8rem 1.5rem; /* Larger padding for easy tapping */
    }

    /* --- Box Container (Grid) Adjustments --- */
    .project .box-container {
        margin: 0; 
        display: block; /* Forces single-column layout */
    }

    /* --- Individual Project Box Adjustments --- */
    .project .box-container .grid-item {
        width: 100%; /* Ensure each item takes up full width */
        margin: 1rem 0; /* Vertical space between project cards */
    }
    
    .project .box-container .grid-item .box {
        width: 95% !important; /* Use 95% of screen width (adjust this as needed) */
        margin: 0 auto; /* Center the card */
        /* You had 95% in your initial snippet, using it here */
    }

    /* --- Image Ratio Adjustment (1:1 Square Shape) --- */
    .project .box-container .grid-item .box img {
        aspect-ratio: 1 / 1; /* Sets the image ratio to a perfect square */
        object-fit: cover; /* Ensures image covers the square area without stretching */
        width: 100%;
        height: auto;
    }

    /* --- Content inside the Project Box --- */
    .project .box-container .grid-item .box .content .desc p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .project .box-container .grid-item .box .content .btns a.btn {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* back to home button */
.backbtn{
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  margin-top: 4rem;
}
.backbtn .btn {
  position: relative;
  line-height: 0;
  padding: 1.6rem 3rem;
  border-radius: .5em;
  transition: 0.3s;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0px 2px 4px rgba(48, 68, 247, .3);
  text-align: center;
}
.day-mode .backbtn .btn{
  color:#000;
  border: 2px solid #000;
}
.backbtn .btn span {
  font-weight: 600;
  font-size: 1.7rem;
  font-family: 'Nunito', sans-serif;
}
.backbtn .btn i {
  margin-right: 0.5rem;
  font-size: 1.5rem;
  transition: 0.3s;
}
.backbtn .btn:hover{
  background: #ffffff;
  color: #000;
}
.day-mode .backbtn .btn:hover{
  background: #000000;
  color:#fff
}
.backbtn .btn:hover i {
  transform: translateX(-8px);
}
/* work section ends */

/* common media queries starts*/
@media(max-width:450px){
  html{
    font-size: 55%;
  }
  body{
    padding-right: 0;
  }
  section{
    padding: 2rem;
  }
}
/* common media queries ends*/


/* scroll top starts */
#scroll-top{
  position: fixed;
  top: -140%;
  right: 2rem;
  padding: 1rem 1.5rem;
  font-size: 2rem;
  background: #ffae00;
  color: rgb(13, 0, 44);
  border-radius: 5rem;
  transition: 1s linear;
  z-index: 1000;
}
#scroll-top.active{
  top: calc(100% - 12rem);
}
/* scroll top ends */