/* =========================================================
   PixelNX — Our Team
   Built on the PixelNX design system (Outfit, orange/slate, light theme)
   ========================================================= */

:root {
  --textColor: #777777;
  --darkColor: #222222;
  --primaryColor: #f7913b;
  --primaryDark: #e87a1f;
  --lightColor: #fff1e5;
  --secondaryColor: #353b48;
  --bgBlue: #e9e9f6;
  --white: #ffffff;
  --line: #ececf1;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 30px;

  --shadow-soft: 0 0 30px 0 rgb(0 0 0 / 6%);
  --shadow-card: 0 18px 40px -18px rgb(35 35 35 / 22%);
  --shadow-hover: 0 28px 60px -20px rgb(247 145 59 / 38%);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: all 0.35s var(--ease);

  --maxw: 1240px;
  --barH: 68px;
}

/* Scoped reset — limited to the team page wrapper and the full-page profile
   overlay so the shared site header/footer styles are never affected. */
.pnx_teamPage *,
.pnx_teamPage *::before,
.pnx_teamPage *::after,
.pnx_pageView *,
.pnx_pageView *::before,
.pnx_pageView *::after { box-sizing: border-box; }

.pnx_teamPage,
.pnx_pageView {
  font-family: "Outfit", sans-serif;
  color: var(--textColor);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.pnx_teamPage {
  background:
    radial-gradient(1200px 600px at 85% -5%, #fff7ef 0%, rgba(255, 247, 239, 0) 60%),
    radial-gradient(1000px 500px at 0% 0%, #f4f4fb 0%, rgba(244, 244, 251, 0) 55%),
    var(--white);
}

body.pnx_noScroll { overflow: hidden; }

.pnx_teamPage img,
.pnx_pageView img { max-width: 100%; display: block; }

.pnx_teamContainer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =========================================================
   Section heading (PixelNX style: eyebrow pill + ghost word)
   ========================================================= */
.pnx_teamSection {
  padding: 96px 0 110px;
  position: relative;
  overflow: hidden;
}

.pnx_teamHeading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(20px);
  animation: pnxFadeUp 0.8s var(--ease) forwards;
}

.pnx_eyebrow {
  display: inline-block;
  padding: 6px 22px;
  background-color: var(--primaryColor);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
  box-shadow: 0 10px 24px -10px rgb(247 145 59 / 70%);
}

.pnx_teamHeading h2 {
  font-size: clamp(26px, 5vw, 52px);
  font-weight: 800;
  color: var(--secondaryColor);
  margin: 0;
  position: relative;
  line-height: 1.15;
  letter-spacing: -0.5px;
  overflow-wrap: break-word;
}

.pnx_ghostWord {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  font-size: clamp(90px, 16vw, 170px);
  font-weight: 900;
  color: var(--secondaryColor);
  opacity: 0.04;
  z-index: -1;
  letter-spacing: 6px;
  pointer-events: none;
  text-transform: uppercase;
}

.pnx_teamHeading p {
  font-size: 18px;
  color: var(--textColor);
  margin: 18px auto 0;
  max-width: 620px;
}

/* =========================================================
   Team grid  (4 / 2 / 1)
   ========================================================= */
.pnx_teamGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* =========================================================
   Card
   ========================================================= */
.pnx_card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  outline: none;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  transition-delay: var(--d, 0ms);
}

.pnx_card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pnx_card:hover,
.pnx_card:focus-visible {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(247, 145, 59, 0.35);
}

/* media — fixed 400x480 aspect ratio = 5:6 */
.pnx_cardMedia {
  position: relative;
  aspect-ratio: 400 / 480;
  overflow: hidden;
  background: var(--lightColor);
}

.pnx_cardMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--ease), filter 0.5s var(--ease);
}

/* On hover: photo turns black & white + subtle zoom */
.pnx_card:hover .pnx_cardMedia img,
.pnx_card:focus-visible .pnx_cardMedia img {
  transform: scale(1.06);
  filter: grayscale(100%);
}

