/* Custom styles for feminist-hci site
   Keep this file for your own additions/overrides.
*/

/* Introduction highlight box (light yellow background) */
.introduction-box {
  background-color: #fffced; /* light yellow */
  padding: 16px 20px;
  margin: 10px 0 20px 0;
  border-radius: 2px;
}

.introduction-box p {
  margin-top: 0;
  margin-bottom: 12px;
}

.introduction-box p:last-child {
  margin-bottom: 0;
}

/* ===== Header / Navigation ===== */

html {
  scroll-behavior: smooth; /* 可选：平滑滚动 */
}

/* 顶部 header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* header 内部布局（桌面端：左 logo 右导航） */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

/* logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.site-logo__text {
  font-size: 16px;
}

/* 如果你用的是图片 logo（CHI26%20logo.png） */
.site-logo__img {
  height: 28px;
  width: auto;
  display: block;
}

/* 导航菜单（桌面端） */
.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap; /* 桌面端也不换行，避免偶发断行 */
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
  flex: 0 0 auto; /* 不被压缩/不换行 */
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ===== Mobile: logo top + horizontal scroll menu ===== */
@media (max-width: 720px) {
  .site-header__inner {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* logo 稍微缩小一点更协调 */
  .site-logo__img {
    height: 26px;
  }

  /* 菜单单行横向滚动：不再出现掉到第二行的尴尬 */
  .site-nav {
    width: 100%;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* iOS 更丝滑 */
    padding-bottom: 2px;
  }

  .site-nav a {
    font-size: 13px;
    padding: 6px 8px;
  }

  /* 隐藏横向滚动条（更干净） */
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  .site-nav {
    scrollbar-width: none;
  }
}


/* ===== Prevent anchor jump being hidden under the header ===== */
/* 56px header height + some spacing */
h2[id],
h1[id] {
  scroll-margin-top: 72px;
}

/* Logo image in header */
.site-logo__img {
  height: 28px;       /* 推荐高度，可调 24–32 */
  width: auto;
  display: block;
}


/* News: max height + internal scroll */
.news-box {
  max-height: 220px;          /* 你可以改成 200/260/300，看你想要多高 */
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.02);
}

/* 让段落在容器里更紧凑一点 */
.news-box p {
  margin-top: 0;
  margin-bottom: 12px;
}

.news-box p:last-child {
  margin-bottom: 0;
}

/* ===== Section heading (h2) refinement ===== */

/* 调小 h2 字号 + 去掉底部横线 */
.markdown-body h2 {
  font-size: 1.3rem;          /* 原来大约是 1.75rem，可改 1.3–1.45 */
  border-bottom: none;        /* 去掉主题自带的横线 */
  padding-bottom: 0;          /* 去掉为横线预留的空间 */
  margin-bottom: 0.6em;       /* 控制 h2 和正文的距离 */
}

/* 可选：让 h2 看起来更“学术/克制”一点 */
.markdown-body h2 {
  font-weight: 600;           /* 原来偏粗 */
  letter-spacing: 0.01em;
}

.markdown-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.markdown-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.1em;
  margin-bottom: 0.45em;
}

.markdown-body hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Discussion quotes from the meet-up (italic) */
.markdown-body em {
  font-style: italic;
}

/* ===== Meet-up photo gallery (compact, before summary) ===== */

.meetup-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 8px 0;
}

.meetup-gallery__supporting {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meetup-gallery__item {
  margin: 0;
  overflow: visible;
  border-radius: 2px;
}

.meetup-gallery__item--featured,
.meetup-gallery__item--featured .meetup-gallery__trigger,
.meetup-gallery__item--featured img {
  aspect-ratio: 1;
}

.meetup-gallery__trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.03);
  cursor: zoom-in;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.meetup-gallery__supporting .meetup-gallery__item,
.meetup-gallery__supporting .meetup-gallery__trigger {
  min-height: 0;
  height: 100%;
}

.meetup-gallery__trigger:hover,
.meetup-gallery__trigger:focus-visible {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: scale(1.02);
  z-index: 2;
}

.meetup-gallery__trigger:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.35);
  outline-offset: 2px;
}

.meetup-gallery__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
  pointer-events: none;
}

.meetup-gallery-preview {
  margin: 10px 0 6px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  overflow: hidden;
  text-align: center;
}

.meetup-gallery-preview[hidden] {
  display: none;
}

.meetup-gallery-preview img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

.meetup-gallery__hint {
  margin: 0 0 18px 0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 720px) {
  .meetup-gallery {
    grid-template-columns: 1fr;
  }

  .meetup-gallery__supporting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .meetup-gallery__trigger img {
    aspect-ratio: 1;
  }
}

/* Hover preview (desktop only): enlarged thumbnail near cursor area */
@media (hover: hover) and (pointer: fine) {
  .meetup-gallery__item {
    position: relative;
  }

  .meetup-gallery__trigger::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.15s ease;
  }

  .meetup-gallery__trigger:hover::after {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: zoom-out;
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-lightbox__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  background: #fff;
}

.gallery-lightbox__caption {
  margin: 10px 0 0;
  max-width: 640px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

/* ===== Meet-up summary ===== */

.summary-panel {
  margin: 0 0 20px 0;
  padding: 0;
}

.summary-panel > p {
  margin-top: 0;
  margin-bottom: 12px;
}

.summary-panel__section-title {
  margin: 0 0 0.25em;
  font-size: 1.05rem;
  font-weight: 600;
  padding-top: 0em;
}

.summary-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 0.25em;
}

.summary-section {
  min-width: 0;
}

.summary-section--tensions .summary-theme summary {
  background: #fff8d9;
}

.summary-section--hopes .summary-theme summary {
  background: #edf8e8;
}

.summary-theme {
  margin-bottom: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.015);
}

.summary-theme summary {
  position: relative;
  padding: 13px 34px 13px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.summary-theme summary::-webkit-details-marker {
  display: none;
}

.summary-theme summary::after {
  position: absolute;
  top: 50%;
  right: 14px;
  content: "+";
  font-size: 1.1rem;
  font-weight: 400;
  transform: translateY(-50%);
}

.summary-theme[open] summary::after {
  content: "-";
}

.summary-theme summary:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.4);
  outline-offset: -2px;
}

.summary-theme__content {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  will-change: height, opacity, transform;
}

.summary-theme__content p {
  margin-top: 12px;
  margin-bottom: 12px;
}

.summary-theme__content p:last-child {
  margin-bottom: 0;
}

.summary-panel__closing {
  margin-top: 0.25em;
  padding-top: 0.25em;
}

.summary-panel__closing p {
  margin-top: 0;
  margin-bottom: 12px;
}

.summary-panel__closing p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .summary-sections {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ===== Organizers grid ===== */

.organizers-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px 14px; /* row gap, column gap */
  margin-top: 14px;
}

/* 每个人的卡片 */
.organizer-card {
  text-align: center;
}

/* 圆形头像 */
.organizer-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* 姓名链接（保持你原来的 URL） */
.organizer-name {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.organizer-name:hover {
  text-decoration: underline;
}

/* affiliation 文本 */
.organizer-affiliation {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.7);
}

/* 响应式：屏幕窄时自动降列数 */
@media (max-width: 1000px) {
  .organizers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .organizers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .organizer-avatar {
    width: 88px;
    height: 88px;
  }
}

/* ===== Footer ===== */

.site-footer {
  margin-top: 60px;
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.site-footer p {
  margin: 0;
}
