/* ============================================
   TECH STACK SECTION — Modern tools. Battle-tested.
   ============================================ */

.stack-section {
  padding: 8rem 0;
  background: #fcfbfe;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.stack-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* ── Header ── */
.stack-header {
  text-align: center;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: #6366f1;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.stack-badge:hover {
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.1);
}

.stack-badge .badge-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: #6366f1;
  flex-shrink: 0;
}

.stack-title {
  font-size: 3.25rem;
  font-weight: 850;
  color: #0f172a;
  margin: 1.5rem 0 1rem 0;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

@media (max-width: 768px) {
  .stack-title {
    font-size: 2.5rem;
  }
}

.stack-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stack-subtitle {
  font-size: 1.125rem;
  color: #64748b;
  font-weight: 400;
  max-width: 36rem;
  line-height: 1.5;
  margin: 0 auto;
}

/* ── 5-column grid ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ── Tech card ── */
.stack-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 1.75rem;
  padding: 2.5rem 1.5rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.01);
  cursor: default;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.08);
}

.tech-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tech-icon {
  width: 1.75rem;
  height: 1.75rem;
  -o-object-fit: contain;
     object-fit: contain;
}

.stack-card:hover .tech-icon-wrapper {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.25);
  transform: scale(1.05);
}

.bg-react { background: rgba(0, 216, 255, 0.05); border-color: rgba(0, 216, 255, 0.15); }
.bg-next { background: rgba(15, 23, 42, 0.05); border-color: rgba(15, 23, 42, 0.1); }
.bg-ts { background: rgba(49, 120, 198, 0.05); border-color: rgba(49, 120, 198, 0.15); }
.bg-tailwind { background: rgba(56, 189, 248, 0.05); border-color: rgba(56, 189, 248, 0.15); }
.bg-mongo { background: rgba(71, 162, 72, 0.05); border-color: rgba(71, 162, 72, 0.15); }
.bg-postgres { background: rgba(51, 103, 145, 0.05); border-color: rgba(51, 103, 145, 0.15); }
.bg-aws { background: rgba(255, 153, 0, 0.05); border-color: rgba(255, 153, 0, 0.15); }
.bg-docker { background: rgba(36, 150, 237, 0.05); border-color: rgba(36, 150, 237, 0.15); }
.bg-jest { background: rgba(194, 19, 37, 0.05); border-color: rgba(194, 19, 37, 0.15); }
.bg-vercel { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.08); }

.tech-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.25rem 0 0.35rem 0;
  line-height: 1.2;
  transition: color 0.25s ease;
}

.stack-card:hover .tech-name {
  color: #6366f1;
}

.tech-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

/* ── Bottom Trust Row ── */
.stack-footer-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
}

.stack-footer-trust .trust-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: #6366f1;
  flex-shrink: 0;
}

.trust-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748b;
}

.trust-text strong {
  color: #4f46e5;
}

/* ── Dark Mode Overrides ── */
body.dark-mode .stack-section {
  background: #09090b;
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .stack-badge {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

body.dark-mode .stack-badge .badge-icon {
  color: #a78bfa;
}

body.dark-mode .stack-title {
  color: #f8fafc;
}

body.dark-mode .stack-subtitle {
  color: #94a3b8;
}

body.dark-mode .stack-card {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

body.dark-mode .stack-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .tech-icon-wrapper {
  background: #27272a !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .stack-card:hover .tech-icon-wrapper {
  background: #18181b !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
}

body.dark-mode .tech-name {
  color: #f8fafc;
}

body.dark-mode .stack-card:hover .tech-name {
  color: #a78bfa;
}

body.dark-mode .tech-desc {
  color: #94a3b8;
}

body.dark-mode .icon-next circle {
  fill: #f8fafc;
}

body.dark-mode .icon-next path {
  stroke: #18181b;
}

body.dark-mode .icon-vercel polygon {
  fill: #ffffff;
}

body.dark-mode .trust-text {
  color: #94a3b8;
}

body.dark-mode .trust-text strong {
  color: #a78bfa;
}

/* ══════════════════════════
   MOBILE RESPONSIVENESS OVERRIDES
   ══════════════════════════ */

@media (max-width: 540px) {
  .stack-section {
    padding: 4.5rem 0 !important;
  }
  .stack-inner {
    padding: 0 1rem !important;
  }
  .stack-header {
    margin-bottom: 3rem !important;
  }
  .stack-title {
    font-size: 2.15rem !important;
    line-height: 1.25 !important;
    margin: 1.25rem 0 0.75rem 0 !important;
  }
  .stack-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
  .stack-grid {
    gap: 0.85rem !important;
  }
  .stack-card {
    padding: 1.75rem 0.85rem 1.25rem 0.85rem !important;
    border-radius: 1.25rem !important;
  }
  .tech-icon-wrapper {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 14px !important;
  }
  .tech-icon {
    width: 1.5rem !important;
    height: 1.5rem !important;
  }
  .tech-name {
    font-size: 0.95rem !important;
    margin: 1rem 0 0.25rem 0 !important;
  }
  .tech-desc {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
  }
  .stack-footer-trust {
    margin-top: 3rem !important;
  }
}
@media (max-width: 340px) {
      .stack-inner {
        padding: 0 !important;
    }
}

