:root {
  --navy: #0b1828;
  --paper: #f4f0e9;
  --card: #fffdf9;
  --ink: #171717;
  --muted: #6f6b66;
  --blue: #2d68bb;
  --red: #c54b41;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: #dedad4;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(45, 104, 187, 0.13), transparent 28rem),
    radial-gradient(circle at 90% 92%, rgba(197, 75, 65, 0.12), transparent 28rem),
    #dedad4;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  width: min(100%, 590px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 10px 10px, rgba(21, 30, 40, 0.03) 1px, transparent 1.2px),
    var(--paper);
  background-size: 19px 19px;
}

.profile-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  margin: 10px 10px 0;
  padding: max(18px, env(safe-area-inset-top)) 18px 15px;
  border: 1px solid rgba(103, 85, 64, 0.16);
  border-bottom-color: rgba(119, 97, 69, 0.25);
  border-radius: 25px;
  background:
    linear-gradient(90deg, rgba(255, 252, 246, 0.76), rgba(255, 252, 246, 0.9) 52%, rgba(255, 252, 246, 0.7)),
    url("../images/hero-art-light.webp") center / cover no-repeat,
    #faf4e9;
  color: var(--navy);
  text-align: left;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(124, 99, 69, 0.1),
    0 2px 0 rgba(255, 255, 255, 0.76),
    0 5px 0 rgba(215, 207, 195, 0.72),
    0 12px 24px rgba(47, 41, 33, 0.12);
}

.profile-header::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 2px;
  left: 24px;
  height: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(105, 82, 55, 0.18), transparent);
  pointer-events: none;
}

