html {
  scroll-behavior: smooth;
}

body {
  background: rgb(29, 40, 41);
  background: linear-gradient(
    90deg,
    rgba(29, 40, 41, 1) 0%,
    rgba(24, 30, 31, 1) 11%,
    rgba(19, 19, 20, 1) 41%,
    rgba(19, 19, 20, 1) 58%,
    rgba(24, 30, 31, 1) 85%,
    rgba(29, 40, 41, 1) 100%
  );
  color: white;
  padding: 3rem;
  position: relative;
  overflow-x: hidden;
  animation: fadeInPage 1s ease-in-out;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 2px;
}

.contact-btn {
  padding: 0.5rem 2rem;
  font-size: 1rem;
  background-color: rgba(143, 143, 143, 0.2);
  border: 1px solid rgba(102, 102, 102, 0.5);
  border-radius: 50px;
  cursor: pointer;
  color: white;
  transition: 0.3s;
}

.contact-btn:hover {
  background-color: #76b0ab37;
}

/* main hero section */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 6rem);
  text-align: center;
  position: relative;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  margin-top: -7rem;
}

main h1 {
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1;
  background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
  color: transparent;
  background-clip: text;
}

main h2 {
  font-size: clamp(3.5rem, 7vw, 7.5rem);
  font-weight: 700;
  letter-spacing: 5px;
  line-height: 1;
  background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
  color: transparent;
  background-clip: text;
  display: none;
}

.bio-section {
  margin-top: 1rem;
}

.bio {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 1px;
  max-width: 600px;
}

/* graphics */
.hero-graphics {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: clamp(300px, 45vh, 600px);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: -3rem;
}

/* 3D Planet  */
.model-container {
  width: 100%;
  max-width: 1200px;
  height: 850px;
  margin-top: 2rem;
  z-index: 1;
}

.planet-3D {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.planet-3D:active {
  cursor: grabbing;
}

/* scroll animation */
.scroll-down {
  height: 5rem;
  width: 2rem;
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  z-index: 2;
}

.scroll-down::before,
.scroll-down::after {
  content: "";
  position: absolute;
  top: 20%;
  left: 50%;
  height: 10px;
  width: 10px;
  transform: translate(-50%, -100%) rotate(45deg);
  border: 2px solid lightgray;
  border-top: transparent;
  border-left: transparent;
  animation: scroll-down 3s ease-in-out infinite;
}

.scroll-down::before {
  top: 30%;
  animation-delay: 0.8s;
}

@keyframes scroll-down {
  0% {
    opacity: 0;
  }
  30%,
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 90%;
  }
}

/* about section */
.about-section {
  padding: 100px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-title {
  margin-bottom: 3rem;
  font-size: clamp(3rem, 5vw, 5rem);
  background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
  color: transparent;
  background-clip: text;
}

.bento-grid {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 1400px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "intro intro tech"
    "time passion tech";
  gap: 1.5rem;
}

.card {
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.07));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2rem;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.intro {
  grid-area: intro;
  min-height: 350px;
}
.tech {
  grid-area: tech;
  min-height: 450px;
}
.time {
  grid-area: time;
  min-height: 220px;
  justify-content: center;
}
.passion {
  grid-area: passion;
  min-height: 220px;
  justify-content: center;
}

.card:hover {
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(124, 233, 230, 0.1),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 300;
  color: #ffffff;
  z-index: 2;
}

.card-text {
  color: #7b7b7b;
  line-height: 1.6;
  margin-top: 1rem;
  margin-bottom: 2rem;
  max-width: 30rem;
  z-index: 2;
}

.bento-grid .background-img {
  position: absolute;
  inset: -1%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  z-index: 0;
}

.model-box {
  position: absolute;
  right: 5%;
  top: 10%;
  width: 25rem;
  height: 25rem;
  z-index: 1;
  pointer-events: none;
}

.info-3D {
  width: 100%;
  height: 100%;
  mix-blend-mode: lighten;
  pointer-events: auto;
}

.bento-grid .skills-group {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 250px;
  z-index: 1;
}

.bento-grid .btn {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  background-color: rgba(124, 233, 230, 0.1);
  color: #76b0ab;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s ease;
  z-index: 2;
}

.bento-grid .btn:hover {
  background-color: #76b0ab;
  color: black;
}

