@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #081b29;
  --main-color: #00abf0;
  --text-color: #333;
  --second-text-color: #555;
  --white-color: #fff;
  --cover-color: linear-gradient(45deg, #00abf0, #006e9a);
  --pages-color: linear-gradient(90deg, #fff, #ddd);
  --border: 0.125rem solid #00abf0;
  --box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.2);
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  overflow: hidden;
}
.wrapper {
  position: relative;
  width: 66rem;
  height: 45rem;
  padding: 2rem;
  perspective: 250rem;
  animation: show-animate 2s forwards;
}

@keyframes show-animate {
  0%,
  30% {
    opacity: 0;
    transform: rotate(-20deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0deg);
  }
}

.cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--cover-color);
  box-shadow: var(--box-shadow);
  border-top-left-radius: 0.6rem;
  border-bottom-left-radius: 0.6rem;
  transform-origin: right;
}
.cover.cover-left {
  z-index: -1;
}
.cover.cover-right {
  z-index: 100;
  transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.cover.cover-right.turn {
  transform: rotateY(180deg);
}
.cover.cover-right h1 {
  color: white;
  margin-top: 100px;
  text-align: center;
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  perspective: 400rem;
}
.book .book-page {
  position: absolute;
  width: 50%;
  height: 100%;
  background: var(--pages-color);
  box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.1);
  display: flex;
  padding: 2rem;
}
.book-page.page-left {
  box-shadow: -0.6rem 0.6rem 0.6rem rgba(0, 0, 0, 0.1);
}
.profile-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  perspective: 1000px; /* Enable 3D perspective */
}
.profile-page img {
  max-width: 180px;
  border-radius: 50%;
  border: 0.25rem solid var(--main-color);
  margin-bottom: 0.8rem;
}
.profile-page h1 {
  font-size: 2.7rem;
  line-height: 1;
}
.profile-page h3 {
  font-size: 1.5rem;
  color: var(--main-color);
  overflow: hidden; /* Ensures the text is hidden until animated */
  border-right: 0.15em solid var(--main-color); /* Creates a cursor effect */
  white-space: nowrap; /* Prevents text wrapping */
  animation: typing 4s steps(30, end), blink-caret 0.75s step-end infinite; /* Typewriter and blinking cursor effects */
  
  /* Fixed height to prevent shifting */
  height: 2rem; /* Adjust based on your font size and line height */
}

