#services {
  background: #0f172a;
  position: relative;
  padding: 45px 15px;
  text-align: center;
  z-index: 1;
}

#services-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 166, 153, 0.1), transparent 60%);
  animation: subtlePulse 10s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

#services::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="rgba(34,166,153,0.03)"><circle cx="10" cy="10" r="1"/></svg>') repeat;
  animation: softDrift 20s linear infinite;
  pointer-events: none;
  z-index: -1;
}

#services h2 {
  color: transparent;
  background: linear-gradient(90deg, #22a699, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

#services h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #22a699;
  transition: width 0.3s ease;
}

#services h2:hover::after {
  width: 100%;
}

#services p {
  color: #d1d5db;
  font-size: 0.9375rem;
  font-style: italic;
  letter-spacing: 0.375px;
  max-width: 750px;
  margin: 0 auto 24px;
  background: rgba(34, 166, 153, 0.03);
  padding: 6px 12px;
  border-radius: 6px;
}

#services .clickable {
  color: #22a699;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

#services .clickable:hover {
  color: #2dd4bf;
}

#services .skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

#services .skill-card {
  background: #1e293b;
  border-radius: 9px;
  padding: 18px 12px;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#services.in-view .skill-card:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

#services.in-view .skill-card:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

#services.in-view .skill-card:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

#services.in-view .skill-card:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

#services .skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 10px rgba(34, 166, 153, 0.2);
}

#services .section-logo {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto 9px;
}

#services .skill-card h3 {
  color: #22a699;
  font-size: 1.125rem;
  margin-bottom: 12px;
  text-align: center;
}

#services .skill-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#services .skill-item h4 {
  color: #d1d5db;
  font-size: 0.825rem;
  margin-bottom: 6px;
}

#services .skill-item p {
  color: #d1d5db;
  font-size: 0.7125rem;
  margin-bottom: 6px;
}

#services .inline-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

#services .inline-icon {
  width: 18px;
  height: 18px;
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(180deg) brightness(100%) contrast(100%);
  transition: transform 0.3s ease;
}

#services .inline-icon:hover {
  transform: scale(1.2);
}

.scroll-indicator {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  margin: 15px auto;
}

.scroll-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 5px;
  animation: subtleGlow 2.5s ease-in-out infinite;
}

.scroll-text:hover {
  color: #cbd5e1;
}

.scroll-icon {
  font-size: 1.2rem;
  color: #e2e8f0;
  animation: gentleBounce 1.8s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes softDrift {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}

@keyframes subtleGlow {
  0%, 100% { text-shadow: 0 0 5px rgba(45, 212, 191, 0.3); }
  50% { text-shadow: 0 0 10px rgba(45, 212, 191, 0.6); }
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); opacity: 0.8; }
}

@keyframes cardFadeIn {
  0% { opacity: 0; transform: translateY(15px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

#services.in-view h2 {
  animation: cardFadeIn 0.7s ease-out forwards;
}

#services.in-view p {
  animation: cardFadeIn 0.7s ease-out 0.2s forwards;
}

@media (max-width: 1024px) {
  #services .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  #services .skills-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
  }

  #services h2 {
    font-size: 1.875rem;
  }

  #services p {
    font-size: 0.825rem;
  }

  #services .skill-card h3 {
    font-size: 0.975rem;
  }

  #services .skill-item h4 {
    font-size: 0.75rem;
  }

  #services .section-logo {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 320px) {
  #services {
    padding: 30px 8px;
  }

  #services h2 {
    font-size: 1.65rem;
  }

  #services p {
    font-size: 0.75rem;
  }

  #services .skill-card {
    padding: 12px 8px;
  }

  #services .skill-card h3 {
    font-size: 0.9rem;
  }

  #services .skill-item h4 {
    font-size: 0.675rem;
  }

  #services .skill-item p {
    font-size: 0.6375rem;
  }

  #services .inline-icon {
    width: 15px;
    height: 15px;
  }

  #services .section-logo {
    width: 24px;
    height: 24px;
  }

  .scroll-indicator {
    margin: 10px auto;
  }

  .scroll-text {
    font-size: 0.75rem;
  }

  .scroll-icon {
    font-size: 1.3rem;
  }
}