html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  color: white;
  background: linear-gradient(#0c0318, #281537, #0c0318);
  display: flex;
  flex-direction: column;
  width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  top: 0;
}
a {
  text-decoration: solid;
}
#magic-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(167, 138, 191, 0.4),
    transparent 70%
  );
  filter: blur(40px);
  transform: translate(-50%, -50%);
  z-index: 0;
  mix-blend-mode: lighten; /* Optional: makes it glow-like */
}

/*header*/
header {
  top: 0;
  width: 100%;
  margin: 0;
  height: 100px;
  display: flex;
  align-items: center;
  position: fixed;
  background-color: transparent;
  transition: background-color 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  overflow-y: hidden;
}

header.scrolled {
  background-color: #0c0318;
}

.brand img {
  width: 80px;
  height: 80px;
  margin: 20px;
  margin-right: 0;
  filter: drop-shadow(1px 1px 5px white);
  object-fit: cover;
}
.name {
  position: relative;
}
.name h2 {
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  margin: 0;
  margin-bottom: 15px;
  transform: translateX(-17px) translateY(15px);
  font-weight: 200;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  font-size: 30px;
  filter: drop-shadow(1px 1px 5px white);
  border-right: 2px solid #a78abf;
  animation:
    typing2 3.5s steps(50, end) infinite,
    blink-caret 0.7s step-end infinite;
}

article {
  margin-top: 100px;
}

/*introduction*/
.intro {
  display: flex;

  flex-direction: row;
  gap: 30px;
  height: 85vh;
  justify-content: center;
  align-items: center;
}
.text {
  padding: 15px;
}
.avatar {
  position: relative;
  width: 400px;
  height: 400px;
  left: 40px;
}
.blur {
  width: 400px;
  height: 400px;
}
.avatar .my-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.my-avatar {
  transform: translateY(-40px);
}

.start {
  font-size: 1.8rem;
  margin: 10px 0;
  text-wrap: wrap;
  max-width: 500px;
}
#name {
  color: #a78abf;
  font-size: 3rem;
  margin-top: 0;
  padding-top: 0;
}

.intro h3 {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-right: 2px solid #a78abf;
  animation:
    typing 5s steps(10000, end) forwards,
    blink-caret 0.7s step-end 5s;
}
@keyframes typing2 {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes typing {
  0% {
    width: 0;
  }
  100% {
    width: 30ch;
  }
}

@keyframes blink-caret {
  0%,
  100% {
    border-color: transparent;
  }
  50% {
    border-color: #a78abf;
  }
}

.soc a {
  color: #bfaad0;
  background-color: transparent;
  border-radius: 50%;
  margin: 10px;
  border: 1px solid #bfaad0;
  padding: 10px;
  transition: all 0.3s ease-out;
}

.desc {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.soc a:hover {
  color: #0c0318;
  transform: scale(0.99);
  background-color: #bfaad0;
  filter: drop-shadow(1px 1px 10px #bfaad0);
}

.download-btn {
  color: #bfaad0;
  background-color: transparent;
  border-radius: 30px;
  text-decoration: solid;
  margin: 10px;
  width: 150px;
  border: 1px solid #bfaad0;
  padding: 15px;
  display: flex;
  justify-content: center;
  transition: all 0.3s ease-out !important;
}
.download-btn:hover {
  color: #0c0318;
  transform: scale(0.99);
  background-color: #bfaad0;
  filter: drop-shadow(1px 1px 10px #bfaad0);
}

/*about me*/
.about {
  padding: 40px 20px;
  margin: 30px 0;
  color: white;
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.about h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: white;
  font-weight: 600;
  position: relative;
}
.about-con {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 20px auto;
  width: 90%;
  color: white;
}

.about h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #a78abf; /* accent color */
  margin: 10px auto 0;
  border-radius: 2px;
}
.about-text {
  margin: 10px;
  font-size: 1.3rem;
  line-height: 1.6;

  color: white;
  max-width: 800px;
}

.contact-info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  gap: 15px;
  margin-top: 40px;
}

.info-item {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: #c7b9d3;
}

.info-item i {
  color: #bfaad0;
  margin-right: 10px;
  font-size: 1.3rem;
}

.info-item a {
  color: #c7b9d3;
  text-decoration: none;
  transition: color 0.3s ease;
}

.info-item a:hover {
  color: #a78abf;
}

/*programming skills*/
/* Programming skills */
.progSkills {
  width: 70vw;
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  margin: 5px;
  display: flex;
  flex-direction: column;
  margin: 20px auto;
  align-items: center;
  justify-content: center;
  text-align: center;

  h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: white;
    font-weight: 600;
    position: relative;
  }

  h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background: #a78abf;
    margin: 10px auto 0;
    border-radius: 2px;
  }
}

