/* ================================================================
   Profile page — /u/
   Requires /style.css for base tokens, topbar, footer, buttons.
   ================================================================ */

/* ================================================================
   FONT OVERRIDES
   The profile page uses Darker Grotesque instead of the site-wide
   Sora/Manrope. These overrides apply within the profile page
   wrapper only.
   ================================================================ */
.profile-page {
  --font-display: "Darker Grotesque", sans-serif;
  --font-body: "Darker Grotesque", sans-serif;
}

/* ================================================================
   TWO-COLUMN GITHUB LAYOUT
   ================================================================ */
.profile {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem max(5vw, 1.25rem) 6rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ================================================================
   LEFT SIDEBAR
   ================================================================ */
.sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.sidebar__avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.sidebar__avatar-overlay.is-visible {
  opacity: 1;
}

.sidebar__avatar svg {
  width: 96px;
  height: 96px;
  color: var(--ink-faint);
}

/* Fallback placeholder icon (before avatar renders) */
.sidebar__avatar svg[viewBox="0 0 24 24"] {
  width: 48px;
  height: 48px;
}

.sidebar__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sidebar__role {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-dim);
  line-height: 1.35;
  margin-top: 0.2rem;
}

.sidebar__company {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar__company svg {
  width: 16px;
  height: 16px;
  color: var(--ink-dim);
  flex-shrink: 0;
}

.sidebar__since {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar__since svg {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.sidebar__divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 1.25rem 0;
  border: none;
}

/* Stats stacked vertically */
.sidebar__stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar__stat {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.sidebar__stat-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--teal);
}

.sidebar__stat-label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-dim);
}

/* Edit profile button in sidebar */
.sidebar__edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.sidebar__edit-btn:hover {
  border-color: var(--teal-line);
  color: var(--teal);
}

/* Sign-out link in sidebar */
.sidebar__signout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 160ms ease;
}

.sidebar__signout:hover {
  color: var(--teal);
}

/* ================================================================
   RIGHT CONTENT
   ================================================================ */
.content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 1.25rem;
}

/* ================================================================
   REVEAL ANIMATION
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ================================================================
   BADGES — WRAPPING FLEX ROW (collectible pins)
   ================================================================ */
.badges__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: flex-start;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
  gap: 0.4rem;
  cursor: default;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.badge-item:hover {
  transform: scale(1.05);
}

.badge-item:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Badge SVG */
.badge-item__visual {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-item__visual svg,
.badge-item__img {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  filter: drop-shadow(0 2px 10px rgba(69, 216, 197, 0.08));
  transition: filter 0.3s ease, border-color 0.3s ease;
}

.badge-item:hover .badge-item__visual svg,
.badge-item:hover .badge-item__img {
  filter: drop-shadow(0 4px 20px rgba(69, 216, 197, 0.3));
  border-color: rgba(237, 238, 236, 0.35);
}

.badge-item__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.625rem;
  color: var(--teal);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.badge-item__rarity {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 400;
  color: var(--ink-faint);
  line-height: 1.3;
}

/* ---- Locked Badge — fully silhouetted ---- */
.badge-item--locked .badge-item__img,
.badge-item--locked .badge-item__visual svg,
.badge-item--locked:hover .badge-item__img,
.badge-item--locked:hover .badge-item__visual svg {
  filter: brightness(0) !important;
  opacity: 1;
}

/* Lock overlay */
.badge-item__lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.badge-item__lock-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-item__lock-icon svg {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
  filter: none;
  border: none;
  border-radius: 0;
}

/* Tooltip for locked badges */
.badge-item__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.badge-item__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--line);
}

.badge-item--locked:hover .badge-item__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   BADGE DETAIL MODAL
   ================================================================ */
.badge-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.badge-modal[hidden] {
  display: none;
}

.badge-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.badge-modal__card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  max-width: 340px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  animation: badge-modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes badge-modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.badge-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 160ms ease, background 160ms ease;
}

.badge-modal__close:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.badge-modal__visual {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-modal__visual img,
.badge-modal__visual svg {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  filter: drop-shadow(0 8px 32px rgba(69, 216, 197, 0.2));
}

.badge-modal__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

.badge-modal__desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0;
}

.badge-modal__date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.badge-modal__download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid var(--teal-line);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.badge-modal__download svg {
  width: 14px;
  height: 14px;
  filter: none;
  border-radius: 0;
}

