*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --text: #ffffff;
  --bio: #ffffff;
  --btn-bg: #222222;
  --btn-bg-hover: #2e2e2e;
  --btn-text: #ffffff;
  --btn-radius: 8px;
  --thumb-radius: 4px;
  --link-gap: 14px;
  --container: 580px;
  --cover-height: 280px;
  --shadow:
    0.3px 0.5px 0.7px hsl(0deg 0% 6.7% / 0.021),
    0.9px 1.8px 2.5px -0.6px hsl(0deg 0% 6.7% / 0.026),
    2px 4px 5.5px -1.2px hsl(0deg 0% 6.7% / 0.031),
    4.6px 9.3px 12.8px -1.7px hsl(0deg 0% 6.7% / 0.035);
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  position: relative;
  width: 100%;
  max-width: var(--container);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

.cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--cover-height);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cover-img {
  width: 100%;
  height: 150%;
  object-fit: cover;
  object-position: center center;
  transform: translateY(-22%);
}

.cover-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.85) 78%,
    #000000 100%
  );
}

.profile {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 14px 32px;
  animation: fadeUp 0.45s ease both;
}

.avatar-wrap {
  margin: 0 0 16px;
  padding: 3px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
}

.name {
  margin: 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
}

.bio {
  margin-top: 4px;
  padding: 0 calc(var(--link-gap) * 3);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: var(--bio);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.section-title {
  margin-top: 24px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
  letter-spacing: 0.02em;
}

.links {
  display: flex;
  flex-direction: column;
  gap: var(--link-gap);
  width: 100%;
  margin-top: var(--link-gap);
}

.link-item {
  position: relative;
  animation: fadeUp 0.5s ease both;
}

.link-item:nth-child(1) { animation-delay: 0.08s; }
.link-item:nth-child(2) { animation-delay: 0.16s; }

.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  width: 100%;
  padding: 12px 56px;
  border-radius: var(--btn-radius);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: var(--shadow);
  transition: background 0.2s ease, transform 0.15s ease;
}

.link-btn:hover {
  background: var(--btn-bg-hover);
}

.link-btn:active {
  transform: scale(0.985);
}

.link-thumb {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 8px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: var(--thumb-radius);
}

.link-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-label {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-align: center;
  text-wrap: balance;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile,
  .link-item,
  .link-btn {
    animation: none;
    transition: none;
  }
}
