/* Anton "PORTFOLIO" advance ratio at line-height 0.8, letter-spacing 0: ~3.82625 (measured in browser) */
:root {
  --portfolio-k: 3.84;
  --footer-word-k: 5.72;
}

.hl {
  color: var(--accent);
}

#hero {
  position: relative;
  padding-block: var(--space-4);
  overflow-x: clip;
  max-inline-size: 100%;
  isolation: isolate;
}

.hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-block-end: var(--space-5);
}

.hero__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status .dot,
.motion-toggle .dot {
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}

.hero__stage {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
}

@media (max-width: 899px) {
  .hero__stage {
    gap: 0;
  }
}

.hero__intro {
  position: relative;
  z-index: 3;
  min-inline-size: 0;
  order: 2;
}

.hero__hello {
  margin: 0 0 var(--space-2);
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 1.5rem + 1.5vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  transform: rotate(-4deg);
  transform-origin: left center;
}

.hero__name {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 8vw, 7rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--text);
}

#hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  text-transform: uppercase;
  margin-block-end: var(--space-3);
  color: var(--text);
}

#hero-title .hl {
  color: var(--accent);
}

.hero__lead {
  margin-block-end: var(--space-4);
  color: var(--muted);
  max-inline-size: 36rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__btn-secondary {
  border-color: rgb(255 255 255 / 0.35);
  color: var(--text);
}

.hero__poster {
  position: relative;
  order: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  inline-size: 100%;
  min-block-size: min(62svh, 560px);
  z-index: 1;
}

.hero__word-wrap {
  container-type: inline-size;
  inline-size: 100%;
  overflow: hidden;
  z-index: 0;
  order: 0;
}

.hero__word {
  inline-size: max-content;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: calc(100cqi / var(--portfolio-k));
  line-height: 0.8;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(var(--accent-rgb) / 0.12);
  background: linear-gradient(
    to bottom,
    rgb(var(--accent-rgb) / 0.85) 0%,
    rgb(var(--accent-rgb) / 0.35) 45%,
    transparent 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  user-select: none;
}

.hero__figure {
  position: relative;
  z-index: 2;
  inline-size: auto;
  max-inline-size: 100%;
  margin-inline: auto;
  margin-block-start: 0;
  flex-shrink: 0;
}

.hero__figure picture {
  display: block;
  inline-size: auto;
}

.hero__figure img {
  display: block;
  block-size: auto;
  inline-size: auto;
  max-inline-size: min(100%, 720px);
  max-block-size: min(62svh, 560px);
  height: auto;
  aspect-ratio: 1200 / 1538;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

.stats {
  order: 3;
  list-style: none;
  padding: 0;
  margin: 0;
  max-inline-size: 100%;
  position: relative;
  z-index: 3;
}

.stats li {
  display: grid;
  grid-template-columns: minmax(3.5rem, auto) minmax(0, 1fr);
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  align-items: baseline;
  padding-block: var(--space-4);
  border-block-start: 1px solid rgb(255 255 255 / 0.12);
  min-inline-size: 0;
}

.stats li:first-child {
  border-block-start: none;
  padding-block-start: 0;
}

.stats strong {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem);
  color: var(--accent);
  line-height: 1;
}

.stats__label {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats li > :not(strong):not(small):not(.stats__label) {
  display: none;
}

.stats small {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}

.hero__rail {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-block-start: var(--space-6);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid rgb(255 255 255 / 0.1);
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: auto;
}

.hero__rail-link {
  color: inherit;
  text-decoration: none;
}

.hero__rail-link:hover {
  color: var(--text);
}

.hero__rail-center {
  text-align: center;
}

.hero__rail-right {
  text-align: end;
}

@media (max-width: 599px) {
  .stats {
    margin-block-start: 1.5rem;
  }
}

@media (max-width: 899px) {
  .hero__intro {
    order: 3;
    margin-block-start: clamp(0.5rem, 2.5vw, 2rem);
  }

  .hero__word-wrap {
    order: 1;
  }

  .hero__poster {
    position: relative;
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    min-block-size: 0;
    overflow-x: clip;
    margin-block-start: calc(-1 * clamp(1.75rem, 12vw, 4rem));
    padding-block-end: 0;
    margin-block-end: 0;
  }

  .hero__figure {
    position: relative;
    inset: unset;
    translate: none;
    inline-size: 106%;
    max-inline-size: 106%;
    margin-inline: auto;
    margin-block-end: 0;
  }

  .hero__figure img {
    inline-size: 100%;
    width: 100%;
    height: auto;
    max-block-size: none;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .hero__figure {
    inline-size: 70%;
    max-inline-size: 70%;
  }

  .hero__intro {
    margin-block-start: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero__figure img {
    inline-size: 100%;
    width: 100%;
  }
}

@media (min-width: 900px) {
  #hero {
    padding-block: var(--space-1) var(--space-1);
    max-block-size: none;
    --hero-viewport-chrome: 10.5rem;
  }

  .hero__top {
    margin-block-end: var(--space-1);
  }

  .hero__stage {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-block-size: 0;
    block-size: calc(100svh - var(--hero-viewport-chrome));
    max-block-size: calc(100svh - var(--hero-viewport-chrome));
    position: relative;
  }

  .hero__word-wrap {
    order: unset;
    grid-column: 1;
    grid-row: 1;
  }

  .hero__poster {
    order: unset;
    grid-column: 1;
    grid-row: 2;
    position: relative;
    display: block;
    min-block-size: 0;
    align-self: stretch;
    block-size: 100%;
    max-block-size: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
  }

  .hero__figure {
    position: absolute;
    inset-inline-start: 50%;
    inset-block-end: 0;
    translate: -50% clamp(4rem, 8vh, 6rem);
    pointer-events: none;
    margin: 0;
    z-index: 2;
  }

  .hero__figure img {
    inline-size: clamp(720px, 92vw, 1180px);
    block-size: clamp(520px, 58svh, 920px);
    width: clamp(720px, 92vw, 1180px);
    height: clamp(520px, 58svh, 920px);
    max-block-size: none;
    max-inline-size: none;
    object-fit: contain;
    object-position: bottom center;
  }

  .hero__intro {
    position: absolute;
    inset-inline-start: clamp(0.75rem, 3vw, 12rem);
    inset-block-end: 0;
    z-index: 8;
    max-inline-size: clamp(15rem, 24vw, 38rem);
    padding-block-end: var(--space-1);
    margin: 0;
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    overflow-x: clip;
    overflow-y: visible;
  }

  .hero__hello {
    font-size: clamp(1.35rem, calc(1.35rem + (100vw - 80rem) * 0.04), 3rem);
    margin-block-end: 0.125rem;
  }

  .hero__name {
    font-size: clamp(2.75rem, calc(2.75rem + (100vw - 80rem) * 0.075), 7.5rem);
    margin-block-end: 0.125rem;
  }

  #hero-title {
    font-size: clamp(1.25rem, calc(1.25rem + (100vw - 80rem) * 0.06), 4.5rem);
    margin-block-end: var(--space-1);
  }

  .hero__lead {
    font-size: clamp(1.0625rem, calc(0.7rem + 0.37vw), 1.25rem);
    margin-block-end: var(--space-2);
    line-height: 1.4;
  }

  .hero__actions {
    flex-wrap: wrap;
    gap: var(--space-1);
    align-items: center;
    margin-block-end: 0;
  }

  .hero__actions .btn {
    scroll-margin-top: 5rem;
    min-block-size: clamp(3rem, 2.75rem + 0.25vw, 3.5rem);
  }

  .hero__btn-secondary {
    font-size: 0.8125rem;
    padding-block: 0.65rem;
    padding-inline: 1rem;
    min-block-size: 2.75rem;
  }

  .stats {
    order: unset;
    position: absolute;
    inset-inline-end: clamp(0.75rem, 3vw, 12rem);
    inset-block-end: 0;
    z-index: 8;
    inline-size: auto;
    max-inline-size: clamp(16rem, 22vw, 32rem);
    padding-block-end: var(--space-1);
    margin: 0;
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    justify-self: unset;
  }

  .stats li {
    padding-block: var(--space-3);
  }

  .stats strong {
    font-size: clamp(2.875rem, calc(2.875rem + (100vw - 80rem) * 0.075), 7.5rem);
  }

  .stats__label {
    font-size: clamp(0.875rem, 0.8125rem + 0.12vw, 1.0625rem);
  }

  .hero__stage {
    overflow: clip;
  }

  .hero__rail {
    grid-column: 1 / -1;
    margin-block-start: var(--space-2);
    padding-block-start: var(--space-2);
  }
}

@media (min-width: 900px) and (min-height: 961px) {
  #hero {
    --hero-viewport-chrome: 10.25rem;
  }

  .hero__figure {
    translate: -50% clamp(3.25rem, 4.75vh, 5rem);
  }

  .hero__figure img {
    inline-size: clamp(1000px, 94vw, 1320px);
    block-size: clamp(820px, 62svh, 980px);
    width: clamp(1000px, 94vw, 1320px);
    height: clamp(820px, 62svh, 980px);
  }
}

@media (min-width: 1500px) and (min-height: 840px) and (max-height: 899px) {
  .hero__figure {
    translate: -50% clamp(4.65rem, 7.85vh, 6.15rem);
  }

  .hero__figure img {
    inline-size: clamp(980px, 92vw, 1180px);
    block-size: clamp(760px, 58svh, 840px);
    width: clamp(980px, 92vw, 1180px);
    height: clamp(760px, 58svh, 840px);
  }
}

@media (min-width: 900px) and (max-width: 1599px) and (min-height: 901px) {
  .hero__intro {
    max-inline-size: min(14.75rem, 20vw);
    inset-inline-start: clamp(0.5rem, 1.5vw, 2rem);
  }

  .stats {
    max-inline-size: min(16.5rem, 20vw);
    inset-inline-end: clamp(0.5rem, 1.5vw, 2rem);
  }
}

@media (min-width: 900px) and (max-height: 900px) and (max-width: 1439px) {
  .hero__name {
    font-size: clamp(2.5rem, calc(2.5rem + (100vw - 64rem) * 0.048), 3.35rem);
    line-height: 0.88;
  }

  #hero-title {
    font-size: clamp(0.85rem, calc(0.85rem + (100vw - 64rem) * 0.022), 1.125rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hero__intro {
    max-inline-size: min(14rem, 16.5vw);
    min-inline-size: 0;
  }
}

@media (min-width: 900px) and (max-height: 900px) {
  .stats {
    max-block-size: min(15.5rem, 40svh);
  }

  .stats li {
    padding-block: 0.4rem;
  }

  .stats strong {
    font-size: clamp(2rem, calc(2rem + (100vw - 64rem) * 0.05), 3rem);
  }

  .stats small {
    display: none;
  }

  .stats__label {
    font-size: 0.75rem;
    line-height: 1.25;
  }
}

@media (min-width: 900px) and (max-height: 768px) {
  #hero {
    --hero-viewport-chrome: 11.25rem;
  }

  .hero__figure {
    inset-inline-start: 50%;
    translate: -50% clamp(2rem, 5vh, 3.25rem);
  }

  .hero__figure img {
    inline-size: clamp(360px, 52vw, 440px);
    block-size: clamp(280px, 38svh, 340px);
    width: clamp(360px, 52vw, 440px);
    height: clamp(280px, 38svh, 340px);
  }

  .hero__intro {
    max-inline-size: min(calc(100% - 2rem), 7.25rem);
    inset-inline-start: 0;
    min-inline-size: 0;
    padding-block-start: clamp(0.5rem, 2vh, 1rem);
  }

  .hero__name {
    margin-block-end: 0.125rem;
    font-size: clamp(1.65rem, calc(1.65rem + (100vw - 64rem) * 0.03), 2rem);
  }

  #hero-title {
    margin-block-end: 0.125rem;
    font-size: clamp(0.8rem, calc(0.8rem + (100vw - 64rem) * 0.018), 1rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hero__actions {
    gap: var(--space-1);
  }

  .stats {
    max-inline-size: 8.75rem;
    inset-inline-end: 0.25rem;
    max-block-size: min(11.5rem, 34svh);
    align-self: end;
  }

  .stats li {
    padding-block: 0.25rem;
  }

  .stats strong {
    font-size: clamp(1.45rem, calc(1.45rem + (100vw - 48rem) * 0.035), 1.85rem);
  }

  .stats__label {
    font-size: 0.75rem;
  }
}

@media (min-width: 1200px) and (min-height: 901px) {
  .hero__intro {
    min-inline-size: min(100%, 25rem);
  }
}

@media (min-width: 900px) and (max-height: 960px) {
  #hero {
    --hero-viewport-chrome: 10.75rem;
  }

  .hero__lead {
    display: none;
  }

  .hero__name {
    margin-block-end: 0.0625rem;
  }

  #hero-title {
    margin-block-end: 0.0625rem;
  }

  .hero__actions .btn {
    padding-block: 0.55rem;
    min-block-size: 2.5rem;
  }

  .hero__actions {
    gap: 0.375rem;
  }

  .hero__figure {
    translate: -50% clamp(8.25rem, 12vh, 10.25rem);
  }

  .hero__figure img {
    block-size: clamp(680px, 56svh, 720px);
    height: clamp(680px, 56svh, 720px);
  }
}

@media (min-width: 900px) and (max-height: 960px) and (min-width: 1400px) {
  .hero__figure {
    translate: -50% clamp(6.25rem, 9vh, 8.25rem);
  }
}

@media (min-width: 900px) and (max-height: 860px) {
  #hero {
    --hero-viewport-chrome: 11rem;
  }

  .hero__hello {
    display: none;
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .hero__intro {
    max-inline-size: min(100%, 21.25rem);
  }

  .stats {
    max-inline-size: 16.25rem;
  }
}

@media (min-width: 900px) and (min-height: 961px) and (min-width: 1280px) {
  .hero__intro {
    inset-inline-start: clamp(1rem, 2.5vw, 8rem);
  }

  .stats {
    inset-inline-end: clamp(1rem, 2.5vw, 8rem);
  }
}

@media (min-width: 900px) and (min-height: 961px) and (min-width: 1440px) {
  .hero__intro {
    inset-inline-start: clamp(1.25rem, 3vw, 9rem);
  }

  .stats {
    inset-inline-end: clamp(1.25rem, 3vw, 9rem);
  }
}

@media (min-width: 900px) and (min-height: 961px) and (min-width: 1600px) {
  .hero__intro {
    inset-inline-start: clamp(1.5rem, 3.5vw, 10rem);
  }

  .stats {
    inset-inline-end: clamp(1.5rem, 3.5vw, 10rem);
  }
}

@media (min-width: 900px) and (min-height: 961px) and (min-width: 1920px) {
  .hero__intro {
    inset-inline-start: clamp(4rem, 7vw, 9.5rem);
    max-inline-size: min(25vw, 32rem);
    min-inline-size: min(100%, 27rem);
    padding-block-start: 0;
  }

  .stats {
    inset-inline-end: clamp(4rem, 7vw, 9.5rem);
    max-inline-size: min(18vw, 22rem);
  }

  .hero__hello {
    font-size: clamp(2.25rem, 2vw, 3rem);
    margin-block-end: 0;
    line-height: 1;
  }

  .hero__name {
    line-height: 0.85;
    margin-block-end: 0;
  }

  #hero-title {
    line-height: 0.95;
    margin-block-end: 0.125rem;
  }

  .hero__lead {
    margin-block-end: 0.25rem;
    line-height: 1.3;
  }

  .hero__actions {
    gap: 0.25rem;
  }

  .stats small {
    display: none;
  }

  .stats li {
    padding-block: var(--space-2);
    row-gap: 0;
  }
}

@media (min-width: 900px) and (min-height: 961px) and (min-width: 2560px) {
  .hero__intro {
    inset-inline-start: clamp(2rem, 3vw, 5rem);
    max-inline-size: min(24vw, 44rem);
  }

  .stats {
    inset-inline-end: clamp(2rem, 3vw, 5rem);
    max-inline-size: min(18vw, 32rem);
  }
}

@media (max-width: 599px) {
  .hero__intro {
    margin-block-start: clamp(1.25rem, 5vw, 2rem);
  }

  .hero__poster {
    margin-block-start: calc(-1 * clamp(1.25rem, 10vw, 3rem));
  }

  .hero__rail {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__rail-right,
  .hero__rail-link {
    text-align: center;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .hero__poster {
    min-block-size: min(52svh, 320px);
  }

  .hero__figure img {
    max-block-size: min(52svh, 320px);
  }

  #hero-title {
    font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  }

  .hero__name {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
