/* =========================================================
   KKF Traveller Profiles
   Version: 1.0.0
   ========================================================= */

.kkf-profile-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px 70px;
}

.kkf-profile {
  font-family: var(--kkf-font-body, "Plus Jakarta Sans", system-ui,
    sans-serif);
  color: var(--kkf-ink, #17211f);
}

.kkf-profile *,
.kkf-profile *::before,
.kkf-profile *::after {
  box-sizing: border-box;
}

/* ---------------------------------------- hero */

.kkf-profile-hero {
  margin-bottom: 34px;
  border: 1px solid var(--kkf-line, #ecdfd3);
  border-radius: var(--kkf-radius-lg, 24px);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 44px -34px rgba(23, 33, 31, 0.5);
}

.kkf-profile-cover {
  position: relative;
  z-index: 1;
  height: 190px;
  background: linear-gradient(120deg, #f7941d, #f0522b 60%, #d63e1c);
  overflow: hidden;
}

.kkf-profile-cover img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
  display: block;
  opacity: 0.55;
  filter: saturate(1.05);
}

.kkf-profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(23, 33, 31, 0) 40%,
    rgba(23, 33, 31, 0.35) 100%
  );
}

.kkf-profile-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 20px;
  padding: 0 26px 24px;
}

.kkf-profile-avatar {
  position: relative;
  z-index: 3;
  width: 128px !important;
  height: 128px !important;
  max-width: none;
  margin: -64px 0 0;
  border: 5px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--kkf-sand, #fbf6f0);
  box-shadow: 0 10px 28px -14px rgba(23, 33, 31, 0.7);
}

.kkf-profile-copy {
  min-width: 0;
  padding-top: 16px;
}

.kkf-profile-copy h1 {
  margin: 0 0 8px;
  font-family: var(--kkf-font-display, "Fraunces", Georgia, serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.kkf-profile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* the role chip */

.kkf-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.kkf-role::before {
  content: "";
  width: 14px;
  height: 14px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.kkf-role-traveller {
  background: var(--kkf-teal-wash, #eaf5f3);
  color: var(--kkf-teal, #0e6e63);
}

.kkf-role-traveller::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6e63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-6.2 7-11a7 7 0 1 0-14 0c0 4.8 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E");
}

.kkf-role-partner {
  background: var(--kkf-sun-wash, #fff1ea);
  color: var(--kkf-sun-deep, #c33b16);
}

.kkf-role-partner::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c33b16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19V8a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v11'/%3E%3Cpath d='M3 14h18M7 6V4M17 6V4M2 19h20'/%3E%3C/svg%3E");
}

.kkf-role-team {
  background: #eef1fb;
  color: #3f4d8f;
}

.kkf-role-team::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233f4d8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.6 5.4 5.9.8-4.3 4.1 1 5.9L12 16.4 6.8 19.2l1-5.9L3.5 9.2l5.9-.8z'/%3E%3C/svg%3E");
}

.kkf-profile-country,
.kkf-profile-since {
  color: var(--kkf-ink-soft, #5f6f6a);
  font-size: 13px;
  font-weight: 600;
}

.kkf-profile-bio {
  margin: 0 0 12px;
  max-width: 56ch;
  color: #33403c;
  font-size: 15px;
  line-height: 1.6;
}

.kkf-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.kkf-profile-stats span {
  color: var(--kkf-ink-soft, #5f6f6a);
  font-size: 13.5px;
}

.kkf-profile-stats strong {
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--kkf-ink, #17211f);
  margin-right: 3px;
}

.kkf-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}

/* the follow button */

.kkf-follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--kkf-mango, #f7941d),
    var(--kkf-sun, #f0522b));
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px -14px rgba(240, 82, 43, 0.95);
  transition: transform 0.22s ease, background 0.22s ease,
    color 0.22s ease, box-shadow 0.22s ease;
}

.kkf-follow::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.kkf-follow:hover {
  transform: translateY(-1px);
}

.kkf-follow.is-following {
  background: #fff;
  border: 1.5px solid var(--kkf-line, #ecdfd3);
  color: var(--kkf-ink-soft, #5f6f6a);
  box-shadow: none;
}

.kkf-follow.is-following::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6e63' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.kkf-follow.is-following:hover {
  border-color: #f3b7ad;
  color: #d8452a;
}

.kkf-profile-share {
  min-height: 42px;
  padding: 10px 22px;
  font-size: 14px;
  justify-content: center;
}

/* ---------------------------------------- albums */

.kkf-profile-albums h2 {
  margin: 0 0 18px;
  font-family: var(--kkf-font-display, "Fraunces", Georgia, serif);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.kkf-book-likes {
  margin-left: auto;
  color: var(--kkf-ink-soft, #5f6f6a);
  font-size: 12.5px;
  font-weight: 700;
}

/* ---------------------------------------- toast */

.kkf-profile-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 10000;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--kkf-ink, #17211f);
  color: #fff;
  font-family: var(--kkf-font-body, system-ui, sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.35, 1),
    opacity 0.28s ease;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.kkf-profile-toast.is-in {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ---------------------------------------- responsive */

@media (max-width: 860px) {
  .kkf-profile-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 0 18px 20px;
    text-align: center;
  }

  .kkf-profile-avatar {
    width: 104px !important;
    height: 104px !important;
    margin: -52px auto 0;
  }

  .kkf-profile-copy {
    padding-top: 0;
  }

  .kkf-profile-tags,
  .kkf-profile-stats {
    justify-content: center;
  }

  .kkf-profile-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .kkf-profile-actions {
    flex-direction: row;
    justify-content: center;
    padding-top: 4px;
  }

  .kkf-follow,
  .kkf-profile-share {
    flex: 1 1 0;
  }
}

@media (max-width: 600px) {
  .kkf-profile-wrap { padding: 14px 12px 60px; }
  .kkf-profile-cover { height: 130px; }
  .kkf-profile-hero { border-radius: var(--kkf-radius, 16px); }
  .kkf-profile-stats { gap: 12px; }
  .kkf-profile-stats strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .kkf-profile *,
  .kkf-profile-toast { transition: none !important; }
}

.kkf-follow-label {
  line-height: 1;
}