/* Typing animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Blinking cursor effect */
@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--main-color);
  }
}
.profile-page .social-media {
  margin: 0.6rem 0 0.8rem;
}
.profile-page .social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: var(--border);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--main-color);
  margin: 0 0.2rem;
  transition: 0.5s;
}
.profile-page .social-media a:hover {
  background: var(--main-color);
  color: var(--white-color);
  transition: transform 0.5s ease, box-shadow 0.5s ease; /* Smooth transitions */
  transform: rotateY(0deg) translateY(-10px) scale(1.05); /* Adjust position on hover */
  box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.6); /* Increased shadow on hover */
}
.profile-page p {
  text-align: justify;
}
.profile-page .btn-box {
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 9.5rem;
  height: 3rem;
  background: var(--main-color);
  border: var(--border);
  border-radius: 0.3rem;
  font-size: 1rem;
  color: var(--white-color);
  font-weight: 500;
  margin: 0 1rem;
  transition: 0.5s;
}
.btn:hover {
  background: transparent;
  color: var(--main-color);
  transition: transform 0.5s ease, box-shadow 0.5s ease; /* Smooth transitions */
  transform: rotateY(0deg) translateY(-10px) scale(1.05); /* Adjust position on hover */
  box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.6); /* Increased shadow on hover */
}
.btn-box .btn:nth-child(2) {
  background: transparent;
  color: var(--main-color);
}
.btn-box .btn:nth-child(2):hover {
  background: var(--main-color);
  color: var(--white-color);
}
.book-page.page-right {
  position: absolute;
  right: 0;
  transform-style: preserve-3d;
  transform-origin: left;
  /* this is where we turn the pages as book */
  transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.book-page.page-right.turn {
  transform: rotateY(-180deg);
}
.book-page .page-front,
.book-page .page-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--pages-color);
  padding: 1.5rem 2rem;
}
.book-page .page-front {
  transform: rotateY(0deg) translateZ(1px);
}
.book-page .page-back {
  transform: rotateY(180deg) translateZ(1px);
}
.title {
  text-align: center;
  margin-bottom: 1rem;
}
.workeduc-box {
  border-left: var(--border);
  max-height: 505px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.workeduc-box .workeduc-content {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 1.2rem;
}
.workeduc-box .workeduc-content:before {
  content: "";
  position: absolute;
  top: 0;
  left: -0.65rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--main-color);
  border-radius: 50%;
}
.workeduc-content .year {
  color: var(--main-color);
}
.workeduc-content .year i {
  margin-right: 0.4rem;
}
.number-page {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
}
.nextprev-btn {
  position: absolute;
  bottom: 0.9rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;

  cursor: pointer;
  font-size: 2rem;
  color: var(--second-text-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
  border: 2px solid var(--main-color);
  border-radius: 50%;
}
.nextprev-btn:hover {
  color: var(--main-color);
  transition: transform 0.5s ease, box-shadow 0.5s ease; /* Smooth transitions */
  transform: rotateY(0deg) translateY(-10px) scale(1.05); /* Adjust position on hover */
  box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.6); /* Increased shadow on hover */
  border-radius: 50%;
}
.nextprev-btn.back {
  left: 1.5rem;
}
.services-box .services-content {
  flex: 1 1 10rem;
  border: var(--border);
  border-radius: 0.5rem;
  text-align: center;
  padding: 0.8rem 0.5rem 1.1rem;
  transition: 0.3s ease;
  margin-top: 20px;
  max-height: 100%; 
}
.services-box .services-content:hover {
  box-shadow: var(--box-shadow);
}
.services-box {
  max-height: 505px; /* Define a maximum height for the container */
  /* overflow-y: scroll;  Enable scrolling if content exceeds the max height */
  /* -webkit-overflow-scrolling: touch; Smooth scrolling on mobile devices */
}
.services-content i {
  font-size: 2.5rem;
  color: var(--main-color);
}
.services-content h3 {
  font-size: 1.1rem;
}
.services-content p {
  margin: 0.2rem 0 0.8rem;
}
.services-content .btn {
  width: 8rem;
  height: 2.5rem;
}
.skills-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-height: 505px;
  overflow-y: auto;
}
.skills-box .skills-content {
  flex: 1 1 20rem;
}
.skills-content h3 {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.skills-content .content {
  display: flex;
  flex-wrap: no-wrap;
  gap: 0.8rem;
}
.skills-content .content span {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  transition: 0.3s ease;
}
.skills-content .content span:hover {
  box-shadow: var(--box-shadow);
}

.skills-content .content span i {
  font-size: 3rem;
  color: var(--main-color);
}
.portfolio-box {
  max-height: 505px;
  overflow-y: auto;
}
.portfolio-box .img-box {
  display: flex;
  width: 100%;
  height: 15rem;
  border: var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}
.portfolio-box .img-box img {
  width: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}
.portfolio-box .img-box:hover img {
  transform: scale(1.1);
}
.portfolio-box .info-box {
  margin: 1rem 0 1.5rem;
}
.portfolio-box .info-box .info-title {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.portfolio-box .info-box .info-title h3 {
  font-size: 1.3rem;
}
.portfolio-box .info-box .info-title a {
  display: flex;
  align-items: center;
  color: var(--main-color);
}
.portfolio-box .info-box .info-title a i {
  margin-left: 0.3rem;
}
.portfolio-box .btn-box {
  display: flex;
  justify-content: center;
}
.portfolio-box .btn-box .btn {
  margin: 0 1.15rem;
}
.back-profile {
  position: absolute;
  bottom: 1.2rem;
  right: 2rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: var(--border);
  border-radius: 0.3rem;
  font-size: 1.1rem;
  color: var(--main-color);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
}
.back-profile:hover {
  background: var(--main-color);
  color: var(--white-color);
}
.back-profile p {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(0.5);
  font-size: 1rem;
  color: var(--main-color);
  opacity: 0;
  transition: 0.5s;
}
.back-profile:hover p {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  top: -1.8rem;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .wrapper {
    width: 60rem;
    height: 40rem;
  }
}

.wrapper1 {
  width: 100%;
  max-width: 1536px;
  position: relative;
  height: 90px;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1) 20%,
    rgba(0, 0, 0, 1) 80%,
    rgba(0, 0, 0, 0)
  );
}
@keyframes scrollLeft {
  to {
    left: -200px;
  }
}
@keyframes scrollRight1 {
  0% {
    left: -710px; /* Start off the left */
  }
  100% {
    left: 100%; /* Move to the right, off the screen */
  }
}
@keyframes scrollRight2 {
  0% {
    left: -465px; /* Start off the left */
  }
  100% {
    left: 100%; /* Move to the right, off the screen */
  }
}
.itemL {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  position: absolute;
  left: max(calc(97px * 7), 100%);
  animation-name: scrollLeft;
  animation-duration: 15s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.itemL1 {
  animation-delay: calc(15s / 7 * (7 - 1) * -1);
}
.itemL2 {
  animation-delay: calc(15s / 7 * (7 - 2) * -1);
}
.itemL3 {
  animation-delay: calc(15s / 7 * (7 - 3) * -1);
}
.itemL4 {
  animation-delay: calc(15s / 7 * (7 - 4) * -1);
}
.itemL5 {
  animation-delay: calc(15s / 7 * (7 - 5) * -1);
}

.itemL6 {
  animation-delay: calc(15s / 7 * (7 - 6) * -1);
}
.itemL7 {
  animation-delay: calc(15s / 7 * (7 - 7) * -1);
}
.itemF {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  position: absolute;
  left: max(calc(97px * 9), 100%);
  animation-name: scrollRight1;
  animation-duration: 20s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.itemF1 {
  animation-delay: calc(20s / 9 * (9 - 1) * -1);
}
.itemF2 {
  animation-delay: calc(20s / 9 * (9 - 2) * -1);
}
.itemF3 {
  animation-delay: calc(20s / 9 * (9 - 3) * -1);
}
.itemF4 {
  animation-delay: calc(20s / 9 * (9 - 4) * -1);
}
.itemF5 {
  animation-delay: calc(20s / 9 * (9 - 5) * -1);
}
.itemF6 {
  animation-delay: calc(20s / 9 * (9 - 6) * -1);
}
.itemF7 {
  animation-delay: calc(20s / 9 * (9 - 7) * -1);
}
.itemF8 {
  animation-delay: calc(20s / 9 * (9 - 8) * -1);
}
.itemF9 {
  animation-delay: calc(20s / 9 * (9 - 9) * -1);
}
.itemDT {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  position: absolute;
  left: max(calc(97px * 7), 100%);
  animation-name: scrollLeft;
  animation-duration: 15s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.itemDT1 {
  animation-delay: calc(15s / 7 * (7 - 1) * -1);
}
.itemDT2 {
  animation-delay: calc(15s / 7 * (7 - 2) * -1);
}
.itemDT3 {
  animation-delay: calc(15s / 7 * (7 - 3) * -1);
}
.itemDT4 {
  animation-delay: calc(15s / 7 * (7 - 4) * -1);
}
.itemDT5 {
  animation-delay: calc(15s / 7 * (7 - 5) * -1);
}
.itemDT6 {
  animation-delay: calc(15s / 7 * (7 - 6) * -1);
}
.itemDT7 {
  animation-delay: calc(15s / 7 * (7 - 7) * -1);
}
.itemDDT {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  position: absolute;
  left: max(calc(97px * 7), 100%);
  animation-name: scrollRight2;
  animation-duration: 15s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.itemDDT1 {
  animation-delay: calc(15s / 7 * (7 - 1) * -1);
}
.itemDDT2 {
  animation-delay: calc(15s / 7 * (7 - 2) * -1);
}
.itemDDT3 {
  animation-delay: calc(15s / 7 * (7 - 3) * -1);
}
.itemDDT4 {
  animation-delay: calc(15s / 7 * (7 - 4) * -1);
}
.itemDDT5 {
  animation-delay: calc(15s / 7 * (7 - 5) * -1);
}
.itemDDT6 {
  animation-delay: calc(15s / 7 * (7 - 6) * -1);
}
.itemDDT7 {
  animation-delay: calc(15s / 7 * (7 - 7) * -1);
}
.itemDP {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 7rem;
  height: 5.5rem;
  border: var(--border);
  border-radius: 0.3rem;
  font-weight: 600;
  position: absolute;
  left: max(calc(97px * 7), 100%);
  animation-name: scrollLeft;
  animation-duration: 15s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.itemDP1 {
  animation-delay: calc(15s / 7 * (7 - 1) * -1);
}
.itemDP2 {
  animation-delay: calc(15s / 7 * (7 - 2) * -1);
}
.itemDP3 {
  animation-delay: calc(15s / 7 * (7 - 3) * -1);
}
.itemDP4 {
  animation-delay: calc(15s / 7 * (7 - 4) * -1);
}
.itemDP5 {
  animation-delay: calc(15s / 7 * (7 - 5) * -1);
}
.itemDP6 {
  animation-delay: calc(15s / 7 * (7 - 6) * -1);
}
.itemDP7 {
  animation-delay: calc(15s / 7 * (7 - 7) * -1);
}
.resume-preview {
  width: 100%;
  height: 500px;
  cursor: pointer;
  border: none;
}

/* Overlay button styles */
.overlay-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  padding: 8px 12px;
  background-color: #00abf0;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.page-nav {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-nav button {
  background-color: var(--main-color);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s ease;
}

.page-nav button:hover {
  background-color: #008cc0;
  transform: scale(1.05);
}
