.home #page:has(.bio-hero) {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.bio-hero {
  --copy-width: 54vw;
  --inset: clamp(3rem, 7vw, 9rem);
  --text: #302c29;
  position: relative;
  isolation: isolate;
  flex: 1;
  padding: clamp(1rem, 2.5vh, 2rem) var(--inset) clamp(1.2rem, 3.8vh, 3rem);
  color: var(--text);
  text-align: left;
}

.bio-hero::before {
  content: "";
  position: absolute;
  inset: 0 5% 0 3%;
  z-index: -2;
  background: var(--theme-surface);
}

.bio-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem clamp(1.25rem, 2.5vw, 2.5rem);
  margin-bottom: clamp(1.5rem, 4vh, 2.65rem);
}

.bio-heading .bio-name {
  color: #211e1a;
  margin: 0;
  text-align: start;
  font-size: clamp(4.2rem, min(7.7vw, 13.8vh), 7.7rem);
  line-height: 1.05;
}

.bio-languages {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 45%, white);
  border-radius: 2rem;
  background: var(--theme-surface);
  font: 600 12px/1.15 system-ui, sans-serif;
}
.bio-languages a {
  display: grid;
  place-items: center;
  min-width: 2.45em;
  min-height: 26px;
  padding: 0 .65em;
  border-radius: 2rem;
  color: var(--theme-link);
  text-decoration: none;
}
.bio-languages a:hover { background: var(--theme-surface-alt); }
.bio-languages a[aria-current] { color: white; background: var(--theme-secondary); }
.bio-hero a:focus-visible { outline: 2px solid var(--theme-secondary); outline-offset: 2px; }
.bio-reader { position: relative; z-index: 1; width: var(--copy-width); }
.bio-text[hidden] { display: none; }
.bio-text {
  font: 400 clamp(.82rem, min(1.05vw, 1.93vh), 1.07rem)/1.34 Georgia, 'Times New Roman', serif;
  color: var(--text);
  text-align: start;
}
.bio-text[lang="ar"] {
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.45;
}
.bio-text h2, .bio-text h3, .bio-text p, .bio-text ul, .bio-text li {
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-align: start;
  padding: 0;
  margin: 0;
}
.bio-text h2 {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: clamp(.9rem, calc(1.65vh + .25rem), 1.25rem);
}
.bio-text h3 {
  font-weight: 700;
  margin-bottom: .25em;
}
.bio-text p { margin-bottom: .48em; }
.bio-text .bio-intro { max-width: 85ch; margin-bottom: .7em; }
.bio-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.1vw, 2.3rem);
}
.bio-columns > div { min-width: 0; }
.bio-text ul {
  list-style: disc outside;
  padding-inline-start: 1.05em;
  margin-bottom: .78em;
}
.bio-text li { margin-bottom: .1em; }
.bio-text li::marker { color: var(--theme-accent); font-size: .78em; }
.bio-text a {
  color: var(--theme-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .13em;
}
.bio-text a:hover { color: var(--theme-secondary); }
.bio-closing, .bio-text .bio-signature {
  width: min(100%, 32vw);
  margin-right: auto;
  margin-left: 0;
}
.bio-closing { margin-top: calc(.1em + .375rem); }
.bio-text .bio-signature { width: max-content; max-width: 26vw; font-size: .94em; margin-top: .4em; margin-bottom: 0; font-style: italic; }
.bio-text[lang="ar"] .bio-signature { font-style: normal; }
.bio-portrait {
  position: absolute;
  z-index: -1;
  bottom: 0;
  right: 0;
  display: block;
  width: min(69vw, 138vh);
  max-width: none;
  height: auto;
  pointer-events: none;
}

@media (max-width: 959px) {
  .home #page:has(.bio-hero) {
    height: 100vh;
    height: 100svh;
    min-height: min(100svh, 38rem);
  }
  .home:has(.bio-hero) header .navbar-brand {
    font-size: clamp(1.65rem, 6.8vw, 2.6rem);
    line-height: 1.25;
  }
  .bio-hero {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(5rem, 1fr) min(30svh, 59vw);
    padding: .5rem 0 0;
  }
  .bio-hero::before { inset: 0 2%; }
  .bio-heading, .bio-reader { margin-inline: clamp(1.4rem, 6.5vw, 3.75rem); }
  .bio-heading { display: grid; grid-template-columns: minmax(0, max-content) max-content; gap: .55rem 1.15rem; margin-bottom: 1.5rem; }
  .bio-heading .bio-name { font-size: clamp(3.5rem, 12.7vw, 5.5rem); line-height: 1.02; text-wrap: balance; }
  .bio-languages { font-size: 11px; }
  .bio-reader {
    width: auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent) transparent;
  }
  .bio-closing, .bio-text .bio-signature { width: 100%; max-width: none; }
  .bio-text { font-size: .95rem; line-height: 1.45; padding: 0 .25rem .75rem; }
  .bio-portrait {
    position: static;
    justify-self: end;
    align-self: end;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
  }
}
@media (max-width: 580px) {
  .bio-heading { display: block; text-wrap: balance; }
  .bio-heading .bio-name { display: inline; }
  .bio-heading .bio-languages { margin-inline-start: .65rem; vertical-align: middle; }
  .bio-columns { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 420px) {
  .bio-heading .bio-name { font-size: clamp(3.26rem, 14.36vw, 3.6rem); }
  .bio-languages a { min-width: 2.3em; padding-inline: .42em; }
}
@media (max-height: 480px) and (max-width: 959px) {
  .home #page:has(.bio-hero) { height: auto; min-height: 100svh; }
  .bio-hero { grid-template-rows: auto auto auto; }
  .bio-portrait { width: min(75vw, 40rem); height: auto; }
}

@media (min-width: 960px) and (max-height: 700px) {
  .bio-portrait { width: min(66.5vw, 126vh); }
}
