:root {
  --profile-photo: url("./assets/profile-photo.svg");
  --primary: #0066cc;
  --theme-bg-start: #111821;
  --theme-bg-middle: #33475d;
  --theme-bg-end: #eef2f7;
  --theme-card: #ffffff;
  --theme-card-text: #111113;
  --canvas: #ffffff;
  --canvas-parchment: #f5f5f7;
  --surface-black: #0f1114;
  --surface-panel: #15181d;
  --ink: #111113;
  --ink-muted: #6e6e73;
  --frost: rgba(245, 245, 247, 0.84);
  --hairline: rgba(0, 0, 0, 0.07);
  --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-black);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--surface-black);
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.profile-page {
  position: relative;
  isolation: isolate;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 22px 18px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, var(--theme-bg-start) 0%, var(--theme-bg-middle) 48%, var(--theme-bg-end) 100%);
}

.profile-page::before {
  content: none;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -22px -18px 0;
  padding: 34px 18px 42px;
  overflow: hidden;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.link-row:active,
.share-bottom:active {
  transform: scale(0.95);
}

.link-row:focus-visible,
.share-bottom:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.portrait {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  background: #1d2026;
  box-shadow: var(--shadow-product);
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--profile-photo) center / cover no-repeat;
  opacity: 0;
}

.has-custom-photo .portrait::before {
  opacity: 1;
}

.portrait span {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.has-custom-photo .portrait span {
  opacity: 0;
}

.photo-off .portrait {
  display: none;
}

.photo-off .hero {
  padding-top: 58px;
  padding-bottom: 34px;
}

.photo-off .profile-role,
.photo-off .profile-lines {
  display: none;
}

.photo-off .intro h1 {
  margin-bottom: 0;
}

.intro {
  max-width: 360px;
  padding: 0 12px;
  text-align: center;
}

.intro h1 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: clamp(31px, 7.4vw, 38px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.profile-role {
  margin: 0 0 13px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 4.4vw, 21px);
  font-weight: 600;
  line-height: 1.3;
}

.profile-lines {
  display: grid;
  gap: 4px;
}

.profile-lines p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 400;
  line-height: 1.5;
}

.link-list {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 2;
  margin-top: 8px;
  padding-top: 0;
}

.link-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: 52px 1fr 16px;
  align-items: center;
  gap: 14px;
  padding: 11px 18px 11px 14px;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: color-mix(in srgb, var(--theme-card) 88%, transparent);
  color: var(--theme-card-text);
  overflow: hidden;
  touch-action: manipulation;
  backdrop-filter: saturate(180%) blur(14px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-row:hover {
  border-color: rgba(0, 102, 204, 0.26);
}

.link-row.is-pressed,
.link-row:active {
  background: color-mix(in srgb, var(--theme-card) 78%, var(--primary) 10%);
}

.link-row::after {
  content: "";
  width: 7px;
  height: 7px;
  justify-self: end;
  border-top: 1.7px solid rgba(17, 17, 19, 0.26);
  border-right: 1.7px solid rgba(17, 17, 19, 0.26);
  transform: rotate(45deg);
}

.link-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f5f5f7;
  color: var(--primary);
}

.link-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.link-label {
  justify-self: start;
  color: var(--theme-card-text);
  font-size: clamp(17px, 4.4vw, 19px);
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.quick-dock {
  display: grid;
  place-items: center;
  padding: 24px 0 6px;
}

.share-bottom {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border: 1px solid rgba(0, 102, 204, 0.22);
  border-radius: 9999px;
  background: color-mix(in srgb, var(--theme-card) 88%, transparent);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
  backdrop-filter: saturate(180%) blur(14px);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.share-bottom:hover {
  border-color: rgba(0, 102, 204, 0.42);
}

.share-bottom.is-pressed,
.share-bottom:active {
  background: color-mix(in srgb, var(--theme-card) 78%, var(--primary) 10%);
}

.share-bottom svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 10;
  margin: 0;
  padding: 10px 16px;
  border-radius: 9999px;
  background: rgba(17, 21, 24, 0.86);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.3;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 481px) {
  body {
    padding: 22px 0;
  }

  .profile-page {
    min-height: calc(100svh - 44px);
    border-radius: 32px;
    box-shadow: var(--shadow-product);
  }

  .hero {
    border-radius: 32px 32px 0 0;
  }
}

@media (max-width: 390px) {
  .profile-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .portrait {
    width: 106px;
    height: 106px;
  }

  .link-row {
    min-height: 70px;
    grid-template-columns: 50px 1fr 16px;
    gap: 10px;
    padding: 11px 16px 11px 12px;
    border-radius: 20px;
  }

  .link-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .link-icon svg {
    width: 25px;
    height: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
