.team {
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.team-header {
  margin-bottom: 48px;
}

.team-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-top: 12px;
}

.team-title .word-layer {
  display: inline-block;
  color: var(--gold);
  border-bottom: 2px solid var(--gold-dim);
}

.team-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 540px;
}

/* ── Grid — 3 columns ── */

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

/* ── Member card ── */

.team-member {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px 28px;
  background: rgba(6, 6, 8, 0.9);
  border: 1px solid rgba(212, 168, 50, 0.15);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

.team-member:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 50, 0.3);
  box-shadow:
    0 8px 40px rgba(218, 165, 32, 0.06),
    0 0 60px rgba(218, 165, 32, 0.03);
}

/* ── Ornament frame ── */

.team-ornament {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
  filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.06));
}

.team-member:hover .team-ornament {
  opacity: 0.75;
  filter: drop-shadow(0 0 10px rgba(218, 165, 32, 0.1));
}

/* ── Portrait frame ── */

.portrait-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin-bottom: 20px;
  z-index: 1;
}

.portrait-ornament {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.team-member:hover .portrait-ornament {
  opacity: 0.8;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(0.3) contrast(1.05);
  transition: filter 0.4s ease;
}

.team-member:hover .portrait-img {
  filter: grayscale(0) contrast(1.1);
}

/* Placeholder when no photo — initials */
.portrait-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
}

/* ── Text content ── */

.member-info {
  position: relative;
  z-index: 1;
}

.member-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.member-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.member-bio {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 16px;
  text-align: left;
}

.member-achievements {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  width: 100%;
}

.member-achievements li {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
}

.member-achievements li::before {
  content: '★';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 9px;
  top: 1px;
}

.member-links {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.member-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.25s;
}

.member-links a:hover {
  color: var(--gold);
}

/* ── Apply card — special styling ── */

.team-member--apply {
  border-style: dashed;
  justify-content: center;
  min-height: 100%;
}

.apply-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.team-member--apply:hover .apply-icon {
  opacity: 0.8;
}

.apply-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.apply-body {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: center;
}

.apply-cta {
  font-size: 12px;
  padding: 12px 24px;
}

/* ── Apply modal ── */

.apply-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.apply-modal.visible {
  display: flex;
}

.apply-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.apply-modal-content {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid rgba(212, 168, 50, 0.25);
  padding: 48px 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.apply-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.apply-modal-close:hover {
  color: var(--text);
}

.apply-modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.apply-modal-body {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.apply-modal-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  padding: 12px 28px;
  border: 1.5px solid var(--gold);
  transition: all 0.3s;
  margin-bottom: 16px;
}

.apply-modal-email:hover {
  background: var(--gold);
  color: var(--bg);
}

.apply-modal-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin: 0;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .team { padding: 60px 24px; }
  .team-title { font-size: 32px; }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .team { padding: 48px 16px; }
  .team-title { font-size: 26px; }
  .team-grid { gap: 32px; }
  .team-member { padding: 24px 20px 24px; }
  .portrait-wrap { width: 72px; height: 72px; margin-bottom: 16px; }
  .member-name { font-size: 18px; }
}
