/* ======================
   GLOBAL THEME SAFETY
====================== */

html {
  background-color: var(--bg-main);
}

/* ---------------------- GLOBAL ---------------------- */
body {
  font-family: 'Maven Pro', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-main);
  color: var(--text-main);
}

/* ---------------------- GRID ---------------------- */
.kube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 48px 32px;

  /* prevents cards from stretching when count < 4 */
  align-items: start;
  justify-content: start;
}

/* ---------------------- CARD ---------------------- */
.person {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;

  border-radius: 6px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-card);

  position: relative;
  overflow: hidden;

  /* smooth animation */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform: translateZ(0);
}

/* ---------------------- HOVER EFFECT ---------------------- */
/*.person:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 24px rgba(0, 0, 0, 0.18);
} */

.person:hover {
  transform: scale(1.03);               /* slightly enlarge */
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.15); /* stronger shadow */
}

/* ---------------------- HARD RESET INNER ELEMENTS ---------------------- */
/* This is the real fix for the "double box / black line" issue */
.person * {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ---------------------- IMAGE ---------------------- */
.person__image {
  width: 100%;
  flex-shrink: 0;
}

.person__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* ---------------------- CONTENT WRAPPER ---------------------- */
.person__padding {
  padding: 14px 16px 16px;

  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ---------------------- NAME ---------------------- */
.person__name {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: var(--gold-dark);

  margin: 10px 0 4px;

  word-break: break-word;
  white-space: normal;
  text-align: left;
}

/* ---------------------- PRONOUNS ---------------------- */
.person__pronouns {
  font-size: 12px;
  font-weight: 600;          /* ⬅️ make pronouns bold */
  color: var(--text-muted);

  margin: 8px 0 16px;        /* ⬅️ more space above & below */
  flex-shrink: 0;
}

/* ---------------------- COMPANY (HIDDEN) ---------------------- */
.person__company {
  display: none !important;
}

/* ---------------------- SOCIAL (PINNED TO BOTTOM) ---------------------- */
.person__social {
  margin-top: auto; /* ⬅️ THIS pins icons to bottom */
  padding-top: 12px;
}

.person__social-margin {
  display: flex;
  gap: 10px;
}

.person__social svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

/* ---------------------- MODAL HIDE ---------------------- */
.modal-hide {
  display: none !important;
}

/* ---------------------- RESET BUTTON ---------------------- */
.reset-btn {
  height: 48px;
  padding: 0 20px;
  border-radius: 3px;
  border: 1.5px solid #111827;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.reset-btn:hover {
  background: #111827;
  color: #fff;
}

/* ---------------------- HIDE UNUSED FIELDS ---------------------- */
.person__role,
.person__location,
.person__bio {
  display: none !important;
}

/* ---------------------- SOCIAL ICON HOVER ---------------------- */
.person__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: transform 0.2s ease, color 0.2s ease;
}

.person__social a:hover {
  color: #e6c875;          /* golden hover */
  transform: translateY(-2px); /* subtle lift */
}

.person__social a:focus-visible {
  outline: none;
}


/* ====================== HEADER ====================== */

.header-wrap {
  margin-bottom: 24px;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 100px;       /* smaller, professional size */
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;    /* prevents flex from resizing it */
}

.header-text {
  font-size: 50px;
  font-weight: 700;
  color: #CF9D2F;
  letter-spacing: 0.3px;
}

/* ====================== FILTER BAR ====================== */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 14px;
  flex-wrap: nowrap; /* ⬅ prevents RESET from dropping */
}

.filter-bar select {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;          /* ⬅ space for arrow */
  border-radius: 3px;              /* ⬅ requested */
  border: 1.5px solid #e6c875;
  font-size: 16px;
  font-weight: 500;
  background-color: #fff;
  color: #9297a3;
  appearance: none;
  cursor: pointer;

  /* golden arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%239C8435' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;

  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.filter-bar select:focus {
  outline: none;
  border-color: #d4b553;
  box-shadow: 0 0 0 3px rgba(230, 200, 117, 0.35);
}

/* focus state */
.filter-bar select:focus {
  outline: none;
  border-color: #d4b553;
  box-shadow: 0 0 0 3px rgba(230, 200, 117, 0.35);
}

/* ====================== COUNT TEXT ====================== */

.count-text {
  margin: 8px 0 14px;
  font-size: 18px;
  color: #6b7280;
}

.count-text strong {
  color: #9C8435;
}

/* ====================== GOLD DIVIDER ====================== */

.gold-divider {
  border: none;
  height: 3px;   /* ⬅ thicker */
  background: linear-gradient(
    to right,
    rgba(230, 200, 117, 0),
    #e6c875,
    #f5e6a8,
    #e6c875,
    rgba(230, 200, 117, 0)
  );
  margin: 16px 0 36px;
}


/* =========================================================
   MODAL PROFILE — GOLDEN KUBESTRONAUT
   ========================================================= */

.modal-content-wrapper.golden-kubestronaut {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  font-family: 'Maven Pro', sans-serif;
}

/* ---------- IMAGE ---------- */
.modal-content-wrapper .person__image {
  width: 100%;
}

.modal-content-wrapper .person__image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  box-shadow: 6px 6px 18px rgba(0, 0, 0, 0.15);
}

