body {
  background-color: #140B2D;
  color: #F8F8FF;
  font-family: 'Inter', sans-serif;
}

.floating-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  pointer-events: none;
  animation: floaty 8s ease-in-out infinite;
}

.glow1 {
  width: 300px;
  height: 300px;
  background: #BB86FC;
  top: 15%;
  left: 10%;
  animation-delay: 0s;
}

.glow2 {
  width: 400px;
  height: 400px;
  background: #03DAC6;
  bottom: 10%;
  right: 15%;
  animation-delay: 4s;
}

@keyframes floaty {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-20px) translateX(15px);
  }
}

/* Header styles */
header nav div {
  color: #BB86FC;
  font-weight: 700;
}

header nav ul li a {
  color: #857BA8;
  transition: color 0.3s ease;
}

header nav ul li a:hover {
  color: #BB86FC;
}

/* Buttons */
.btn-purple {
  background: linear-gradient(90deg, #BB86FC 0%, #03DAC6 100%);
  color: #140B2D;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(187, 134, 252, 0.4);
  transition: transform 0.3s ease;
}

.btn-purple:hover {
  transform: scale(1.05);
}

/* Card backgrounds */
.card-bg {
  background-color: rgba(30, 20, 75, 0.6);
  border: 1px solid rgba(133, 123, 168, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.card-bg:hover {
  box-shadow: 0 0 12px #BB86FC;
}

/* Tags */
.tag {
  background-color: #857BA8;
  color: #F8F8FF;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  user-select: none;
}

/* Progress bars */
.progress-bar-bg {
  background-color: #2F244F;
  border-radius: 12px;
  width: 100%;
  height: 16px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 12px;
  background-color: #BB86FC;
  transition: width 0.6s ease;
}

/* Form inputs */
.form-input {
  background-color: #2F244F;
  border: 1.5px solid #857BA8;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #F8F8FF;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #BB86FC;
  box-shadow: 0 0 6px #BB86FC;
}

/* Submit button */
button[type="submit"] {
  background: linear-gradient(90deg, #BB86FC 0%, #03DAC6 100%);
  color: #ffffff;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 14px rgba(187, 134, 252, 0.4);
}

button[type="submit"]:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(187, 134, 252, 0.6);
}

/* Form message (top notification) */
#form-message {
  display: inline-flex;           /* shrink container to content */
  align-items: center;            /* vertically center text */
  min-width: 200px;               /* optional min width */
  max-width: fit-content;         /* container fits text */
  height: 56px;                   /* same height as typical header bar */
  padding: 0 1.5rem;              /* horizontal padding */
  font-size: 1.1rem;              /* bigger font */
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background-color: #BB86FC;
  color: #140B2D;
  font-weight: 700;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 3px 10px rgba(187, 134, 252, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}



#form-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Social icons - Discord */
section#contact div.relative {
  position: relative;
  display: inline-block;
}

section#contact div.relative img {
  width: 40px;
  height: auto;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
}

section#contact div.relative img:hover {
  transform: scale(1.1);
}

/* Tooltip */
section#contact div.relative .tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #BB86FC;
  color: #140B2D;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
}

section#contact div.relative:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* Sections background with transparency */
#projects,
#skills,
#about,
#contact {
  background-color: rgba(30, 20, 75, 0.6);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 16px rgba(187, 134, 252, 0.15);
  transition: background-color 0.3s ease;
}

#projects:hover,
#skills:hover,
#about:hover,
#contact:hover {
  background-color: rgba(30, 20, 75, 0.75);
}

/* Scroll smooth */
html {
  scroll-behavior: smooth;
}

.extra-projects-transition {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

.extra-projects-transition.open {
  max-height: 3000px;
  opacity: 1;
}

/* Project expand styles */

.project {
  transition: all 0.3s ease;
}

.extra-description {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
  margin-top: 0;
  color: #857BA8;
  font-size: 0.95rem;
  line-height: 1.4;
}

.project.expanded .extra-description {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.75rem;
}

.extra-projects-transition {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

.extra-projects-transition.open {
  max-height: 3000px; /* large enough for all projects */
  opacity: 1;
}

/* Cards expand on click */
.project-item {
  transition: all 0.3s ease;
  overflow: hidden;
}

.project-item.expanded p {
  white-space: normal;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.project-item p {
  max-height: 3rem; /* truncate description by default */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.8;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  cursor: pointer;
}

.project-item p {
  max-height: 1.5rem; /* smaller height to truncate single line */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.8;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.project-item.expanded p {
  white-space: normal;
  max-height: 1000px; /* big enough to show full text */
  opacity: 1;
}

.project-item {
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.project-item p {
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  opacity: 1 !important;
  cursor: default;
  transition: none;
}

.project-item.expanded p {
  white-space: normal;
  opacity: 1;
  max-height: none; /* allow full height */
}

#projects {
  max-height: 600px;   /* or any fixed height you want */
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #BB86FC transparent;
}

/* Optional: style scrollbars for WebKit browsers */
#projects::-webkit-scrollbar {
  width: 8px;
}

#projects::-webkit-scrollbar-thumb {
  background-color: #BB86FC;
  border-radius: 4px;
}

#projects::-webkit-scrollbar-track {
  background: transparent;
}

#reviews-skills-wrapper > section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}


@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 40s linear infinite;
}

