/* ═══════════════════════════════════════════════════════
   Infinity Binary — Team Page Stylesheet
   Hero · Team Grid (Flip Cards) · Culture Strip · Responsive
   ═══════════════════════════════════════════════════════ */

/* ── 1. Team Hero ── */
.team-hero {
  background: var(--ink-section);
  padding: 140px 0 80px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.team-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.team-hero > .container {
  position: relative;
  z-index: 1;
}

/* ── 2. Team Grid ── */
.team-section {
  background: var(--off-white);
  padding: clamp(60px, 8vw, 100px) 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

/* ── 3. Flip Card (Uniform Height) ── */
.team-card {
  perspective: 1000px;
  width: 100%;
  max-width: 380px;
}

.card-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.76,0,0.24,1);
  height: 450px;
}

.team-card:hover .card-inner,
.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  border: 2px solid var(--ink);
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.card-front {
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-back {
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transform: rotateY(180deg);
}

/* ── 4. Avatar ── */
.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  flex-shrink: 0;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 5. Card Front Content ── */
.team-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1rem;
  line-height: 1.25;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--lime-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
  line-height: 1.3;
}

.team-dept-badge {
  background: var(--lime-bg);
  border: 1px solid var(--lime);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--lime-dark);
  padding: 3px 10px;
  margin-top: 8px;
  white-space: nowrap;
}

.team-bio {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--ink-light);
  line-height: 1.65;
  margin-top: 0.75rem;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-overflow: ellipsis;
  max-width: 34ch;
}

.team-flip-hint {
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── 6. Card Back Content ── */
.card-back-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.team-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  flex-grow: 1;
  align-content: flex-start;
}

.team-skills span {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 4px 10px;
  white-space: nowrap;
}

.team-fun-fact {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 2px solid rgba(0,0,0,0.15);
  width: 100%;
  text-align: center;
  flex-shrink: 0;
}

.fun-fact-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--ink-light);
}

.fun-fact-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  line-height: 1.6;
  max-width: 28ch;
  margin: 3px auto 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

/* Team links (card back) */
.team-links {
  display: flex;
  gap: 8px;
  margin-top: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  flex-shrink: 0;
}

.team-links .btn {
  font-size: 0.75rem;
  padding: 7px 14px;
}

.team-links .btn i {
  margin-right: 4px;
}

/* ── 7. Culture Strip ── */
.culture-strip {
  background: var(--orange-bg);
  border-top: 2px solid rgba(0,0,0,0.1);
  border-bottom: 2px solid rgba(0,0,0,0.1);
  padding: clamp(60px, 8vw, 100px) 0;
}

.culture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.culture-text {
  /* Left column of culture grid */
}

.culture-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--orange);
  letter-spacing: 0.12em;
  display: inline-block;
  margin-bottom: 1rem;
}

.culture-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.culture-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.culture-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.culture-card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 3px 3px 0 var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 200ms ease;
}

.culture-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.culture-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--orange-bg);
  border: 2px solid var(--orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-dark);
  font-size: 1rem;
}

.culture-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.culture-card-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin-top: 2px;
}

/* ── 8. Responsive: Team ── */
@media (max-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .team-card {
    max-width: 100%;
  }
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 680px;
  }
  .card-inner {
    height: 430px;
  }
  .culture-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .card-inner {
    height: 440px;
  }
}