/* ---------- CONTENT ---------- */
.modal__content {
  display: flex;
  flex-direction: column;
}

/* ---------- NAME ---------- */
.modal__content .person__name {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #9C8435;
  margin-bottom: 8px;
}

.modal__content .person__pronouns {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-left: 6px;
}

/* ---------- METADATA ---------- */
.person__metadata {
  list-style: none;
  padding: 0;
  margin: 8px 0 18px;
}

.person__metadata li {
  font-size: 14px;
  color: #374151;
}

.person__metadata strong {
  color: #111827;
}

/* ---------- BIO / CONTENT ---------- */
.person__content p {
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 20px;
}

/* ---------- SOCIAL ---------- */
.modal__content .person__social {
  margin-top: auto;
}

.modal__content .person__social-margin {
  display: flex;
  gap: 14px;
}

.modal__content .person__social a {
  color: #6b7280;
  transition: transform 0.2s ease, color 0.2s ease;
}

.modal__content .person__social a:hover {
  color: #9C8435;
  transform: translateY(-2px);
}

.modal__content .person__social svg {
  width: 32px;
  height: 32px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .modal-content-wrapper.golden-kubestronaut {
    grid-template-columns: 1fr;
  }

  .modal-content-wrapper .person__image img {
    max-width: 240px;
    margin: 0 auto;
  }

  .modal__content {
    margin-top: 12px;
  }
}

/* =========================================================
   MODAL CLOSE BUTTON — SVG VERSION
   ========================================================= */

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);

  background: #ffffff;
  color: #6b7280;

  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn svg {
  display: block;
}

/* hover */
.modal-close-btn:hover {
  background: linear-gradient(
    to right,
    #e6c875,
    #f5e6a8
  );
  color: #111827;
  border-color: #d4b553;
  transform: rotate(90deg);
}

/* focus (keyboard users) */
.modal-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(230, 200, 117, 0.4);
}

.attribution-banner {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0.15),
    rgba(212, 175, 55, 0.08)
  );
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  padding: 10px 16px;
  text-align: center;
}

.attribution-banner p {
  margin: 0;
  font-size: 14px;
  color: #6b4e00;
  font-weight: 500;
}

.attribution-banner a {
  color: #b8922c;
  font-weight: 600;
  text-decoration: none;   /* remove underline */
}

.attribution-banner a::after {
  content: none;           /* remove custom underline */
}

.attribution-banner a:hover {
  color: #d4af37;
}




/* ---------- LOADING OVERLAY ---------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(249, 250, 251, 0.85);
  backdrop-filter: blur(4px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 1000;
}

/* ---------- SPINNER WRAPPER (ROTATES) ---------- */
.kube-spinner {
  width: 96px;
  height: 96px;

  display: flex;
  align-items: center;
  justify-content: center;

  animation: kube-spin 1.7s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

/* ---------- IMAGE (STATIC, CENTERED) ---------- */
.kube-spinner img {
  width: 80px;
  height: 80px;

  object-fit: contain;
  display: block;

  pointer-events: none;
}

/* ---------- ROTATION ANIMATION ---------- */
@keyframes kube-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ======================
   HEADER + THEME TOGGLE
====================== */

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* keep logo + title grouped */
.header-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between; /* ⬅️ key line */
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* push toggle to the right */
.theme-toggle {
  margin-left: auto;
}

/* heading link */

.header-home-link {
  color: inherit;          /* keep gold color */
  text-decoration: none;   /* no underline */
}

.header-home-link:hover {
  text-decoration: none;
  opacity: 0.9;            /* subtle feedback */
}
