/* Section Skills */
.section-skills {
  padding: 6rem 0;
  background: radial-gradient(
      80% 70% at 15% 85%,
      rgba(126, 34, 206, 0.42) 0%,
      rgba(126, 34, 206, 0.2) 28%,
      transparent 48%
    ),
    radial-gradient(
      80% 70% at 85% 15%,
      rgba(192, 38, 211, 0.42) 0%,
      rgba(192, 38, 211, 0.2) 30%,
      transparent 50%
    ),
    #0b0f17;
}

/* Heading */
.skill-heading {
  text-align: center;
  font-size: 2.4rem;
  margin: 0 0 2.4rem;
  letter-spacing: 0.3rem;
  font-weight: 600;
  color: #d9e2ec;

  background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.frontend-dev-heading {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3.2rem;
  font-weight: 500;
  color: #c7d5e0;
}

/* Wrapper */
.tech-stack-wrapper {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.4rem;
  padding: 0;
  margin: 0 auto 4rem;
  max-width: 1150px;
}

/* Card */
.tech-stack-box {
  position: relative;
  width: 150px;
  height: 150px;
  background: linear-gradient(145deg, #1e202d 0%, #16171f 55%, #14151b 100%);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.7),
    0 2px 6px -2px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  cursor: default;
  transition: transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1),
    border-color 0.4s ease, box-shadow 0.45s ease;
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
}

.tech-stack-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 25%,
      rgba(255, 255, 255, 0.07),
      transparent 60%
    ),
    linear-gradient(120deg, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.tech-stack-box:hover {
  transform: translateY(-12px) scale(1.035);
  border-color: rgba(110, 150, 255, 0.45);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(110, 150, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.tech-stack-box:active {
  transform: translateY(-4px) scale(1.01);
}

/* Logo */
.tech-stack-logo {
  width: 95px;
  height: 95px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease;
  opacity: 0.95;
  padding: 12px;
}

.tech-stack-box:hover .tech-stack-logo {
  transform: translateY(-4px);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55)) brightness(1.08);
  opacity: 1;
}

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: rgba(30, 34, 45, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e5eef7;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tech-stack-box:hover .tooltip,
.tech-stack-box:focus-within .tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Optional invert for dark icons */
.invert-dark {
  filter: invert(1) brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.tech-stack-box:hover .invert-dark {
  filter: invert(1) brightness(1.25) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

/* Animation stagger */
.tech-stack-box:nth-child(odd) {
  animation-delay: 0.15s;
}
.tech-stack-box:nth-child(even) {
  animation-delay: 0.3s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
