:root {
  --top: #54b6ca;
  --middle: #3477b3;
  --bottom: #071a8c;
  --white: #fff;
  --soft-white: rgba(255,255,255,.72);
  --max-width: 650px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bottom); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, var(--top) 0%, var(--middle) 34%, var(--bottom) 100%);
  background-attachment: fixed;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100%, var(--max-width));
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
}
.home-mark, .share-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.45);
  color: #07111d;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.home-mark { text-decoration: none; font-size: 15px; font-weight: 850; }
.share-button { cursor: pointer; padding: 13px; }
.share-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.home-mark:active, .share-button:active { transform: scale(.96); }

.profile { text-align: center; padding: 60px 10px 36px; }
.avatar {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
h1 { margin: 25px 0 10px; font-size: clamp(30px, 8vw, 42px); line-height: 1; letter-spacing: -.035em; }
.profile p { max-width: 540px; margin: 0 auto; font-size: clamp(17px, 4.6vw, 23px); line-height: 1.42; font-weight: 500; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; margin-top: 28px; }
.socials a {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  transition: transform .15s ease, background .15s ease;
}
.socials a:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.socials img {
  width: 23px;
  height: 23px;
  display: block;
  object-fit: contain;
}
.socials svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.links { display: grid; gap: 20px; }
.link-card {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 68px 1fr 32px;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 999px;
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,.015);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.link-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.link-card:active { transform: scale(.987); }
.link-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.link-copy { text-align: center; min-width: 0; }
.link-title { display: block; font-size: clamp(17px, 4.5vw, 22px); font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.link-subtitle { display: block; margin-top: 4px; color: var(--soft-white); font-size: clamp(14px, 3.8vw, 17px); line-height: 1.1; }
.link-arrow { font-size: 26px; color: rgba(255,255,255,.62); transform: translateX(-2px); }
.loading, .error { text-align: center; padding: 30px; font-size: 17px; }

footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 72px; color: rgba(255,255,255,.78); font-size: 14px; }
footer a { text-underline-offset: 3px; }

@media (min-width: 720px) {
  body { padding: 36px 0 0; }
  .page-shell { border-radius: 26px 26px 0 0; box-shadow: 0 25px 70px rgba(0,0,0,.22); }
}
@media (max-width: 420px) {
  .page-shell { padding-left: 14px; padding-right: 14px; }
  .profile { padding-top: 45px; }
  .link-card { min-height: 82px; grid-template-columns: 58px 1fr 26px; gap: 8px; }
  .link-image { width: 54px; height: 54px; }
}
