.work-with-me {
  display: inline-block;
  position: relative;
}

.work-with-me-trigger {
  appearance: none;
  background: none;
  border: 0;
  color: #111;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.work-with-me-trigger::after {
  color: #d88400;
  content: "✦";
  display: inline-block;
  font-size: 0.8em;
  margin-left: 0.35rem;
  transition: transform 160ms ease;
}

.work-with-me-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg) scale(1.25);
}

.work-with-me-tooltip {
  --work-tooltip-paper: #f3f0e8;

  animation: work-with-me-pop 180ms cubic-bezier(0.2, 0.9, 0.3, 1.25);
  background: var(--work-tooltip-paper);
  border: 2px solid #111;
  box-shadow: 5px 5px 0 #111;
  box-sizing: border-box;
  color: #111;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  padding: 1rem 1.1rem;
  position: absolute;
  right: -0.25rem;
  text-align: left;
  top: calc(100% + 0.8rem);
  transform: rotate(-1.5deg);
  width: 16rem;
  z-index: 20;
}

.work-with-me-tooltip::before {
  background: var(--work-tooltip-paper);
  border-left: 2px solid #111;
  border-top: 2px solid #111;
  content: "";
  height: 0.75rem;
  position: absolute;
  right: 1.5rem;
  top: -0.48rem;
  transform: rotate(45deg);
  width: 0.75rem;
}

.work-with-me-tooltip[hidden] {
  display: none;
}

.work-with-me-tooltip a {
  color: #111;
  display: inline-block;
  margin-top: 0.55rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.work-with-me-tooltip a:hover {
  text-decoration-style: wavy;
}

.work-with-me-trigger:focus-visible,
.work-with-me-tooltip a:focus-visible {
  outline: 3px solid #d88400;
  outline-offset: 3px;
}

@keyframes work-with-me-pop {
  from {
    opacity: 0;
    transform: translateY(-0.4rem) rotate(-1.5deg) scale(0.92);
  }
}

@media (max-width: 600px) {
  .work-with-me {
    display: block;
  }

  .work-with-me-trigger {
    display: block;
    line-height: 1.5;
    padding: 5px 10px;
    text-align: right;
    width: 100%;
  }

  .work-with-me-tooltip {
    right: 0.5rem;
    top: calc(100% + 0.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-with-me-tooltip {
    animation: none;
  }
}
