@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* Exact values pulled from the reference's dark-theme CSS variables
     (--colorPrimary, --colorOnPrimary, --colorOnPrimaryTranslucent,
     --colorPrimarySurface, --colorSingleAlbum1/2, --colorProfileBottomShadow*) */
  --brand-bg: #000000;
  --brand-surface: rgba(255, 255, 255, 0.0706);
  --brand-hairline: rgba(255, 255, 255, 0.12);
  --brand-text: #ffffff;
  --brand-text-translucent: rgba(255, 255, 255, 0.502);
  --tile-overlay-1: rgba(35, 6, 35, 0);
  --tile-overlay-2: rgba(6, 13, 18, 0.6);
  --hero-fade-1: rgba(5, 0, 0, 0);
  --hero-fade-2: rgba(0, 0, 0, 0.38);
  --hero-fade-3: rgba(0, 0, 0, 0.878);
  --font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  border-color: var(--brand-hairline);
}

html {
  background-color: var(--brand-bg);
  color: var(--brand-text);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-display);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- full-bleed blurred backdrop ---------- */

.bg-image {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100%;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(50px);
  transform: scale(1.1);
}

/* ---------- sticky mini header ---------- */

.mini-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  pointer-events: none;
}

.mini-header.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mini-header-avatar {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-header-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 600;
}

/* ---------- page shell / card ---------- */

.page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  padding: 24px 14px 56px;
}

.container.card {
  width: 100%;
  max-width: 566px;
  margin: 0 auto;
  border-radius: 30px;
  overflow: hidden;
  background-color: var(--brand-bg);
  box-shadow: 0 1px 10px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- hero photo ---------- */

.hero-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 566 / 546;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(180px, 32vw, 260px);
  background: linear-gradient(180deg, var(--hero-fade-1) 12%, var(--hero-fade-2) 46%, var(--hero-fade-3) 76%, var(--brand-bg) 100%);
}

/* ---------- profile block ---------- */

.profile-block {
  margin-top: -48px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px 28px;
}

.profile-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-name h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--brand-text);
}

.verify-badge {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.verify-badge-sm {
  width: 14px;
  height: 14px;
}

.handle {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-text-translucent);
}

/* ---------- social icon carousel ---------- */
/* Structure matches the reference exactly: .carousel-container >
   .userSocialMediaIcon.carousel-track > .social-icon-wrapper > a.socialicon */

.carousel-container {
  margin-top: 20px;
  width: 100%;
  display: grid;
  place-items: center;
  position: relative;
  overflow-x: clip;
}

.carousel-track {
  display: flex;
  justify-content: center;
  animation: none;
}

.social-icon-wrapper {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  padding: 1px;
}

.socialicon {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease-out;
}

.socialicon:active {
  transform: scale(0.9);
}

.socialicon img {
  width: 100%;
  height: 100%;
}

/* ---------- bio ---------- */

.bio {
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.4;
  color: var(--brand-text);
}

/* ---------- featured links: 1 big tile + 2-col grid ---------- */

.listofalbum {
  margin-top: 24px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 0;
}

.singlebigitem,
.singlealbum {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}

.singlebigitem:active,
.singlealbum:active {
  transform: scale(0.97);
}

.singlebigitem:hover .imgbox-img,
.singlealbum:hover .imgbox-img {
  transform: scale(1.06);
}

.singlebigitem {
  width: 100%;
  height: 200px;
}

.singlealbum {
  width: calc(50% - 5px);
  height: 151px;
}

.imgbox-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.singlebigitem::after,
.singlealbum::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--tile-overlay-1) 0%, var(--tile-overlay-2) 128.76%);
}

.iconbox {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
}

.iconbox img {
  width: 100%;
  height: 100%;
}

.singlebigitem .iconbox {
  width: 44px;
  height: 44px;
}

.albumtext {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.singlebigitem .albumtext {
  font-size: 19px;
}

/* ---------- gallery: horizontal scroll ---------- */

.gallery-scroll {
  margin-top: 24px;
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  display: block;
  flex: 0 0 auto;
  width: 30%;
  aspect-ratio: 1 / 1;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}

.gallery-item:active {
  transform: scale(0.97);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-out;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ---------- sign-off ---------- */

.sign-off {
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--brand-text);
  opacity: 0.6;
}

/* ---------- animations ---------- */

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-in {
  animation: row-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .stagger-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .mini-header,
  a,
  a * {
    transition: none !important;
    transform: none !important;
  }
}