.badge-modal__download:hover {
  background: rgba(69, 216, 197, 0.15);
  border-color: var(--teal);
}

/* ================================================================
   UPCOMING RSVPs
   ================================================================ */
.upcoming-rsvps {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.upcoming-rsvp {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease;
}

.upcoming-rsvp:hover {
  border-color: var(--teal-line);
}

.upcoming-rsvp__date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
  min-width: 3.5rem;
}

.upcoming-rsvp__name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.upcoming-rsvp__tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.upcoming-rsvp__tag--confirmed {
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid var(--teal-line);
}

.upcoming-rsvp__tag--waitlist {
  color: #E8AE2A;
  background: rgba(232, 174, 42, 0.1);
  border: 1px solid rgba(232, 174, 42, 0.3);
}

.upcoming-rsvp__loc {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-left: auto;
}

/* ── RSVP view toggle ── */
.rsvps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.rsvps-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px;
}
.rsvps-toggle__btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: background 100ms, color 100ms;
}
.rsvps-toggle__btn--active {
  background: var(--bg-1);
  color: var(--teal);
}

/* ── RSVP Calendar ── */
.rsvps-cal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.rsvps-cal__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}
.rsvps-cal__nav {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-dim);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: border-color 150ms;
}
.rsvps-cal__nav:hover { border-color: var(--teal-line); color: var(--teal); }
.rsvps-cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--ink-faint);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.25rem;
}
.rsvps-cal__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.rsvps-cal__day {
  min-height: 52px;
  padding: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-dim);
  border-radius: 4px;
  overflow: hidden;
}
.rsvps-cal__day span { display: block; }
.rsvps-cal__day--outside { opacity: 0.25; }
.rsvps-cal__day--today { border: 1px solid var(--teal-line); }
.rsvps-cal__day--event { background: var(--bg-1); }
.rsvps-cal__evt {
  display: block;
  font-size: 0.5rem;
  color: var(--teal);
  text-decoration: none;
  padding: 1px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms;
}
.rsvps-cal__evt:hover { color: var(--ink); }

/* Mobile agenda fallback */
.rsvps-cal__agenda-day {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.rsvps-cal__agenda-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-dim);
  margin-bottom: 0.2rem;
}
.rsvps-cal__agenda-event {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  padding: 0.15rem 0 0.15rem 0.6rem;
  border-left: 2px solid var(--teal-line);
  transition: color 150ms;
}
.rsvps-cal__agenda-event:hover { color: var(--ink); }

@media (max-width: 600px) {
  .rsvps-cal__days { display: flex; flex-direction: column; gap: 0; }
  .rsvps-cal__weekdays { display: none; }
  .rsvps-cal__day { min-height: auto; }
}

/* ================================================================
   NEXT BADGE NUDGE
   ================================================================ */
.nudge {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-dim);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nudge svg {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.nudge strong {
  color: var(--teal);
  font-weight: 600;
}

/* ================================================================
   ACTIVITY SECTION
   ================================================================ */
.activity__grid {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 2rem;
  align-items: start;
}

.activity-timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
}

/* Vertical line */
.activity-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--line);
}

.activity-timeline__item {
  position: relative;
  padding: 0.85rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Dots */
.activity-timeline__dot {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}

.activity-timeline__dot--hollow {
  border: 2px solid var(--teal);
  background: var(--bg-0);
}

.activity-timeline__dot--filled {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.activity-timeline__dot--small {
  width: 9px;
  height: 9px;
  left: -27px;
  border: 2px solid var(--teal-line);
  background: var(--teal-dim);
}

.activity-timeline__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.activity-timeline__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.activity-timeline__type {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.activity-timeline__body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.activity-timeline__body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: var(--teal-line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.activity-timeline__body a:hover {
  text-decoration-color: var(--teal);
}

.activity-timeline__team {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink-dim);
  margin-top: 0.1rem;
}

/* Empty activity state */
.activity-timeline__empty {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-faint);
  padding: 1rem 0;
}

/* ================================================================
   EVENTS MAP (Leaflet)
   ================================================================ */
.events-map {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
}

/* Match Leaflet container bg to dark theme so no white flash */
.events-map .leaflet-container {
  background: #1a1a2e;
}

/* Dark theme overrides for Leaflet */
.events-map .leaflet-control-zoom a {
  background: var(--bg-2);
  color: var(--ink-dim);
  border-color: var(--line);
}
.events-map .leaflet-control-zoom a:hover {
  background: var(--bg-1);
  color: var(--ink);
}
.events-map .leaflet-control-attribution {
  background: rgba(19, 20, 20, 0.8);
  color: var(--ink-faint);
  font-size: 0.5rem;
}
.events-map .leaflet-control-attribution a {
  color: var(--ink-faint);
}

/* Custom teal marker */
.event-marker {
  width: 12px;
  height: 12px;
  background: var(--teal);
  border: 2px solid var(--bg-0);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(69, 216, 197, 0.4);
  transition: width 0.15s, height 0.15s;
}

.event-marker:hover {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 12px rgba(69, 216, 197, 0.6);
}

/* Map tooltip */
.map-tooltip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.map-tooltip strong {
  color: var(--teal);
}

/* Ensure map container clips the oversized inner map */
.events-map {
  position: relative;
  overflow: hidden;
}

.map-placeholder__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-faint);
  text-align: center;
  z-index: 1;
}

