/* ============================================================
   CISCO Website — Members Directory (neo-brutalist)

   Replaces the legacy 3D orbital carousel (css/carousel.css).
   Directory grid + member tiles + the migrated & restyled
   full-screen profile modal. Matches the Events/Projects
   neo-brutalist language: 2-4px #000 borders, hard offset
   shadows, square corners, hover/focus invert, monospace
   uppercase labels.
   ============================================================ */

/* ---------- Directory grid ---------- */
.members-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1199px) {
  .members-directory { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .members-directory { grid-template-columns: 1fr; }
}

/* ---------- Result count / clear ---------- */
.members-count {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  white-space: nowrap;
  align-self: center;
}

.members-clear:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #ccc;
  color: #999;
}

.members-clear:disabled:hover {
  border-color: #ccc;
  color: #999;
}

/* Clear-filters button inside the empty state (also brutalist) */
.members-empty-action {
  margin-top: 1rem;
  padding: 0.55rem 1.2rem;
  border-radius: 0;
  border: 2px solid #000;
  background: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.members-empty-action:hover {
  background: #000;
  color: #fff;
}

/* ---------- Member search (matches .filter-bar select style) ---------- */
.members-filter .members-search {
  padding: 0.55rem 1rem;
  border-radius: 0;
  border: 2px solid #ccc;
  background: #fff;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  min-width: 220px;
  transition: border-color 0.2s;
}

.members-filter .members-search::placeholder {
  color: #999;
  opacity: 1;
}

.members-filter .members-search:hover,
.members-filter .members-search:focus {
  border-color: #000;
  outline: none;
}

/* ---------- Member tile (brutalist, tactile like .project-card) ---------- */
.member-tile {
  position: relative;
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  padding: 0;
  color: #000;
  width: 100%;
  font: inherit;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  min-width: 0;
}

/* White, readable body on hover — the tile lifts (bigger hard
   shadow), the name gets a blue underline, and the profile modal
   is cued by the blueprint marks (.card-geo). No black invert. */
.member-tile:hover,
.member-tile:focus-visible {
  background: #fff;
  color: #000;
  box-shadow: 6px 6px 0 #000;
  transform: translate(-2px, -3px);
}

.member-tile:focus-visible {
  outline: 3px solid var(--blue-primary);
  outline-offset: 2px;
}

.member-tile__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  border-bottom: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.member-tile__media img.is-fallback {
  object-fit: contain;
  width: 42%;
  height: auto;
  opacity: 0.35;
}

.member-tile__body {
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.member-tile__role {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--blue-primary);
  border: 2px solid #000;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
}

.member-tile__name {
  position: relative;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Blue underline sweep under the name on hover/focus (open-profile cue). */
.member-tile__name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  height: 2px;
  width: 100%;
  background: var(--blue-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.member-tile:hover .member-tile__name::after,
.member-tile:focus-visible .member-tile__name::after {
  transform: scaleX(1);
}

/* ============================================================
   Member Profile Modal — full-viewport split-screen (brutalist)
   Migrated from the deleted css/carousel.css and restyled.
   ============================================================ */

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.profile-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.profile-modal__inner {
  display: grid;
  grid-template-columns: 40% 60%;
  /* width: 100vw (the scrollbar-inclusive viewport) — on a phone with
     visible overflow it's wider than the visual viewport and was one of
     the sideways-pan triggers; 100% tracks the actual containing block. */
  width: 100%;
  height: 100vh;
  background: #fff;
}

/* --- Left: full-height portrait --- */
.profile-modal__portrait {
  position: relative;
  background: var(--cisco-blue-light);
  overflow: hidden;
  border-right: 3px solid #000;
}

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

.profile-modal__portrait .profile-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cisco-blue);
  opacity: 0.4;
}

.profile-modal__portrait .profile-fallback img {
  width: 32%;
  height: auto;
  object-fit: contain;
}

/* --- Right: scrollable content --- */
.profile-modal__content {
  position: relative;
  background: #fff;
  overflow: hidden;
}

.profile-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: 2px solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}

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

.profile-modal__close:hover {
  background: #000;
  color: #fff;
}

.profile-modal__close:focus-visible {
  outline: 3px solid var(--blue-primary);
  outline-offset: 2px;
}

.profile-modal__scroll {
  height: 100%;
  overflow-y: auto;
  padding: 3.5rem 3rem 4rem;
  display: flex;
  flex-direction: column;
}

/* --- Role badge --- */
.profile-modal__role {
  display: inline-block;
  align-self: flex-start;
  background: var(--blue-primary);
  border: 2px solid #000;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 0;
  margin-bottom: 1rem;
}

/* --- Name --- */
.profile-modal__name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #000;
  margin: 0 0 0.5rem;
}

/* --- Subtitle (quote) --- */
.profile-modal__subtitle {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #444;
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* --- Section titles --- */
.profile-modal__section-title {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000;
  margin: 0 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

/* --- Bio --- */
.profile-modal__bio {
  margin-bottom: 2rem;
}

.profile-modal__bio p {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* --- Contact card --- */
.profile-modal__contact {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.profile-modal__contact .profile-modal__section-title {
  border-bottom: 2px solid #000;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.profile-modal__contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.profile-modal__contact-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.profile-modal__contact-label {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  min-width: 60px;
}

.profile-modal__contact-value {
  color: #333;
  font-size: 0.9rem;
  text-decoration: none;
  word-break: break-word;
}

a.profile-modal__contact-value {
  color: var(--blue-link);
  font-weight: 600;
}

a.profile-modal__contact-value:hover {
  text-decoration: underline;
}

/* CTA button */
.profile-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border: 2px solid #000;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.profile-modal__cta:hover {
  background: transparent;
  color: #000;
}

.profile-modal__cta:focus-visible {
  outline: 3px solid var(--blue-primary);
  outline-offset: 2px;
}

.profile-modal__cta svg {
  flex-shrink: 0;
}

/* --- Key Initiatives grid --- */
.profile-modal__initiatives {
  margin-bottom: 2rem;
}

.profile-modal__initiatives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.profile-modal__initiative-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 2px 2px 0 #000;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.profile-modal__initiative-card h4 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: #000;
  margin: 0;
  line-height: 1.3;
}

.profile-modal__initiative-card p {
  font-size: 0.72rem;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

/* --- Expertise badges --- */
.profile-modal__expertise {
  margin-bottom: 1rem;
}

.profile-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-modal__badge {
  display: inline-block;
  border: 2px solid #000;
  background: transparent;
  color: #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  text-transform: uppercase;
}

.profile-modal__badge:hover {
  background: #000;
  color: #fff;
}

/* --- Scrollbar --- */
.profile-modal__scroll::-webkit-scrollbar {
  width: 4px;
}

.profile-modal__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.profile-modal__scroll::-webkit-scrollbar-thumb {
  background: #000;
}

/* ============================================================
   Profile Modal — Mobile (stack vertically)
   ============================================================ */
@media (max-width: 768px) {
  .profile-modal__inner {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
  }

  .profile-modal__portrait {
    border-right: none;
    border-bottom: 3px solid #000;
  }

  .profile-modal__scroll {
    padding: 2rem 1.5rem 3rem;
  }

  .profile-modal__initiatives-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-modal__close {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .profile-modal__inner {
    grid-template-rows: 35vh 1fr;
  }

  .profile-modal__name {
    font-size: 1.8rem;
  }

  .profile-modal__initiatives-grid {
    grid-template-columns: 1fr;
  }
}
