@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 0.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: 0.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, 0.3);
}
section {
  min-height: 100vh;
  padding: 2rem 9%;
}
.heading {
  font-size: 3.5rem;
  color: rgb(32, 32, 32);
  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: 0.2rem solid #011aff;
  padding: 0.5rem 0;
}
/* 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: 0.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: 0.5rem;
    border-bottom: 0.5rem solid #011aff;
  }
  .fa-times {
    transform: rotate(180deg);
  }
  header .navbar.nav-toggle {
    right: 0;
  }
}
/* hamburger icon ends */

/* work section starts */
.work {
  /* background: #010124; */
  background: linear-gradient(to bottom, #010136, #00003a);
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.work h2 {
  color: #fff;
  padding: 1rem;
}
.work .heading span {
  color: rgb(255, 230, 0);
}
.work .button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem auto;
  width: 50%;
  justify-content: center;
  align-items: center;
}
.work .button-group .btn {
  outline: none;
  padding: 1rem 2rem;
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 500;
}
.work .button-group .btn:hover {
  background-color: #fff;
  color: #000;
}
.work .button-group .btn.is-checked {
  background-color: #fff;
  color: #000;
}
.work .box-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem;
  width: 100%;
  max-width: 120rem;
  align-self: stretch;
  justify-content: center;
  align-items: stretch;
}
.work .box-container .grid-item {
  flex: 0 0 calc(50% - 0.75rem);
  max-width: 38rem;
  min-width: 28rem;
  display: flex;
  align-items: stretch;
}
.work .box-container .grid-item .box {
  width: 100%;
  flex: 1;
  min-width: 0;
  display: flex;
}
.work .box-container .box {
  flex: 1 1 30rem;
  height: 36rem;
  min-height: 36rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.7rem 1rem rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  background: #fff;
  border: none;
  display: flex;
  flex-direction: column;
}
.work .box-container .box .box__img {
  flex: 0 0 52%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.work .box-container .box .box__img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Bookshelf: wide screenshot, cap image height so content + View/Code buttons always visible */
.work .box-container .box.box--wide-image .box__img {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 19rem;
  background: #14151c;
}
.work .box-container .box.box--wide-image .box__img img {
  object-fit: cover;
  object-position: center center;
}
/* Expense Tracker: show desktop + mobile screenshots together in one frame */
.work .box-container .box.box--showcase-images .box__img {
  flex: 0 0 48%;
  min-height: 18rem;
  padding: 1.4rem;
  gap: 1.2rem;
  background: linear-gradient(135deg, #0f172a, #111827 55%, #1f2937);
}
.work .box-container .box.box--showcase-images .box__img.box__img--split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  align-items: stretch;
}
.work .box-container .box.box--showcase-images .project-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1.2rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
}
.work .box-container .box.box--showcase-images .project-shot--desktop {
  min-height: 18rem;
}
.work .box-container .box.box--showcase-images .project-shot--mobile {
  min-height: 18rem;
}
.work .box-container .box.box--showcase-images .project-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0.8rem;
}
.work .box-container .box .content {
  flex: 1;
  min-height: 14rem;
  width: 100%;
  position: relative;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  overflow: hidden;
  min-width: 0;
}
.work .box-container .box .content .tag {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
  height: auto;
  padding: 0.8rem 1rem;
  width: 100%;
  background: #ffd900;
  flex-shrink: 0;
}
.work .box-container .box .content .tag h3 {
  font-size: 1.8rem;
  line-height: 1.2;
}
.work .box-container .box:hover {
  box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.35);
}
.work .desc {
  margin: 1rem 1.5rem 0.5rem;
  padding: 0;
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.work .desc p {
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 0;
  color: #333;
  word-wrap: break-word;
}
/* Buttons always visible at bottom of content (sibling of .desc) */
.work .content .btns {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1rem 1.5rem 1.25rem;
  align-items: center;
  flex-shrink: 0;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.work .content .btns .btn {
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  background: rgb(12, 12, 12);
  margin-right: 0;
  text-decoration: none;
  flex-shrink: 0;
  flex: 0 0 auto;
  min-height: 2.6rem;
  white-space: nowrap;
  min-width: fit-content;
}
.work .content .btns .btn:hover {
  background: #310ae0f5;
  color: #fff;
}
.work .content .btns .btn i {
  font-size: 1.15rem;
}

@media screen and (max-width: 768px) {
  .work .box-container .grid-item {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 0;
  }
  .work .box-container .box.box--showcase-images .box__img.box__img--split {
    grid-template-columns: 1fr;
  }
  .work .box-container .box.box--showcase-images .project-shot--mobile {
    width: min(16rem, 55%);
    justify-self: center;
  }
}
@media screen and (max-width: 450px) {
  .work .button-group {
    width: 100%;
  }
  .work .box-container {
    margin: 0.5rem;
  }
  .work .box-container .grid-item {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* back to home button */
.work .backbtn {
  display: block;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  text-align: center;
  margin-top: 6rem;
  margin-bottom: 2rem;
  padding: 0 2rem;
  clear: both;
  flex-shrink: 0;
}
.work .backbtn .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  line-height: 1.2;
  padding: 1.4rem 2.5rem;
  border-radius: 0.5em;
  transition: 0.3s;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0px 2px 4px rgba(48, 68, 247, 0.3);
  text-align: center;
  text-decoration: none;
}
.work .backbtn .btn span {
  font-weight: 600;
  font-size: 1.7rem;
  font-family: "Nunito", sans-serif;
  vertical-align: middle;
}
.work .backbtn .btn i {
  font-size: 1.5rem;
  transition: 0.3s;
  flex-shrink: 0;
}
.work .backbtn .btn:hover {
  background: #ffffff;
  color: #000;
}
.work .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 */
