.portfolio-page {
  --content-width: 1240px;
  --page-gutter: clamp(16px, 5.5vw, 80px);
  --section-space: clamp(40px, 5.5vw, 80px);
  background: var(--paper-bright);
}

.portfolio-header,
.portrait-opening {
  background: var(--navy);
  color: var(--paper-bright);
}

.portrait-opening { container-type: inline-size; font-size: 1rem; }

.portfolio-header {
  position: sticky;
  z-index: 50;
  top: 0;
}

.portfolio-header .nav-shell,
.portrait-layout {
  width: min(var(--content-width), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
}

.portfolio-header .nav-shell {
  position: static;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.25rem;
  padding: 8px 0;
  border-bottom: 1px solid #415362;
  box-shadow: none;
}

.portfolio-monogram {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.09em;
  line-height: 1;
  text-decoration: none;
}

.portfolio-header nav { gap: clamp(6px, 1.4vw, 20px); }
.portfolio-header nav a {
  min-height: 44px;
  padding: 5px 2px;
  border-radius: 0;
  color: var(--on-navy);
  font-size: .94rem;
  font-weight: 550;
}

.portfolio-header nav .nav-resume,
.portfolio-header nav a:is(:hover, :active, [aria-current="location"]) {
  margin: 0;
  color: var(--navy-link);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .3em;
}

.portrait-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: clamp(20px, 2.4vw, 36px) clamp(36px, 6vw, 96px);
  padding-block: clamp(28px, 3.5vw, 54px) clamp(36px, 4.5vw, 70px);
}

.portrait-layout h1 {
  align-self: end;
  margin: 0;
  color: var(--paper-bright);
  font-size: clamp(3.5rem, 8vw, 7.7rem);
  font-weight: 650;
  letter-spacing: -.067em;
  line-height: .94;
}

.portrait-layout h1 span { display: block; color: var(--navy-link); }
.portrait-introduction { grid-column: 1; }
.portrait-introduction p {
  max-width: 50ch;
  margin: 0;
  color: var(--on-navy);
  font-size: clamp(1rem, 1.28vw, 1.2rem);
  line-height: 1.55;
}

.portrait-introduction .portrait-specialty {
  margin-bottom: .56em;
  color: var(--paper-bright);
  font-size: clamp(1.1rem, 1.65vw, 1.55rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.profile-portrait {
  grid-area: 1 / 2 / 3 / 3;
  align-self: center;
  justify-self: end;
  width: min(100%, 25rem);
  margin: 0;
}

.profile-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.02;
  object-fit: cover;
}

.profile-portrait figcaption {
  margin-top: 10px;
  color: var(--on-navy);
  font-size: .88rem;
  line-height: 1.4;
}

@media (max-width: 700px) {
  .portfolio-header { position: static; }
  .portfolio-header .nav-shell { min-height: 56px; gap: 0 8px; padding-block: 4px; }
  .portfolio-header nav { flex-wrap: wrap; gap: 0 8px; }
  .portfolio-header nav a { font-size: .84rem; }
  .portrait-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
    gap: 22px 16px;
    align-items: center;
    padding-block: 24px 30px;
  }
  .portrait-layout h1 {
    align-self: center;
    font-size: clamp(2.55rem, 9vw, 3.9rem);
    overflow-wrap: anywhere;
  }
  .profile-portrait { grid-area: 1 / 2; max-width: 12rem; }
  .profile-portrait img { aspect-ratio: 1.2; }
  .profile-portrait figcaption { margin-top: 6px; font-size: .78rem; }
  .portrait-introduction { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .portfolio-header nav { gap: 0 4px; }
  .portrait-layout { column-gap: 12px; }
}

@container (max-width: 18em) {
  .portrait-layout { grid-template-columns: minmax(0, 1fr); }
  .portrait-layout h1 { font-size: 2.3rem; }
  .portrait-introduction { grid-row: 2; }
  .profile-portrait { grid-area: 3 / 1; justify-self: start; }
}
