/* ==========================================================================
   Tech Stack v2 – Dark animated tabs with icon grid
   ========================================================================== */

.ts2 {
  padding: clamp(72px, 9vw, 120px) 0;
  background: #0a0a0b;
  overflow: hidden;
}

/* ── Header ── */
.ts2__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(40px, 5vw, 56px);
}

.ts2__eyebrow {
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent, #2f70ff);
  margin: 0 0 14px;
}

.ts2__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 18px;
}

.ts2__desc {
  font-size: var(--font-size-base, 1rem);
  line-height: 1.7;
  color: rgba(230,233,239,.6);
  margin: 0;
}

/* ── Tab bar ── */
.ts2__tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: clamp(32px, 4vw, 48px);
}

.ts2__tabs::-webkit-scrollbar {
  display: none;
}

.ts2__tab {
  flex: 1 0 0%;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  position: relative;
}

.ts2__tab:hover {
  color: rgba(255,255,255,.8);
}

.ts2__tab.is-active {
  color: #fff;
  background: rgba(47,112,255,.15);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(47,112,255,.1);
}

/* ── Panels ── */
.ts2__panels {
  position: relative;
  min-height: 200px;
}

.ts2__panel {
  display: none;
  animation: ts2FadeIn 0.4s ease;
}

.ts2__panel.is-active {
  display: block;
}

@keyframes ts2FadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Icon grid ── */
.ts2__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.ts2__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.ts2__item:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* ── Icon ── */
.ts2__icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  overflow: hidden;
  padding: 6px;
}

.ts2__item:hover .ts2__icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.ts2__icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Label ── */
.ts2__label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts2__item:hover .ts2__label {
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ts2__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .ts2 {
    padding: clamp(48px, 6vw, 80px) 0;
  }

  .ts2__tabs {
    margin-left: -20px;
    margin-right: -20px;
    padding: 4px 20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .ts2__tab {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
  }

  .ts2__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .ts2__item {
    padding: 14px 16px;
    gap: 10px;
  }

  .ts2__icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .ts2__icon-wrap img {
    width: 20px;
    height: 20px;
  }

  .ts2__label {
    font-size: 13px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ts2__panel {
    animation: none;
  }

  .ts2__item {
    transition: none;
  }
}
