/* public-profile-editorial-luxury-v1
   Editorial-Luxury redesign of /:slug (saadjie.com/<child>).
   Pairs with contribute.css for shared ambient layers (aurora,
   particle canvas, scroll progress, ticker, paper grain).
   Page-specific blocks restyled below: hero, about, total panel,
   feed list, sticky CTA. All design tokens come from the same
   bone/copper/carbon palette used on /contribute.
*/

:root {
  --el-bone:        #FAF6F0;
  --el-bone-deep:   #F2EBDE;
  --el-paper:       #FFFFFF;
  --el-carbon:      #1A1916;
  --el-graphite:    #3D3A35;
  --el-muted:       #6B6660;
  --el-mute-soft:   #9C958B;
  --el-hairline:    #E8E1D6;
  --el-copper:      #B87333;
  --el-copper-deep: #9A5F2A;
  --el-copper-tint: #F4E7D6;
  --el-radius:      4px;
  --el-radius-lg:   8px;
  --el-font-display: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --el-font-body:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ------------------------------------------------------------------ */
/* Page shell                                                          */
/* ------------------------------------------------------------------ */

.public-profile {
  background-color: var(--el-bone);
  color: var(--el-carbon);
  font-family: var(--el-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main.profile {
  position: relative;
  z-index: 3;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 40px) 120px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}

/* ------------------------------------------------------------------ */
/* Hero card -- portrait + name + welcome                              */
/* ------------------------------------------------------------------ */

.profile__hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 36px);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
  background: linear-gradient(135deg, #FFFBF3 0%, #F6E9D2 100%);
  border: 1px solid var(--el-hairline);
  border-radius: var(--el-radius-lg);
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 48px rgba(184, 115, 51, 0.10), 0 2px 6px rgba(26, 25, 22, 0.04);
  animation: el-fadeUp 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@media (min-width: 640px) {
  .profile__hero {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    align-items: center;
    text-align: left;
  }
}

/* Animated mesh backdrop inside the hero card -- three copper radials
   drifting on long offsets. Identical pattern to the contribute hero. */
.profile__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45vmax 30vmax at 12% 22%, rgba(184, 115, 51, 0.32), transparent 65%),
    radial-gradient(40vmax 28vmax at 88% 30%, rgba(233, 178, 100, 0.42), transparent 65%),
    radial-gradient(38vmax 26vmax at 50% 100%, rgba(154, 95, 42, 0.30), transparent 65%);
  filter: blur(40px);
  animation: el-profile-hero-drift 28s ease-in-out infinite alternate;
}
@keyframes el-profile-hero-drift {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(2%, -2%); }
}

.profile__hero-portrait {
  display: flex;
  justify-content: center;
}

.profile__photo {
  display: block;
  width: clamp(140px, 28vw, 200px);
  height: clamp(140px, 28vw, 200px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 1px var(--el-copper),
    0 18px 36px rgba(184, 115, 51, 0.32);
  transition: transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.profile__hero:hover .profile__photo {
  transform: scale(1.04);
}
.profile__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--el-font-display);
  font-size: clamp(56px, 12vw, 84px);
  font-weight: 500;
  color: var(--el-copper);
  background: linear-gradient(135deg, var(--el-bone) 0%, var(--el-copper-tint) 100%);
}

.profile__hero-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.profile__hero-eyebrow {
  margin: 0;
  font-family: var(--el-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--el-copper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.profile__hero-eyebrow::before,
.profile__hero-eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.profile__hero-eyebrow::after { display: none; }

.profile__name {
  margin: 0;
  font-family: var(--el-font-display);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  background: linear-gradient(110deg,
    #5A2C0A 0%,
    var(--el-copper-deep) 22%,
    var(--el-copper) 42%,
    #F4C77A 55%,
    var(--el-copper) 70%,
    var(--el-copper-deep) 88%,
    #5A2C0A 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(184, 115, 51, 0.25));
  animation: el-name-shimmer 5s ease-in-out infinite alternate;
}
@keyframes el-name-shimmer {
  0%   { background-position: 0% 50%;   }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   }
}

.profile__welcome {
  margin: 0;
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--el-graphite);
}
.profile__welcome--empty {
  color: var(--el-muted);
  font-style: italic;
}

.profile__placeholder-notice {
  margin: 0;
  color: var(--el-graphite);
  font-size: 15px;
  line-height: 1.55;
}
.profile__placeholder-meta {
  margin: 0;
  font-size: 13px;
  color: var(--el-muted);
}
.profile__url {
  display: inline-block;
  padding: 4px 8px;
  background: var(--el-bone);
  border: 1px solid var(--el-hairline);
  border-radius: var(--el-radius);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--el-graphite);
  word-break: break-all;
}

