/* Team Member (cosmic) */
.tm {
  --tm-bg: #070b1640;
  --tm-bg-2: #0a1030;
  --tm-text: #ffffff;
  --tm-muted: rgba(255, 255, 255, 0.72);

  --tm-accent-1: #00ffc6;
  --tm-accent-2: #00aaff;
  --tm-accent-3: #7a5cff;
  --tm-accent-4: #ff4ecd;

  --tm-r: 24px; /* 8pt system: 24 */
  --tm-pad: 24px; /* 24 */
  --tm-gap: 24px; /* 24 */

  position: relative;
  color: var(--tm-text);
  background:
    radial-gradient(
      1200px 600px at 20% 10%,
      rgba(0, 170, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 70% 30%,
      rgba(122, 92, 255, 0.14),
      transparent 60%
    ),
    radial-gradient(
      1100px 700px at 40% 80%,
      rgba(0, 255, 198, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, var(--tm-bg), #050713);
  overflow: hidden;
}

.tm__wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.tm__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tm__stars {
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.9) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 30% 80%,
      rgba(255, 255, 255, 0.8) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(255, 255, 255, 0.7) 0 1px,
      transparent 2px
    ),
    radial-gradient(
      circle at 60% 60%,
      rgba(255, 255, 255, 0.6) 0 1px,
      transparent 2px
    );
  background-size:
    260px 260px,
    320px 320px,
    420px 420px,
    520px 520px;
  opacity: 0.18;
  filter: blur(0.2px);
  transform: translateZ(0);
}

.tm__nebula {
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(
      500px 300px at 15% 25%,
      rgba(0, 255, 198, 0.2),
      transparent 60%
    ),
    radial-gradient(
      600px 340px at 85% 35%,
      rgba(255, 78, 205, 0.18),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at 45% 70%,
      rgba(0, 170, 255, 0.16),
      transparent 60%
    );
  filter: blur(24px);
  opacity: 0.9;
}

.tm__paths {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  transform: translateZ(0);
}

.tm__orbits {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.tm__orbit {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  filter: drop-shadow(0 0 10px rgba(0, 255, 198, 0.12));
}

.tm__orbit--1 {
  width: 420px;
  height: 420px;
  left: -120px;
  top: 60px;
}
.tm__orbit--2 {
  width: 560px;
  height: 560px;
  right: -180px;
  top: 140px;
}
.tm__orbit--3 {
  width: 480px;
  height: 480px;
  left: 25%;
  bottom: -220px;
}

.tm__hero {
  position: relative;
  padding: 96px 0 48px; /* 12*8, 6*8 */
}

.tm__heroGrid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.tm__photoCol {
  max-width: 360px;
}

.tm__eyebrow {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 16px;
}

.tm__name {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  margin: 0 0 16px;
  font-family: "Montserrat", Sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-style: normal;
  color: #ffffff;
}

.tm__role {
  margin: 0 0 24px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--tm-accent-1), var(--tm-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 16px rgba(0, 255, 198, 0.25);
  display: inline-block;
}

.tm__lead {
  margin: 0 0 24px;
  max-width: 52ch;
  color: var(--tm-muted);
  font-size: 16px;
  line-height: 1.6;
}

.tm__metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 500px;
}

.tm__metaItem {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  flex: 1;
  min-width: 200px;
}

.tm__metaLabel {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tm__metaValue {
  color: var(--tm-text);
  text-decoration: none;
  opacity: 0.92;
  font-size: 18px;
  word-break: break-all;
}

.tm__metaValue:hover {
  opacity: 1;
  text-decoration: underline;
}

.tm__social {
  display: flex;
  gap: 12px;
}

.tm__socialLink {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: var(--tm-text);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 18px;
}

/* Brand colors for social links */
.tm__socialLink[href*="linkedin"] {
  background: rgba(0, 119, 181, 0.1);
  border-color: rgba(0, 119, 181, 0.3);
}

.tm__socialLink[href*="facebook"] {
  background: rgba(24, 119, 242, 0.1);
  border-color: rgba(24, 119, 242, 0.3);
}

.tm__socialLink[href*="instagram"] {
  background: rgba(228, 64, 95, 0.1);
  border-color: rgba(228, 64, 95, 0.3);
}

.tm__socialLink:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 198, 0.45);
  box-shadow: 0 0 0 6px rgba(0, 255, 198, 0.08);
}

/* Enhanced hover with brand colors - NO BACKGROUND */
.tm__socialLink[href*="linkedin"]:hover {
  border-color: #0077B5;
  color: white;
  box-shadow: 0 0 0 6px rgba(0, 119, 181, 0.15);
}

.tm__socialLink[href*="facebook"]:hover {
  border-color: #1877F2;
  color: white;
  box-shadow: 0 0 0 6px rgba(24, 119, 242, 0.15);
}

.tm__socialLink[href*="instagram"]:hover {
  border-color: #E4405F;
  color: white;
  box-shadow: 0 0 0 6px rgba(228, 64, 95, 0.15);
}

/* Override global a:hover for social links */
.tm__socialLink:hover {
  color: inherit !important;
}

/* Force reset all SVG styles */
div.tm__social .tm__socialLink:hover svg * {
  fill: none !important;
  color: none !important;
  background: none !important;
}

div.tm__social .tm__socialLink:hover svg {
  opacity: 1 !important;
  fill: none !important;
  color: none !important;
  background: none !important;
}

