/* ============================================================
   BOTTOM NAV — shared across all pages
   ============================================================ */

.nav-bar {
  position: fixed;
  bottom: 28px;
  /* safe-area for iPhone home indicator */
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 14px));
  left: 50%;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 60px;
  padding: 8px 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255,255,255,0.04);
  user-select: none;
  /* prevent nav from being wider than screen */
  max-width: calc(100vw - 32px);
  transform: translate3d(-50%, 0, 0);
  contain: layout paint style;
}

/* Individual nav items */
.nav-item {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
  white-space: nowrap;
  /* minimum touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Hover only on devices that support it */
@media (hover: hover) {
  .nav-item:hover {
    color: rgba(255, 255, 255, 0.75);
  }
}

.nav-item.active {
  color: var(--pop);
  font-weight: 700;
  background: rgba(95, 194, 176, 0.12);
}

/* Profile avatar button */
.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  margin-left: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
  /* minimum touch target */
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

@media (hover: hover) {
  .nav-avatar:hover {
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
  }
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Avatar fallback (initials) */
.nav-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8a96e, #8b6f47);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

/* ============================================================
   PROFILE CARD (popup above nav)
   ============================================================ */

.profile-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 490;
  pointer-events: none;
}

.profile-card-overlay.open {
  pointer-events: all;
}

.profile-card {
  position: fixed;
  bottom: 90px;
  bottom: max(90px, calc(env(safe-area-inset-bottom) + 76px));
  left: 50%;
  transform: translate3d(-50%, 20px, 0);
  width: min(360px, calc(100vw - 32px));
  background: rgba(16, 16, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 28px 24px 24px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255,255,255,0.04);
  /* cap height so it doesn't overflow small screens */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: transform, opacity;
  contain: layout paint style;
  backface-visibility: hidden;
}

.profile-card.open {
  pointer-events: all;
}

/* Card header */
.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.profile-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card__avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8a96e, #8b6f47);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.profile-card__name {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 4px;
}

.profile-card__title {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  margin-bottom: 10px;
}

.profile-card__bio {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Meta row (location + time) */
.profile-card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.profile-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.profile-card__meta-item svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Divider */
.profile-card__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin-bottom: 18px;
}

/* Social links grid */
.profile-card__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.profile-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  /* minimum touch target */
  min-height: 64px;
}

@media (hover: hover) {
  .profile-card__link:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
  }
}

/* Active state for touch */
.profile-card__link:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.97);
}

.profile-card__link svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.profile-card__link-label {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

/* ============================================================
   RESPONSIVE — TABLET  (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-item {
    padding: 8px 16px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  .nav-bar {
    bottom: 16px;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
    padding: 6px 8px;
    gap: 2px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .nav-avatar {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    margin-left: 4px;
  }

  .profile-card {
    bottom: 76px;
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 62px));
    padding: 22px 18px 20px;
    border-radius: 20px;
  }

  .profile-card__avatar {
    width: 60px;
    height: 60px;
  }

  .profile-card__name {
    font-size: 1rem;
  }

  .profile-card__links {
    gap: 8px;
  }

  .profile-card__link {
    padding: 12px 6px;
  }

  .profile-card__link svg {
    width: 20px;
    height: 20px;
  }

  .profile-card__link-label {
    font-size: 0.65rem;
  }
}

/* 2026 visual refresh */
.nav-bar {
  gap: 2px;
  padding: 7px;
  border-color: rgba(214, 184, 125, 0.18);
  border-radius: 12px;
  background: rgba(7, 9, 7, 0.84);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55), inset 0 1px rgba(255, 255, 255, 0.04);
}

.nav-item {
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(244, 237, 223, 0.46);
  font-family: "Courier Prime", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item.active {
  color: var(--black);
  background: var(--pop);
  box-shadow: 0 6px 20px rgba(101, 214, 194, 0.14);
}

.nav-avatar {
  appearance: none;
  padding: 0;
  background: transparent;
  border-color: rgba(214, 184, 125, 0.32);
  border-width: 1px;
}

.profile-card {
  border-color: rgba(214, 184, 125, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(101, 214, 194, 0.08), transparent 34%),
    rgba(8, 10, 8, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.profile-card__avatar { border-color: rgba(214, 184, 125, 0.36); }
.profile-card__name { font-family: "IM Fell English", serif; font-size: 1.35rem; font-weight: 400; }
.profile-card__title,
.profile-card__bio,
.profile-card__meta-item,
.profile-card__link-label { font-family: "Courier Prime", monospace; }

.profile-card__link {
  border-color: rgba(214, 184, 125, 0.12);
  border-radius: 8px;
  background: rgba(214, 184, 125, 0.035);
}

@media (hover: hover) {
  .profile-card__link:hover {
    border-color: rgba(101, 214, 194, 0.3);
    background: rgba(101, 214, 194, 0.08);
  }
  .profile-card__link:hover svg,
  .profile-card__link:hover .profile-card__link-label { color: var(--pop); }
}

@media (max-width: 480px) {
  .nav-bar { border-radius: 10px; }
  .nav-item { padding: 8px 11px; font-size: 0.61rem; }
  .profile-card { border-radius: 12px; }
}