/* ------------------------------------------------------------------ */
/* About section                                                       */
/* ------------------------------------------------------------------ */

.profile__about {
  padding: clamp(20px, 3vw, 32px);
  background: var(--el-paper);
  border: 1px solid var(--el-hairline);
  border-radius: var(--el-radius-lg);
  box-shadow: 0 1px 2px rgba(26, 25, 22, 0.04);
  animation: el-fadeUp 700ms 100ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.profile__about-heading {
  margin: 0 0 14px;
  font-family: var(--el-font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 26px);
  letter-spacing: -0.01em;
  color: var(--el-carbon);
}
.profile__about-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--el-graphite);
}
.profile__about-body strong { color: var(--el-carbon); }
.profile__about-body + .profile__about-body { margin-top: 14px; }

/* ------------------------------------------------------------------ */
/* Running total panel -- the headline number                          */
/* ------------------------------------------------------------------ */

.total-panel,
.profile__total {
  position: relative;
  padding: clamp(36px, 5vw, 56px) clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, #FFFBF3 0%, #F6E9D2 100%);
  border: 1px solid var(--el-hairline);
  border-radius: var(--el-radius-lg);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 48px rgba(184, 115, 51, 0.12), 0 2px 6px rgba(26, 25, 22, 0.04);
  color: var(--el-carbon);
  animation: el-fadeUp 700ms 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
/* Top copper accent strip */
.total-panel::before,
.profile__total::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--el-copper) 0%, #E9B264 50%, var(--el-copper-deep) 100%);
}
/* Soft animated mesh behind the number */
.total-panel::after,
.profile__total::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40vmax 28vmax at 30% 50%, rgba(184, 115, 51, 0.18), transparent 60%),
    radial-gradient(35vmax 24vmax at 75% 50%, rgba(233, 178, 100, 0.22), transparent 60%);
  filter: blur(48px);
  animation: el-profile-total-drift 22s ease-in-out infinite alternate;
}
@keyframes el-profile-total-drift {
  0%   { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.total-panel__eyebrow,
.profile__total-heading {
  margin: 0 0 16px;
  font-family: var(--el-font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--el-copper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.total-panel__eyebrow::before,
.total-panel__eyebrow::after,
.profile__total-heading::before,
.profile__total-heading::after {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.total-panel__amount,
.profile__total-amount {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.total-panel__rands,
.profile__total-rands {
  font-family: var(--el-font-display);
  font-weight: 600;
  font-size: clamp(56px, 11vw, 104px);
  line-height: 1;
  letter-spacing: -0.022em;
  background: linear-gradient(135deg,
    var(--el-carbon) 0%,
    var(--el-copper-deep) 35%,
    var(--el-copper) 60%,
    #E9B264 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 14px rgba(184, 115, 51, 0.25));
  animation: el-name-shimmer 7s ease-in-out infinite alternate;
}
.total-panel__caption,
.profile__total-caption {
  font-family: var(--el-font-body);
  font-size: 13px;
  color: var(--el-muted);
  letter-spacing: 0.03em;
}

/* Rhythm dots -> 3 copper pulses */
.total-panel__rhythm {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.total-panel__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--el-copper);
  opacity: 0.5;
  animation: el-dot-pulse 1.8s ease-in-out infinite;
}
.total-panel__dot:nth-child(2) { animation-delay: 0.3s; }
.total-panel__dot:nth-child(3) { animation-delay: 0.6s; }
@keyframes el-dot-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.35; }
  50%      { transform: scale(1.15); opacity: 1;    }
}

/* ------------------------------------------------------------------ */
/* Recent contributor feed                                             */
/* ------------------------------------------------------------------ */

.profile__feed,
.feed-list {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--el-paper);
  border: 1px solid var(--el-hairline);
  border-radius: var(--el-radius-lg);
  box-shadow: 0 1px 2px rgba(26, 25, 22, 0.04);
  animation: el-fadeUp 700ms 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.profile__feed::before,
.feed-list::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--el-copper), transparent);
  border-radius: var(--el-radius-lg) var(--el-radius-lg) 0 0;
}
.profile__feed-heading,
.feed-list__heading {
  margin: 0 0 18px;
  font-family: var(--el-font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 28px);
  letter-spacing: -0.01em;
  color: var(--el-carbon);
}
.profile__feed-empty {
  margin: 0;
  color: var(--el-muted);
  font-style: italic;
  font-family: var(--el-font-display);
  font-size: 17px;
}
.profile__feed-list,
.feed-list__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile__feed-item,
.feed-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--el-hairline);
  transition: background 200ms ease, padding 200ms ease;
}
.profile__feed-item:first-child,
.feed-list__item:first-child {
  border-top: 0;
  padding-top: 4px;
}
.profile__feed-item:hover,
.feed-list__item:hover {
  background: linear-gradient(90deg, transparent 0%, var(--el-bone) 50%, transparent 100%);
}
.profile__feed-name,
.feed-list__name {
  font-weight: 600;
  color: var(--el-carbon);
  font-size: 15px;
  word-break: break-word;
}
.profile__feed-amount,
.feed-list__amount {
  margin-left: auto;
  color: var(--el-copper-deep);
  font-family: var(--el-font-display);
  font-weight: 600;
  font-size: 19px;
}
.profile__feed-when,
.feed-list__when {
  color: var(--el-muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.profile__feed-sep,
.feed-list__sep {
  color: var(--el-mute-soft);
}
.profile__feed-message,
.feed-list__message {
  flex-basis: 100%;
  margin: 6px 0 0;
  padding: 10px 14px;
  background: var(--el-bone);
  border-left: 2px solid var(--el-copper);
  color: var(--el-graphite);
  font-family: var(--el-font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  border-radius: 0 var(--el-radius) var(--el-radius) 0;
}

/* ------------------------------------------------------------------ */
/* Sticky mobile CTA                                                   */
/* ------------------------------------------------------------------ */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--el-hairline);
  box-shadow: 0 -8px 24px rgba(26, 25, 22, 0.08);
}
.sticky-cta__inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sticky-cta__copy {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.sticky-cta__lead {
  font-family: var(--el-font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--el-carbon);
  letter-spacing: -0.01em;
}
.sticky-cta__hint {
  font-size: 12px;
  color: var(--el-muted);
}
.sticky-cta__button {
  display: inline-block;
  background: linear-gradient(135deg, var(--el-copper) 0%, var(--el-copper-deep) 100%);
  color: #fff;
  border: 1.5px solid var(--el-copper);
  padding: 14px 26px;
  font-family: var(--el-font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--el-radius);
  text-decoration: none;
  box-shadow:
    0 6px 18px rgba(184, 115, 51, 0.32),
    0 0 0 0 rgba(184, 115, 51, 0.55);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: el-cta-pulse 2.6s ease-in-out infinite;
  white-space: nowrap;
}
.sticky-cta__button:hover {
  transform: translateY(-1px);
}
@keyframes el-cta-pulse {
  0%, 100% {
    box-shadow:
      0 6px 18px rgba(184, 115, 51, 0.32),
      0 0 0 0 rgba(184, 115, 51, 0.55);
  }
  50% {
    box-shadow:
      0 10px 28px rgba(184, 115, 51, 0.42),
      0 0 0 14px rgba(184, 115, 51, 0);
  }
}
/* Bottom padding to keep content above the sticky bar on mobile */
@media (max-width: 768px) {
  main.profile { padding-bottom: 140px; }
}
/* Hide sticky CTA on tablet+ -- the CTA can sit inline elsewhere */
@media (min-width: 769px) {
  .sticky-cta { display: none; }
  main.profile { padding-bottom: 80px; }
}

/* ------------------------------------------------------------------ */
/* Public footer                                                       */
/* ------------------------------------------------------------------ */

.public-footer {
  position: relative;
  z-index: 3;
  padding: 32px 16px 100px;
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid var(--el-hairline);
}
.public-footer small {
  font-family: var(--el-font-body);
  font-size: 12px;
  color: var(--el-mute-soft);
  letter-spacing: 0.04em;
}
.public-footer a {
  display: inline-block;
  color: var(--el-graphite);
  text-decoration: none;
  border-bottom: 1px solid var(--el-hairline);
  padding: 8px 4px;
  min-height: 44px;
  line-height: 1.7;
}
.public-footer a:hover {
  color: var(--el-copper-deep);
  border-bottom-color: var(--el-copper);
}
.public-footer__report {
  margin-inline-start: 4px;
}

/* ------------------------------------------------------------------ */
/* Fade-up shared keyframe + reduced-motion bail-out                   */
/* ------------------------------------------------------------------ */

@keyframes el-fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .profile__hero,
  .profile__hero::before,
  .profile__photo,
  .profile__name,
  .profile__about,
  .total-panel,
  .total-panel::after,
  .total-panel__rands,
  .total-panel__dot,
  .feed-list,
  .profile__feed,
  .sticky-cta__button,
  .profile__feed-item,
  .feed-list__item {
    animation: none !important;
    transition: none !important;
  }
  /* CRITICAL: animation: none cancels the keyframes but the fade-up
     animation-fill-mode pinned opacity:0. Reset explicitly so the
     reduced-motion page renders visible, not invisible. */
  .profile__hero,
  .profile__about,
  .total-panel,
  .profile__feed,
  .feed-list {
    opacity: 1 !important;
    transform: none !important;
  }
  .profile__name,
  .total-panel__rands {
    background-position: 50% 50% !important;
  }
}