/* hover overlay summary — bottom-weighted so the B&W photo stays visible up top */
.pnx_cardOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 20px;
  background: linear-gradient(
    to top,
    rgba(53, 59, 72, 0.97) 0%,
    rgba(53, 59, 72, 0.92) 32%,
    rgba(53, 59, 72, 0.55) 62%,
    rgba(53, 59, 72, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.pnx_card:hover .pnx_cardOverlay,
.pnx_card:focus-visible .pnx_cardOverlay {
  opacity: 1;
}

.pnx_cardSummary {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 14px;
  transform: translateY(12px);
  transition: transform 0.45s var(--ease);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pnx_cardCta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--primaryColor);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.45s var(--ease) 0.05s, opacity 0.45s var(--ease) 0.05s, background 0.25s;
}

.pnx_cardCta svg { transition: transform 0.3s var(--ease); }

.pnx_card:hover .pnx_cardSummary,
.pnx_card:focus-visible .pnx_cardSummary { transform: translateY(0); }

.pnx_card:hover .pnx_cardCta,
.pnx_card:focus-visible .pnx_cardCta {
  transform: translateY(0);
  opacity: 1;
}

.pnx_card:hover .pnx_cardCta svg { transform: translateX(4px); }

/* card info */
.pnx_cardInfo {
  padding: 20px 22px 24px;
  text-align: center;
}

.pnx_cardName {
  font-size: 19px;
  font-weight: 700;
  color: var(--secondaryColor);
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}

.pnx_cardRole {
  font-size: 14px;
  font-weight: 500;
  color: var(--primaryColor);
  margin: 0;
}

/* =========================================================
   Full-page profile view
   ========================================================= */
.pnx_pageView {
  --leftW: clamp(360px, 38vw, 520px);
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--white);
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.pnx_pageView.is-open { opacity: 1; }
.pnx_pageView[hidden] { display: none; }

/* Opacity-only animation (no transform) so the fixed left panel stays
   anchored to the viewport — a transformed ancestor would break position:fixed. */
.pnx_page {
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.pnx_pageView.is-open .pnx_page {
  opacity: 1;
}

/* sticky top bar */
.pnx_pageBar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--barH);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.pnx_backBtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--secondaryColor);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 20px 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: var(--t);
}

.pnx_backBtn:hover {
  background: var(--secondaryColor);
  color: var(--white);
  border-color: var(--secondaryColor);
}
.pnx_backBtn svg { transition: transform 0.3s var(--ease); }
.pnx_backBtn:hover svg { transform: translateX(-3px); }

.pnx_pageNav { display: flex; gap: 10px; }

.pnx_navBtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--secondaryColor);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: var(--t);
}

.pnx_navBtn:hover {
  background: var(--primaryColor);
  color: var(--white);
  border-color: var(--primaryColor);
  transform: translateY(-2px);
}

/* body transition — opacity only (keeps fixed left panel anchored) */
.pnx_modalBody {
  transition: opacity 0.28s var(--ease);
}
.pnx_modalBody.slide-out-left,
.pnx_modalBody.slide-out-right { opacity: 0; }
.pnx_modalBody.slide-in-right,
.pnx_modalBody.slide-in-left { animation: pnxFadeIn 0.32s var(--ease); }

@keyframes pnxFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================================
   Profile layout — full width, magazine-style
   ========================================================= */
.pnx_profile {
  display: grid;
  grid-template-columns: var(--leftW) 1fr;
  align-items: start;
}

/* LEFT — column reserves the width; the panel itself is fixed to the viewport */
.pnx_profileLeft {
  background: var(--secondaryColor);
}

.pnx_profileSticky {
  position: fixed;
  top: var(--barH);
  left: 0;
  width: var(--leftW);
  height: calc(100vh - var(--barH));
  z-index: 5;
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background:
    radial-gradient(420px 420px at 110% -10%, rgba(247, 145, 59, 0.22), transparent 70%),
    linear-gradient(165deg, #3b414f 0%, #2a2f3a 100%);
}

/* Photo displayed at 500x600 (capped to viewport), keeping the 5:6 source ratio. */
.pnx_profilePhoto {
  position: relative;
  height: min(600px, calc(100vh - var(--barH) - 190px));
  aspect-ratio: 500 / 600;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -22px rgb(0 0 0 / 60%);
  background: var(--lightColor);
}

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

.pnx_photoTag {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* Identity below the photo (out of the image box) */
.pnx_profileIdentity {
  text-align: center;
  max-width: 100%;
}

.pnx_profileName {
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 14px;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.pnx_profileRole {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--primaryColor);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 26px -12px rgb(247 145 59 / 90%);
}

/* RIGHT — content */
.pnx_profileRight {
  padding: clamp(34px, 4vw, 64px) clamp(22px, 4vw, 72px);
}

.pnx_profileInner {
  max-width: 860px;
}

.pnx_block { margin-bottom: 44px; }
.pnx_block:last-child { margin-bottom: 0; }

.pnx_blockTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--secondaryColor);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.pnx_blockTitle::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--primaryColor);
}

.pnx_summaryText {
  font-size: 16.5px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}

.pnx_empty {
  font-size: 15px;
  font-style: italic;
  color: #aaa;
  margin: 0;
}

/* skills pills */
.pnx_pillWrap { display: flex; flex-wrap: wrap; gap: 10px; }

.pnx_pill {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--secondaryColor);
  background: var(--lightColor);
  border: 1px solid rgba(247, 145, 59, 0.22);
  border-radius: var(--radius-pill);
  transition: var(--t);
}

.pnx_pill:hover {
  background: var(--primaryColor);
  color: var(--white);
  border-color: var(--primaryColor);
  transform: translateY(-2px);
}

