@font-face {
  font-family: Figtree;
  src: url("./assets/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --ink: #080808;
  --muted: #565653;
  --line: #deded9;
  --gutter: clamp(20px, 5.4vw, 27px);
  --portrait-size: clamp(104px, 27vw, 120px);
  font-family: Figtree, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #eeede9;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 32px 16px;
  background: radial-gradient(ellipse at 50% 0%, #f8f7f4 0%, #eeede9 63%, #e8e6e1 100%);
}

img {
  display: block;
}

.profile {
  width: min(100%, 460px);
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 24px 65px -26px rgb(32 28 23 / 32%), 0 2px 10px rgb(32 28 23 / 6%);
}

.cover {
  position: relative;
  height: 318px;
  background: #555249;
}

.cover::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(8 8 8 / 72%) 0%, rgb(8 8 8 / 30%) 20%, transparent 42%),
    linear-gradient(180deg, transparent 62%, rgb(252 252 251 / 32%) 83%, var(--surface) 100%);
  content: "";
  pointer-events: none;
}

.cover__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  filter: saturate(.64) contrast(1.04);
}

.cover__bar {
  position: absolute;
  z-index: 1;
  inset: 17px var(--gutter) auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.cover__wordmark {
  width: 73px;
  height: auto;
}

.share {
  position: relative;
}

.share__button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 36%);
  border-radius: 50%;
  background: rgb(8 8 8 / 46%);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.share__button[hidden] {
  display: none;
}

.share__button img {
  filter: invert(1);
}

.share__status {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: .8125rem;
}

.share__status:not(:empty) {
  padding: 7px 10px;
}

.profile__content {
  position: relative;
  margin-top: calc(var(--portrait-size) * -.51);
  padding: 0 var(--gutter) 27px;
}

.identity {
  display: grid;
  justify-items: center;
  text-align: center;
}

.identity__portrait {
  width: var(--portrait-size);
  height: var(--portrait-size);
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: #d6d1c8;
  box-shadow: 0 8px 22px rgb(24 23 20 / 16%);
  object-fit: cover;
}

.identity h1 {
  margin: 13px 0 0;
  font-size: clamp(2.25rem, 8.7vw, 2.875rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.05;
}

.identity__role {
  margin: 5px 0 0;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.4;
}

.identity__bio {
  max-width: 32ch;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.quick-links,
.links,
.social-links {
  padding: 0;
  list-style: none;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 0;
}

.quick-link {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-height: 106px;
  padding: 12px 5px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.quick-link__title {
  font-size: clamp(.8125rem, 3.3vw, .875rem);
  font-weight: 650;
  line-height: 1.15;
  text-wrap: balance;
}

.quick-link__detail {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.2;
}

.links {
  display: grid;
  gap: 9px;
  margin: 13px 0 0;
}

.link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 15px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.link--primary {
  min-height: 78px;
  margin-top: 14px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.link__icon,
.social-link__icon {
  display: grid;
  place-items: center;
  background: transparent;
}

.link__icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
}

.quick-link > .link__icon {
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.link__icon--thumbnail {
  height: auto;
  border-radius: 5px;
}

.art-icon {
  object-fit: contain;
}

.icon--instagram img {
  width: 32px;
  height: 32px;
}

.link__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.2;
}

.link__title {
  font-size: 1rem;
  font-weight: 650;
}

.link__detail {
  color: var(--muted);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.link--primary .link__detail {
  color: #c8c8c4;
}

.link__arrow {
  opacity: .72;
  transition: transform 160ms ease;
}

.link--primary .link__arrow {
  opacity: 1;
  filter: invert(1);
}

.quick-link:focus-visible,
.link:focus-visible,
.social-link:focus-visible,
.profile-footer a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.socials {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.socials h2 {
  margin: 0;
  font-size: .9375rem;
  font-weight: 600;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 0;
}

.social-link {
  display: grid;
  min-width: 56px;
  justify-items: center;
  gap: 5px;
  padding: 3px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .75rem;
  text-decoration: none;
}

.social-link__icon {
  width: 44px;
  height: 44px;
  border-radius: 0;
  transition: filter 160ms ease;
}

.profile-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.5;
  text-align: center;
}

.profile-footer p {
  max-width: 36ch;
  margin: 0 auto;
  text-wrap: balance;
}

.profile-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.profile-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink);
  text-underline-offset: 3px;
}

.share__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (hover: hover) {
  .share__button:hover {
    background: rgb(8 8 8 / 72%);
  }

  .quick-link:hover,
  .link:not(.link--primary):hover {
    border-color: #bdbdb7;
    background: #f5f5f2;
  }

  .link--primary:hover {
    border-color: #232322;
    background: #232322;
  }

  .link:hover .link__arrow {
    transform: translate(2px, -2px);
  }

  .social-link:hover .social-link__icon {
    filter: brightness(1.12);
  }
}

@media (max-width: 520px) {
  body {
    display: block;
    padding: 0;
    background: var(--surface);
  }

  .profile {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .cover {
    height: clamp(242px, 74vw, 318px);
  }

  .profile__content {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .share__button,
  .quick-link,
  .link,
  .link__arrow,
  .social-link__icon {
    transition: none;
  }
}