/* Faux map grid */
.map-placeholder__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.12;
  pointer-events: none;
}

/* London dot */
.map-dot {
  position: absolute;
  top: 36%;
  left: 54%;
  z-index: 2;
}

.map-dot__ping {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(69, 216, 197, 0.5);
  position: relative;
}

.map-dot__ping::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--teal-line);
  animation: map-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes map-ping {
  0% { transform: scale(0.8); opacity: 0.8; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.map-dot__tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  pointer-events: none;
}

.map-dot__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--line);
}

/* ================================================================
   PROFILE NOT FOUND / PRIVATE STATE
   ================================================================ */
.profile-empty {
  max-width: 480px;
  margin: 12vh auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-empty__icon {
  width: 64px;
  height: 64px;
  color: var(--ink-faint);
}

.profile-empty__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}

.profile-empty__text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

/* ================================================================
   LOADING STATE
   ================================================================ */
.profile-loading {
  max-width: 480px;
  margin: 16vh auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-faint);
}

/* ================================================================
   RESPONSIVE: 800px — sidebar stacks above content
   ================================================================ */
@media (max-width: 800px) {
  .profile {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
  }

  .sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }

  .sidebar__avatar {
    width: 80px;
    height: 80px;
    margin-bottom: 0;
  }

  .sidebar__avatar svg {
    width: 36px;
    height: 36px;
  }

  .sidebar__info {
    flex: 1;
    min-width: 200px;
  }

  .sidebar__divider {
    width: 100%;
    flex-basis: 100%;
  }

  .sidebar__stats {
    flex-direction: row;
    gap: 1.25rem;
    flex-wrap: wrap;
  }
}

/* Larger badges on wide screens */
@media (min-width: 1400px) {
  .badge-item__visual {
    width: 160px;
    height: 160px;
  }

  .badges__row {
    gap: 2rem;
  }

  .badge-item__name {
    font-size: 0.7rem;
  }
}

/* Activity grid stacks at 700px */
@media (max-width: 700px) {
  .activity__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .profile {
    padding: 1.5rem 1rem 4rem;
  }

  .sidebar__name {
    font-size: 1.25rem;
  }

  /* Tighten badge grid for small screens */
  .badges__row {
    gap: 1rem;
  }

  .badge-item {
    width: 80px;
  }

  .badge-item__visual {
    width: 72px;
    height: 72px;
  }

  /* Badge modal: full-width card */
  .badge-modal {
    padding: 1rem;
    align-items: flex-end;
  }

  .badge-modal__card {
    max-width: none;
    border-radius: 16px 16px 8px 8px;
    padding: 2rem 1.5rem 1.5rem;
  }

  .badge-modal__visual {
    width: 160px;
    height: 160px;
  }

  .badge-modal__name {
    font-size: 1.15rem;
  }

  /* Upcoming RSVPs: stack labels */
  .upcoming-rsvp {
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
    padding: 0.5rem 0.65rem;
  }

  .upcoming-rsvp__loc {
    flex-basis: 100%;
    margin-left: 0;
  }
}

@media (max-width: 380px) {
  .sidebar__stats {
    gap: 0.4rem 1rem;
  }

  .badge-item {
    width: 72px;
  }

  .badge-item__visual {
    width: 64px;
    height: 64px;
  }

  .badge-item__name {
    font-size: 0.5625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .map-dot__ping::before {
    animation: none;
  }
}