.profile-main {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.profile-intro { min-width: 0; }

.studio-label {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1.25;
}

.avatar-wrap {
  width: 70px;
  height: 70px;
  padding: 4px;
  border: 1px solid rgba(28, 45, 61, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 11px 25px rgba(33, 40, 46, 0.15), 0 0 0 4px rgba(255, 255, 255, 0.42);
}

.avatar-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-header h1 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.82rem, 9vw, 2.35rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.profile-copy {
  max-width: 380px;
  margin: 0;
  color: #515b64;
  font-size: 0.73rem;
  line-height: 1.35;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: #72766f;
  font-size: 0.51rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
}

.links-area {
  position: relative;
  padding: 29px 14px 20px;
}

.links-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 5px 17px;
}

.heading-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.links-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 8vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.links-heading p {
  flex: 0 0 auto;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.social-card {
  --brand: #4f6682;
  --wash: #f4f7fa;
  position: relative;
  display: grid;
  grid-template-columns: 28px 52px minmax(0, 1fr) 36px;
  align-items: center;
  min-height: 90px;
  gap: 11px;
  overflow: hidden;
  padding: 13px 13px 13px 16px;
  border: 1px solid rgba(35, 31, 27, 0.1);
  border: 1px solid color-mix(in srgb, var(--brand) 14%, rgba(35, 31, 27, 0.075));
  border-radius: 18px;
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--brand) 5%, #fffdf9) 0%, #fffdf9 54%, color-mix(in srgb, var(--wash) 70%, #fffdf9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 7px 22px rgba(35, 30, 24, 0.065);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.social-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 4px;
  border-radius: 99px;
  background: var(--brand);
  opacity: 0.9;
  transition: opacity 170ms ease, transform 170ms ease;
}

.social-card:hover,
.social-card:focus-visible {
  z-index: 1;
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  box-shadow: 0 13px 28px rgba(35, 30, 24, 0.11);
  outline: none;
}

.social-card:hover::before,
.social-card:focus-visible::before {
  opacity: 1;
}

.social-card:active { transform: translateY(-1px) scale(0.995); }

.card-index {
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid color-mix(in srgb, var(--brand) 13%, transparent);
  color: color-mix(in srgb, var(--brand) 58%, #8c877f);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.social-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(24, 23, 22, 0.055), 0 6px 16px color-mix(in srgb, var(--brand) 14%, transparent);
  transition: box-shadow 170ms ease, transform 170ms ease;
}

.social-icon img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.social-card:hover .social-icon,
.social-card:focus-visible .social-icon {
  transform: rotate(-1deg) scale(1.035);
  box-shadow: inset 0 0 0 1px rgba(24, 23, 22, 0.045), 0 9px 23px color-mix(in srgb, var(--brand) 24%, transparent);
}

.social-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.social-copy strong {
  color: var(--ink);
  color: color-mix(in srgb, var(--brand) 68%, var(--ink));
  font-size: 0.96rem;
  font-weight: 820;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.social-description {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-handle {
  overflow: hidden;
  margin-top: 4px;
  color: var(--brand);
  font-size: 0.66rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-arrow {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(35, 31, 27, 0.1);
  border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent);
  background: rgba(255, 255, 255, 0.64);
  color: var(--brand);
  transition: transform 170ms ease, background 170ms ease;
}

.social-arrow svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.social-card:hover .social-arrow { transform: translateX(2px); background: color-mix(in srgb, var(--brand) 15%, transparent); }

.instagram-card {
  --brand: #c13584;
  --wash: #fff0f7;
  background:
    radial-gradient(circle at 98% 4%, rgba(255, 196, 64, 0.2), transparent 34%),
    radial-gradient(circle at 88% 108%, rgba(118, 56, 250, 0.16), transparent 44%),
    linear-gradient(108deg, #fffafd 0%, #fff4f9 54%, #f9f2ff 100%);
}

.instagram-card::before { background: linear-gradient(180deg, #ffd600, #ff3a44 36%, #d300c5 68%, #7638fa); }
.instagram-card .social-icon { background: linear-gradient(145deg, #fff, #fff0f7 58%, #f5efff); }

.telegram-card {
  --brand: #168fc7;
  --wash: #ebf8ff;
  background:
    radial-gradient(circle at 96% 8%, rgba(38, 165, 228, 0.16), transparent 36%),
    linear-gradient(108deg, #fbfdff 0%, #f3faff 58%, #eaf7fe 100%);
}
.telegram-card::before { background: linear-gradient(180deg, #65c9f4, #168fc7); }
.telegram-card .social-icon { background: linear-gradient(145deg, #fff, #eaf8fe); }

.whatsapp-card {
  --brand: #159447;
  --wash: #eaf9ef;
  background:
    radial-gradient(circle at 96% 12%, rgba(37, 211, 102, 0.15), transparent 38%),
    linear-gradient(108deg, #fcfffd 0%, #f3fbf6 58%, #eaf8ef 100%);
}
.whatsapp-card::before { background: linear-gradient(180deg, #46dd7d, #128c4a); }
.whatsapp-card .social-icon { background: linear-gradient(145deg, #fff, #eaf9ef); }

.vk-card {
  --brand: #0873e8;
  --wash: #eaf4ff;
  background:
    radial-gradient(circle at 98% 0%, rgba(0, 119, 255, 0.15), transparent 36%),
    linear-gradient(108deg, #fbfdff 0%, #f2f8ff 56%, #eaf4ff 100%);
}
.vk-card::before { background: linear-gradient(180deg, #41a0ff, #0077ff); }
.vk-card .social-icon { background: linear-gradient(145deg, #fff, #eaf4ff); }

.max-card {
  --brand: #6540d8;
  --wash: #f2efff;
  background:
    radial-gradient(circle at 98% 2%, rgba(0, 191, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 112%, rgba(149, 0, 255, 0.14), transparent 44%),
    linear-gradient(108deg, #fcfbff 0%, #f5f2ff 57%, #eef6ff 100%);
}
.max-card::before { background: linear-gradient(180deg, #00bfff, #471aff 52%, #9500ff); }
.max-card .social-icon { background: linear-gradient(145deg, #fff, #eff7ff 44%, #f5efff); }

.website-card {
  --brand: #24364b;
  --wash: #f1eee8;
  background:
    radial-gradient(circle at 98% 0%, rgba(45, 104, 187, 0.13), transparent 38%),
    linear-gradient(108deg, #fffdf9 0%, #faf7f1 58%, #f0f4f8 100%);
}
.website-card::before { background: linear-gradient(180deg, #c54b41 0 46%, #eee8df 46% 54%, #2d68bb 54% 100%); }
.website-card .card-index { color: var(--blue); }
.website-card .social-icon { background: linear-gradient(145deg, #fff, #f3eee6); }
.website-card .social-icon img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px max(25px, env(safe-area-inset-bottom));
  color: #99928a;
  font-size: 0.66rem;
}

footer a {
  color: var(--blue);
  font-weight: 750;
}

@media (min-width: 591px) {
  body { padding: 30px 18px; }

  .page-shell {
    min-height: calc(100vh - 60px);
    border: 1px solid rgba(33, 28, 23, 0.1);
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(28, 24, 20, 0.2);
  }

  .profile-header { margin: 16px 16px 0; border-radius: 27px; padding: 20px 24px 17px; }
  .links-area { padding: 31px 22px 24px; }
  .social-card { min-height: 94px; padding: 14px 14px 14px 18px; }
}

@media (max-width: 385px) {
  .profile-header { margin: 8px 8px 0; padding: max(16px, env(safe-area-inset-top)) 13px 14px; border-radius: 21px; }
  .profile-main { grid-template-columns: 64px minmax(0, 1fr); gap: 11px; }
  .avatar-wrap { width: 64px; height: 64px; }
  .profile-header h1 { font-size: clamp(1.72rem, 9vw, 2.05rem); }
  .profile-copy { font-size: 0.68rem; }
  .profile-meta { gap: 5px; font-size: 0.48rem; }
  .links-area { padding-inline: 10px; }
  .links-heading p { display: none; }
  .social-card { grid-template-columns: 23px 47px minmax(0, 1fr) 33px; gap: 8px; padding: 11px 9px 11px 12px; border-radius: 16px; }
  .card-index { font-size: 0.78rem; }
  .social-icon { width: 47px; height: 47px; border-radius: 14px; }
  .social-icon img { width: 39px; height: 39px; }
  .website-card .social-icon img { width: 42px; height: 42px; border-radius: 12px; }
  .social-arrow { width: 33px; height: 33px; }
}

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