/* Team page: Founder card + Editorial Alternating Syntrofos Profiles (Photo Left/Right + Profile Text) + Spotlight Modal */

.founder-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-bottom: clamp(32px, 4vw, 52px);
  padding: clamp(22px, 2.8vw, 32px) clamp(24px, 3.2vw, 36px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 120% at 0% 50%, rgba(124, 77, 255, 0.14), transparent 65%),
    var(--surface);
  box-shadow: var(--inner-highlight);
}

.founder-credit::before {
  content: "ε π";
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.founder-credit h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: -0.025em;
  margin: 0;
}

.founder-credit p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.4;
  margin-left: auto;
}

/* Quick index strip so visitors can jump directly to any Syntrofos */
.team-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.team-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.team-jump a:hover,
.team-jump a:focus-visible {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

/* Editorial alternating rows: Photo Left / Profile Right, then Profile Left / Photo Right */
.profile-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(20px, 3vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--inner-highlight);
  scroll-margin-top: 96px;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease);
}

.profile-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow);
}

.profile-card:target {
  border-color: var(--c-create);
  box-shadow: 0 0 0 1px var(--c-create), var(--card-shadow);
}

.profile-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: pointer;
}

.profile-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 16%;
  transition: transform 0.55s var(--ease);
}

.profile-card:hover .profile-photo img {
  transform: scale(1.03);
}

.profile-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-index {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.profile-focus {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.profile-details h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.036em;
  margin: 0;
}

.profile-role {
  margin: 8px 0 0;
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.4;
}

.profile-bio {
  margin: 18px 0 0;
  max-width: 50ch;
  font-size: clamp(15.5px, 1.2vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-2);
}

.profile-note {
  margin: 12px 0 0;
  max-width: 50ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 24px;
}

.profile-open-btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--paper-2);
  border-color: var(--line-strong);
}

.team-page .team-closing {
  margin-top: clamp(36px, 5vw, 72px);
}

/* Native <dialog> Spotlight Modal (optional enlarged view when photo/button clicked) */
dialog.profile-modal {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 100px -24px rgba(0, 0, 0, 0.85);
  overflow: auto;
}

dialog.profile-modal::backdrop {
  background: rgba(8, 9, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

dialog.profile-modal[open] {
  animation: modal-in 0.28s var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 460px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 15px;
}

.modal-close:hover {
  background: var(--surface-2);
}

.modal-media {
  background: var(--paper-2);
  overflow: hidden;
}

.modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}

.modal-body {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.6vw, 44px);
  padding-top: clamp(28px, 4vw, 46px);
}

.modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-right: 40px;
}

.modal-focus {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.modal-body h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.036em;
  margin: 0;
}

.modal-role {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
}

.modal-bio {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
}

.modal-note {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.modal-actions {
  margin-top: 26px;
}

.modal-nav {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-step {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.modal-counter {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 820px) {
  .profile-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
  }
  .profile-photo img {
    aspect-ratio: 4 / 4.2;
  }
  .modal-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .modal-media {
    aspect-ratio: 4 / 3;
  }
  .modal-body {
    padding: 22px 20px 24px;
  }
}

@media (max-width: 600px) {
  .founder-credit {
    padding: 18px;
  }
  .founder-credit p {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.profile-modal[open] {
    animation: none;
  }
}
