@font-face {
  font-family: "Bree Serif";
  font-style: normal;
  font-weight: 400;
  src: url("assets/Bree_Serif/BreeSerif-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "League Spartan";
  font-style: normal;
  font-weight: 100 900;
  src: url("assets/League_Spartan/LeagueSpartan-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

:root {
  color: #282826;
  background: #fefefe;
  font-family: "League Spartan", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --accent: #f27a32;
  --muted: #777771;
  --page: #fefefe;
  --title-size: 84px;
  --subtitle-size: 44px;
  --body-size: 24px;
  --content-left: clamp(56px, 13vw, 220px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--page);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.calling-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
}

.portrait-layer {
  position: absolute;
  z-index: 0;
  top: 49%;
  right: -9vw;
  width: min(82vw, 1300px);
  transform: translateY(-50%);
  pointer-events: none;
}

.background-portrait {
  display: block;
  width: 100%;
  max-width: none;
  opacity: 0.62;
  user-select: none;
}

.headphones-link {
  position: absolute;
  top: 43%;
  left: 34%;
  width: 22%;
  height: 16%;
  border-radius: 45%;
  pointer-events: auto;
  cursor: pointer;
}

.headphones-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.red-panda {
  position: absolute;
  z-index: 2;
  right: 4px;
  bottom: -20px;
  display: block;
  width: clamp(75px, 9vw, 130px);
  height: auto;
  pointer-events: none;
  transform: scaleX(-1);
  user-select: none;
}

.identity {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: clamp(38px, 7.5vh, 84px) 0 0 var(--content-left);
}

.wordmark {
  display: inline-flex;
  width: max-content;
  column-gap: 0.24em;
  align-items: baseline;
  margin: 0;
  font-family: "Bree Serif", Georgia, serif;
  font-size: var(--title-size);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: nowrap;
}

.expression {
  width: auto;
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  letter-spacing: -0.08em;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transform-origin: left center;
  transition:
    transform 160ms ease,
    color 160ms ease;
}

.expression:hover,
.expression:focus-visible {
  color: #e96820;
  transform: translateY(-0.035em);
}

.expression:focus-visible {
  outline: 2px solid rgb(242 122 50 / 42%);
  outline-offset: 0.08em;
  border-radius: 0.08em;
}

.expression.is-changing {
  transform: scale(0.96, 1.04) translateY(-0.035em);
}

.expression-value {
  display: inline-block;
  transform-origin: left center;
}

.role-wrap {
  position: relative;
  width: fit-content;
  margin: clamp(14px, 1.8vh, 20px) 0 0 0.18rem;
}

.role {
  margin: 0;
  border: 0;
  padding: 0;
  color: #383835;
  background: transparent;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: var(--subtitle-size);
  font-weight: 300;
  letter-spacing: 0.025em;
  line-height: 1;
  cursor: default;
}

.role:focus-visible {
  outline: 2px solid rgb(242 122 50 / 42%);
  outline-offset: 0.14em;
  border-radius: 0.08em;
}

.engineer-easter-egg {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 20px);
  left: 0;
  width: max-content;
  border: 1px solid #d8d8d3;
  border-radius: 18px;
  padding: 15px 19px 13px;
  color: #383835;
  background: var(--page);
  box-shadow: 0 12px 28px rgb(70 50 35 / 12%);
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 15px;
  font-weight: 350;
  letter-spacing: 0.035em;
  line-height: 1.18;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: left bottom;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 180ms ease,
    visibility 0s linear 180ms;
}

.engineer-easter-egg::before {
  position: absolute;
  bottom: -8px;
  left: 27px;
  width: 15px;
  height: 15px;
  border-right: 1px solid #d8d8d3;
  border-bottom: 1px solid #d8d8d3;
  background: var(--page);
  content: "";
  transform: rotate(45deg);
}

.role-wrap:hover .engineer-easter-egg,
.role-wrap:focus-within .engineer-easter-egg {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition:
    opacity 150ms ease 2s,
    transform 180ms ease 2s,
    visibility 0s linear 2s;
}

.current-work {
  margin: clamp(14px, 1.8vh, 20px) 0 0 0.18rem;
  color: #73736d;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: var(--body-size);
  font-weight: 350;
  letter-spacing: 0.015em;
  line-height: 1.25;
}

.company {
  color: rgb(118 222 124);
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 150ms ease;
}

.company:hover,
.company:focus-visible {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.info-section {
  margin: clamp(18px, 2.4vh, 26px) 0 0 0.18rem;
  font-family: "League Spartan", Arial, sans-serif;
}

.info-section h2 {
  margin: 0 0 14px;
  color: #383835;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
}

.info-section p {
  width: min(
    calc(var(--wordmark-width, 680px) + clamp(36px, 5vw, 72px)),
    calc(100vw - var(--content-left) - 24px)
  );
  max-width: none;
  margin: 0;
  color: #73736d;
  font-size: 22px;
  font-weight: 350;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.info-section a {
  color: #4b4b47;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition:
    color 150ms ease,
    text-decoration-thickness 150ms ease;
}

.info-section a:hover,
.info-section a:focus-visible {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.footer-zone {
  position: absolute;
  z-index: 2;
  bottom: clamp(42px, 7vh, 74px);
  left: var(--content-left);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.footer-actions {
  display: flex;
  gap: clamp(8px, 0.75vw, 12px);
  align-items: center;
}

.footer-action {
  appearance: none;
  display: grid;
  border: 0;
  padding: 0;
  color: #4b4b47;
  background: transparent;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: var(--subtitle-size);
  font-weight: 350;
  letter-spacing: 0.015em;
  line-height: 1;
  text-align: left;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  cursor: pointer;
  transition: color 150ms ease;
}

.footer-action:hover,
.footer-action:focus-visible {
  color: var(--accent);
}

.footer-action:focus-visible {
  outline: 2px solid rgb(242 122 50 / 42%);
  outline-offset: 7px;
  border-radius: 2px;
}

.résumé-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
}

.resume-suffix {
  display: inline-block;
  overflow: visible;
  width: 0;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transform: translateX(-0.2em);
  white-space: nowrap;
  transition:
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.résumé-action:hover .resume-suffix,
.résumé-action:focus-visible .resume-suffix {
  width: var(--resume-suffix-width, 4em);
  clip-path: inset(0);
  opacity: 1;
  transform: translateX(0);
}

.hello-action {
  display: inline-flex;
  align-items: baseline;
}

.hello-action::after {
  margin-left: 0.28em;
  content: "→";
  opacity: 0;
  transform: translateX(-0.2em);
  transition:
    opacity 130ms ease,
    transform 150ms ease;
}

.hello-action:hover::after,
.hello-action:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 760px) {
  :root {
    --title-size: 48px;
    --subtitle-size: 30px;
    --body-size: 18px;
    --content-left: 46px;
  }

  .portrait-layer {
    top: 55%;
    right: -52vw;
    width: 150vw;
  }

  .background-portrait {
    opacity: 0.54;
  }

  .red-panda {
    right: -2px;
    bottom: -14px;
    width: clamp(60px, 19vw, 90px);
  }

  .identity {
    width: 100%;
    padding: 34px var(--content-left) 0;
  }

  .wordmark {
    font-size: var(--title-size);
  }

  .role-wrap {
    margin-top: 14px;
  }

  .role {
    font-size: var(--subtitle-size);
  }

  .engineer-easter-egg {
    font-size: 13px;
  }

  .current-work {
    max-width: 330px;
    margin-top: 13px;
    font-size: var(--body-size);
  }

  .info-section {
    margin-top: 18px;
  }

  .info-section h2 {
    margin-bottom: 12px;
    font-size: 22px;
  }

  .info-section p {
    font-size: 18px;
    line-height: 1.45;
  }

  .footer-zone {
    bottom: 40px;
    left: var(--content-left);
  }

  .footer-actions {
    gap: 8px;
  }

  .footer-action {
    font-size: var(--subtitle-size);
  }

}

@media (prefers-reduced-motion: reduce) {
  .expression,
  .engineer-easter-egg,
  .footer-action,
  .resume-suffix,
  .info-section a,
  .hello-action::after {
    transition: none;
  }
}
