/* ============================================================
   FelixCraft · Team Profile Overrides v4
   Uses CSS variables — no hardcoded theme colors.
   ============================================================ */

body[class*="profile-"] {
  min-width: 0;
}

body[class*="profile-"] .page {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

body[class*="profile-"] .hero,
body[class*="profile-"] .content,
body[class*="profile-"] .grid {
  position: relative;
  z-index: 1;
}

body[class*="profile-"] .card {
  overflow: hidden;
  min-width: 0;
}

/* ── Frame121 — CEO ─────────────────────────────────────── */
body.profile-frame121 .hero {
  grid-template-columns: .9fr 1.1fr;
  min-height: 620px;
  gap: 80px;
}

body.profile-frame121 .hero h1 {
  color: var(--accent);
  letter-spacing: -.1em;
  text-shadow: 0 12px 0 var(--accent-subtle);
}

body.profile-frame121 .portrait {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  width: min(480px,100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: rotate(1deg);
}

body.profile-frame121 .portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

body.profile-frame121 .portrait .companion {
  position: static;
}

body.profile-frame121 .content {
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

body.profile-frame121 .content .card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border-radius: var(--r-xl);
}

/* ── Hunt — Admin ───────────────────────────────────────── */
body.profile-hunt .hero {
  grid-template-columns: 1.2fr .8fr;
  min-height: 620px;
  padding-top: 100px;
}

body.profile-hunt .hero h1 {
  color: var(--accent);
  text-shadow: 0 12px 0 var(--accent-subtle);
}

body.profile-hunt .portrait {
  order: 2;
  justify-self: end;
  border-radius: 20px;
  transform: rotate(5deg);
  clip-path: none;
}

body.profile-hunt .grid {
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
}

body.profile-hunt .grid .card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--r-lg);
  border-left: 4px solid var(--accent);
}

body.profile-hunt .grid .card:last-child {
  grid-column: 1 / -1;
}

/* ── Rimaki — Developer ─────────────────────────────────── */
body.profile-rimaki .hero {
  max-width: 960px;
  padding-top: 120px;
}

body.profile-rimaki .hero h1 {
  color: var(--accent);
  font-family: var(--mono);
  text-shadow: 0 0 30px var(--accent-subtle);
}

body.profile-rimaki .bio {
  padding: 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
}

body.profile-rimaki .grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

body.profile-rimaki .grid .card {
  min-height: 220px;
  border: 1px dashed var(--accent);
  border-radius: var(--r-md);
  background: var(--accent-subtle);
}

body.profile-rimaki .grid .card:last-child {
  grid-column: 1 / -1;
}

/* ── Nicekun — Developer ────────────────────────────────── */
body.profile-nicekun .hero {
  grid-template-columns: 1.1fr .9fr;
  min-height: 650px;
}

body.profile-nicekun .hero > div:first-child {
  order: 2;
}

body.profile-nicekun .portrait {
  order: 1;
  justify-self: start;
  transform: rotate(-7deg);
  border-radius: 18px 48px 18px 48px;
}

body.profile-nicekun .grid {
  grid-template-columns: 1.35fr .65fr;
  gap: 16px;
}

body.profile-nicekun .grid .card {
  min-height: 220px;
  border-radius: 18px 40px 18px 40px;
}

body.profile-nicekun .grid .card:first-child {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Nick — Co-Founder ──────────────────────────────────── */
body.profile-nick .hero {
  max-width: 920px;
  padding-top: 170px;
  text-align: center;
}

body.profile-nick .hero .eyebrow {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--accent-subtle);
}

body.profile-nick .bio {
  margin-inline: auto;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  background: var(--accent-subtle);
}

body.profile-nick .grid {
  grid-template-columns: repeat(3,1fr);
  max-width: 940px;
  margin: auto;
}

body.profile-nick .grid .card {
  min-height: 195px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border-radius: var(--r-xl);
}

/* ── Simon — Partner ────────────────────────────────────── */
body.profile-simon .hero {
  padding-top: 150px;
}

body.profile-simon .portraits {
  gap: 30px;
}

body.profile-simon .portraits .portrait {
  width: min(250px,38vw);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: var(--shadow-lg);
}

body.profile-simon .portraits .portrait img {
  border-radius: 18px;
}

body.profile-simon .grid {
  grid-template-columns: repeat(3,1fr);
  max-width: 940px;
  margin: auto;
}

body.profile-simon .grid .card:last-child {
  grid-column: auto;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  body.profile-frame121 .hero,
  body.profile-hunt .hero,
  body.profile-nicekun .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  body.profile-frame121 .content,
  body.profile-hunt .grid,
  body.profile-rimaki .grid,
  body.profile-nicekun .grid,
  body.profile-nick .grid,
  body.profile-simon .grid {
    grid-template-columns: 1fr;
  }

  body.profile-frame121 .portrait,
  body.profile-hunt .portrait,
  body.profile-nicekun .portrait {
    justify-self: center;
  }

  body.profile-hunt .hero > div:first-child,
  body.profile-nicekun .hero > div:first-child {
    order: 1;
  }

  body.profile-hunt .portrait,
  body.profile-nicekun .portrait {
    order: -1;
  }

  body.profile-hunt .grid .card:last-child,
  body.profile-rimaki .grid .card:last-child,
  body.profile-nick .grid .card:last-child,
  body.profile-simon .grid .card:last-child {
    grid-column: auto;
  }

  body.profile-nicekun .grid .card:first-child {
    grid-row: auto;
  }

  body.profile-simon .portraits .portrait {
    width: min(190px,43vw);
  }
}
