/* --- Premium Editorial Design System for xMonks Team Page --- */

:root {
  --primary: #ED592C;
  --bg-editorial: #F9F7F2;
  --text-charcoal: #0F172A;
  --text-muted: #64748B;
  --border-fine: rgba(15, 23, 42, 0.08);
}

html, body {
  background-color: var(--bg-editorial);
  color: var(--text-charcoal);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden !important;
  max-width: 100%;
}

body {
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Page structure */
.team-layout {
  padding-top: 80px;
}

/* Background grid line overlay */
.editorial-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  justify-content: space-between;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.editorial-grid-line {
  width: 1px;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.02);
}

/* Ambient glow blobs */
.glow-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
  pointer-events: none;
  z-index: -10;
  opacity: 0.5;
}

.glow-blob-1 {
  top: 10%;
  left: -10%;
  width: 450px;
  height: 450px;
  background-color: rgba(237, 89, 44, 0.06);
}

.glow-blob-2 {
  top: 50%;
  right: -10%;
  width: 550px;
  height: 550px;
  background-color: rgba(14, 165, 233, 0.05);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 1.5rem 2.5rem;
  z-index: 10;
  text-align: center;
}

.hero-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-charcoal);
  margin-bottom: 1.5rem;
}

.hero-title-italic {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--primary);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Controls: Search and Filters */
.controls-section {
  position: relative;
  z-index: 20;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.25rem;
  background-color: transparent;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s ease;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.filter-btn:hover {
  color: var(--text-charcoal);
}

.filter-btn.active {
  background-color: #ffffff;
  color: var(--text-charcoal);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  font-weight: 600;
}



/* Team Grid */
.team-grid-section {
  position: relative;
  z-index: 20;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem 6rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2.5rem;
}

@media (min-width: 480px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Modern Circular Card Layout */
.team-card {
  position: relative;
  background: rgba(249, 247, 242, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 24px;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, background 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  height: auto;
}

.team-card:hover {
  background: rgba(249, 247, 242, 0.75);
  box-shadow: 0 12px 40px 0 rgba(15, 23, 42, 0.06);
}

.team-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.card-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Circular portrait container */
.image-container {
  width: 210px;
  height: 210px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #FFFDF5 0%, #EADFC9 100%);
  border-radius: 50%;
  border: 3px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.team-card:hover .image-container {
  transform: scale(1.04);
}

.team-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Info container styled cleanly at the bottom */
.info-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 1rem;
  margin-top: auto;
}

.info-left {
  text-align: left;
  flex-grow: 1;
  padding-right: 0.5rem;
}

.member-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-charcoal);
  margin: 0;
  line-height: 1.2;
}

.member-role {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--primary);
  margin-top: 0.25rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-right {
  display: flex;
  align-items: center;
}

.linkedin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-charcoal) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.linkedin-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.linkedin-link:hover,
.team-card:hover .linkedin-link {
  color: var(--primary) !important;
}

.linkedin-link:hover {
  transform: translateY(-2px);
}

/* LQIP blur-up */
.img-loading {
  filter: blur(10px);
  transform: scale(1.04);
}

.img-loaded {
  filter: blur(0);
  transform: scale(1);
}

/* Mobile Viewport Scaling */
@media (max-width: 640px) {
  .image-container {
    width: 140px;
    height: 140px;
    border-width: 2px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .team-card,
  .card-wrapper,
  .team-image,
  .image-container {
    transition: none !important;
  }
}
