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

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --card-alt: #f5f7fb;
  --line: #e8ebf2;
  --text: #111111;
  --muted: #6f7684;
  --shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(82, 223, 99, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
  color: var(--text);
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

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

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 28px 18px;
  place-items: center;
}

.profile-card {
  width: min(100%, 430px);
}

.profile-top {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.avatar-wrap {
  width: min(100%, 252px);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 26%;
  border-radius: 28px;
}

.profile-copy {
  display: grid;
  gap: 6px;
  text-align: center;
}

.handle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 4.6vw, 20px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.link-stack {
  display: grid;
  gap: 14px;
}

.link-card {
  display: grid;
  min-height: 104px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.05);
  transition:
    min-height 220ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.link-card:not(.link-card-mature) {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: #d9deea;
  box-shadow: 0 16px 36px rgba(17, 17, 17, 0.08);
  outline: none;
}

.link-card-primary {
  background: linear-gradient(180deg, #ffffff 0%, #f7fff8 100%);
}

.link-card-mature {
  height: 106px;
  min-height: 0;
  overflow: hidden;
}

.mature-card-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  height: 100%;
}

.link-visual {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card-alt);
}

.platform-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.platform-icon-square {
  border-radius: 20px;
}

.platform-icon-round {
  border-radius: 999px;
}

.link-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.link-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  min-width: 0;
}

.link-action {
  display: inline-grid;
  min-width: 70px;
  min-height: 38px;
  padding: 9px 16px;
  place-items: center;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}

.is-clicked {
  transform: scale(0.985);
}

.mature-copy {
  min-width: 0;
}

.link-card-mature.is-open {
  height: 106px;
  min-height: 0;
  background:
    linear-gradient(120deg, rgba(52, 53, 57, 0.98), rgba(75, 54, 47, 0.98)),
    #313136;
  border-color: rgba(255, 255, 255, 0.16);
}

.link-card-mature.is-open .mature-card-layout {
  grid-template-columns: minmax(0, 1fr) auto;
}

.link-card-mature.is-open .mature-card-layout > .link-visual {
  display: none;
}

.mature-preview-copy {
  display: inline;
}

.link-card-mature.is-open .mature-preview-copy {
  display: none;
}

.mature-title {
  display: none;
  margin: 0;
  min-width: 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.link-card-mature.is-open .mature-title {
  display: block;
}

.mature-continue {
  display: none;
  place-items: center;
  min-width: 112px;
  min-height: 38px;
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #090909;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.link-card-mature.is-open .mature-continue {
  display: inline-grid;
}

.link-card-mature.is-open .link-action {
  display: none;
}

.mature-continue:hover,
.mature-continue:focus-visible {
  background: #f0f0f0;
  outline: none;
  transform: translateY(-1px);
}

.mature-continue:active {
  transform: translateY(1px);
}

.reveal {
  animation: reveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal-delay-1 {
  animation-delay: 70ms;
}

.reveal-delay-2 {
  animation-delay: 120ms;
}

.reveal-delay-3 {
  animation-delay: 170ms;
}

.reveal-delay-4 {
  animation-delay: 220ms;
}

.reveal-delay-5 {
  animation-delay: 270ms;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 18px 14px 24px;
  }

  .profile-top {
    gap: 14px;
    margin-bottom: 18px;
  }

  .avatar-wrap {
    width: min(100%, 220px);
    border-radius: 32px;
  }

  .avatar {
    border-radius: 24px;
  }

  .handle {
    font-size: 17px;
  }

  .link-card:not(.link-card-mature) {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
  }

  .link-card {
    min-height: 92px;
    padding: 14px;
  }

  .link-card-mature,
  .link-card-mature.is-open {
    height: 94px;
    min-height: 0;
  }

  .mature-card-layout {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .link-visual {
    width: 64px;
    height: 64px;
    border-radius: 20px;
  }

  .link-title {
    font-size: 17px;
    line-height: 1.25;
  }

  .link-action {
    min-width: 54px;
    min-height: 30px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .mature-title {
    font-size: 17px;
    line-height: 1.25;
  }

  .mature-continue {
    min-width: 88px;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 12px;
  }
}
