/* ===== Staff Profile / Link-in-Bio Page ===== */
.staff-profile-page {
  background: #0a0a0a;
}

.sp-main {
  min-height: 80vh;
  padding: 100px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sp-loading {
  text-align: center;
  padding: 120px 20px;
  color: var(--text-muted);
}
.sp-loading .material-symbols-rounded {
  font-size: 2.5rem;
  animation: spin 1.5s linear infinite;
  display: block;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sp-loading p { font-size: .9rem; }

.sp-404 {
  text-align: center;
  padding: 120px 20px;
  color: rgba(255,255,255,.7);
}
.sp-404 .material-symbols-rounded {
  font-size: 4rem;
  color: rgba(255,255,255,.2);
  display: block;
  margin-bottom: 20px;
}
.sp-404 h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #fff;
}
.sp-404 p {
  margin-bottom: 28px;
  color: rgba(255,255,255,.5);
}

.sp-profile {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  animation: spFadeIn .5s ease;
}
@keyframes spFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cover + Avatar */
.sp-cover {
  position: relative;
  height: 180px;
  border-radius: 24px 24px 0 0;
  margin-bottom: -52px;
}
.sp-cover__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fb923c 0%, #e63946 40%, #7c3aed 100%);
  opacity: .85;
  border-radius: 24px 24px 0 0;
}
.sp-avatar {
  position: absolute;
  bottom: -48px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 4px solid #0d1018;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #0a0a0a;
  z-index: 2;
  overflow: hidden;
}
.sp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Edit profile button (shown to logged-in owner of this profile) */
/* Positioned as a floating chip at the top-right of the profile card */
.sp-edit-own {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 10, 10, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sp-edit-own:hover {
  background: #fb923c;
  border-color: #fb923c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(251, 146, 60, .35);
}
.sp-edit-own .material-symbols-rounded { font-size: 15px; }

/* Birthday ribbon (shown over the cover when today = birthday or spotlight = true) */
.sp-birthday-ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b, #f59e0b, #fb923c);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, .45);
  animation: bdayBob 2.8s ease-in-out infinite;
}
.sp-birthday-ribbon .material-symbols-rounded { font-size: 18px; }
@keyframes bdayBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Position the cover relative so edit/birthday chips anchor correctly */
.sp-cover { position: relative; }

/* ===== Birthday theme (applied when today is the person's birthday OR
        they are today's seeded "staff of the moment") ===== */
.sp-profile.is-birthday {
  position: relative;
}

/* Warmer cover gradient on birthdays */
.sp-profile.is-birthday .sp-cover__bg {
  background: linear-gradient(135deg, #ff6b6b 0%, #f59e0b 35%, #fb923c 70%, #ec4899 100%);
  opacity: .95;
  animation: bdayCoverShimmer 8s ease-in-out infinite;
}
@keyframes bdayCoverShimmer {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  50%      { filter: hue-rotate(-12deg) saturate(1.15); }
}

/* Pulsing glow on the avatar */
.sp-profile.is-birthday .sp-avatar {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .35), 0 0 32px rgba(245, 158, 11, .55);
  animation: bdayAvatarGlow 2.4s ease-in-out infinite;
}
@keyframes bdayAvatarGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .35), 0 0 32px rgba(245, 158, 11, .45); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, .55), 0 0 48px rgba(245, 158, 11, .75); }
}

/* Subtle warm tint on the info card */
.sp-profile.is-birthday .sp-info {
  border-color: rgba(245, 158, 11, .25);
  background:
    radial-gradient(1200px 120px at 50% 0%, rgba(245, 158, 11, .10), transparent 70%),
    rgba(13, 16, 24, .95);
}

