:root {
  color-scheme: dark;
  --ink: #090a0f;
  --paper: #f5f5f1;
  --muted: rgba(245, 245, 241, 0.48);
  --faint: rgba(245, 245, 241, 0.13);
  --blue: #5368ff;
  --blue-bright: #7788ff;
  --max-width: 1440px;
  --page-x: clamp(20px, 4.4vw, 72px);
}

* {
  box-sizing: border-box;
  transition: all 0.3s;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 77% 34%, rgba(83, 104, 255, 0.13), transparent 25rem),
    var(--ink);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

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

::selection {
  background: var(--blue);
  color: white;
}

.page {
  width: min(100%, var(--max-width));
  min-height: 100svh;
  margin: 0 auto;
  padding-inline: var(--page-x);
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
}

.monogram {
  display: inline-flex;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.monogram span {
  margin-left: 1px;
  color: var(--blue-bright);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
}

.socials {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.socials a {
  transition: color 180ms ease;
}

.socials a:hover,
.socials a:focus-visible {
  color: var(--paper);
}

.socials span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 180ms ease;
}

.socials a:hover span,
.socials a:focus-visible span {
  transform: translate(2px, -2px);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: clamp(54px, 8vw, 130px);
  min-height: calc(100svh - 142px);
  transition:
    grid-template-columns 650ms cubic-bezier(0.22, 1, 0.36, 1),
    gap 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.primary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-block: clamp(56px, 8vh, 96px) 48px;
  transition: padding-top 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page.has-open-panel .stage {
  grid-template-columns: minmax(590px, 1.48fr) minmax(270px, 0.52fr);
  gap: clamp(38px, 5vw, 78px);
}

.page.has-open-panel .primary {
  padding-top: clamp(34px, 5vh, 60px);
}

.identity {
  animation: enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left top;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.overline {
  margin: 0 0 clamp(14px, 2vh, 22px);
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark {
  display: flex;
  margin: 0;
  flex-direction: column;
  font-size: clamp(4.4rem, 8.6vw, 8.25rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.78;
  transition:
    font-size 650ms cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 650ms cubic-bezier(0.22, 1, 0.36, 1);

  & span {
    display: inline-flex;

    & .kerning {
      &.letters-is {
        margin-right: -0.02em;
      }
      &.letters-la {
        margin-right: -0.08em;
      }
      &.letters-aw {
        margin-right: -0.06em;
      }
    }
  }

  & i {
    position: relative;
    display: inline-block;
    color: var(--blue-bright);
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0;
    text-align: center;

    &.dot {
      width: 0.24em;
      margin: 0.04em -0.09em 0;
    }
    &.slash {
      margin: -0.05em -0.14em 0 -0.15em;
      transform: rotate(-10deg);
    }
  }
}

.wordmark span:last-child {
  margin-left: -0.02em;
  white-space: nowrap;
}

.page.has-open-panel .identity {
  transform: translateY(-4px);
}

.page.has-open-panel .wordmark {
  font-size: clamp(3.8rem, 7vw, 6.45rem);
  letter-spacing: -0.025em;
}

.menu {
  --menu-trigger-width: clamp(190px, 18vw, 230px);
  container-type: inline-size;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: clamp(58px, 10vh, 120px);
  animation: enter 700ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: padding-top 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-item {
  position: relative;
  display: block;
  width: var(--menu-trigger-width);
  max-width: 100%;
  min-height: clamp(74px, 8.5vh, 88px);
  overflow: hidden;
  background: rgba(245, 245, 241, 0.045);
  transition:
    width 580ms cubic-bezier(0.22, 1, 0.36, 1),
    min-height 580ms cubic-bezier(0.22, 1, 0.36, 1),
    background 280ms ease,
    box-shadow 280ms ease;
}

.menu-item.is-open {
  width: 100%;
  min-height: 118px;
  background: rgba(83, 104, 255, 0.09);
  box-shadow: inset 4px 0 0 var(--blue);
}

.menu-item h2 {
  width: var(--menu-trigger-width);
  height: 100%;
  margin: 0;
}

.menu-trigger {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.menu-title {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  transition:
    color 240ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-toggle {
  position: relative;
  width: 22px;
  height: 22px;
}

.menu-toggle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 1px;
  background: var(--muted);
  transition:
    background 240ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translate(-50%, -50%);
}

.menu-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

.menu-trigger:hover .menu-title,
.menu-trigger:focus-visible .menu-title,
.menu-item.is-open .menu-title {
  color: var(--blue-bright);
  transform: translateX(7px);
}

.menu-trigger:hover .menu-toggle span,
.menu-trigger:focus-visible .menu-toggle span,
.menu-item.is-open .menu-toggle span {
  background: var(--blue-bright);
}

.menu-item.is-open .menu-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(0deg);
}

.menu-trigger:focus-visible {
  outline: none;
}

.menu-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--menu-trigger-width);
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
  transition:
    opacity 180ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-drawer-inner {
  display: flex;
  width: calc(100cqw - var(--menu-trigger-width));
  height: 100%;
  min-width: 0;
  flex: 0 0 calc(100cqw - var(--menu-trigger-width));
  align-items: center;
  overflow: hidden;
}

.menu-item.is-open .menu-drawer {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 390ms, 0ms;
}

.bio-copy {
  max-width: 520px;
  margin: 0;
  padding: 20px 34px 20px 26px;
  color: rgba(245, 245, 241, 0.72);
  /* font-family: Georgia, 'Times New Roman', serif; */
  /* font-size: clamp(1rem, 1.65vw, 1.35rem); */
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.48;
}

.tool-list {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 14px 22px 14px 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  list-style: none;
}

.tool-list li {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(245, 245, 241, 0.12);
  border-radius: 4px;
  background: rgba(245, 245, 241, 0.035);
  transition:
    border-color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}

.tool-list li:hover,
.tool-list li:focus-within {
  border-color: rgba(119, 136, 255, 0.72);
  background: rgba(83, 104, 255, 0.13);
  transform: translateY(-2px);
}

.tool-list a {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 11px 12px;
  transition: transform 220ms ease;
}

.tool-list span {
  padding-right: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.tool-list small {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.015em;
  line-height: 1.4;
}

.tool-list b {
  position: absolute;
  top: 10px;
  right: 11px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.tool-list a:hover b,
.tool-list a:focus-visible b {
  color: var(--blue-bright);
  transform: translate(3px, -3px);
}

.tool-list a:hover,
.tool-list a:focus-visible {
  transform: translateX(3px);
}

.page.has-open-panel .menu {
  padding-top: clamp(26px, 4vh, 50px);
}

.portrait {
  position: relative;
  isolation: isolate;
  align-self: center;
  justify-self: center;
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0;
  animation: portrait-enter 900ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: width 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page.has-open-panel .portrait {
  width: min(100%, 430px);
}

.portrait-glow {
  position: absolute;
  inset: 4% 1%;
  z-index: -1;
  filter: blur(clamp(42px, 5vw, 72px));
  opacity: 0.9;
  transform: translateZ(0);
  animation: glow-breathe 8s ease-in-out infinite alternate;
}

.glow-blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.glow-one {
  bottom: 2%;
  left: 1%;
  width: 66%;
  height: 54%;
  background: #2444ff;
  animation: glow-drift-one 5s ease-in-out infinite alternate;
}

.glow-two {
  top: 27%;
  right: 0;
  width: 52%;
  height: 53%;
  background: #7639ff;
  animation: glow-drift-two 6.5s ease-in-out infinite alternate;
}

.glow-three {
  top: 3%;
  left: 27%;
  width: 38%;
  height: 44%;
  background: #357eff;
  animation: glow-drift-two 7.21s ease-in-out -4s infinite alternate-reverse;
}

.glow-four {
  right: 16%;
  bottom: 0;
  width: 46%;
  height: 39%;
  background: #e042c6;
  animation: glow-drift-one 6.13s ease-in-out -3s infinite alternate-reverse;
}

.glow-five {
  bottom: -8%;
  left: 36%;
  width: 31%;
  height: 31%;
  background: #55b7ff;
}

.portrait-image {
  position: absolute;
  inset: 10.5%;
  overflow: hidden;
  border-radius: 50%;
  background: #1a1b20;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.42);
}

.portrait-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, transparent 43%, rgba(83, 104, 255, 0.3));
  content: '';
  mix-blend-mode: color;
  pointer-events: none;
}

.portrait-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  filter: grayscale(1) contrast(1.08);
  transform: scale(1.025);
}

footer {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  color: rgba(245, 245, 241, 0.32);
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.no-js .menu-item:hover,
.no-js .menu-item:focus-within {
  width: 100%;
}

.no-js .menu-item:hover .menu-drawer,
.no-js .menu-item:focus-within .menu-drawer {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portrait-enter {
  from {
    opacity: 0;
    transform: scale(0.94) rotate(2deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes glow-breathe {
  from {
    opacity: 0.72;
    transform: scale(0.94) translateY(4%);
  }
  to {
    opacity: 1;
    transform: scale(1.06) translateY(-2%);
  }
}

@keyframes glow-drift-one {
  from {
    transform: translate(-10%, 10%) scale(0.84);
  }
  to {
    transform: translate(18%, -14%) scale(1.24);
  }
}

@keyframes glow-drift-two {
  from {
    transform: translate(16%, -8%) scale(1.16);
  }
  to {
    transform: translate(-16%, 16%) scale(0.8);
  }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    gap: 42px;
  }

  .page.has-open-panel .stage {
    grid-template-columns: minmax(490px, 1fr) minmax(230px, 0.48fr);
    gap: 28px;
  }

  .wordmark {
    font-size: clamp(4.15rem, 9.5vw, 6.2rem);
  }

  .menu {
    --menu-trigger-width: 174px;
  }

  .menu-trigger {
    padding-inline: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tool-list {
    gap: 10px;
    padding-right: 14px;
  }

  .tool-list span {
    font-size: 0.68rem;
  }

  .tool-list small {
    font-size: 0.57rem;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 66px;
  }

  .socials {
    gap: 16px;
    font-size: 0.58rem;
  }

  .stage {
    display: flex;
    min-height: auto;
    flex-direction: column;
    gap: 54px;
  }

  .page.has-open-panel .stage {
    gap: 34px;
  }

  .primary {
    display: contents;
  }

  .identity {
    order: 1;
    padding-top: 58px;
  }

  .page.has-open-panel .identity {
    padding-top: 34px;
    transform: none;
  }

  .wordmark {
    font-size: clamp(3.7rem, 17.5vw, 5.3rem);
    line-height: 0.8;
  }

  .page.has-open-panel .wordmark {
    font-size: clamp(3.1rem, 14.5vw, 4.5rem);
  }

  .portrait {
    order: 2;
    width: min(88vw, 420px);
  }

  .page.has-open-panel .portrait {
    width: min(72vw, 330px);
  }

  .menu {
    --menu-trigger-width: 112px;
    order: 3;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .menu-trigger {
    min-height: 72px;
    padding-inline: 12px;
    grid-template-columns: 1fr auto;
  }

  .menu-number {
    display: none;
  }

  .menu-title {
    font-size: 1.16rem;
    letter-spacing: 0.01em;
  }

  .menu-item.is-open {
    min-height: 124px;
  }

  .menu-item:last-child.is-open {
    min-height: 208px;
  }

  .bio-copy {
    padding: 16px 18px;
    font-size: 1rem;
  }

  .tool-list {
    padding: 13px 14px;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .tool-list a {
    gap: 3px;
    padding: 7px 9px;
  }

  .tool-list span {
    font-size: 0.7rem;
  }

  .tool-list small {
    font-size: 0.57rem;
  }

  .tool-list b {
    top: 7px;
    right: 8px;
  }

  footer {
    margin-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    /* animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; */
  }
}
