.home-intro {
  grid-area: intro;
  max-width: 80ch;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}
html:lang(en) .home-intro p:lang(zh),
html:lang(zh) .home-intro p:lang(en) { display: none }
.home-intro p:lang(zh) { line-height: 1.6 }
#home .identity { grid-area: name }
#home #directory { grid-area: directory }
html:lang(en) #home #name,
html:lang(en) #home #alias {
  display: flex;
  align-items: baseline;
  column-gap: clamp(.4rem, 1.7vw, 1.8rem);
}
html:lang(en) #home #alias { margin-block-start: 0 }

html:has(#home:not([hidden])) { scrollbar-gutter: stable both-edges }

@media (orientation: landscape) and (min-width: 800px), (orientation: portrait) and (min-width: 741px) {
  #home.layout {
    width: auto;
    margin-inline: 0;
    grid-template-columns: 66% minmax(0, 1fr);
    column-gap: clamp(20px, 4vw, 80px);
  }
}
@media (orientation: landscape), (min-width: 741px) {
  #home #directory {
    justify-self: end;
    inline-size: max-content;
    max-inline-size: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  #directory a:not(.interest-entry) { max-inline-size: 100%; text-wrap: balance }
  /* The visible strokes end at 94% of the photography link's hit area. */
  #directory .interest-entry { margin-inline-end: calc(-.06 * var(--directory-mark)) }
}

@media (orientation: landscape) and (min-width: 800px) {
  main:has(#home:not([hidden])) {
    --home-bottom: clamp(2rem, 6svh, 5rem);
    align-self: start;
    padding-block: max(clamp(3rem, 8svh, 6rem), calc(25svh - var(--home-bottom))) var(--home-bottom);
  }
  #home.layout {
    min-height: 75svh;
    grid-template-areas: "film directory" "name directory" "intro directory";
    grid-template-rows: 1fr auto auto;
    row-gap: 0;
  }
  #home .film {
    grid-area: film;
    align-self: stretch;
    max-inline-size: var(--home-photo-width, 80ch);
    min-height: clamp(100px, 16svh, 230px);
    margin-block: var(--about-ink-offset, .8rem) clamp(14px, 2svh, 24px);
  }
  #home .identity { align-self: end }
  #home #alias .slash { align-self: center }
  #home .home-intro { position: relative; margin-block-start: clamp(14px, 2svh, 24px) }
  #home .home-intro p:lang(en) {
    max-inline-size: var(--home-photo-width, 100%);
    text-align: justify;
  }
  /* Keep the translated copy in normal flow, and measure the Chinese line breaks at the same width. */
  html:lang(en) #home .home-intro p:lang(zh) {
    display: block;
    visibility: hidden;
    position: absolute;
    inset: 0 0 auto;
  }
  html:lang(en) #home.layout { min-height: calc(75svh + var(--intro-height-difference, 0px)) }
  #home #directory { align-self: stretch; align-content: space-between }
}
@media (orientation: landscape) and (min-width: 800px) and (max-height: 520px) {
  .sheet:has(#home:not([hidden])) { padding-inline: clamp(20px, 3vw, 52px) }
  main:has(#home:not([hidden])) { padding-top: clamp(5rem, 25svh, 8rem) }
  #home.layout { grid-template-columns: 71% minmax(0, 1fr) }
}
@media (orientation: portrait), (max-width: 799px) {
  #home.layout { grid-template-areas: "film film" "name directory" "intro directory"; grid-template-rows: auto auto 1fr }
  #home .film { grid-area: film }
  #home .home-intro { align-self: start }
}
@media (orientation: portrait) and (min-width: 741px), (orientation: landscape) and (max-width: 799px) {
  #home.layout { grid-template-rows: auto 1fr auto }
  #home .identity { align-self: end }
  #home #directory { align-self: stretch; align-content: space-between }
}
@media (orientation: portrait) and (min-width: 741px) {
  #home .film { height: clamp(288px, 35svh, 450px) }
}
@media (orientation: portrait) and (max-width: 740px) {
  #home.layout { grid-template-areas: "film" "name" "intro" "directory"; grid-template-rows: repeat(4, auto) }
  #home .film { height: clamp(204px, 35svh, 340px) }
  #home .identity { grid-area: name; margin-block-start: .75rem }
  #home .home-intro { margin-inline: var(--gutter); margin-block-end: .65rem }
}
