/* ── FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── RESET & TOKENS ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #f0ece6;
  --bg-noise:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  --card:         #141414;
  --card-mid:     #1e1e1e;
  --accent:       #e8d5b0;
  --accent-hot:   #f5c842;
  --text-light:   #f5f0e8;
  --text-muted:   #888;
  --text-dark:    #141414;
  --radius-card:  28px;
  --radius-btn:   16px;
  --radius-pill:  999px;
  --shadow-deep:  0 32px 80px rgba(0,0,0,.22), 0 8px 24px rgba(0,0,0,.14);
  --shadow-btn:   0 2px 12px rgba(0,0,0,.18);
  --transition:   0.28s cubic-bezier(.4,0,.2,1);
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* ── BODY / STAGE ───────────────────────────────────── */
body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-image: var(--bg-noise);
  font-family: var(--font-body);
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
}

/* ambient blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #f9d98a55 0%, transparent 70%);
  top: -140px; right: -120px;
}
body::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #c8b8e855 0%, transparent 70%);
  bottom: -100px; left: -100px;
}

/* ── PHONE SHELL ────────────────────────────────────── */
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  animation: slideUp .7s cubic-bezier(.22,1,.36,1) both;
}

/* notch bar */
.phone::before {
  content: '';
  display: block;
  width: 90px; height: 5px;
  background: #333;
  border-radius: 3px;
  margin: 14px auto 0;
}

/* ── FEATURED IMAGE ─────────────────────────────────── */
.featured-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  margin: 12px 14px 0;
  border-radius: 18px;
}
.featured-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.featured-wrap:hover img { transform: scale(1.04); }

/* gradient overlay on image */
.featured-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, #141414ee 100%);
  border-radius: inherit;
}

/* ── HEADER ─────────────────────────────────────────── */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 20px;
  position: relative;
  margin-top: -40px;
  z-index: 2;
  animation: fadeUp .6s .2s both;
}

.avatar-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 180deg, var(--accent-hot), var(--accent), var(--accent-hot));
  box-shadow: 0 0 0 3px var(--card);
  flex-shrink: 0;
}
.avatar-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a2a;
  display: block;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-light);
  margin-top: 12px;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-align: center;
}

.profile-username {
  font-size: .8rem;
  font-weight: 400;
  color: var(--accent-hot);
  letter-spacing: .04em;
  margin-top: 4px;
}

.profile-bio {
  font-size: .82rem;
  color: #aaa;
  text-align: center;
  margin-top: 10px;
  line-height: 1.55;
  max-width: 280px;
}

/* ── DIVIDER ─────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #333, transparent);
  margin: 0 24px 20px;
}

/* ── LINKS LIST ──────────────────────────────────────── */
.links-list {
  list-style: none;
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  animation: fadeUp .5s both;
}
.link-item:nth-child(1) { animation-delay: .3s }
.link-item:nth-child(2) { animation-delay: .38s }
.link-item:nth-child(3) { animation-delay: .46s }
.link-item:nth-child(4) { animation-delay: .54s }
.link-item:nth-child(5) { animation-delay: .62s }

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--card-mid);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-btn);
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
}
.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ffffff09 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.link-btn:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: #3a3a3a;
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.link-btn:hover::before { opacity: 1; }
.link-btn:active { transform: scale(.98); }

.link-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 800;
  color: var(--accent-hot);
  letter-spacing: .02em;
  flex-shrink: 0;
  border: 1px solid #3a3a3a;
}

.link-text {
  flex: 1;
  min-width: 0;
}
.link-label {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}
.link-desc {
  font-size: .74rem;
  color: #666;
  margin-top: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  color: #444;
  font-size: 1rem;
  transition: transform var(--transition), color var(--transition);
  flex-shrink: 0;
}
.link-btn:hover .link-arrow {
  transform: translate(3px, -3px);
  color: var(--accent-hot);
}

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 20px 24px 24px;
  font-size: .72rem;
  color: #444;
  letter-spacing: .04em;
  animation: fadeUp .5s .7s both;
}
.site-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* ── SKELETON LOADER ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1e1e1e 25%, #282828 50%, #1e1e1e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
.skeleton-featured { height: 200px; margin: 12px 14px; border-radius: 18px; }
.skeleton-avatar { width: 80px; height: 80px; border-radius: 50%; margin: -40px auto 12px; }
.skeleton-text { height: 12px; margin: 8px 60px; }
.skeleton-text.wide { margin: 8px 40px; }
.skeleton-btn { height: 68px; border-radius: 16px; margin: 0 16px; }

/* ── PLACEHOLDER IMAGE ───────────────────────────────── */
.img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1e1e1e, #2d2d2d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
}

/* ── DARK / LIGHT TOGGLE ─────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 100;
  background: #141414;
  border: 1px solid #2a2a2a;
  color: var(--text-light);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--accent-hot);
}

/* ── LIGHT MODE ──────────────────────────────────────── */
[data-theme="light"] {
  --card:      #ffffff;
  --card-mid:  #f5f2ee;
  --text-light: #141414;
  --text-muted: #666;
  --shadow-deep: 0 32px 80px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.07);
}
[data-theme="light"] .phone { background: var(--card); }
[data-theme="light"] .link-btn { background: var(--card-mid); border-color: #e8e2da; color: #141414; }
[data-theme="light"] .link-icon { background: #ede8e0; border-color: #ddd8d0; }
[data-theme="light"] .link-desc { color: #999; }
[data-theme="light"] .link-arrow { color: #ccc; }
[data-theme="light"] .divider { background: linear-gradient(to right, transparent, #e0dbd3, transparent); }
[data-theme="light"] .site-footer { color: #aaa; }
[data-theme="light"] .site-footer span { background: #f0ece6; border-color: #e0dbd3; }
[data-theme="light"] .phone::before { background: #e0dbd3; }
[data-theme="light"] .theme-toggle { background: #fff; color: #141414; border-color: #e0dbd3; }
[data-theme="light"] .skeleton { background: linear-gradient(90deg, #ede8e0 25%, #e0dbd3 50%, #ede8e0 75%); background-size: 200% 100%; }

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 440px) {
  body { padding: 1rem .5rem; align-items: flex-start; }
  .phone { border-radius: 20px; max-width: 100%; }
}
@media (min-width: 900px) {
  /* on desktop, float the phone on the stage */
  .phone {
    box-shadow: var(--shadow-deep),
                inset 0 1px 0 rgba(255,255,255,.05);
  }
}