/* Category tabs */
.skill-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  width: 100%;
}

.category-btn {
  background: transparent;
  border: 1px solid #a78abf;
  color: #bfaad0;
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: #a78abf;
  color: #0c0318;
  transform: scale(0.95);
}

.category-btn.active {
  background: #a78abf;
  color: #0c0318;
}

.skills-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.skill-category {
  margin-bottom: 30px;
  width: 100%;
}

.skill-category h3 {
  color: #bfaad0;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: left;
  border-left: 3px solid #a78abf;
  padding-left: 15px;
}

.skills-list {
  list-style: none;
  margin: 0;
  width: 100%;
  padding: 0;
}

.skills-list li {
  display: flex;
  align-items: center;
  margin-bottom: 25px; /* Increased to accommodate percentage */
  position: relative;
}

.skills-list h5 {
  min-width: 160px;
  margin: 0;
  font-size: 16px;
  text-align: left;
  color: white;
}

.skills-bar {
  flex: 1;
  height: 10px; /* Slightly taller for better visibility */
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  margin-left: 15px;
  overflow: visible; /* Changed from hidden to show percentage */
  position: relative;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, #a78abf, #bfaad0);
  border-radius: 5px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Percentage display for ALL screens */
.bar-percentage {
  position: absolute;
  right: -40px; /* Position outside the bar */
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #bfaad0;
  background: rgba(167, 138, 191, 0.2);
  padding: 2px 6px;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 10;
}

/* Alternative: Show percentage on the right side of the bar */
.skill-percent-fixed {
  margin-left: 15px;
  font-size: 14px;
  font-weight: 600;
  color: #bfaad0;
  min-width: 45px;
  text-align: right;
  background: rgba(167, 138, 191, 0.15);
  padding: 3px 8px;
  border-radius: 15px;
  backdrop-filter: blur(5px);
}

/* Hover effect enhancement */
.skills-list li:hover .bar {
  background: linear-gradient(90deg, #b89fd1, #d6b5e8);
  box-shadow: 0 0 15px rgba(167, 138, 191, 0.5);
}

.skills-list li:hover .skill-percent-fixed {
  background: rgba(167, 138, 191, 0.3);
  color: white;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .progSkills {
    width: 90vw;
    padding: 15px;
  }

  .skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  .skills-list li {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .skills-list h5 {
    min-width: 120px;
    font-size: 15px;
    margin-bottom: 5px;
  }

  .skills-bar {
    width: calc(100% - 120px); /* Account for h5 width */
    margin-left: 0;
  }

  .skill-percent-fixed {
    font-size: 12px;
    min-width: 40px;
    padding: 2px 6px;
  }
}

@media (max-width: 480px) {
  .skills-list li {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    margin-bottom: 25px;
  }

  .skills-list h5 {
    min-width: auto;
    width: 100%;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .skills-bar {
    width: 100%;
    margin-bottom: 5px;
  }

  .skill-percent-fixed {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 14px;
    background: rgba(167, 138, 191, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
  }

  /* Alternative layout for very small screens */
  .skill-category {
    padding: 10px;
  }

  .bar-percentage {
    right: 5px; /* Adjust for small screens */
    background: rgba(0, 0, 0, 0.5);
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .skill-percent-fixed {
    position: relative;
    display: inline-block;
    margin-top: 5px;
    margin-left: 0;
    align-self: flex-end;
  }

  .skills-list li {
    margin-bottom: 30px;
  }
}
/* Add this to ensure percentages show on all screens */
.skills-list li {
  position: relative;
}

.skills-list li::after {
  content: attr(data-percentage);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #bfaad0;
  background: rgba(167, 138, 191, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  z-index: 10;
}

@media (max-width: 480px) {
  .skills-list li::after {
    font-size: 11px;
    padding: 2px 6px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
  }
}

/*projects container*/
.projects {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  background: transparent;
  color: white;
  align-items: baseline;
}

.softwares,
.hardwares {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}
.soft,
.hard {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  transition: all 0.4s ease-in-out;
  opacity: 0.6;
  margin: 15px;
  overflow: hidden;
  position: relative;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  box-shadow:
    0 0 2px #281537,
    0 0 2px #a78abf;
}
.soft,
.hard,
.cert {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  contain: layout paint;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.8s;
  box-shadow: 0 0 10px #281537;
  font-size: 17px;
  flex-direction: column;
}
.card-back p,
.card-front p {
  margin: 0;
  background-color: transparent;
  font-size: smaller;
  color: #bfaad0;
  display: none;
}

.card-front {
  background-color: #28153747;
  color: white;
  transform: rotateY(0deg);
  z-index: 2;
}

.card-back {
  background: radial-gradient(circle at top right, #5c3987, #281537, #2c1a3acd);
  color: white;
  transform: rotateY(180deg);
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.card-back h4 {
  font-weight: 300;
  padding: 5px;
  margin: 0;
}
.card-back a {
  color: #c7b9d3;
  padding: 1px;
  margin: 0;
  text-decoration: underline !important;
}
.hard:hover .card-front,
.hard:active .card-front,
.soft:hover .card-front,
.soft:active .card-front {
  transform: rotateY(180deg);
}
.hard:hover .card-back,
.hard:active .card-back,
.soft:hover .card-back,
.soft:active .card-back {
  transform: rotateY(360deg);
  z-index: 2;
}
.soft.flipped .card-front,
.hard.flipped .card-front,
.cert.flipped .card-front {
  transform: rotateY(180deg);
}

.soft.flipped .card-back,
.hard.flipped .card-back,
.cert.flipped .card-back {
  transform: rotateY(0deg);
  z-index: 2;
}
.project-container {
  position: relative;
  padding: 30px;
  border-radius: 20px;
  background-color: #0c0318;
  color: white;
  overflow: hidden;
  max-width: 550px;
  height: 70%;
  margin: 30px auto;
  text-align: center;
  box-shadow:
    0 0 1px #281537,
    0 0 1px #a78abf;
}
.project-container::before {
  content: "";
  position: absolute;
  width: 70px;
  height: 1px;
  background: #bfaad0;
  border-radius: 50px;
  box-shadow:
    0 0 10px #bfaad0,
    0 0 20px #bfaad0;
  animation: moveAround 15s linear infinite;
  z-index: 2;
}

@keyframes moveAround {
  0% {
    top: 0;
    left: 0;
    width: 70px;
    height: 1px;
    transform: none;
  }
  24.9% {
    top: 0;
    left: 100%;
    width: 70px;
    height: 1px;
    transform: translate(-100%, 0);
  }
  25% {
    top: 0;
    left: 100%;
    width: 1px;
    height: 70px;
    transform: translate(-100%, 0);
  }
  49.9% {
    top: 100%;
    left: 100%;
    width: 1px;
    height: 70px;
    transform: translate(-100%, -100%);
  }
  50% {
    top: 100%;
    left: 100%;
    width: 70px;
    height: 1px;
    transform: translate(-100%, -100%);
  }
  74.9% {
    top: 100%;
    left: 0;
    width: 70px;
    height: 1px;
    transform: translate(0, -100%);
  }
  75% {
    top: 100%;
    left: 0;
    width: 1px;
    height: 70px;
    transform: translate(0, -100%);
  }
  99.9% {
    top: 0;
    left: 0;
    width: 1px;
    height: 70px;
    transform: none;
  }
  100% {
    top: 0;
    left: 0;
    width: 70px;
    height: 1px;
    transform: none;
  }
}
/*language skills*/
.lang-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 20px;
  justify-content: center;
  align-items: center;
  gap: 70px;
  margin: 20px;
}
.lang {
  margin-bottom: 150px;
}
.lang-h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: white;
  font-weight: 600;
  position: relative;
}

.lang-h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #a78abf;
  margin: 10px auto 0;
  border-radius: 2px;
}

/*education*/
.edu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 20px auto;
  width: 90%;
  color: white;
}
.edu h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: white;
  font-weight: 600;
  position: relative;
}

.edu h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background: #a78abf;
  margin: 10px auto 0;
  border-radius: 2px;
}
/*timeline*/
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    #281537,
    #a78abf,
    #281537,
    #a78abf,
    #281537
  );
  background-size: 400% 400%;
  animation: gradientMove 5s ease infinite;
}

.timeline-item {
  position: relative;
  padding: 30px 40px;
  box-sizing: border-box;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(45deg, #a78abf, #281537);
  z-index: 1;
}
@keyframes gradientMove {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}

.timeline-item.left {
  left: -50%;
  text-align: right;
}

.timeline-item.left::before {
  right: -7px;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-item.right::before {
  left: -5px;
}

.timeline-content {
  padding: 20px 10px;
  padding-top: 0;
  border-radius: 6px;
  color: #d6cce2;
}

.timeline-content h3 {
  margin: 0 0 5px;
  color: #bfaad0;
  font-weight: 600;
  font-size: 1.4rem;
}

.timeline-content h4 {
  margin: 0 0 10px;
  color: white;
  font-weight: 1000;
  font-size: 1.6rem;
}

.timeline-content p {
  margin: 0;
  font-size: 1rem;
  color: white;
}

/*certificates*/
.certificates {
  padding: 40px 20px;
  text-align: center;
  color: white;
}

.certificates h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  position: relative;
}
.certificates h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #a78abf;
  margin: 10px auto 0;
  border-radius: 2px;
}
.cert {
  width: 350px;
  height: 350px;
  border-radius: 10px;
  transition: all 0.4s ease-in-out;
  opacity: 0.6;
  margin: 15px;
  overflow: hidden;
  position: relative;
  perspective: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  box-shadow:
    0 0 2px #281537,
    0 0 2px #a78abf;
  .img {
    width: 80%;
    border-radius: 0px;
    box-shadow: 0 0 5px #a78abf;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 0px;
    }
  }
}
.cert:hover .card-front,
.cert:active .card-front {
  transform: rotateY(180deg);
}
.cert:hover .card-back,
.cert:active .card-back {
  transform: rotateY(360deg);
  z-index: 2;
}
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.card-back h4 {
  margin: 0 0 20px;
  font-size: 0.95rem;
  font-weight: 400;
  color: #d6cce2;
  max-width: 150px;
}
.card-back h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.cert-btn {
  color: #bfaad0;
  background-color: transparent;
  border-radius: 30px;
  text-decoration: solid;
  margin: 10px;
  width: 150px;
  padding: 15px;
  display: flex;
  justify-content: center;
  transition: all 0.3s ease-out;
  cursor: pointer;
}
.cert-btn:hover {
  transform: scale(0.99);
}
/*clubs*/
.clubs {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  margin-bottom: 100px;
}
.clubs h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  position: relative;
}
.clubs h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #a78abf;
  margin: 10px auto 0;
  border-radius: 2px;
}

