/**
 * TSW Team Page Styles
 *
 * Ported from static site, adapted for theme CSS variables.
 * Animated borders, glow FX, glassmorphism, hover reveals.
 * Used on: page-templates/template-team.php
 *
 * @package TSW
 * @since   1.0.0
 */

/* ============ HERO ============ */
.tm-hero {
  position: relative;
  padding: 120px 0 80px;
  background: linear-gradient(155deg, #111820 0%, #162230 35%, #1a3a25 70%, #234D20 100%);
  overflow: hidden;
}

.tm-hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tm-hero-shapes .tsw-shape { opacity: .06; }

.tm-breadcrumb {
  font-size: .8rem;
  margin-bottom: 28px;
}

.tm-breadcrumb .breadcrumb-item a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}

.tm-breadcrumb .breadcrumb-item a:hover { color: var(--tsw-white); }
.tm-breadcrumb .breadcrumb-item.active { color: var(--tsw-green-bright); font-weight: 600; }
.tm-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.3); }

.tm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--tsw-green-bright);
  background: rgba(149,191,71,.12);
  border: 1px solid rgba(149,191,71,.2);
  border-radius: 50px;
  margin-bottom: 18px;
}

.tm-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--tsw-white);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 18px;
  max-width: 650px;
}

.tm-hero-title .tsw-highlight { color: var(--tsw-green-bright); }

.tm-hero-desc {
  font-size: clamp(.95rem, 1.5vw, 1.1rem);
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 0;
}

/* ============ FOUNDER SPOTLIGHT ============ */
.tm-founder {
  padding: 90px 0;
  background: var(--tsw-white);
  position: relative;
  overflow: hidden;
}

.tm-founder-card {
  background: linear-gradient(155deg, #111820 0%, #162230 40%, #1a3a25 80%, #234D20 100%);
  border-radius: 24px;
  padding: 60px;
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  overflow: hidden;
}

.tm-founder-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(149,191,71,.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 20%, rgba(0,128,90,.1) 0%, transparent 40%);
  pointer-events: none;
}

/* Animated ring around founder image */
.tm-founder-img-wrap {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  overflow: visible;
}

.tm-founder-img-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(
    from 0deg,
    #95bf47, #00805a, #95bf47, #234D20, #95bf47
  );
  animation: tmRingSpin 6s linear infinite;
}

.tm-founder-img-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #162230;
}

@keyframes tmRingSpin {
  to { transform: rotate(360deg); }
}

.tm-founder-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #162230;
}

/* Floating badges around founder (inside img-wrap) */
.tm-founder-float {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(20,20,20,.7);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  font-size: .74rem;
  font-weight: 600;
  color: var(--tsw-white);
  animation: tmFloatBadge 4s ease-in-out infinite;
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-founder-float i { color: var(--tsw-green-bright); flex-shrink: 0; }

.tm-founder-float--1 { top: -10px; right: -10px; animation-delay: 0s; }
.tm-founder-float--2 { bottom: -10px; left: -10px; animation-delay: 1.5s; }
.tm-founder-float--3 { bottom: 50px; right: -15px; animation-delay: 3s; }

@keyframes tmFloatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Founder text */
.tm-founder-content {
  position: relative;
  z-index: 2;
  flex: 1;
}

.tm-founder-name {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--tsw-white);
  margin-bottom: 4px;
}

.tm-founder-role {
  font-size: 1rem;
  color: var(--tsw-green-bright);
  font-weight: 600;
  margin-bottom: 20px;
}

.tm-founder-bio {
  font-size: .95rem;
  color: rgba(255,255,255,.72);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 520px;
}

.tm-founder-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tm-founder-stat strong {
  display: block;
  font-family: var(--tsw-font-display, 'Qilka', serif);
  font-size: 1.6rem;
  color: var(--tsw-green-bright);
  line-height: 1;
  margin-bottom: 2px;
}

.tm-founder-stat span {
  font-size: .76rem;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

.tm-founder-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tm-founder-tech {
  padding: 5px 12px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--tsw-green-bright);
  background: rgba(149,191,71,.12);
  border: 1px solid rgba(149,191,71,.2);
  border-radius: 50px;
}