/*projects section*/
.projects-section {
  padding: 100px 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-section h3 {
  margin-bottom: 3rem;
  font-size: clamp(3rem, 5vw, 5rem);
  background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
  color: transparent;
  background-clip: text;
}

.slider {
  height: var(--height);
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 10% 90%, transparent);
}

.slider .list {
  display: flex;
  min-width: calc(var(--width) * var(--quantity));
  position: relative;
  height: 100%;
  align-items: center;
}

.slider .list .item {
  width: var(--width);
  height: var(--height);
  position: absolute;
  left: 100%;
  padding: 1rem;
  animation: autoRun 50s linear infinite;
  transition:
    filter 0.5s,
    transform 0.5s;
  animation-delay: calc(
    (50s / var(--quantity)) * (var(--position) - 1) - 50s
  ) !important;
}

.slider .list .item img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@keyframes autoRun {
  from {
    left: 100%;
  }
  to {
    left: calc(var(--width) * -1);
  }
}

.slider:hover .item {
  animation-play-state: paused !important;
  filter: grayscale(1);
}

.slider .item:hover {
  filter: grayscale(0);
  transform: scale(1.05);
  z-index: 10;
}

/* contact section */
.contact-section {
  padding: 100px 0 150px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h3 {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  margin-bottom: 15px;
  background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
  color: transparent;
  background-clip: text;
}

.section-header p {
  color: lightgray;
  max-width: 600px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.info-card {
  background-color: #1e1e1e;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
}
.info-card h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: lightgray;
}
.contact-item {
  margin-bottom: 2rem;
}
.contact-item p {
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: #7ce9e6;
}
.contact-item a {
  color: lightgray;
  text-decoration: none;
  transition: color 0.3s;
}
.contact-item a:hover {
  color: #7ce9e6;
}

.social-link {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.social-link p {
  margin-bottom: 15px;
  color: #7ce9e6;
  font-weight: 600;
}
.social-link a {
  display: inline-block;
  margin-right: 15px;
  color: lightgray;
  text-decoration: none;
  padding: 8px 15px;
  background-color: #2d2d2d;
  border-radius: 6px;
  transition: all 0.2s;
}

.social-link a:hover {
  background-color: #7ce9e6;
  color: #1e1e1e;
}

/* form styles */
.form-group {
  margin-bottom: 20px;
}
.form-control {
  width: 100%;
  padding: 12px 15px;
  background-color: #2d2d2d;
  border-radius: 8px;
  color: lightgray;
  font-size: 16px;
  border: 1px solid #333;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #7ce9e6;
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.message-btn {
  width: 100%;
  padding: 12px;
  background-color: rgba(124, 233, 230, 0.1);
  color: #7ce9e6;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.message-btn:hover {
  background-color: #7ce9e6;
  color: #131314;
}
.success-message {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
  display: none;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 2rem;
  background-color: rgba(124, 233, 230, 0.05);
}

.box-icons {
  display: flex;
  gap: 2rem;
}
.box-icons a {
  color: lightgray;
  font-size: 2rem;
  transition: color 0.5s;
}
.box-icons a:hover {
  color: #7ce9e6;
}

/* mobile responsive */

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "intro intro"
      "tech tech"
      "time passion";
  }
  .model-box {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    height: 300px;
    margin-top: 1rem;
  }
  .slider {
    --width: 40rem !important;
    --height: 25rem !important;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1.5rem;
  }

  main {
    min-height: auto;
    margin-top: 2rem;
  }

  .hero-content {
    margin-top: 0;
  }

  .hero-graphics {
    flex-direction: column;
    height: auto;
    margin-top: -10rem;
  }

  .location {
    position: relative;
    left: auto;
    top: auto;
    text-align: center;
    margin-bottom: 1rem;
  }

  .location p {
    display: inline-block;
  }
  .location p br {
    display: none;
  }
  .location p::before {
    content: "BASED IN NEPAL";
  }
  .location p {
    font-size: 0;
  }
  .location p::before {
    font-size: 1.5rem;
  }

  .scroll-down {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 2rem;
  }

  .model-container {
    height: 350px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "tech" "time" "passion";
  }

  .card {
    padding: 1.5rem;
  }
  .intro,
  .tech,
  .time,
  .passion {
    min-height: auto;
  }

  .slider {
    --width: 28rem !important;
    --height: 18rem !important;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  main h1 {
    display: none;
  }
  main h2 {
    display: block;
  }

  .model-container {
    height: 280px;
  }

  .slider {
    --width: 20rem !important;
    --height: 14rem !important;
  }
}