:root {
  --bg: #0b0b10;
  --panel: #181820;
  --panel-soft: #23232b;
  --text: #ffffff;
  --muted: #a8a8b2;
  --muted-strong: #d3d3dc;
  --accent: #9a1f9f;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(780px 520px at 0% 36%, rgba(40, 95, 98, 0.22), transparent 64%),
    radial-gradient(740px 520px at 100% 100%, rgba(95, 38, 113, 0.2), transparent 62%),
    linear-gradient(180deg, #202024 0%, #121217 42%, #0b0b10 100%);
}

a {
  color: inherit;
}

.page {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 46px) 46px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(30px, 7vw, 66px);
}

.logo {
  display: block;
  width: 148px;
  height: auto;
}

.store-link,
.secondary-link,
.follow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.store-link {
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(140deg, var(--accent), #b83dc6);
  font-size: 0.92rem;
}

.secondary-link {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-layout {
  display: block;
}

.profile-header {
  display: grid;
  grid-template-columns: clamp(124px, 24vw, 260px) minmax(0, 1fr);
  gap: clamp(22px, 6vw, 58px);
  align-items: center;
  margin-bottom: clamp(44px, 8vw, 78px);
}

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

.avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--panel-soft);
  object-fit: cover;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
}

.avatar-fallback,
.art-fallback,
.artist-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b2b35, #4a1f51);
  color: #fff;
  font-weight: 900;
}

.avatar-fallback {
  font-size: clamp(2.7rem, 7vw, 5rem);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7.3vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 4vw, 38px);
  margin-top: clamp(16px, 3vw, 28px);
  color: var(--muted);
  font-size: clamp(1.24rem, 4.3vw, 2.75rem);
  font-weight: 500;
}

.stat strong {
  color: #fff;
  font-weight: 900;
}

.joined {
  margin: clamp(16px, 3vw, 28px) 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 3.1vw, 2rem);
  font-weight: 500;
}

.follow-pill {
  min-width: clamp(158px, 24vw, 318px);
  min-height: clamp(54px, 8vw, 82px);
  margin-top: clamp(20px, 4vw, 34px);
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: clamp(1.08rem, 3.5vw, 2.2rem);
}

.content-section + .content-section {
  margin-top: clamp(42px, 8vw, 72px);
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.6rem);
  letter-spacing: 0;
}

.section-count {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.collection-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 31%);
  gap: clamp(18px, 4vw, 28px);
  margin: 0 calc(clamp(16px, 4vw, 46px) * -1);
  padding: 0 clamp(16px, 4vw, 46px) 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.collection-row::-webkit-scrollbar {
  display: none;
}

.collection-card,
.artist-card {
  display: block;
  text-decoration: none;
}

.collection-card {
  scroll-snap-align: start;
  min-width: 0;
}

.collection-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.25);
}

.collection-art img,
.artist-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-art img:only-child,
.art-fallback {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

.art-fallback {
  aspect-ratio: 1;
  font-size: 2rem;
}

.card-title,
.artist-name {
  display: block;
  margin-top: 16px;
  color: #fff;
  font-size: clamp(1.1rem, 3.1vw, 1.75rem);
  line-height: 1.12;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.card-meta,
.artist-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: clamp(0.96rem, 2.4vw, 1.38rem);
  line-height: 1.25;
  font-weight: 800;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3.4vw, 28px);
}

.artist-card img,
.artist-fallback {
  width: 100%;
  aspect-ratio: 0.72;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.22);
}

.artist-fallback {
  font-size: 1.6rem;
}

.profile-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card {
  min-height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(21, 21, 29, 0.72);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.state,
.empty-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.state {
  min-height: 440px;
  padding: 32px;
}

.empty-panel {
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 800;
}

.status-text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .page {
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 34px;
  }

  .logo {
    width: 134px;
  }

  .profile-header {
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .stats {
    gap: 14px;
  }

  .collection-row {
    grid-auto-columns: minmax(206px, 72%);
  }

  .artist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .profile-header {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 16px;
  }

  .follow-pill {
    min-width: 0;
    width: 100%;
  }
}