.tm-founder-social {
  display: flex;
  gap: 10px;
}

.tm-founder-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  transition: all .3s ease;
  text-decoration: none;
}

.tm-founder-social a:hover {
  background: var(--tsw-green);
  border-color: var(--tsw-green);
  color: var(--tsw-white);
  transform: translateY(-3px);
}

/* ============ DEPARTMENT SECTIONS ============ */
.tm-dept {
  padding: 80px 0;
  position: relative;
}

.tm-dept--alt { background: var(--tsw-cloud); }
.tm-dept--white { background: var(--tsw-white); }

.tm-dept-header {
  text-align: center;
  margin-bottom: 50px;
}

.tm-dept-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 16px;
  color: var(--tsw-white);
}

.tm-dept-icon--dev { background: linear-gradient(135deg, #5e8e3e, #95bf47); }
.tm-dept-icon--design { background: linear-gradient(135deg, #6b3fa0, #9b59b6); }
.tm-dept-icon--marketing { background: linear-gradient(135deg, #0f4f4f, #1a8a8a); }
.tm-dept-icon--strategy { background: linear-gradient(135deg, #c0392b, #e74c3c); }

.tm-dept-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--tsw-ink);
  margin-bottom: 6px;
}

.tm-dept-sub {
  font-size: .9rem;
  color: var(--tsw-graphite);
}

/* ============ TEAM CARD — EXTRAORDINARY ============ */
.tm-card {
  position: relative;
  background: var(--tsw-white);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  transition: all .45s cubic-bezier(.23,1,.32,1);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--tsw-stone);
}

.tm-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,50,20,.12);
  border-color: rgba(94,142,62,.3);
}

/* Card top: image area with animated gradient border */
.tm-card-img-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 30px 10px;
  background: linear-gradient(180deg, var(--tsw-cloud) 0%, var(--tsw-white) 100%);
}

.tm-card-img-wrap {
  position: relative;
  width: 150px;
  height: 150px;
}

/* Animated gradient ring */
.tm-card-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    var(--tsw-green) 25%,
    transparent 50%,
    var(--tsw-green-bright) 75%,
    transparent 100%
  );
  animation: tmRingSpin 4s linear infinite;
  opacity: 0;
  transition: opacity .4s;
}

.tm-card:hover .tm-card-ring { opacity: 1; }

.tm-card-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--tsw-cloud);
}

.tm-card-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--tsw-white);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transition: transform .4s;
}

.tm-card:hover .tm-card-img {
  transform: scale(1.04);
}

/* Glow behind image on hover */
.tm-card-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(149,191,71,.2) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0;
  transition: opacity .4s;
  z-index: 0;
}

.tm-card:hover .tm-card-glow { opacity: 1; }

/* Experience badge on image */
.tm-card-exp {
  position: absolute;
  bottom: 5px;
  right: 10px;
  z-index: 5;
  padding: 4px 10px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--tsw-white);
  background: var(--tsw-green);
  border-radius: 50px;
  border: 2px solid var(--tsw-white);
  box-shadow: 0 2px 8px rgba(94,142,62,.3);
}

/* Card body */
.tm-card-body {
  padding: 18px 24px 8px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tm-card-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--tsw-ink);
  margin-bottom: 2px;
  line-height: 1.2;
}

.tm-card-role {
  font-size: .82rem;
  font-weight: 600;
  color: var(--tsw-green);
  margin-bottom: 14px;
}

/* Tech stack pills */
.tm-card-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-bottom: 14px;
}

.tm-card-tech {
  padding: 3px 10px;
  font-size: .66rem;
  font-weight: 600;
  color: var(--tsw-graphite);
  background: var(--tsw-cloud);
  border: 1px solid var(--tsw-stone);
  border-radius: 50px;
  transition: all .3s;
}

.tm-card:hover .tm-card-tech {
  border-color: rgba(94,142,62,.25);
  color: var(--tsw-forest);
  background: rgba(94,142,62,.06);
}