.gradient {
  position: relative;
  top: 0;
  left: 0;
  z-index: -1;
}
.clublogo {
  position: absolute;
  width: 300px;
  height: 300px;
  object-fit: cover;
  transform: translateY(-20%);
}
.clubBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  h1 {
    color: #bfaad0;
    font-size: 1.5rem;
    margin: 20px 0;
  }
  p {
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
  }
  h3 {
    font-size: 1.1rem;
    margin-top: 30px;
    margin-bottom: 0;
  }
}
/*footer*/
footer {
  width: 100%;
  height: 100px;
  background-color: #0f031790;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bfaad0;
  font-size: 0.8rem;
  margin-bottom: 0;
  position: relative;
}

/*tablet and phone*/

@media (max-width: 768px) {
  article {
    align-items: center;
    text-align: center;
  }

  .intro {
    flex-direction: column;
    height: auto;
    padding-top: 70px;
  }

  .avatar {
    width: 250px;
    height: 250px;
    left: 0;
  }

  .blur {
    width: 250px;
    height: 250px;
  }

  .my-avatar {
    transform: none;
  }

  .intro h1 {
    font-size: 30px;
  }

  .desc {
    align-items: center;
  }

  .soc {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  .projects {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
  }

  .project-container {
    width: 70%;
    margin: 30px auto;
    text-align: center;
  }
  .cert-grid {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 460px) {
  .name {
    display: none;
  }
  header {
    justify-content: center;
  }
  .card-back p,
  .card-front p {
    display: block;
  }
  .timeline::before {
    left: 10px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 20px;
  }
  .timeline-item.left::before {
    left: 5px;
  }
  .timeline-item.right::before {
    left: 5px;
  }
  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    text-align: left;
  }
}
