/* ===== Projects container stack when active ===== */
#projects.active {
  display: flex;          /* flex or block/grid as needed */
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* ===== Portfolio Filters Bar ===== */
#portfolio-flters {
  list-style: none;
  padding: 0;
  margin: 0 auto 50px;
  display: flex;
  justify-content: center;
  gap: 36px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  user-select: none;
  position: relative;
  color: var(--text-dim);
}

#portfolio-flters li {
  position: relative;
  cursor: pointer;
  font-size: 15px;
  padding: 10px 20px;
  color: var(--text-dim);
  transition: color 0.4s ease, transform 0.3s ease;
  background: transparent;
  border-radius: 40px;
  overflow: visible;
}

/* Animated underline bar */
#portfolio-flters li::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  border-radius: 3px;
  filter: drop-shadow(0 0 5px var(--accent));
  transition: width 0.4s ease;
  z-index: 2;
}

/* Show underline on hover and active */
#portfolio-flters li:hover::before,
#portfolio-flters li.filter-active::before {
  width: 100%;
}

/* Hover text color with gradient & scale */
#portfolio-flters li:hover {
  color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px var(--accent));
  z-index: 10;
}

/* Active filter styling */
#portfolio-flters li.filter-active {
  color: transparent;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  box-shadow:
    0 0 10px var(--accent-2, 0.4),
    inset 0 0 10px var(--accent);
  z-index: 10;
}

/* Active pill glow background */
#portfolio-flters li.filter-active::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 40px;
  background: linear-gradient(90deg, var(--accent)33, var(--accent-2)33);
  filter: blur(6px);
  z-index: 1;
  transition: background 0.4s ease;
}

/* Tactile feedback on click */
#portfolio-flters li:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* ===== Project Links Container ===== */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3.5rem;
  align-items: center;
  justify-content: flex-start;
  padding-top: 3.2rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  position: relative;
  z-index: 1;
}

/* Project Link buttons */
.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 1rem;
  text-decoration: none;
  color: var(--text-color, #fff);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: 
    background 0.4s ease,
    transform 0.3s ease,
    box-shadow 0.4s ease,
    border 0.3s ease,
    color 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 0 0 rgba(0, 255, 200, 0.4);
}

/* Hover effects on links */
.project-links a:hover {
  background: rgba(0, 255, 200, 0.08);
  color: var(--accent-clr, #00ffc8);
  transform: translateY(-2px);
  border: 1px solid rgba(0, 255, 200, 0.25);
  box-shadow:
    0 8px 30px rgba(0, 255, 200, 0.2),
    0 0 12px rgba(0, 255, 200, 0.15),
    inset 0 0 1px rgba(0, 255, 200, 0.4);
}

/* Animated arrow before text */
.project-links a::before {
  content: '↗';
  opacity: 0;
  transform: translateX(-4px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  font-size: 1.5rem;
  color: var(--accent-clr, #00ffc8);
  margin-left: 0.25rem;
  display: inline-block;
  position: relative;
}

/* Show arrow on hover */
.project-links a:hover::before {
  opacity: 1;
  transform: translateX(4px);
}

/* Underline / glow effect */
.project-links a::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  bottom: 0.5rem;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent-clr, #00ffc8), #00ffee);
  transition: width 0.4s ease;
  border-radius: 2px;
}

/* Animate underline on hover */
.project-links a:hover::after {
  width: calc(100% - 3rem);
}

/* Accessibility focus ring */
.project-links a:focus-visible {
  outline: 2px dashed var(--accent-clr, #00ffc8);
  outline-offset: 4px;
}

/* Tap (mobile press) scale */
.project-links a:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

/* ===== Responsive for mobile ===== */
@media (max-width: 600px) {
  .project-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  .project-links a {
    width: 100%;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 0.8rem 1.4rem;
  }

  .project-links a::after {
    display: none; /* Hide underline on mobile */
  }

  .project-links a::before {
    display: none; /* Hide arrow on mobile */
  }
}
