/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TECH STACK SECTION — Infinite Marquee Cards
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.techstack-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.techstack-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.techstack-slider {
  position: relative;
  overflow: hidden;
  padding: 12px 0;
}
.techstack-slider::before,
.techstack-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.techstack-slider::before {
  left: 0;
  background: linear-gradient(to right, rgb(248 250 252) 0%, transparent 100%);
}
.techstack-slider::after {
  right: 0;
  background: linear-gradient(to left, rgb(248 250 252) 0%, transparent 100%);
}

.techstack-marquee {
  display: flex;
  width: max-content;
  animation: techstackSlide 60s linear infinite;
  will-change: transform;
}
.techstack-slider:hover .techstack-marquee {
  animation-play-state: paused;
}
.techstack-marquee.paused {
  animation-play-state: paused;
}

@keyframes techstackSlide {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.techstack-card {
  flex-shrink: 0;
  width: 210px;
  margin: 0 14px;
  padding: 28px 22px 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(99,102,241,0.04);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.4s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.techstack-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 3px;
  background: linear-gradient(135deg, #6366f1 0%, #f97316 100%);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.techstack-card:hover::before { opacity: 1; }
.techstack-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(99,102,241,0.10), 0 6px 20px rgba(0,0,0,0.05);
  border-color: rgba(99,102,241,0.18);
}

.techstack-icon {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(249,115,22,0.06) 100%);
  border: 1px solid rgba(226,232,240,0.6);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), background 0.4s ease;
}
.techstack-card:hover .techstack-icon {
  transform: scale(1.08);
  background: linear-gradient(135deg, rgba(99,102,241,0.10) 0%, rgba(249,115,22,0.10) 100%);
}
.techstack-icon svg { width: 28px; height: 28px; }
.techstack-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.techstack-name {
  font-size: 14px; font-weight: 700; color: #0f172a;
  margin-bottom: 6px; line-height: 1.3;
}
.techstack-desc {
  font-size: 12px; line-height: 1.6; color: #64748b; font-weight: 500;
}

@media (max-width: 640px) {
  .techstack-card { width: 180px; margin: 0 10px; padding: 22px 18px 20px; }
  .techstack-icon { width: 44px; height: 44px; margin-bottom: 12px; }
  .techstack-icon svg { width: 24px; height: 24px; }
  .techstack-icon img { width: 28px; height: 28px; }
  .techstack-slider::before, .techstack-slider::after { width: 50px; }
  .techstack-name { font-size: 13px; }
  .techstack-desc { font-size: 11px; }
  .techstack-marquee { animation-duration: 40s; }
}

@media (prefers-reduced-motion: reduce) {
  .techstack-marquee { animation-duration: 150s; }
  .techstack-card:hover { transform: none; }
}
