/* The portrait and backdrop share the existing pointer/scroll motion container. */
@font-face {
  font-family: 'Portfolio Handwriting';
  src: url('assets/fonts/NothingYouCouldDo.ttf') format('truetype');
  font-style: normal; font-weight: 400; font-display: swap;
}
.site-header {
  position: relative; z-index: 5; height: 72px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px;
}
.site-header nav { justify-self: center; margin: 0; gap: 36px; }
.site-header .download { justify-self: end; }
.hero:has(.portrait-art) {
  border-bottom: 1px solid transparent; min-height: clamp(500px, 40vw, 620px);
  padding-top: 36px; grid-template-columns: 1.08fr 1fr;
}
.hero:has(.portrait-art) h1 { font-size: clamp(135px, 14vw, 200px); line-height: 1.06; }
.hero:has(.portrait-art) .hero-role { font-size: clamp(23px, 2.35vw, 34px); }
.hero:has(.portrait-art) .hero-line { font-size: 23px; margin-top: 12px; }
.hero:has(.portrait-art) .hero-intro { font-size: 14px; line-height: 1.8; max-width: 465px; margin-top: 14px; }
.hero-signature {
  position: absolute; z-index: 2; right: -6px; bottom: 58px; width: 165px;
  color: var(--blue); font-family: 'Portfolio Handwriting', cursive;
  font-size: clamp(28px, 2.55vw, 36px); line-height: 1.08;
  font-weight: 400; letter-spacing: -.7px; text-align: center;
  rotate: -12deg; transform: skewX(-8deg); pointer-events: none;
}
.hero-signature > span { display: block; }
.hero-signature > span:nth-child(2) { margin-left: 16px; }
.hero-signature > span:nth-child(3) { margin-left: 42px; }
.hero-signature .signature-stroke {
  display: block; width: 145px; height: 29px; margin: -2px 0 0 25px;
  stroke-width: 1.3; overflow: visible;
}
.hero:has(.portrait-art)::after {
  content: ''; position: absolute; bottom: 0; left: -56px; right: -56px;
  border-bottom: 1px solid var(--line); pointer-events: none;
}
.hero:has(.portrait-art) .hero-foot {
  grid-column: 1; grid-row: 2; border-bottom: 0;
  justify-content: flex-start; gap: clamp(28px, 5vw, 70px);
  margin-top: 16px; padding-block: 23px 25px;
}
.hero .portrait-art {
  grid-column: 2; grid-row: 1 / 3; align-self: stretch;
  height: auto; min-height: 0; margin-top: -108px;
  transform: translateX(var(--pointer-x)); transform-origin: center bottom;
}
/* Keep the cutout grounded on the divider during both hover and scroll. */
.scroll-directed .hero .portrait-art {
  transform: translateX(var(--pointer-x)) scale(var(--art-scale, 1));
  transform-origin: center bottom;
}
.portrait-art .portrait-backdrop {
  position: absolute; width: min(26vw, 340px); top: 65px; right: -4px;
  transform: none; box-shadow: none; animation: none; z-index: 0;
}
.portrait-backdrop::before { display: none; }
.hero-portrait {
  position: absolute; height: 100%; width: 112%; max-width: none;
  object-fit: contain; object-position: center bottom; bottom: 0; left: -28%;
  z-index: 1; display: block; pointer-events: none;
  animation: portrait-enter 1s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes portrait-enter { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1100px) and (min-width: 761px) {
  .hero:has(.portrait-art)::after { left: -32px; right: -32px; }
  .site-header nav { gap: 24px; }
  .hero:has(.portrait-art) .hero-line { font-size: 21px; }
  .hero:has(.portrait-art) .hero-intro { max-width: 360px; }
  .hero-signature { font-size: 25px; width: 125px; right: -5px; bottom: 49px; }
  .hero-signature .signature-stroke { width: 110px; margin-left: 18px; }
  .hero-portrait { left: -37%; }
  .portrait-art .portrait-backdrop { width: 26vw; top: 65px; }
}
@media (max-width: 760px) {
  .site-header { display: flex; height: auto; min-height: 94px; gap: 0; }
  .site-header nav { margin-top: 16px; gap: 20px; }
  .hero:has(.portrait-art) { min-height: 0; padding-top: 31px; grid-template-columns: 1fr; }
  .hero:has(.portrait-art) h1 { font-size: clamp(115px, 31vw, 170px); line-height: 1.2; }
  .hero:has(.portrait-art) .hero-role { font-size: clamp(20px, 5vw, 27px); }
  .hero:has(.portrait-art) .hero-line { font-size: 23px; margin-top: 16px; }
  .hero-signature { font-size: 25px; width: 125px; right: -5px; bottom: 27px; }
  .hero-signature .signature-stroke { width: 108px; height: 24px; margin-left: 18px; }
  .hero:has(.portrait-art)::after { left: -20px; right: -20px; }
  .hero .portrait-art {
    grid-column: 1; grid-row: 3; height: 400px; min-height: 0;
    margin: 10px auto 0; width: 100%; max-width: 400px;
  }
  .portrait-art .portrait-backdrop { width: 235px; top: 28px; right: 0; }
  .hero-portrait { width: 100%; left: -29%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-portrait { animation: none; }
  .scroll-directed .hero .portrait-art { transform: none; }
}