/* projects */
.pnx_projectGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.pnx_projectCard {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
  transition: var(--t);
}

.pnx_projectCard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primaryColor);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

.pnx_projectCard:not(.is-nolink):hover {
  border-color: rgba(247, 145, 59, 0.4);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.pnx_projectCard:not(.is-nolink):hover::before { transform: scaleY(1); }

.pnx_projectTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pnx_projectName {
  font-size: 17px;
  font-weight: 700;
  color: var(--secondaryColor);
  margin: 0;
}

.pnx_projectArrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lightColor);
  color: var(--primaryColor);
  flex-shrink: 0;
  transition: var(--t);
}

.pnx_projectCard:not(.is-nolink):hover .pnx_projectArrow {
  background: var(--primaryColor);
  color: var(--white);
  transform: scale(1.08);
}

.pnx_projectDesc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--textColor);
  margin: 0 0 16px;
  flex-grow: 1;
}

.pnx_projectLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primaryColor);
  flex-wrap: wrap;
}

.pnx_extIcon {
  font-size: 12px;
  font-weight: 500;
  color: #9a9aa5;
  background: #f5f5f8;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.pnx_projectCard.is-nolink {
  cursor: default;
  opacity: 0.85;
}
.pnx_projectCard.is-nolink .pnx_projectLink { color: #aaa; }

/* AI R&D block */
.pnx_aiBlock {
  background: linear-gradient(135deg, #fff8f1 0%, #fef3ea 100%);
  border: 1px solid rgba(247, 145, 59, 0.2);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  position: relative;
  overflow: hidden;
}

.pnx_aiBlock::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(247, 145, 59, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.pnx_aiBlock .pnx_blockTitle { border-bottom-color: rgba(247, 145, 59, 0.25); }

.pnx_aiBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  line-height: 1;
}

.pnx_aiBadge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pnx_aiBlock .pnx_blockTitle::before { display: none; }

.pnx_aiList { margin: 0; padding: 0; }

.pnx_aiList li {
  position: relative;
  list-style: none;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--secondaryColor);
}

.pnx_aiList li:last-child { margin-bottom: 0; }

.pnx_aiList li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(247, 145, 59, 0.18);
  box-shadow: inset 0 0 0 3px var(--primaryColor);
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes pnxFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Responsive
   ========================================================= */

/* tablet — 2 per row */
@media (max-width: 992px) {
  .pnx_teamGrid { grid-template-columns: repeat(2, 1fr); gap: 22px; }

  .pnx_profile { grid-template-columns: 1fr; }
  .pnx_profileSticky {
    position: relative;
    top: 0;
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 30px 26px;
  }
  .pnx_profilePhoto {
    height: auto;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 500 / 600;
  }
  .pnx_profileRight { padding: 36px 30px 48px; }
}

/* small tablet / large phone */
@media (max-width: 680px) {
  .pnx_teamSection { padding: 70px 0 80px; }
  .pnx_pageBar { padding: 0 16px; }
  .pnx_backBtn span { display: none; }
  .pnx_backBtn { padding: 10px; }
  .pnx_navBtn span { display: none; }
  .pnx_navBtn { padding: 10px; }
}

/* mobile — 2 per row */
@media (max-width: 560px) {
  .pnx_teamGrid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .pnx_cardInfo { padding: 14px 10px 18px; }
  .pnx_cardName { font-size: 15px; }
  .pnx_cardRole { font-size: 12px; }
  .pnx_cardSummary { font-size: 12.5px; -webkit-line-clamp: 5; margin-bottom: 12px; }
  .pnx_cardCta { font-size: 12.5px; padding: 7px 14px; }
  .pnx_cardOverlay { padding: 16px 14px; }

  .pnx_teamHeading { margin-bottom: 44px; }
  .pnx_teamHeading h2 { font-size: 25px; }
  .pnx_teamHeading p { font-size: 16px; }
  .pnx_ghostWord { font-size: 64px; }

  .pnx_profileSticky { padding: 18px; gap: 18px; }
  .pnx_profilePhoto { max-width: 300px; aspect-ratio: 500 / 600; }
  .pnx_profileRight { padding: 30px 20px 40px; }
  .pnx_aiBlock { padding: 22px 20px; }
  .pnx_projectGrid { grid-template-columns: 1fr; }
}

/* Touch devices (phones & tablets) have no hover — hide the overlay/button
   entirely; the whole card opens the profile on tap. Devices with a mouse
   (laptops & desktops) keep the hover overlay regardless of window width. */
@media (hover: none) {
  .pnx_cardOverlay { display: none; }
  .pnx_card:hover .pnx_cardMedia img,
  .pnx_card:focus-visible .pnx_cardMedia img { filter: none; transform: none; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .pnx_card { opacity: 1; transform: none; }
}
