:root {
  --page-bg: #f2efed;
  --card-bg: #ffffff;
  --ink: #080c0d;
  --muted: #aaaaaa;
  --divider: #d5d5d5;
  --available: #40c770;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: "Manrope", Arial, sans-serif;
}

.mobile-page {
  width: min(100%, 402px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 41px 11px 80px;
  background: var(--page-bg);
}

.profile-card-scene {
  width: 370px;
  max-width: 100%;
  height: 542px;
  min-height: 542px;
  margin: 0 auto;
  perspective: 1200px;
}

.profile-card-motion,
.profile-card-twitch {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  transform-style: preserve-3d;
}

.profile-card-motion {
  will-change: transform;
}

.profile-card-motion.is-motion-paused {
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1) !important;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.profile-card-twitch.is-twitching {
  animation: cardHeadShake 320ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.profile-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-card.is-flipped {
  transform: rotateY(180deg);
}

.profile-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 81px 31px 24px;
  flex-direction: column;
  align-items: center;
  border-radius: 24px;
  background: color-mix(in srgb, var(--card-bg) 90%, transparent);
  backface-visibility: hidden;
}

.profile-card-front {
  pointer-events: auto;
}

.profile-card-back {
  justify-content: center;
  pointer-events: none;
  transform: rotateY(180deg);
}

.profile-card.is-flipped .profile-card-front {
  pointer-events: none;
}

.profile-card.is-flipped .profile-card-back {
  pointer-events: auto;
}

.profile-card.is-flipped .status-value span::after {
  animation: none;
  opacity: 0;
}

.speaker-slot {
  position: absolute;
  top: 23px;
  left: calc(50% - 2px);
  width: 106px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--page-bg);
}

.avatar {
  display: block;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
}

.identity {
  width: 100%;
  margin-top: 26px;
  text-align: center;
}

.identity h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 34px;
  letter-spacing: 0;
}

.identity p {
  margin: 6px 0 0;
  color: #0a0d0d;
  font-size: 20px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: 0;
}

.contact-button {
  border: 0;
  display: inline-flex;
  width: 182px;
  height: 50px;
  margin-top: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.contact-button:focus-visible,
.back-button:focus-visible,
.email-link:focus-visible {
  outline: 3px solid rgba(64, 199, 112, 0.45);
  outline-offset: 4px;
}

.meta-grid {
  display: grid;
  width: 100%;
  margin: auto 0 0;
  grid-template-columns: 142px 1fr;
  column-gap: 22px;
}

.meta-block {
  min-width: 0;
  margin: 0;
  text-transform: uppercase;
}

.meta-block dt,
.meta-block dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.48px;
}

.meta-block dt {
  margin-bottom: 5px;
  color: var(--muted);
  text-align: center;
}

.meta-block dd {
  color: var(--ink);
}

.meta-block:last-child dd {
  text-align: center;
}

.meta-block .status-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--available);
  white-space: nowrap;
}

.meta-block .status-value span {
  position: relative;
  z-index: 0;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--available);
}

.meta-block .status-value span::after {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: var(--available);
  content: "";
  opacity: 0.22;
  transform: scale(0.65);
  z-index: -1;
  animation: statusPulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes statusPulse {
  0% {
    opacity: 0.28;
    transform: scale(0.7);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

/* Adapted from Animate.css headShake (MIT), softened for the profile card. */
@keyframes cardHeadShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateZ(0deg);
  }

  18% {
    transform: translate3d(-1.6px, 0, 0) rotateZ(-0.45deg);
  }

  38% {
    transform: translate3d(1.4px, 0, 0) rotateZ(0.42deg);
  }

  58% {
    transform: translate3d(-0.9px, 0, 0) rotateZ(-0.28deg);
  }

  76% {
    transform: translate3d(0.5px, 0, 0) rotateZ(0.16deg);
  }
}

.contact-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.contact-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.48px;
}

.contact-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 800;
  line-height: 38px;
  letter-spacing: 0;
}

.email-link {
  margin-top: 18px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: 0;
  text-decoration-color: rgba(8, 12, 13, 0.28);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.back-button {
  border: 0;
  display: inline-flex;
  width: 140px;
  height: 46px;
  margin-top: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  padding: 0;
}

.section-divider {
  width: 100%;
  height: 16px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--divider);
}

@media (max-width: 380px) {
  .mobile-page {
    padding-right: 8px;
    padding-left: 8px;
  }

  .profile-card {
    width: 100%;
  }

  .profile-card-face {
    padding-right: 24px;
    padding-left: 24px;
  }

  .meta-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 14px;
  }

  .meta-block:last-child dd {
    padding-left: 0;
    text-align: center;
  }

  .status-value {
    justify-content: center;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card-motion {
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .profile-card-twitch.is-twitching {
    animation: none;
  }

  .profile-card {
    transition-duration: 1ms;
  }

  .profile-card.is-flipped {
    transform: none;
  }

  .profile-card.is-flipped .profile-card-front {
    visibility: hidden;
  }

  .profile-card.is-flipped .profile-card-back {
    transform: none;
  }

  .meta-block .status-value span::after {
    animation: none;
    opacity: 0;
  }
}