/* Experience bar */
.tm-card-exp-bar {
  margin-bottom: 16px;
}

.tm-card-exp-label {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  font-weight: 600;
  color: var(--tsw-graphite);
  margin-bottom: 5px;
}

.tm-card-exp-track {
  height: 4px;
  background: var(--tsw-stone);
  border-radius: 4px;
  overflow: hidden;
}

.tm-card-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tsw-green), var(--tsw-green-bright));
  border-radius: 4px;
  transition: width 1s ease;
}

/* Social links (revealed on hover) */
.tm-card-footer {
  padding: 0 24px 20px;
  text-align: center;
  margin-top: auto;
}

.tm-card-socials {
  display: flex;
  gap: 8px;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: all .35s ease;
}

.tm-card:hover .tm-card-socials {
  opacity: 1;
  transform: translateY(0);
}

.tm-card-social {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1.5px solid var(--tsw-stone);
  color: var(--tsw-graphite);
  font-size: .85rem;
  transition: all .25s ease;
  text-decoration: none;
}

.tm-card-social:hover {
  background: var(--tsw-green);
  border-color: var(--tsw-green);
  color: var(--tsw-white);
  transform: translateY(-2px);
}

/* ============ JOIN CTA ============ */
.tm-join {
  padding: 90px 0;
  background: var(--tsw-forest);
  text-align: center;
}

.tm-join-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--tsw-white);
  margin-bottom: 14px;
}

.tm-join-desc {
  font-size: 1rem;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.tm-join .tm-join-btn {
  background: var(--tsw-green-bright);
  border-color: var(--tsw-green-bright);
  color: var(--tsw-ink);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .3s ease;
}

.tm-join .tm-join-btn:hover {
  background: var(--tsw-white);
  border-color: var(--tsw-white);
  color: var(--tsw-forest);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,255,255,.15);
}

.tm-join .tm-join-btn-outline {
  border: 2px solid rgba(255,255,255,.3);
  color: var(--tsw-white);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .3s ease;
}

.tm-join .tm-join-btn-outline:hover {
  border-color: var(--tsw-white);
  background: rgba(255,255,255,.1);
  color: var(--tsw-white);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
  .tm-hero { padding: 90px 0 60px; }

  .tm-founder-card {
    flex-direction: column;
    padding: 40px 30px;
    gap: 30px;
    text-align: center;
  }

  .tm-founder-img-wrap { width: 200px; height: 200px; margin: 0 auto; }
  .tm-founder-float--1 { top: -8px; right: -5px; }
  .tm-founder-float--2 { bottom: -8px; left: -5px; }
  .tm-founder-float--3 { bottom: 35px; right: -10px; }
  .tm-founder-stats { justify-content: center; }
  .tm-founder-techs { justify-content: center; }
  .tm-founder-social { justify-content: center; }
  .tm-founder-bio { margin-left: auto; margin-right: auto; }

  .tm-founder { padding: 60px 0; }
  .tm-dept { padding: 60px 0; }
  .tm-join { padding: 60px 0; }
}

@media (max-width: 767.98px) {
  .tm-card-img-wrap { width: 130px; height: 130px; }
  .tm-card-glow { width: 150px; height: 150px; }
  .tm-card-socials { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575.98px) {
  .tm-hero { padding: 85px 0 50px; }
  .tm-hero-title { font-size: 1.8rem; }
  .tm-founder-card { padding: 30px 20px; }
  .tm-founder-img-wrap { width: 160px; height: 160px; }
  .tm-founder-float { font-size: .68rem; padding: 6px 10px; max-width: 140px; }
  .tm-founder-float--1 { top: -6px; right: -5px; }
  .tm-founder-float--2 { bottom: -6px; left: -5px; }
  .tm-founder-float--3 { bottom: 25px; right: -8px; }
  .tm-founder-stats { gap: 18px; }
  .tm-founder-stat strong { font-size: 1.3rem; }
  .tm-dept { padding: 50px 0; }
  .tm-join { padding: 50px 0; }
}
