/* Preserve the desktop cover's original text and photo boxes. */
.hero-identity,
.profile-frame picture {
  display: contents;
}

#home .btn-hero-resume {
  display: none;
}

@media (max-width: 720px), (max-width: 960px) and (orientation: landscape) {
  #home .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  #home .hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    height: auto;
    min-height: 46px;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: .9375rem;
    line-height: 1.35;
  }

  #home .btn-hero-resume {
    color: var(--hero-text);
    background: transparent;
    border: 1px solid #81736b;
  }

  #home .btn-hero-resume:is(:hover, :focus-visible) {
    color: var(--hero-text);
    background: #372c28;
    border-color: var(--hero-text);
  }
}

@media (max-width: 720px) {
  .topbar .nav {
    width: calc(100% - 40px);
    height: auto;
    min-height: 56px;
  }

  .topbar .brand,
  .topbar .menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .topbar .menu-toggle {
    gap: 8px;
    padding: 0 10px;
    border: 0;
    font-size: .875rem;
  }

  .topbar .menu-toggle::before {
    content: "";
    width: 15px;
    height: 8px;
    border-block: 1.5px solid currentColor;
  }

  .topbar .menu-toggle[aria-expanded="true"]::before {
    height: 0;
    border-bottom: 0;
  }

  .topbar .nav-links {
    top: 100%;
    padding: 8px 20px 14px;
    max-height: calc(100vh - 58px);
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .topbar .nav-links.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
  }

  .topbar .nav-links a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 7px 10px;
    font-size: .9375rem;
  }

  #home {
    padding: 0;
  }

  #home .warm-hero-panel {
    --portrait-width: clamp(76px, 22vw, 110px);
    width: min(100% - 40px, 570px);
    padding: 24px 0 26px;
  }

  #home .hero-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  #home .hero-copy,
  #home .hero-visual {
    animation: none;
    transform: none;
    translate: none;
  }

  #home .hero-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(var(--portrait-width) * 1.3);
    padding-right: calc(var(--portrait-width) + 12px);
  }

  #home .hero-kicker {
    margin: 0 0 6px;
    font-size: .8125rem;
    line-height: 1.5;
    letter-spacing: .06em;
  }

  #home h1 {
    margin: 0;
    font-size: clamp(2.65rem, 11vw, 3.75rem);
    line-height: 1.12;
  }

  #home .hero-line {
    gap: 4px;
    margin: 16px 0 0;
    font-size: clamp(1rem, 4.6vw, 1.22rem);
    line-height: 1.5;
  }

  #home .role-label {
    font-size: .8125rem;
    letter-spacing: .04em;
  }

  #home .role-list {
    gap: 2px 14px;
  }

  #home .hero-actions {
    margin-top: 16px;
  }

  #home .hero-visual,
  #home .profile {
    position: static;
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  /* The photo shares the identity row's reserved space at any text size. */
  #home .profile-frame {
    position: absolute;
    inset: 0 0 auto auto;
    width: var(--portrait-width);
    aspect-ratio: 10 / 13;
    padding: 3px;
    border-radius: 6px;
  }

  #home .profile-frame::before {
    display: none;
  }

  #home .profile-frame picture,
  #home .profile-frame .avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
  }

  #home .profile-copy {
    padding-top: 14px;
    border-top: 1px solid rgba(244, 239, 232, .2);
  }

  #home .profile-copy strong {
    font-size: 1.0625rem;
    line-height: 1.5;
    letter-spacing: .015em;
  }

  #home .profile-copy p {
    max-width: 38em;
    margin: 4px 0 0;
    font-size: .9375rem;
    line-height: 1.65;
  }
}

@media (min-width: 721px) and (max-width: 960px) and (orientation: landscape) {
  #home {
    padding: 0;
  }

  #home .warm-hero-panel {
    padding: 24px 12px;
  }

  #home .hero-top {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 20px;
  }

  #home .profile {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
  }

  #home .avatar {
    width: 100%;
    height: auto;
  }

  #home h1 {
    margin-bottom: 10px;
    font-size: 3rem;
  }

  #home .hero-line,
  #home .profile-copy strong {
    font-size: 1.125rem;
  }

  #home .profile-copy p {
    font-size: .9375rem;
  }
}