/* Floating confetti overlay — pinned to the profile card, non-interactive */
.sp-birthday-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
  border-radius: 24px;
}
.sp-birthday-confetti span {
  position: absolute;
  top: -10%;
  font-size: 1.5rem;
  opacity: 0;
  animation: bdayConfettiFall 7s linear infinite;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.sp-birthday-confetti span:nth-child(1) { left:  6%; animation-delay: 0s;   font-size: 1.8rem; }
.sp-birthday-confetti span:nth-child(2) { left: 18%; animation-delay: 1.2s; font-size: 1.4rem; }
.sp-birthday-confetti span:nth-child(3) { left: 32%; animation-delay: 2.4s; font-size: 1.6rem; }
.sp-birthday-confetti span:nth-child(4) { left: 46%; animation-delay: .6s;  font-size: 1.2rem; }
.sp-birthday-confetti span:nth-child(5) { left: 60%; animation-delay: 3.1s; font-size: 1.7rem; }
.sp-birthday-confetti span:nth-child(6) { left: 72%; animation-delay: 1.8s; font-size: 1.5rem; }
.sp-birthday-confetti span:nth-child(7) { left: 84%; animation-delay: 2.9s; font-size: 1.3rem; }
.sp-birthday-confetti span:nth-child(8) { left: 92%; animation-delay: 4.2s; font-size: 1.5rem; }

@keyframes bdayConfettiFall {
  0%   { transform: translateY(0)    rotate(0deg);   opacity: 0; }
  10%  {                              opacity: 1;                }
  90%  {                              opacity: 1;                }
  100% { transform: translateY(620px) rotate(360deg); opacity: 0; }
}

/* Respect reduced motion — keep confetti subtle, disable fall animation */
@media (prefers-reduced-motion: reduce) {
  .sp-profile.is-birthday .sp-cover__bg,
  .sp-profile.is-birthday .sp-avatar,
  .sp-birthday-ribbon,
  .sp-birthday-confetti span {
    animation: none !important;
  }
  .sp-birthday-confetti span { opacity: .8; top: 8%; }
}

/* Small admin badge (role chip for visitors, shown top-left under ribbon if both) */
.sp-admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(251, 146, 60, .15);
  color: #fb923c;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* Info */
.sp-info {
  background: rgba(13, 16, 24, .95);
  border: 1px solid rgba(255,255,255,.08);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  padding: 110px 32px 32px;
  text-align: center;
  backdrop-filter: blur(20px);
}

.sp-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.2;
}

.sp-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.sp-dept {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.sp-bio {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin: 0 0 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Details (location, phone) */
.sp-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.sp-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.sp-detail .material-symbols-rounded {
  font-size: 16px;
  color: rgba(255,255,255,.35);
}

/* Social links */
.sp-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.sp-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.sp-link:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 146, 60, .15);
}
.sp-link__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sp-link__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.sp-link__icon--twitter   { background: rgba(29, 161, 242, .15); color: #1da1f2; }
.sp-link__icon--linkedin  { background: rgba(10, 102, 194, .15); color: #0a66c2; }
.sp-link__icon--instagram { background: rgba(225, 48, 108, .15); color: #e1306c; }
.sp-link__icon--youtube   { background: rgba(255, 0, 0, .15);    color: #ff0000; }
.sp-link__icon--website   { background: rgba(251, 146, 60, .15); color: #fb923c; }
.sp-link__icon--email     { background: rgba(16, 185, 129, .15); color: #10b981; }
.sp-link__icon--default   { background: rgba(255,255,255,.06);   color: rgba(255,255,255,.6); }

.sp-link__label {
  flex: 1;
}
.sp-link__arrow {
  color: rgba(255,255,255,.3);
  font-size: 1.1rem;
  transition: transform .2s;
}
.sp-link:hover .sp-link__arrow { transform: translateX(3px); color: var(--accent); }

/* Action buttons */
.sp-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.sp-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
  text-decoration: none;
  font-family: inherit;
}
.sp-action:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.sp-action--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.sp-action--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 146, 60, .3);
}
.sp-action .material-symbols-rounded { font-size: 1.1rem; }

/* Short link badge */
.sp-short-link {
  text-align: center;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sp-short-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  font-weight: 500;
  letter-spacing: .5px;
  transition: color .2s;
}
.sp-short-link a:hover { color: var(--accent); }
.sp-short-link .material-symbols-rounded { font-size: 14px; }

/* Team link */
.sp-team-link {
  text-align: center;
  margin-top: 32px;
}
.sp-team-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.5);
  font-weight: 600;
  font-size: .85rem;
  transition: color .2s;
}
.sp-team-link a:hover { color: var(--accent); }
.sp-team-link .material-symbols-rounded { font-size: 1.2rem; }

/* ===== Staff Directory (all staff grid, shown when no slug in URL) ===== */
.sp-directory {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}
.sp-directory__head {
  text-align: center;
  margin-bottom: 40px;
}
.sp-directory__head h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}
.sp-directory__head h1 em {
  font-style: italic;
  color: var(--accent);
}
.sp-directory__head p {
  color: rgba(255,255,255,.55);
  font-size: .95rem;
}
.sp-directory__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.sp-dir-card {
  position: relative;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  transition: all .25s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.sp-dir-card__bday {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, .4);
  animation: bdayBob 2.8s ease-in-out infinite;
}
.sp-dir-card__bday .material-symbols-rounded { font-size: 14px; }
.sp-dir-card:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(251, 146, 60, .12);
}
.sp-dir-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0a0a0a;
  overflow: hidden;
}
.sp-dir-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sp-dir-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.sp-dir-card__role {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.sp-dir-card__dept {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .sp-main { padding: 80px 14px 40px; }
  .sp-cover { height: 140px; }
  .sp-info { padding: 96px 20px 24px; }
  .sp-name { font-size: 1.6rem; }
  .sp-avatar { width: 88px; height: 88px; font-size: 2rem; bottom: -36px; }
  .sp-actions { flex-direction: column; }
  .sp-directory__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sp-dir-card { padding: 22px 16px; }
}