/* Apply brand colors only to paths */
div.tm__social .tm__socialLink[href*="linkedin"]:hover svg path {
  fill: #0077B5 !important;
  color: #0077B5 !important;
}

div.tm__social .tm__socialLink[href*="facebook"]:hover svg path {
  fill: #1877F2 !important;
  color: #1877F2 !important;
}

div.tm__social .tm__socialLink[href*="instagram"]:hover svg path {
  fill: #E4405F !important;
  color: #E4405F !important;
}

/* Photo card */
.tm__photoCol {
  display: flex;
  justify-content: center;
}
.tm__photoCard {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  display: grid;
  place-items: center;
  transform: translateZ(0);
}

.tm__photoGlow {
  position: absolute;
  inset: -18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 255, 198, 0.3), transparent 55%),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 78, 205, 0.22),
      transparent 55%
    ),
    radial-gradient(circle at 70% 20%, rgba(122, 92, 255, 0.2), transparent 55%);
  filter: blur(18px);
  opacity: 0.9;
}

.tm__photoRing {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    var(--tm-accent-1),
    var(--tm-accent-2),
    var(--tm-accent-3),
    var(--tm-accent-4),
    var(--tm-accent-1)
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
  filter: drop-shadow(0 0 24px rgba(0, 255, 198, 0.18));
  opacity: 0.95;
}

.tm__photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.tm__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.tm__hoverImg {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
}

.tm__hoverImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.95);
}

.tm__photoCard:hover .tm__hoverImg {
  opacity: 1;
  transform: scale(1);
}

/* Main sections */
.tm__main {
  position: relative;
  padding: 40px 0 96px;
}

.tm__sections {
  display: grid;
  gap: 40px;
}

.tm__section {
  position: relative;
}

.tm__h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--tm-r);
  padding: 24px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* Skills */
.tm__skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Single column layout (1-5 skills) */
.tm__skills--single {
  grid-template-columns: 1fr;
}

/* Two column layout (6-12 skills) */
.tm__skills--grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Three column layout (13-20 skills) */
.tm__skills--grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Chip layout (20+ skills) */
.tm__skills--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tm__skills--chips .tm__skill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 6px 12px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: auto;
  flex: 0 0 auto;
}

.tm__skills--chips .tm__skillTop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.tm__skills--chips .tm__skillName {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.tm__skills--chips .tm__skillPercent {
  display: none;
}

.tm__skills--chips .tm__skillBar {
  display: none;
}

.tm__skill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.tm__skill:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 198, 0.35);
  box-shadow: 0 0 0 6px rgba(0, 255, 198, 0.06);
}

.tm__skillTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm__skillName {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tm__skillPercent {
  font-size: 14px;
  font-weight: 600;
  color: var(--tm-accent-1);
  background: rgba(0, 255, 198, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 198, 0.2);
}

.tm__skillTag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
}

.tm__skillBar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.tm__skillFill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--tm-accent-1), var(--tm-accent-2));
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tm__skillFill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

.tm__skill[data-animated="true"] .tm__skillFill {
  width: var(--skill-width, 85%);
}

/* Contact card */
.tm__contact {
  display: grid;
  gap: 16px;
}

.tm__contactItem {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tm__contactIcon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(0, 255, 198, 0.1);
  border: 1px solid rgba(0, 255, 198, 0.22);
  box-shadow: 0 0 30px rgba(0, 255, 198, 0.08);
}

.tm__contactLabel {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 4px;
}

.tm__contactValue,
.tm__contactSocials a {
  color: var(--tm-text);
  text-decoration: none;
  opacity: 0.9;
}

.tm__contactValue:hover,
.tm__contactSocials a:hover {
  opacity: 1;
  text-decoration: underline;
}

.tm__contactSocials {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .tm__hero {
    padding-top: 72px;
  }
  .tm__heroGrid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .tm__metaRow {
    grid-template-columns: 1fr;
  }
  
  /* All skills become chips on mobile */
  .tm__skills,
  .tm__skills--single,
  .tm__skills--grid-2,
  .tm__skills--grid-3,
  .tm__skills--chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .tm__skills .tm__skill,
  .tm__skills--single .tm__skill,
  .tm__skills--grid-2 .tm__skill,
  .tm__skills--grid-3 .tm__skill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 6px 12px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: auto;
    flex: 0 0 auto;
  }
  
  .tm__skills .tm__skillTop,
  .tm__skills--single .tm__skillTop,
  .tm__skills--grid-2 .tm__skillTop,
  .tm__skills--grid-3 .tm__skillTop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }
  
  .tm__skills .tm__skillName,
  .tm__skills--single .tm__skillName,
  .tm__skills--grid-2 .tm__skillName,
  .tm__skills--grid-3 .tm__skillName {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
  }
  
  .tm__skills .tm__skillPercent,
  .tm__skills--single .tm__skillPercent,
  .tm__skills--grid-2 .tm__skillPercent,
  .tm__skills--grid-3 .tm__skillPercent {
    display: none;
  }
  
  .tm__skills .tm__skillBar,
  .tm__skills--single .tm__skillBar,
  .tm__skills--grid-2 .tm__skillBar,
  .tm__skills--grid-3 .tm__skillBar {
    display: none;
  }
  .tm__photoCard {
    width: min(360px, 100%);
  }
}
