#about.profile {
  container-type: inline-size;
  scroll-margin-top: var(--nav-height);
  padding-block-end: var(--chapter-inset);
  color: var(--site-fg);
  background: var(--site-bg);
}

.profile-layout {
  position: relative;
  grid-template-rows: auto 1fr;
  min-height: clamp(520px, calc(100svh - var(--nav-height)), 1080px);
}

.profile-accent {
  grid-column: 1 / -1;
  justify-self: center;
  display: block;
  width: 100cqi;
  height: auto;
  margin-block: 0 clamp(16px, 1.25vw, 24px);
  pointer-events: none;
}

.profile-identity {
  position: relative;
  min-width: 0;
}
.profile-portrait {
  position: absolute;
  inset: auto auto 0 0;
  display: block;
  width: auto;
  height: auto;
  max-width: min(119.36%, 33.333vw, 640px);
  max-height: 100%;
  /* The cutout's jacket begins at x=182 in the 1122px source. */
  transform: translateX(-16.22%);
}

.profile-story {
  align-self: end;
  margin: 24px 0 clamp(32px, min(5.2vw, 9.8svh), 108px);
}

#profile-title {
  scroll-margin-top: calc(var(--nav-height) + 24px);
  margin: 0 0 clamp(40px, 2.92vw, 56px);
  font: 500 36px/44px var(--site-font);
  letter-spacing: -.01em;
}
#profile-title span { display: inline-block; }
.profile-bio {
  margin: 0;
  color: var(--site-secondary);
  font: 400 16px/28px var(--site-font);
  text-wrap: pretty;
}

@media (min-width: 761px) {
  .profile-bio { text-align: justify; }
}

.doudou-dialogue {
  display: grid;
  font-size: var(--detail-size);
  grid-template-columns: 6em minmax(0, 1fr);
  align-items: center;
  column-gap: .75em;
  margin-inline: -1.25em .552em;
}
.profile-dialogue {
  margin-block-start: clamp(24px, 2.09vw, 40px);
}
.doudou-dialogue > img {
  display: block;
  width: 100%;
  height: auto;
}
.doudou-dialogue > .doudou-voice {
  position: relative;
  color: var(--site-secondary);
  font-size: clamp(1.125rem, 1.041667vw, 1.25rem);
  line-height: 1.5;
  text-wrap: balance;
}

.dialogue-slot {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}
.dialogue-actor {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 86%;
}
.dialogue-ink {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}
.dialogue-script { display: block; }
.dialogue-pen {
  position: absolute;
  inset: .27em auto auto 0;
  height: .96em;
  border-inline-start: 1px solid currentColor;
  pointer-events: none;
}
@media screen and (prefers-reduced-motion: no-preference) {
  .doudou-dialogue[data-phase="idle"] .dialogue-transcript,
  .dialogue-ink + .dialogue-transcript { opacity: 0; }
  .doudou-dialogue[data-phase="leaving"] > .doudou-voice {
    opacity: 0;
    transition: opacity 180ms ease;
  }
  .doudou-dialogue[data-phase="holding"] .dialogue-eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: dialogue-resting-blink 5s infinite;
  }
  @keyframes dialogue-resting-blink {
    0%, 57%, 61%, 100% { transform: scaleY(1); }
    59% { transform: scaleY(.16); }
  }
}
@media (prefers-reduced-motion: reduce), print {
  .dialogue-ink { display: none; }
}
@media print {
  .dialogue-slot { background: url("../设计草图/引号弧身/引号弧身-标准造型.svg") center / contain no-repeat; }
  .dialogue-actor { display: none; }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .profile-story { margin: 24px 0 clamp(24px, 3.5vw, 36px); }
  #profile-title { font-size: 32px; line-height: 40px; margin-bottom: 32px; }
}


@media (max-width: 760px) {
  .profile-layout {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: auto;
    grid-template-areas: "accent accent" "portrait title" "bio bio" "dialogue dialogue";
    gap: 32px 12px;
    min-height: 0;
  }
  .profile-accent { grid-area: accent; margin: 0; }
  .profile-identity { grid-area: portrait; align-self: end; }
  .profile-portrait { position: static; width: 119.36%; max-width: none; max-height: none; }
  .profile-story { display: contents; }
  #profile-title {
    grid-area: title;
    align-self: center;
    margin: 0;
    font-size: 28px;
    line-height: 36px;
  }
  .profile-bio { grid-area: bio; line-height: 26px; }
  .doudou-dialogue {
    grid-template-columns: 64px minmax(0, 1fr);
    margin-inline: -8px 0;
  }
  .profile-dialogue {
    grid-area: dialogue;
    margin-block: 0;
  }
}
