/* ══════════════════════════════════════════════════
   USER / DEV PROFILE PAGE
   Layered on top of home.css — reuses its tokens,
   masthead, footer, menu island and info FAB.
   Assumes user/*.html — the ../ paths walk back to
   css/, js/, img/ and the root pages.
══════════════════════════════════════════════════ */

.user-page{
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 5rem;
}

/* ── Back link ── */
.back-link{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
  margin-bottom: 1.75rem;
  transition: color 180ms ease, transform 320ms var(--ease-island);
  transform-origin: left center;
  width: fit-content;
}
.back-link:hover{
  color: var(--purple-deep);
  transform: translateX(-3px);
}
.back-link:active{ transform: translateX(-3px) scale(0.97); }
.back-arrow{
  font-size: 1.05rem;
  line-height: 1;
}

/* ══════════════════════════════════════════════════
   PROFILE CARD
══════════════════════════════════════════════════ */
.profile-card{
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  margin-bottom: 2rem;
}

/* decorative banner strip at the top */
.profile-banner{
  position: relative;
  height: 96px;
  background: var(--purple-deep);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.profile-banner-lines{
  position: absolute;
  inset: -20% -10%;
  background: repeating-conic-gradient(
    from -12deg at 8% 32%,
    rgba(255,255,255,0.09) 0deg 1.4deg,
    transparent 1.4deg 7deg
  );
  pointer-events: none;
}

/* ── Head: avatar + identity ── */
.profile-head{
  position: relative;
  padding: 0 1.75rem 1.25rem;
  display: flex;
  align-items: flex-end;
  gap: 1.35rem;
  flex-wrap: wrap;
}

.profile-avatar-wrap{
  position: relative;
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  margin-top: -54px;   /* pulls the avatar up so it overlaps the banner */
}

.profile-avatar{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--paper);
  background: var(--paper-2);
  display: block;
  box-shadow: 0 0 0 3px var(--ink);
}

.profile-status{
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--purple);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 3px var(--ink);
}

.profile-identity{
  padding-bottom: 0.15rem;
  min-width: 0;
  flex: 1;
}
.profile-identity h1{
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.05;
  margin-bottom: 0.2rem;
  word-break: break-word;
}
.profile-handle{
  font-family: 'Shippori Mincho', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.profile-chips{
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ── Bio ── */
.profile-bio{
  padding: 0 1.75rem 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 60ch;
}

/* ── Link row ── */
.profile-links{
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.75rem 1.75rem;
  border-top: 2px dotted rgba(34,17,43,0.3);
}
.profile-link{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 12px 12px 12px 3px;
  padding: 0.45rem 0.95rem;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform 420ms var(--ease-island),
    box-shadow 260ms var(--ease-island),
    background 180ms ease;
}
.profile-link:hover{
  background: var(--white);
  transform: translate(-1px,-1px) scale(1.03, 1.01);
  box-shadow: 5px 5px 0 var(--ink);
}
.profile-link:active{
  transform: translate(0,0) scale(0.96, 0.98);
  box-shadow: 1px 1px 0 var(--ink);
  transition-duration: 220ms;
}
.profile-link-icon{
  font-size: 1rem;
  line-height: 1;
}

/* ══════════════════════════════════════════════════
   FACTS ROW (was stats)
══════════════════════════════════════════════════ */
.profile-facts{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 16px 16px 16px 4px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink);
  margin-bottom: 2rem;
}
.fact{
  background: var(--paper);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fact-label{
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact-value{
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--ink);
}

/* ══════════════════════════════════════════════════
   PROFILE SECTION
══════════════════════════════════════════════════ */
.profile-section{
  margin-bottom: 2.25rem;
}
.profile-section h2{
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
  line-height: 1.15;
}

.profile-list{
  list-style: none;
  border-top: 2px dotted rgba(34,17,43,0.3);
  padding-top: 1.1rem;
}
.profile-list li{
  position: relative;
  padding: 0.55rem 0 0.55rem 1.4rem;
  color: var(--muted);
  font-size: 0.96rem;
  border-bottom: 1px dashed rgba(34,17,43,0.15);
}
.profile-list li:last-child{ border-bottom: 0; }
.profile-list li::before{
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}
.profile-list code{
  font-family: 'Shippori Mincho', serif;
  font-style: italic;
  font-size: 0.92em;
  background: var(--paper-2);
  border: 1px solid rgba(34,17,43,0.2);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  color: var(--purple-deep);
}

/* ══════════════════════════════════════════════════
   CTA ROW
══════════════════════════════════════════════════ */
.profile-cta{
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 640px){
  .user-page{ padding: 2.5rem 1.35rem 4rem; }

  .profile-head{
    padding: 0 1.35rem 1.15rem;
    align-items: center;
  }
  .profile-avatar-wrap{
    width: 88px;
    height: 88px;
    margin-top: -44px;
  }
  .profile-identity h1{ font-size: 1.65rem; }

  .profile-bio{ padding: 0 1.35rem 1.35rem; }
  .profile-links{ padding: 1.1rem 1.35rem 1.5rem; }

  .profile-facts{
    grid-template-columns: 1fr;
    border-radius: 14px 14px 14px 3px;
  }
  .fact{
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
  }
}

@media (max-width: 480px){
  .profile-banner{ height: 78px; }
  .profile-avatar-wrap{
    width: 78px;
    height: 78px;
    margin-top: -39px;
  }
  .profile-status{
    width: 15px;
    height: 15px;
    border-width: 3px;
  }
  .profile-link{
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce){
  .back-link,
  .profile-link{
    transition: none !important;
  }
  .back-link:hover,
  .back-link:active,
  .profile-link:hover,
  .profile-link:active{
    transform: none !important;
  }
}