.review-card {
  flex-shrink: 0;
}

/* ===== Animation Keyframes ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

/* ===== Animation Utility Classes ===== */
.animate-fade-in-up {
  animation: fadeInUp 1s ease forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 1s ease forwards;
}

.animate-bounce-slow {
  animation: bounceSlow 2s infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.project-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes typewriter {
  from { width: 0 }
  to { width: 100% }
}
.animate-typewriter {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typewriter 1.7s steps(20) forwards;
}

.neon-skill-circle {
  width: 100px;
  height: 100px;
  border: 4px solid #BB86FC;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #2D1E46 40%, #1A0E2A);
  box-shadow:
    0 0 10px #BB86FC,
    0 0 20px #BB86FC44,
    0 0 30px #BB86FC22,
    inset 0 0 10px #BB86FC22;
  transition: transform 0.3s ease;
}
.neon-skill-circle:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 20px #BB86FC,
    0 0 40px #BB86FCaa,
    0 0 60px #BB86FC88,
    inset 0 0 15px #BB86FC55;
}
.neon-percentage {
  font-size: 1.25rem;
  font-weight: bold;
  color: #BB86FC;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  background-color: #3B2E7B;
  border: 1.5px solid #857BA8;
  border-radius: 12px;
  padding: 1.25rem 1rem 0.5rem 1rem;
  color: #F8F8FF;
  font-size: 1rem;
  resize: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #BB86FC;
  box-shadow:
    0 0 8px #BB86FCdd,
    inset 0 0 12px #BB86FCcc;
  background-color: #3B2E7B;
}

.input-label {
  position: absolute;
  top: 1.1rem;
  left: 1rem;
  color: #BB86FC;
  font-size: 1rem;
  pointer-events: none;
  transform: translateY(0);
  transition: 0.3s ease all;
  padding: 0 0.25rem;
  user-select: none;
  background: #3B2E7B;
  border-radius: 4px;
}



/* When input is focused or has content, move label up and remove background */
.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
  top: 0.25rem;
  left: 0.85rem;
  font-size: 0.75rem;
  color: #BB86FCee;
  background: transparent;
  padding: 0;
  transform: translateY(0);
}


.glow-purple-circle {
  box-shadow:
    0 0 5px #BB86FC,
    0 0 10px #BB86FC,
    0 0 20px #BB86FC,
    0 0 40px #BB86FC;
}

.skill-circle .circle {
  background: radial-gradient(circle at center, #3b2374, #1f133a);
}


.skill-circle {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: relative;
}
.skill-circle.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.skill-circle:hover .circle {
  filter: drop-shadow(0 0 10px #BB86FC);
  transform: scale(1.1);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.skill-circle:focus .circle {
  filter: drop-shadow(0 0 10px #BB86FC);
  transform: scale(1.1);
  outline: none;
}
.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: #4b2993cc;
  color: white;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  width: 10rem;
  text-align: center;
  user-select: none;
  z-index: 10;
}
.skill-circle:hover .tooltip,
.skill-circle:focus .tooltip {
  opacity: 1;
  pointer-events: auto;
}

.circle {
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
  /* smaller glow by default */
  box-shadow: 0 0 6px 2px rgba(187, 134, 252, 0.3);
}

.skill-circle:hover .circle,
.skill-circle:focus .circle {
  box-shadow: 0 0 14px 6px rgba(187, 134, 252, 0.7);
  transform: scale(1.1);
}

body {
  opacity: 0;
  transition: opacity 0.5s ease;
}
body.fade-in {
  opacity: 1;
}
body.fade-out {
  opacity: 0;
}

#clipboard-message {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(20px);
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform-origin: center;
  transform-style: preserve-3d;
  /* initially shifted down */
  transform: translateX(-50%) translateY(20px);
}

#clipboard-message.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
