/* Final content hierarchy and portrait composition. */
.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 560px;
}
.hero h1 {
  line-height: 1.03;
  letter-spacing: -5px;
}
.hero .lead {
  max-width: 425px;
  line-height: 1.8;
}
.hero-bottom {
  position: relative;
  z-index: 3;
}
.portrait-frame {
  position: absolute;
  right: 4.4%;
  bottom: clamp(112px, 17vh, 175px);
  width: min(44vw, 670px);
  margin: 0;
  z-index: 2;
  pointer-events: none;
  perspective: 900px;
}
.portrait-parallax {
  transform: translate3d(var(--portrait-x, 0px), var(--portrait-y, 0px), 0)
    rotateY(var(--portrait-yaw, 0deg));
  transition: transform 700ms ease-out;
}
.portrait-float {
  animation: portrait-float 8s ease-in-out infinite;
}
.portrait-image {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: url('./assets/portrait-mask.svg');
  mask-image: url('./assets/portrait-mask.svg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.portrait-parallax {
  -webkit-mask-image: linear-gradient(#000 0 91%, transparent 100%);
  mask-image: linear-gradient(#000 0 91%, transparent 100%);
}
.scene.portrait-backdrop {
  opacity: 0.33;
}
.motion-paused .portrait-float {
  animation-play-state: paused;
}
.project-copy {
  max-width: 535px;
}
.project h2 {
  font-size: clamp(40px, 4.05vw, 66px);
  line-height: 1.14;
  letter-spacing: -2px;
  text-wrap: balance;
}
.project-subtitle {
  max-width: 465px;
  line-height: 1.5;
  margin-top: 25px;
  font-size: 17px;
}
.description {
  max-width: 465px;
  font-size: 16px;
  line-height: 1.85;
}
.project-facts {
  margin-top: 29px;
}
.tags {
  margin-top: 23px;
}
.project-kicker {
  margin-bottom: 24px;
}
.skills h2 {
  max-width: 560px;
  line-height: 1.13;
}
.skill-tabs strong {
  font-size: 19px;
  line-height: 1.35;
}
.about h2 {
  font-size: clamp(34px, 3.5vw, 56px);
  line-height: 1.2;
  letter-spacing: -1.7px;
}
.about-lead {
  font-size: 23px;
  line-height: 1.6;
}
.contact h2 {
  font-size: clamp(65px, 7.8vw, 126px);
}
html[dir='rtl'] .portrait-frame {
  left: 4.4%;
  right: auto;
}
html[dir='rtl'] .hero h1 {
  line-height: 1.25;
}
html[dir='rtl'] .project h2 {
  font-size: clamp(36px, 3.8vw, 62px);
  line-height: 1.5;
}
html[dir='rtl'] .about h2 {
  line-height: 1.5;
}
@keyframes portrait-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  .project-copy {
    max-width: 46vw;
  }
  .project h2 {
    font-size: 44px;
  }
  .hero-copy {
    max-width: 48vw;
  }
  .hero h1 {
    font-size: 92px;
  }
  .portrait-frame {
    width: 47vw;
    right: 1.5%;
    bottom: 150px;
  }
  .skill-tabs strong {
    font-size: 17px;
  }
  html[dir='rtl'] .portrait-frame {
    left: 1.5%;
  }
}
@media (max-width: 700px) {
  .hero {
    height: auto;
    min-height: 1060px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero h1 {
    font-size: clamp(64px, 16vw, 100px);
    line-height: 1.07;
    letter-spacing: -3px;
  }
  .hero .lead {
    max-width: 360px;
    font-size: 16px;
  }
  .portrait-frame {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 430px);
    align-self: center;
    margin: -15px 0 -16px;
  }
  .hero-bottom {
    padding-top: 12px;
    width: 100%;
  }
  .project-copy {
    max-width: 100%;
  }
  .project h2 {
    font-size: clamp(36px, 9.3vw, 58px);
    line-height: 1.2;
    letter-spacing: -1.6px;
  }
  .project-subtitle {
    font-size: 16px;
    line-height: 1.65;
    margin-top: 20px;
  }
  .description {
    line-height: 1.85;
  }
  .skills h2 {
    font-size: 44px;
  }
  .skill-tabs strong {
    font-size: 17px;
  }
  .about h2 {
    font-size: 36px;
    line-height: 1.3;
  }
  .about-lead {
    font-size: 21px;
  }
  html[dir='rtl'] .hero {
    min-height: 1080px;
  }
  html[dir='rtl'] .hero h1 {
    font-size: 70px;
    line-height: 1.4;
  }
  html[dir='rtl'] .portrait-frame {
    left: auto;
    right: auto;
  }
  html[dir='rtl'] .project h2 {
    font-size: clamp(33px, 8vw, 53px);
    line-height: 1.5;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portrait-float {
    animation: none;
  }
  .portrait-parallax {
    transform: none;
    transition: none;
  }
}

/* Language routes are real crawlable links (/ and /fa/) rather than JS-only state. */
a.language-toggle {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
