@font-face {
  font-family: Sora;
  src: url("/fonts/Sora.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Sora, sans-serif;
  font-synthesis: none;
  color: #fff;
  background: #000;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

main {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 6vw, 24px);
}

.profile {
  width: min(100%, 320px);
}
.profile,
.links,
.link {
  min-width: 0;
}
.link > span {
  min-width: 0;
}

.portrait {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.4;
}

.bio {
  margin: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.8;
}

.links {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.link span {
  flex: 0 1 auto;
  margin-inline-end: auto;
}
.link:hover {
  color: #fff;
}
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.5;
}
.link > .icon:last-child {
  width: 14px;
  height: 14px;
  color: #fff;
}
:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 5px;
  border-radius: 2px;
}
.status {
  min-height: 36px;
  margin: 10px 0 0;
  color: #777;
  font-size: 10px;
  line-height: 1.6;
}

.site-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 20px 16px 24px;
  color: #777;
  font-size: 10px;
  line-height: 1.6;
}
.credit-heart {
  cursor: text;
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: none;
}
.site-credit a {
  color: inherit;
  text-decoration: none;
}
.site-credit a:hover {
  color: #fff;
}

.image-frame {
  display: block;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: #111;
}
.image-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  transition: opacity 240ms ease;
}
.image-frame--portrait {
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  border-radius: 50%;
}
.image-frame--home {
  width: 136px;
  height: 136px;
  border-radius: 50%;
}
.image-frame--artist {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.image-frame--spotify {
  width: 48px;
  height: 48px;
  border-radius: 4px;
}
.image-frame[data-image-state="loading"] > img,
.image-frame[data-image-state="error"] > img,
.image-frame[data-image-state="empty"] > img {
  opacity: 0;
}
.image-frame[data-image-state="ready"] > img {
  opacity: 1;
}
.image-frame[data-image-state="loading"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, #ffffff0b 50%, transparent 80%);
  animation: image-shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}
.profile,
.home-intro,
.home-content {
  animation: page-enter 420ms ease-out both;
}
.home-content {
  animation-delay: 60ms;
}
.site-credit {
  animation: credit-enter 500ms ease-out both;
}
.link,
.home-link,
.artist-card {
  transition:
    color 160ms ease,
    transform 160ms ease;
}
.link:hover,
.home-link:hover {
  transform: translateX(2px);
}
@keyframes image-shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes credit-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.link > span,
.home-link-text > span,
.home-directory h3 a,
.artist-name,
.spotify-title,
.site-credit a {
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition:
    background-size 220ms ease,
    color 160ms ease;
}
.link:is(:hover, :focus-visible) > span,
.home-link:is(:hover, :focus-visible) .home-link-text > span,
.home-directory h3 a:is(:hover, :focus-visible),
.artist-card:is(:hover, :focus-visible) .artist-name,
.spotify-track:is(:hover, :focus-visible) .spotify-title,
.site-credit a:is(:hover, :focus-visible) {
  background-size: 100% 1px;
}

.link > span,
.home-link-text > span,
.home-directory h3 a,
.site-credit a {
  padding-bottom: 4px;
  margin-bottom: -4px;
}

html {
  scrollbar-gutter: stable;
}
html.viewer-open {
  overflow: hidden;
}
.profile-trigger {
  cursor: pointer;
  outline-offset: 6px;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}
.profile-trigger:is(:hover, :focus-visible) {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px #ffffff10;
}
.profile-viewer {
  overflow: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 16px;
  border: 1px solid #ffffff15;
  border-radius: 16px;
  background: #080808;
  color: #fff;
  box-shadow: 0 24px 100px #0009;
}
.profile-viewer[open] {
  display: grid;
  gap: 12px;
  animation: viewer-enter 220ms ease-out both;
}
.profile-viewer::backdrop {
  background: #000b;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: viewer-backdrop 220ms ease-out both;
}
.profile-viewer.is-closing {
  animation: viewer-leave 180ms ease-in both;
}
.profile-viewer.is-closing::backdrop {
  animation: viewer-backdrop 180ms ease-in reverse both;
}
.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.viewer-toolbar h2 {
  margin: 0;
  font:
    12px Sora,
    sans-serif;
}
.viewer-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff0a;
  color: #fff;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}
.viewer-close:hover {
  background: #ffffff18;
  transform: rotate(90deg);
}
.viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(72vw, 680px);
  max-height: calc(100svh - 140px);
  margin: auto;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 180ms ease;
}
.profile-viewer[data-image-state="ready"] .viewer-image {
  opacity: 1;
}
@keyframes viewer-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes viewer-leave {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}
@keyframes viewer-backdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 480px) {
  .profile-viewer {
    padding: 12px;
    border-radius: 12px;
  }
  .viewer-image {
    max-width: calc(100vw - 58px);
  }
}
