/* =========================================================
   MEMBER INDEX PAGE
========================================================= */

.member-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.member-page h1 {
  font-size: 32px;
  margin-bottom: 32px;
}

/* ---------- Section ---------- */

.member-section {
  margin-bottom: 56px;
}

.member-section h2 {
  font-size: 22px;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e5e7eb;
}

.section-desc {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

/* ---------- Member List ---------- */

.member-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Card ---------- */

.member-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.member-card.member-link {
  cursor: pointer;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
  border-color: #cbd5e1;
}

/* ---------- Card Layout ---------- */

.member-card-content {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: center;
}

.member-photo {
  width: 160px;
  height: 200px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  display: block;
}

/* ---------- Text ---------- */

.member-text {
  min-width: 0;
}

.member-name {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}

.member-role {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin: 0 0 8px;
}

.member-detail {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 4px;
}

.member-detail a {
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Badge ---------- */

.member-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  margin-left: 8px;
  font-weight: 800;
  vertical-align: middle;
}

.member-actions {
  margin-top: 10px;
}

.detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: #0f172a;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #0f172a;
}

.detail-link:hover {
  background: #111c33;
  border-color: #111c33;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .member-card-content {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .member-photo {
    width: 100%;
    height: 240px;
    border-radius: 16px;
  }
}

/* =========================================================
   MEMBER DETAIL PAGE (profile)
========================================================= */

/* === wrapper === */
.profile{
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 12px;
}

/* === header row === */
.profile-header{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 26px;
  align-items: center;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

/* === photo (keep round) === */
.profile-photo{
  width: 220px;
  height: 220px;
  border-radius: 999px;  /* ✅ 원형 유지 */
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
}

/* === text area === */
.profile-main{ min-width: 0; }

.profile-name{
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: -0.5px;
  font-weight: 900;
}

.profile-role{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #475569;
}

.profile-affiliation{
  margin: 0 0 10px;
  font-size: 14px;
  color: #334155;
}

/* =========================================================
   CONTACT (icons, 4 rows / 1 column) - in-file (no add-on)
========================================================= */

.profile-links-vertical{
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr; /* ✅ 1열 */
  gap: 10px;                 /* ✅ 4행 간격 */
  max-width: 560px;
}

.icon-link{
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;

  text-decoration: none;
  color: #0f172a;

  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.icon-link:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.icon svg{
  width: 18px;
  height: 18px;
  fill: #0f172a;
}

.label{
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  overflow-wrap: anywhere;
}

/* === sections === */
.profile-section{
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 6px;
}

.profile-section h2{
  font-size: 22px;
  margin: 22px 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

.profile-section h3{
  font-size: 16px;
  margin: 16px 0 8px;
  font-weight: 900;
}

.profile-section ul{
  margin: 10px 0 0 18px;
  color: #334155;
}

.profile-section li{
  margin: 6px 0;
  line-height: 1.7;
}

.small-text{
  font-size: 13px;
  color: #64748b;
}

/* === personal gallery grid === */
.personal-gallery{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.personal-gallery img{
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f1f5f9;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

.personal-gallery img:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15,23,42,0.10);
}

/* === modal === */
.gallery-modal{
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  padding: 24px;
}

.gallery-modal.open{ display: grid; }

.gallery-modal img{
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  border-radius: 14px;
  background: #0b1220;
}

/* === responsive === */
@media (max-width: 900px){
  .profile-header{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-photo{
    margin: 0 auto;
  }

  .profile-links-vertical{
    margin-left: auto;
    margin-right: auto;
  }

  .personal-gallery{
    grid-template-columns: repeat(2, 1fr);
  }
  .personal-gallery img{
    height: 200px;
  }
}

@media (max-width: 560px){
  .personal-gallery{
    grid-template-columns: 1fr;
  }
  .personal-gallery img{
    height: 220px;
  }
}
