/* Shared by the member dialog and its standalone page. */
.person-profile-extension { display: none; }
.person-profile .person-dialog-inner {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  grid-template-areas: "photo identity" "photo copy";
  grid-template-rows: auto 1fr;
  min-height: 450px;
}

.person-profile .person-dialog-photo {
  grid-area: photo;
  position: relative;
  height: auto;
}
.person-profile .person-dialog-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
/* Keep the supplied portraits' headroom in the member pages and dialogs. */
.person-profile .person-dialog-photo > img:is([src$="liu-shih-yu-gray-suit-glasses-2-20261007.webp"], [src$="lin-yu-han-black-suit-20261007.webp"], [src$="chiu-huang-chieh-gray-suit-20261007.webp"], [src$="chen-yuan-ming-black-suit-20261007.webp"]) {
  transform: none;
  object-position: center top;
}
.person-profile .person-dialog-identity {
  grid-area: identity;
  min-width: 0;
  padding: 56px 40px 28px;
}
.person-profile .person-dialog-identity :is(h1, h2) {
  margin: 0;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}
.person-profile .person-role {
  margin-top: 10px;
  color: var(--blue);
  font-size: 15px;
  line-height: 1.6;
}
.person-profile .credentials { margin: 18px 0 0; }
.person-profile .person-dialog-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  padding: 0 40px 40px;
}
.person-profile-details { display: grid; gap: 24px; }
.person-profile .person-profile-details > p { font-size: 15px; line-height: 1.9; color: #63758b; }
.person-profile .person-profile-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.5;
}
.person-profile .person-profile-section ul {
  margin: 0;
  padding-left: 1.15em;
  font-size: 15px;
  line-height: 1.85;
  color: #63758b;
  text-wrap: wrap;
  line-break: strict;
  overflow-wrap: break-word;
}
.person-profile-section li + li { margin-top: 6px; }
.person-profile-contact {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.person-profile .person-profile-contact .button { margin-top: 0; }
dialog.person-profile.team-dialog {
  width: min(920px, calc(100vw - 40px));
  max-width: none;
  max-height: 90dvh;
  border-radius: 26px;
  overscroll-behavior: contain;
  box-shadow: 0 28px 90px #15305025;
}
/* Match the portrait cover beneath Safari's rounded dialog clipping. */
dialog.person-profile--resume.team-dialog { background: #3c4148; }
dialog.person-profile.team-dialog .dialog-close {
  position: sticky;
  top: 16px;
  right: auto;
  width: 42px;
  height: 42px;
  margin: 16px 16px -58px auto;
  z-index: 6;
  background: #ffffffae;
  color: #294866;
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
@media (max-width: 720px) {
  .person-profile .person-dialog-inner {
    --profile-photo-height: clamp(320px, 92vw, 410px);
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "portrait" "copy";
    grid-template-rows: auto auto;
    gap: 0;
    min-height: 0;
    padding: 0;
    background: #343b44;
    color: #fff;
  }
  /* Extend the portrait itself behind the details, retaining its colors. The
     sharp layer fades into this blurred copy at the bottom of the photograph. */
  .person-profile .person-profile-extension {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
  }
  .person-profile-extension > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    filter: blur(28px);
    transform: scale(1.12);
  }
  .person-profile .person-dialog-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 120px, rgb(16 24 34 / .22) 240px, rgb(16 24 34 / .64) var(--profile-photo-height));
  }
  .person-profile .person-dialog-photo {
    grid-area: portrait;
    height: var(--profile-photo-height);
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 52%, transparent 98%);
  }
  .person-profile.team-dialog .person-dialog-photo > img {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    object-position: center top;
  }
  .person-profile .person-dialog-identity {
    grid-area: portrait;
    align-self: end;
    position: relative;
    z-index: 2;
    padding: 74px 26px 24px;
  }
  .person-profile .person-dialog-identity :is(h1, h2) { font-size: 32px; color: #fff; }
  .person-profile .person-role { margin-top: 8px; font-size: 14px; color: rgb(255 255 255 / .84); }
  .person-profile .person-dialog-copy { position: relative; z-index: 2; padding: 8px 26px 28px; }
  .person-profile .person-profile-details > p,
  .person-profile .person-profile-section ul { color: rgb(255 255 255 / .88); }
  .person-profile .person-profile-contact { border-top-color: rgb(255 255 255 / .2); }
  .person-profile .person-profile-contact .button {
    width: 100%;
    min-height: 46px;
    color: #fff;
    background: rgb(255 255 255 / .08);
    border-color: rgb(255 255 255 / .36);
  }
  .person-profile .person-profile-contact .button:hover { background: rgb(255 255 255 / .16); }
  dialog.person-profile.team-dialog .dialog-close {
    top: 14px;
    margin: 14px 14px -56px auto;
  }
  dialog.person-profile.team-dialog { width: calc(100vw - 24px); border-radius: 20px; background: #343b44; }
  dialog.person-profile--resume.team-dialog { background: #3c4148; }
}

/* One reading width for the intro, facts, experience and publications. */
.detail-page .detail-document.person-profile--resume { width: min(920px, calc(100% - 48px)); }
.person-profile--resume .person-dialog-inner { display: block; min-height: 0; padding: 0; background: #fff; color: #25384e; }
.person-resume-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 360px;
  width: 100%;
  margin: 0;
  padding: 48px max(48px, calc((100% - 736px) / 2));
  overflow: hidden;
  background: #3c4148;
}
.person-resume-backdrop { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.person-resume-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; filter: blur(48px); transform: scale(1.14); opacity: .3; }
.person-resume-intro::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, transparent 35%, rgb(22 29 38 / .08) 65%, rgb(22 29 38 / .2)); }
.person-profile--resume .person-dialog-photo { position: absolute; inset: 0 auto 0 0; width: 44%; height: 100%; border-radius: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 66%, transparent); mask-image: linear-gradient(90deg, #000 66%, transparent); }
.person-profile--resume .person-dialog-photo > img { transform: none; object-position: center top; }
.person-profile--resume .person-dialog-identity { position: relative; z-index: 1; margin-left: 52%; padding: 0; }
.person-profile--resume .person-dialog-identity :is(h1, h2) { color: #fff; }
.person-profile--resume .person-role { color: #e2e6e9; }
.person-profile--resume .founder-story-facts { width: 100%; max-width: none; margin: 24px 0 0; padding: 20px 0 0; border-top: 1px solid rgb(255 255 255 / .2); }
.person-profile--resume .founder-story-facts dl { padding: 0; border: 0; }
.person-profile--resume .founder-story-facts dt { color: #d5dee7; }
.person-profile--resume .founder-story-facts dd { color: #f0f2f3; }
.person-profile--resume .person-dialog-copy { display: block; padding: 0; }
.person-profile--resume .founder-story-experience { margin-top: 0; }
.person-profile--resume .person-resume-publications { width: calc(100% - 96px); max-width: 736px; padding: 52px 0 0; }
.person-profile--resume .person-resume-works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin: 0; padding: 0; list-style: none; }
.person-profile--resume .person-resume-works li + li { margin-top: 0; }
.person-resume-works li { padding: 16px 0; border-bottom: 1px solid #e0e5e9; color: var(--profile-copy); font-size: 15px; line-height: 1.85; }
.person-resume-works li p { margin: 0; font-size: inherit; line-height: inherit; }
.person-resume-works li .person-resume-description { margin-top: 4px; font-size: 14px; }
.person-profile--resume .person-profile-contact { width: calc(100% - 96px); max-width: 736px; margin: 40px auto 0; padding: 0 0 48px; border: 0; }
@media (max-width: 720px) {
  .detail-page .detail-document.person-profile--resume { width: calc(100% - 24px); }
  .person-profile--resume .person-dialog-inner { padding: 0; background: #fff; color: #25384e; }
  .person-profile--resume .person-dialog-inner::after { display: none; }
  .person-resume-intro { --resume-photo-height: clamp(340px, 105vw, 430px); display: block; min-height: 0; padding: 0; }
  .person-resume-intro::after { background: linear-gradient(180deg, transparent 40%, rgb(22 29 38 / .1) 75%, rgb(22 29 38 / .2)); }
  .person-profile--resume .person-dialog-photo { inset: 0 0 auto; width: 100%; height: var(--resume-photo-height); border-radius: 0; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 98%); mask-image: linear-gradient(180deg, #000 60%, transparent 98%); }
  .person-profile--resume .person-dialog-identity { margin: 0; padding: calc(var(--resume-photo-height) - 80px) 26px 30px; }
  .person-profile--resume .person-dialog-copy { padding: 0; }
  .person-profile--resume .person-resume-publications { width: calc(100% - 52px); padding: 36px 0 0; }
  .person-profile--resume .person-resume-works { grid-template-columns: 1fr; }
  .person-resume-works li { padding: 14px 0; }
  .person-profile--resume .person-profile-contact { width: calc(100% - 52px); margin-top: 28px; padding: 0 0 28px; }
  .person-profile--resume .person-profile-contact .button { color: #284461; background: transparent; border-color: var(--line); }
}
