.profile-redesign {
  min-height: calc(100vh - 72px);
  padding: 1.6rem 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 12% 0, rgba(242, 184, 75, .1), transparent 34rem),
    radial-gradient(ellipse at 92% 18%, rgba(108, 80, 177, .12), transparent 36rem),
    #08090b;
}

.profile-redesign-shell,
.profile-redesign .profile-grid {
  width: min(1280px, calc(100% - 2.5rem));
  max-width: 1280px;
}

.profile-visual {
  position: relative;
}

.profile-banner-wrap {
  position: relative;
  height: clamp(220px, 30vw, 350px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 72% 20%, rgba(242, 184, 75, .18), transparent 32rem),
    linear-gradient(130deg, #171411, #090a0d 62%, #14101b);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.profile-banner-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  opacity: .58;
  filter: saturate(.72) contrast(1.05);
}

.profile-banner-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 10, .46), transparent 70%),
    linear-gradient(0deg, #08090b 0%, rgba(8, 9, 11, .38) 24%, transparent 76%);
}

.profile-banner-mark,
.profile-banner-caption {
  position: absolute;
  top: 1.25rem;
  color: rgba(255, 255, 255, .72);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .2em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

.profile-banner-mark { left: 1.5rem; color: #f0c66f; }
.profile-banner-caption { right: 1.5rem; color: rgba(255, 255, 255, .58); }

.profile-identity-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.2rem;
  width: calc(100% - 3rem);
  margin: -62px auto 0;
  padding: 1.2rem 1.4rem .9rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22, 23, 26, .97), rgba(11, 12, 14, .96));
  box-shadow: 0 20px 50px rgba(0, 0, 0, .36), inset 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
}

.profile-identity-card .profile-avatar-wrap {
  grid-column: 1;
  grid-row: 1;
}

.profile-identity-card .profile-avatar-lg {
  width: 94px;
  height: 94px;
  border: 3px solid #111214;
  background: linear-gradient(135deg, #f3d996, #b27b32);
  color: #17120a;
  box-shadow: 0 0 0 2px rgba(242, 184, 75, .55), 0 10px 24px rgba(0, 0, 0, .38);
}

.profile-identity-card .profile-identity {
  grid-column: 2;
  grid-row: 1;
}

.profile-identity-card .profile-name-row {
  gap: .55rem;
  margin-bottom: .12rem;
}

.profile-identity-card .profile-name {
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  overflow-wrap: anywhere;
}

.profile-identity-card .profile-username {
  color: #e4bf70;
  font-size: .82rem;
  font-weight: 650;
}

.profile-identity-card .profile-bio {
  max-width: 620px;
  margin-top: .45rem;
  color: #b7b8bd;
}

.profile-identity-card .profile-badges {
  display: flex;
  min-height: 0;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .35rem 0;
}

.profile-identity-card .profile-premium-badge {
  padding: .3rem .55rem;
  border-color: rgba(242, 184, 75, .42);
  background: rgba(242, 184, 75, .1);
  color: #f3d996;
  font-size: .59rem;
}

.profile-identity-card .profile-premium-badge[hidden] {
  display: none !important;
}

.profile-identity-card .profile-actions {
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  max-width: 350px;
}

.profile-redesign .profile-actions .btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: .55rem .75rem;
  border-radius: 9px;
  font-size: .68rem;
  font-weight: 750;
  white-space: nowrap;
}

.profile-redesign .profile-actions .btn-primary {
  border-color: #e8bd66;
  background: linear-gradient(130deg, #f3d996, #dcae58);
  color: #17120a;
}

.profile-redesign .profile-actions .btn-outline {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .035);
  color: #e5e5e5;
}

.profile-redesign .profile-actions .btn-outline:hover {
  border-color: rgba(242, 184, 75, .48);
  color: #f3d996;
}

.profile-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
  padding-top: .85rem;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.profile-redesign .profile-stat {
  min-width: 0;
  gap: .1rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.profile-redesign .profile-stat strong {
  color: #f1d18c;
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
}

.profile-redesign .profile-stat span {
  color: #999ba1;
  font-size: .59rem;
  letter-spacing: .1em;
}

.profile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
}

.profile-social-links[hidden] { display: none !important; }

.profile-social-link {
  padding: .28rem .55rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: #dedfe2;
  font-size: .66rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.profile-social-link:hover {
  border-color: rgba(242, 184, 75, .5);
  background: rgba(242, 184, 75, .08);
  color: #f3d996;
}

.profile-redesign .profile-lower {
  margin-top: 1.5rem;
}

.profile-redesign .profile-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, .75fr);
  gap: 1rem;
  align-items: start;
}

.profile-redesign .profile-panel,
.profile-redesign .sidebar-card,
.profile-quick-links {
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 26, 29, .88), rgba(13, 14, 16, .9));
  box-shadow: 0 16px 38px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(12px);
}

