.portfolio-footer {
  --paper: #fbfaf7;
  --ink: #111111;
  --muted: #6f6c66;
  --page-gutter: clamp(20px, 4vw, 68px);
  position: relative;
  display: block;
  align-items: center;
  width: 100%;
  min-height: clamp(540px, 78svh, 820px);
  padding-top: clamp(56px, 7svh, 96px);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right));
  padding-bottom: max(28px, calc(20px + env(safe-area-inset-bottom)));
  background: var(--paper);
  color: var(--ink);
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: calc(clamp(540px, 78svh, 820px) - clamp(84px, 10svh, 132px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 6svh, 68px);
}

.footer-editorial {
  align-items: center;
  width: 100%;
  max-width: 1020px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 1.45fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
}

.footer-editorial h2 {
  align-self: start;
  font-size: clamp(40px, 5.6vw, 84px);
  font-weight: 700;
  letter-spacing: -.08em;
  word-spacing: -.06em;
  line-height: .96;
  text-align: right;
  text-wrap: balance;
  transform: scaleX(.88);
  transform-origin: right center;
  filter: url(#ink-bleed);
}

.footer-editorial h2 > span {
  display: block;
}
.footer-editorial h2 > span + span {
  margin-top: .2em;
}

.footer-contact {
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -.045em;
  word-spacing: -.05em;
  filter: url(#ink-bleed-xs);
}

.footer-contact > p .ink-line {
  display: inline-block;
}

.footer-contact > div {
  margin-top: clamp(20px, 4svh, 40px);
}

.footer-contact > div > span {
  display: block;
  color: var(--muted);
}

.footer-email {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.portfolio-footer a {
  color: inherit;
  text-decoration: none;
}

.footer-email a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding-block: 8px;
  text-decoration: none;
}

.footer-email .email-label,
.footer-shelf-link .email-label {
  position: relative;
  display: inline-block;
}

.footer-shelf-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 8px;
  text-decoration: none;
}

.footer-shelf-link[aria-current="page"] {
  color: var(--muted);
}

.footer-email .email-glyph,
.footer-shelf-link .email-glyph {
  display: inline-block;
}

.footer-email .email-label::before,
.footer-email .email-label::after,
.footer-shelf-link .email-label::before,
.footer-shelf-link .email-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1.5px;
  background: currentColor;
  pointer-events: none;
}

.footer-email .email-label::before,
.footer-shelf-link .email-label::before {
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform .28s cubic-bezier(.42, 0, .2, 1) .1s;
}

.footer-email .email-label::after,
.footer-shelf-link .email-label::after {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .24s cubic-bezier(.42, 0, .2, 1) 0s;
}

.footer-email a:hover .email-label::before,
.footer-email a:focus-visible .email-label::before,
.footer-shelf-link:hover .email-label::before,
.footer-shelf-link:focus-visible .email-label::before {
  transform: scaleX(0);
  transition-delay: 0s;
}

.footer-email a:hover .email-label::after,
.footer-email a:focus-visible .email-label::after,
.footer-shelf-link:hover .email-label::after,
.footer-shelf-link:focus-visible .email-label::after {
  transform: scaleX(1);
  transition: transform .4s cubic-bezier(.22, .88, .24, 1) .12s;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer-social a {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(56px, 7svh, 80px);
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ink);
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  transition: color .32s cubic-bezier(.34, 0, .14, 1), transform .42s cubic-bezier(.22, .88, .24, 1);
}

.footer-social a::before {
  content: "";
  position: absolute;
  left: var(--ink-x, 50%);
  top: var(--ink-y, 50%);
  width: 250%;
  height: 250%;
  background: var(--ink);
  border-radius: 44% 56% 52% 48% / 48% 44% 56% 52%;
  transform: translate(-50%, -50%) scale(0) rotate(0deg);
  transition: transform .52s cubic-bezier(.34, 0, .14, 1);
  z-index: 0;
  pointer-events: none;
}

.footer-social .social-label {
  position: relative;
  z-index: 1;
  filter: url(#ink-bleed-xs);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: #ffffff;
  transform: scale(1.04);
}

.footer-social a:hover::before,
.footer-social a:focus-visible::before {
  transform: translate(-50%, -50%) scale(1) rotate(28deg);
}

.footer-social a:active {
  transform: scale(.97);
}

.footer-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.5svh, 28px);
}

.footer-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(44px, 9.2vw, 138px);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.08em;
  word-spacing: -.06em;
  transform: scaleX(.88);
  transform-origin: center;
  filter: url(#ink-bleed);
  text-align: center;
}

.footer-bottom {
  align-items: center;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: clamp(12px, .95vw, 15px);
  font-weight: 600;
  letter-spacing: -.04em;
  filter: url(#ink-bleed-xs);
}

@media (max-width: 639px) {
  .footer-editorial {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-editorial h2 {
    order: -1;
    justify-self: end;
    font-size: clamp(36px, 10.2vw, 60px);
  }
  .footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px 24px;
  }
  .footer-contact > p .ink-line {
  display: inline-block;
}

.footer-contact > div {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-email .email-label::before,
  .footer-email .email-label::after,
  .footer-shelf-link .email-label::before,
  .footer-shelf-link .email-label::after,
  .footer-social a,
  .footer-social a::before {
    transition: none;
  }
  .footer-social a:hover,
  .footer-social a:focus-visible,
  .footer-social a:active {
    transform: none;
  }
}
