@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;
}

*:not(canvas) {
  max-width: 100%;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
}

body {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

*::selection {
  background: #8b5cf6;
  color: #fff;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

html::-webkit-scrollbar {
  width: .8rem;
}

html::-webkit-scrollbar-track {
  background: #1a1a2e;
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-radius: 10px;
}

/* ===== SPACE BACKGROUND STYLES ===== */
#space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

#stars-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: twinkle linear infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

#shooting-stars {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: linear-gradient(90deg, white, transparent);
  border-radius: 50%;
  animation: shoot 2s ease-out forwards;
}

@keyframes shoot {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
    width: 2px;
  }

  100% {
    transform: translateX(300px) translateY(300px);
    opacity: 0;
    width: 100px;
  }
}

/* Celestial Objects (Moon, Sun, Planets) */
.celestial-object {
  position: fixed;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
}

.celestial-object img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: rotate 60s linear infinite;
}

.celestial-object.sun img {
  filter: drop-shadow(0 0 40px rgba(255, 200, 100, 0.8));
  animation: rotate 60s linear infinite, pulse-glow 3s ease-in-out infinite;
}

.celestial-object.moon img {
  filter: drop-shadow(0 0 30px rgba(200, 200, 255, 0.6));
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-20px) translateX(10px);
  }

  50% {
    transform: translateY(-10px) translateX(-10px);
  }

  75% {
    transform: translateY(-30px) translateX(5px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 40px rgba(255, 200, 100, 0.8)) brightness(1);
  }

  50% {
    filter: drop-shadow(0 0 60px rgba(255, 220, 120, 1)) brightness(1.2);
  }
}

/* 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: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(139, 92, 246, 0.3);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

section {
  min-height: 100vh;
  padding: 2rem 9%;
  position: relative;
  z-index: 1;
}

.heading {
  font-size: 3.5rem;
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.heading span {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header .logo {
  font-size: 1.9rem;
  font-weight: 800;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

header .logo i {
  font-size: 2.2rem;
  color: #8b5cf6;
}

header .logo:hover {
  color: #ec4899;
}

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: #ffffff;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04rem;
  transition: all 0.3s ease;
}

header .navbar ul li a.active,
header .navbar ul li a:hover {
  color: #8b5cf6;
  border-bottom: .2rem solid #8b5cf6;
  padding: .5rem 0;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

/* navbar ends */

/* hamburger icon starts*/
#menu {
  font-size: 3rem;
  cursor: pointer;
  color: #8b5cf6;
  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: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
  }

  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 */
.work {
  background: transparent;
  margin-top: 5rem;
  padding-top: 8rem;
}

.work h2 {
  color: #fff;
  padding: 1rem;
  margin-bottom: 3rem;
}

.work .heading span {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Filter Buttons with Space Theme */
.work .button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 3rem auto;
  width: 80%;
  justify-content: center;
  align-items: center;
}

.work .button-group .btn {
  outline: none;
  padding: 1.2rem 2.5rem;
  background: rgba(139, 92, 246, 0.1);
  color: #fff;
  border: 2px solid rgba(139, 92, 246, 0.5);
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.4rem;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.work .button-group .btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-color: #ec4899;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.work .button-group .btn.is-checked {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-color: #ec4899;
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

/* Project Cards Container */
.work .box-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin: 4rem auto;
  padding: 2rem;
  max-width: 1400px;
}

/* Individual Project Card with Floating Animation */
.work .box-container .box {
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
  width: 350px;
  height: 35rem;
  flex-shrink: 0;
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.4s ease;
}

.floating-card {
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-15px) scale(1.02);
  }
}

.work .box-container .box:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.6);
  border-color: rgba(236, 72, 153, 0.6);
}

.work .box-container .box img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work .box-container .box:hover img {
  transform: scale(1.1) rotate(2deg);
  filter: brightness(1.1);
}

.work .box-container .box .content {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 85%;
  left: 0;
  background: linear-gradient(to top, rgba(10, 14, 39, 0.98) 0%, rgba(10, 14, 39, 0.95) 70%, transparent 100%);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.work .box-container .box:hover .content {
  top: 0;
  padding-top: 10%;
  overflow-y: auto;
}

.work .box-container .box .content .tag {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.work .box-container .box .content .tag h3 {
  font-size: 2rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.work .desc {
  margin: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  overflow-y: auto;
}

.work .desc p {
  font-size: 1.5rem;
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  display: block;
  overflow: visible;
  white-space: normal;
}
}

.work .desc .btns {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 2rem;
  gap: 1rem;
}

.work .desc .btns .btn {
  line-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 2.5rem;
  border-radius: 50px;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(236, 72, 153, 0.8));
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 600;
}

.work .desc .btns .btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
  border-color: rgba(255, 255, 255, 0.6);
}

.work .desc .btns .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@media screen and (max-width: 450px) {
  .work .button-group {
    width: 100%;
    gap: 1rem;
  }

  .work .button-group .btn {
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
  }

  .work .box-container {
    margin: 1rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work .box-container .grid-item .box {
    width: 95% !important;
  }

  .celestial-object {
    display: none;
  }

  .heading {
    font-size: 2.5rem;
  }

  .backbtn .btn {
    padding: 1.5rem 2.5rem;
  }

  .backbtn .btn span {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .work .box-container {
    grid-template-columns: 1fr;
  }

  .celestial-object img {
    width: 80px;
    height: 80px;
  }
}

/* back to home button */
.backbtn {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
  margin-top: 6rem;
}

.backbtn .btn {
  position: relative;
  line-height: 0;
  padding: 1.8rem 4rem;
  border-radius: 50px;
  transition: all 0.4s ease;
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  border: 2px solid rgba(139, 92, 246, 0.6);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.backbtn .btn span {
  font-weight: 700;
  font-size: 1.7rem;
  font-family: 'Nunito', sans-serif;
}

.backbtn .btn i {
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.backbtn .btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  border-color: #ec4899;
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(236, 72, 153, 0.5);
}

.backbtn .btn:hover i {
  transform: translateX(-10px);
}

/* Coming Soon Card Styles */
.coming-soon-image {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.coming-soon-image::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.coming-soon-overlay {
  text-align: center;
  z-index: 1;
}

.coming-soon-overlay h3 {
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
  margin-bottom: 1rem;
}

.coming-soon-overlay p {
  font-size: 1.6rem;
  color: #e5e7eb;
}

/* 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: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #ffffff;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5);
  transition: all 0.4s ease;
  z-index: 1000;
}

#scroll-top:hover {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.6);
}

#scroll-top.active {
  top: calc(100% - 12rem);
}

/* scroll top ends */
}

100% {
  filter: brightness(1.2) drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
}
}

/* Gradient color shift */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Subtle fade pulse for subtitle */
@keyframes fade-pulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Disabled button styles */
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.disabled:hover {
  transform: none;
}