.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: 1rem;
}

.profile-section-heading > div > span,
.profile-quick-links > span {
  color: #e6bd68;
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .15em;
}

.profile-section-heading h2 {
  margin: .15rem 0 0;
  color: #f5f5f5;
  font-size: 1.08rem;
  font-weight: 750;
}

.profile-section-heading.compact { margin-bottom: .75rem; }
.profile-section-mark { color: #e7c675; font-size: 1.1rem; }

.profile-redesign .achievement-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: .6rem;
}

.profile-redesign .achievement-card {
  min-height: 136px;
  gap: .35rem;
  padding: .8rem;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.profile-redesign .achievement-card.is-earned {
  border-color: rgba(242, 184, 75, .2);
  background: linear-gradient(145deg, rgba(242, 184, 75, .085), rgba(255, 255, 255, .018));
}

.profile-redesign .achievement-card strong {
  color: #f1f1f1;
  font-size: .75rem;
}

.profile-redesign .achievement-card small {
  color: #a4a5aa;
  font-size: .64rem;
  line-height: 1.45;
}

.profile-detail-list {
  display: grid;
  gap: .45rem;
}

.profile-detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .7rem;
  padding: .65rem .7rem;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 9px;
  background: rgba(255, 255, 255, .022);
}

.profile-detail-item > span {
  color: #a8a9ae;
  font-size: .68rem;
}

.profile-detail-item > strong {
  color: #f0f0f0;
  font-size: .68rem;
  text-align: right;
}

.profile-detail-item small,
.profile-detail-item button {
  grid-column: 1 / -1;
}

.profile-detail-item small {
  color: #a9a9ad;
  font-size: .64rem;
}

.profile-detail-item #profilePixusStatus.is-active {
  color: #f3d996;
}

.profile-detail-item .profile-verify-email {
  width: fit-content;
  padding: .42rem .6rem;
  border: 1px solid rgba(242, 184, 75, .3);
  border-radius: 7px;
  background: rgba(242, 184, 75, .08);
  color: #f1d18c;
  font: inherit;
  font-size: .62rem;
  cursor: pointer;
}

.profile-quick-links {
  display: grid;
  gap: .35rem;
  margin-top: .8rem;
}

.profile-quick-links > span { margin: 0 0 .25rem .25rem; }

.profile-quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .62rem .7rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d3d4d7;
  font-size: .72rem;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.profile-quick-links a:hover {
  border-color: rgba(242, 184, 75, .17);
  background: rgba(242, 184, 75, .06);
  color: #f3d996;
}

.profile-quick-links a span { color: #e6bd68; }

@media (max-width: 980px) {
  .profile-identity-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .profile-identity-card .profile-avatar-wrap { grid-row: 1; }
  .profile-identity-card .profile-identity { grid-column: 2; grid-row: 1; }
  .profile-identity-card .profile-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    justify-content: flex-start;
  }

  .profile-stats { grid-row: 3; }
  .profile-redesign .profile-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); }
}

@media (max-width: 700px) {
  .profile-redesign { padding-top: 1rem; }

  .profile-redesign-shell,
  .profile-redesign .profile-grid {
    width: calc(100% - 1.5rem);
  }

  .profile-banner-wrap {
    height: 220px;
    border-radius: 16px;
  }

  .profile-banner-mark,
  .profile-banner-caption {
    top: .9rem;
    font-size: .5rem;
  }

  .profile-banner-mark { left: .9rem; }
  .profile-banner-caption { right: .9rem; }

  .profile-identity-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: .6rem .8rem;
    width: calc(100% - 1rem);
    margin-top: -42px;
    padding: .85rem;
    border-radius: 14px;
  }

  .profile-identity-card .profile-avatar-lg {
    width: 66px;
    height: 66px;
    font-size: 1.8rem;
  }

  .profile-identity-card .profile-name { font-size: 1.35rem; }
  .profile-identity-card .profile-username { font-size: .72rem; }
  .profile-identity-card .profile-bio { font-size: .75rem; }

  .profile-identity-card .profile-actions {
    gap: .35rem;
  }

  .profile-redesign .profile-actions .btn {
    min-height: 35px;
    padding: .48rem .58rem;
    font-size: .62rem;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    padding-top: .65rem;
  }

  .profile-redesign .profile-stat { padding: .42rem .5rem; }
  .profile-redesign .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-redesign .profile-panel,
  .profile-redesign .sidebar-card,
  .profile-quick-links { padding: .9rem; }
}

@media (max-width: 380px) {
  .profile-identity-card { grid-template-columns: 58px minmax(0, 1fr); }
  .profile-identity-card .profile-avatar-lg { width: 56px; height: 56px; }
  .profile-identity-card .profile-name { font-size: 1.16rem; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-redesign *,
  .profile-redesign *::before,
  .profile-redesign *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
