/* ==========================================================================
   Creator directory and profile pages (creators, generated profiles, Kazi)
   ========================================================================== */

/* Directory ------------------------------------------------------------------ */
.creator-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(32px, 3.6vw, 56px) clamp(12px, 1.6vw, 24px); }

.creator-card { display: flex; flex-direction: column; color: var(--bone); text-decoration: none; }
.creator-card-media { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); isolation: isolate; }
.creator-card img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: var(--media-filter); transition: filter .9s ease, transform 1.4s var(--ease); }

.creator-card-copy { display: grid; justify-items: start; gap: 6px; padding-top: 14px; }
.creator-card-copy strong { font-size: 1.125rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.creator-card-copy small { color: var(--stone); font-size: .875rem; line-height: 1.45; }

@media (hover: hover) {
  .creator-card:hover img { filter: none; transform: scale(1.045); }
  .creator-card:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
}

.creator-card:focus-visible img { filter: none; }

@media (max-width: 1100px) {
  .creator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .creator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Profile hero --------------------------------------------------------------- */
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: min(calc(100svh - var(--header-h)), 880px);
}

.profile-portrait { position: relative; min-height: 420px; overflow: hidden; background: var(--ink-2); }
.profile-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: var(--media-filter); transition: filter .9s ease; }

/* A profile is the one place a portrait returns to its own colours. */
@media (hover: hover) {
  .profile-portrait:hover img { filter: none; }
}

@media (hover: none) {
  .profile-portrait img { filter: none; }
}

.profile-copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(32px, 4vw, 56px);
  padding: clamp(24px, 3vw, 44px) max(var(--gutter), calc((100vw - var(--page-width)) / 2 + var(--gutter))) clamp(28px, 3.4vw, 52px) clamp(24px, 5vw, 80px);
}

.profile-headline h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-size: clamp(2.75rem, 10cqi, 5.5rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.profile-intro,
.kazi-role { max-width: 40ch; margin-top: clamp(16px, 1.8vw, 24px); color: var(--bone-2); font-size: var(--fs-lede); line-height: 1.45; }
.profile-meta { margin-top: 10px; color: var(--stone); font-size: .9375rem; }

@media (max-width: 860px) {
  .profile-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .profile-portrait { aspect-ratio: 4 / 5; min-height: 0; max-height: 78svh; }
  .profile-copy { gap: 32px; padding: 26px var(--gutter) 36px; }
}

/* Biography and links -------------------------------------------------------- */
.profile-bio,
.profile-connect { padding-block: var(--section); scroll-margin-top: var(--header-h); }
.profile-bio + .profile-connect { padding-top: 0; }

.profile-bio > .container,
.profile-connect > .container { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(28px, 6vw, 112px); }

.profile-bio h2,
.profile-connect h2 { overflow-wrap: anywhere; }

.profile-bio .container > div:last-child > * + * { margin-top: 1.15em; }
.profile-bio .container > div:last-child p { max-width: 60ch; color: var(--bone-2); font-size: var(--fs-body-l); line-height: 1.68; overflow-wrap: anywhere; }
.profile-bio .container > div:last-child p:first-child { color: var(--bone); font-size: var(--fs-lede); line-height: 1.5; }
.profile-bio .container > div:last-child p:last-child { margin-top: clamp(28px, 3vw, 40px); padding-top: 22px; border-top: 1px solid var(--line); color: var(--stone); font-size: var(--fs-body); }
.profile-bio .container > div:last-child p:last-child strong { display: block; margin-bottom: 6px; color: var(--stone); font-size: .875rem; font-weight: 600; }

.profile-links { border-top: 1px solid var(--line-strong); }

.profile-links > div {
  display: grid;
  grid-template-columns: minmax(96px, .32fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 6px 24px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
}

.profile-links span { color: var(--stone); font-size: .9375rem; }
/* Handles and addresses keep their own casing, so they are set in the text face. */
.profile-links a,
.profile-links strong { justify-self: start; font-size: clamp(1.125rem, 1.5vw, 1.375rem); font-weight: 500; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.profile-links a { background: linear-gradient(currentColor, currentColor) no-repeat left 100% / 100% 1px; transition: background-size .45s var(--ease); }
.profile-links a:hover { background-position: right 100%; background-size: 0 1px; }
.profile-links a[target="_blank"]::after { content: ""; display: inline-block; width: .7em; height: .7em; margin-left: .5em; background: currentColor; -webkit-mask: var(--icon-arrow-out) center / contain no-repeat; mask: var(--icon-arrow-out) center / contain no-repeat; opacity: .6; }

@media (pointer: coarse) {
  .profile-links a { position: relative; }
  .profile-links a::before { content: ""; position: absolute; inset: -9px -6px; }
}

@media (max-width: 860px) {
  .profile-bio > .container,
  .profile-connect > .container { grid-template-columns: minmax(0, 1fr); }
}

/* Staff portraits are small uploads, so they are framed rather than enlarged. */
.kazi-portrait { display: grid; place-items: center; padding: clamp(28px, 5vw, 72px); }
.kazi-portrait img { position: static; width: min(100%, 420px); height: auto; aspect-ratio: 1; object-position: 50% 50%; }

@media (max-width: 860px) {
  .kazi-portrait { aspect-ratio: auto; max-height: none; }
  .kazi-portrait img { width: min(100%, 300px); }
}
