@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  font-family: "DM Sans", Arial, sans-serif;
  color: #101114;
  background: #eff0f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 46px 20px;
  background: #eff0f5;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.profile {
  position: relative;
  width: min(100%, 664px);
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  padding: 30px 32px 24px;
  overflow: hidden;
  border-radius: 26px;
  background: #eff0f5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.top-actions {
  display: flex;
  align-items: center;
}

.share-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #121318;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.share-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px #20243618;
}

.identity {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 38px 0 36px;
  text-align: center;
}

.avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.identity h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.25;
}

.identity p {
  margin: 5px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.links {
  display: grid;
  gap: 15px;
}

.link-card {
  position: relative;
  display: grid;
  min-height: 74px;
  grid-template-columns: 52px 1fr 18px;
  align-items: center;
  gap: 14px;
  padding: 8px 18px 8px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #d9dbe4;
  box-shadow: 0 7px 20px #20243612;
}

.link-card:focus-visible,
.share-button:focus-visible {
  outline: 3px solid #6756ed;
  outline-offset: 3px;
}

.link-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.social-icon {
  background: transparent;
}

.social-icon img {
  width: 40px;
  height: 40px;
}

.link-label {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.card-more {
  color: #74767b;
  font-size: 18px;
  line-height: 1;
}

.profile-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #d9dbe4;
  text-align: center;
}

.profile-footer p {
  margin: 0;
}

.footer-thanks {
  font-size: 14px;
  font-weight: 600;
}

.footer-thanks span {
  color: #e4405f;
}

.footer-credit {
  margin-top: 7px !important;
  color: #74767b;
  font-size: 12px;
}

.error-header {
  display: flex;
  justify-content: center;
}

.error-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.error-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.error-content {
  display: flex;
  min-height: 390px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.error-code {
  margin: 0;
  color: #6756ed;
  font-size: clamp(76px, 18vw, 120px);
  font-weight: 700;
  letter-spacing: -8px;
  line-height: 1;
}

.error-content h1 {
  margin: 16px 0 0;
  font-size: clamp(22px, 5vw, 30px);
  letter-spacing: -0.6px;
}

.error-message {
  max-width: 380px;
  margin: 10px 0 22px;
  color: #666873;
  font-size: 15px;
  line-height: 1.6;
}

.error-home {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px;
  background: #17181e;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.error-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px #20243624;
}

.error-home:focus-visible,
.error-brand:focus-visible {
  outline: 3px solid #6756ed;
  outline-offset: 3px;
}

.share-status {
  position: fixed;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  left: 20px;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #18191f;
  color: white;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.share-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  body {
    padding: 0;
  }

  .profile {
    min-height: 100vh;
    padding: 20px 18px 26px;
    border-radius: 0;
  }

  .identity {
    padding: 38px 0 32px;
  }

  .avatar {
    width: 104px;
    height: 104px;
  }

  .identity h1 {
    font-size: 25px;
  }

  .identity p {
    font-size: 16px;
  }

  .error-content {
    min-height: 420px;
  }

  .links {
    gap: 12px;
  }

  .link-card {
    min-height: 72px;
    grid-template-columns: 48px 1fr 14px;
    gap: 10px;
    padding-right: 13px;
  }

  .link-icon {
    width: 48px;
    height: 48px;
  }

  .link-label {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
