/* =========================================================
   Laboratory of Bacterial Physiology — 공통 스타일
   색상을 바꾸려면 아래 :root 의 값만 수정하면 됩니다.
   ========================================================= */
:root {
  --bg: #ffffff;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --accent: #1f4e79;      /* 메뉴 강조색 / 링크색 */
  --accent-soft: #eef3f8;
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 16px 18px; max-width: var(--max); margin: 0 auto;
}
.brand { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); }
.brand img { height: 52px; width: auto; }
.brand .lab-name { font-size: 20px; font-weight: 600; letter-spacing: .2px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; white-space: nowrap; }
.nav a {
  text-decoration: none; color: var(--text); font-size: 15px;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.menu-btn {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 4px; padding: 6px 10px; font-size: 18px; cursor: pointer;
}

/* ---------- Page content ---------- */
main.wrap { padding-top: 48px; padding-bottom: 64px; }
h1.page-title {
  font-size: 30px; font-weight: 400; margin: 0 0 28px; letter-spacing: .5px;
}
h1.page-title::after { content: " //"; color: var(--muted); }
h2 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.lead { margin: 0 0 18px; }
.question {
  font-weight: 600; font-size: 18px; margin: 24px 0 36px;
  padding-left: 14px; border-left: 3px solid var(--accent);
}

/* ---------- Slideshow (Research) ---------- */
.slideshow { position: relative; background: #f4f4f4; overflow: hidden; }
.slide { display: none; }
.slide.show { display: block; }
.slide img { width: 100%; height: auto; margin: 0 auto; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.35); color: #fff; border: 0; width: 40px; height: 40px;
  border-radius: 50%; font-size: 20px; cursor: pointer;
}
.slide-btn:hover { background: rgba(0,0,0,.55); }
.slide-btn.prev { left: 12px; }
.slide-btn.next { right: 12px; }
.slide-count { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- Publications ---------- */
.pub-year { font-size: 18px; font-weight: 600; margin: 36px 0 10px; color: var(--accent); }
ol.pubs { margin: 0; padding-left: 22px; }
ol.pubs li { margin-bottom: 14px; }
.pub-title { font-weight: 600; }
.pub-journal { font-style: italic; }

/* ---------- People ---------- */
.people-group { margin-top: 40px; }
.person {
  display: grid; grid-template-columns: 160px 1fr; gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.person img, .person .photo-placeholder {
  width: 160px; height: 200px; object-fit: cover; background: #eee;
}
.photo-placeholder { display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; }
.person h3 { margin: 0 0 2px; font-size: 19px; }
.person .role { color: var(--muted); margin: 0 0 10px; }
.person ul { margin: 6px 0 0; padding-left: 18px; }
.alumni-list { padding-left: 18px; }

/* Current Members: 카드 2열 */
.members-grid .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.members-grid .person { grid-template-columns: 110px 1fr; gap: 18px; padding: 20px 0; }
.members-grid .person img { width: 110px; height: 138px; }
.members-grid .person h3 { font-size: 17px; }
.members-grid .person p { margin: 0 0 4px; font-size: 15px; }
.person .role { margin-bottom: 8px; }
.alumni-list li { margin-bottom: 8px; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none;
  align-items: center; justify-content: center; flex-direction: column; padding: 16px; z-index: 50;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; max-width: 100%; width: auto; }
.lightbox p { color: #ddd; margin: 12px 0 0; text-align: center; }
.lightbox button {
  position: absolute; top: 14px; right: 18px; background: none; border: 0;
  color: #fff; font-size: 32px; cursor: pointer;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-grid dl { margin: 0; }
.contact-grid dt { font-weight: 600; margin-top: 14px; }
.contact-grid dd { margin: 2px 0 0; }
.map iframe { width: 100%; height: 320px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 13px; text-align: center; padding: 24px 16px;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; }
  .brand img { height: 36px; max-width: 45%; object-fit: contain; }
  .brand { flex: 1 1 0; gap: 10px; }
  .brand .lab-name { font-size: 16px; line-height: 1.35; }
  .menu-btn { display: block; }
  .nav { width: 100%; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav a.active { border-bottom-color: var(--line); font-weight: 600; }
  main.wrap { padding-top: 32px; padding-bottom: 48px; }
  h1.page-title { font-size: 24px; }
  .person { grid-template-columns: 1fr; }
  .members-grid .grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact (affiliations + cards) ---------- */
.affil-list { margin: 0; padding-left: 20px; }
.affil-list li { margin-bottom: 4px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { border: 1px solid var(--line); padding: 18px 20px; }
.contact-card h2 { margin: 0 0 8px; font-size: 17px; color: var(--accent); }
.contact-card p { margin: 0 0 8px; font-size: 15px; }
@media (max-width: 760px) { .contact-cards { grid-template-columns: 1fr; } }


/* =========================================================
   원래 사이트 스타일: 큰 연구실 이름 + 오른쪽 메뉴 + 청록 회색 배경
   ========================================================= */
:root {
  --band: #7d9e9b;        /* 본문 뒤 배경색 */
  --teal: #3faf9a;        /* // 표시, 현재 메뉴 색 */
  --title: #4d5d66;       /* 연구실 이름 색 */
}
body { background: var(--band); }
.site-header { background: #fff; border-bottom: 0; }
.header-inner {
  display: block; position: relative;
  padding: 26px 24px 0; max-width: var(--max);
}
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; }
.brand-logo { height: 54px; width: auto; }
.brand-top {
  font-family: "Cinzel", "Trajan Pro", Georgia, serif;
  font-size: 44px; font-weight: 600; letter-spacing: 3px; line-height: 1.1;
}
.brand-top .t1 { color: #2e3a52; }
.brand-top .t2 { color: #6f8f86; }
.brand .lab-name {
  font-size: 42px; font-weight: 400; color: var(--title);
  letter-spacing: .5px; line-height: 1.3; margin-top: 4px;
}
.nav { margin-top: 10px; }
.nav ul { justify-content: flex-end; gap: 0; }
.nav li + li a { border-left: 1px solid #cfd6d8; }
.nav a {
  display: block; padding: 8px 14px 12px; font-size: 17px; color: #8a9499;
  border-bottom: 0;
}
.nav a:hover { color: var(--teal); }
.nav a.active { color: var(--teal); border-bottom: 0; }

main.wrap {
  background: #fff; max-width: var(--max);
  padding: 32px 24px 56px; margin: 12px auto 0;
}
h1.page-title { color: #3c4a52; }
h1.page-title::after { color: var(--teal); }
.pub-year, .contact-card h2 { color: var(--teal); }
.question { border-left-color: var(--teal); }
a { color: #2f7f72; }
.site-footer { border-top: 0; color: #eef3f2; }

@media (max-width: 760px) {
  .header-inner { padding: 18px 16px 12px; }
  .brand-top { font-size: 26px; letter-spacing: 2px; }
  .brand .lab-name { font-size: 22px; line-height: 1.3; }
  .brand-logo { height: 34px; }
  .menu-btn { position: absolute; right: 16px; top: 22px; }
  .nav { margin-top: 12px; }
  .nav li + li a { border-left: 0; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  main.wrap { margin-top: 0; padding: 28px 16px 40px; }
}

.contact-cards.two { grid-template-columns: 1fr 1fr; align-items: start; }
.contact-card h3 { margin: 14px 0 4px; font-size: 15px; font-weight: 600; color: #3c4a52; }
.contact-card h2 + h3 { margin-top: 0; }
@media (max-width: 760px) { .contact-cards.two { grid-template-columns: 1fr; } }

/* SNU Medicine 글자체: Playfair Display (SNU 정자 + Medicine 기울임) */
.brand-top { font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: 2px; }
.brand-top .t2 { font-style: italic; letter-spacing: 1px; }

/* 원래 사이트 글자체: 로고는 이미지, 나머지는 Verdana 계열 */
body { font-family: Verdana, "DejaVu Sans", Tahoma, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 15px; }
.brand-logo { height: 46px; width: auto; display: block; }
.brand .lab-name {
  font-family: Verdana, "DejaVu Sans", Tahoma, sans-serif;
  color: #607776; font-size: 40px; letter-spacing: 0; margin-top: 6px;
}
h1.page-title { font-family: Verdana, "DejaVu Sans", Tahoma, sans-serif; }
@media (max-width: 760px) {
  .brand-logo { height: 28px; }
  .brand .lab-name { font-size: 20px; }
}

/* SNU MEDICINE 로고 (휘장 포함) */
.brand-logo { height: 58px; }
@media (max-width: 760px) { .brand-logo { height: 34px; max-width: 75vw; object-fit: contain; object-position: left; } }

/* Research 첫 화면 글자 크기 */
.research .lead { font-size: 18px; line-height: 1.75; }
.research .question { font-size: 20px; }
@media (max-width: 760px) { .research .lead { font-size: 16px; } .research .question { font-size: 17px; } }

/* 흰 본문 상자 폭 넓힘 */
:root { --max: 1240px; }
main.wrap { width: calc(100% - 200px); padding-left: 44px; padding-right: 44px; }
.header-inner { width: calc(100% - 200px); padding-left: 44px; padding-right: 44px; }
@media (max-width: 760px) {
  main.wrap { width: 100%; padding-left: 16px; padding-right: 16px; }
  .header-inner { width: 100%; padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  main.wrap, .header-inner { width: calc(100% - 64px); }
}

/* ---------- 첫 화면 연구 그림 슬라이드 (페이드) ---------- */
.slideshow {
  position: relative; background: #fff; overflow: hidden;
  height: clamp(260px, 40vw, 520px);
  border: 1px solid var(--line); border-radius: 4px; margin-top: 8px;
}
.slideshow .slide {
  display: block; position: absolute; inset: 0; padding: 20px 64px;
  opacity: 0; visibility: hidden;
  transition: opacity 1.6s ease-in-out, visibility 0s linear 1.8s;
}
.slideshow .slide.show { opacity: 1; visibility: visible; transition: opacity 1.8s ease-in-out, visibility 0s; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.slide-btn { z-index: 2; opacity: .55; transition: opacity .2s; }
.slideshow:hover .slide-btn { opacity: 1; }
.slide-dots { display: flex; justify-content: center; gap: 10px; margin: 14px 0 0; }
.slide-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0;
  background: #c9d3d2; cursor: pointer;
}
.slide-dots button.on { background: var(--teal); }
@media (max-width: 760px) {
  .slideshow { height: 64vw; }
  .slideshow .slide { padding: 10px 36px; }
  .slide-btn { width: 32px; height: 32px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .slideshow .slide { transition: none; } }

/* ---------- Gallery: 연도별 묶음 + 사진 비율 그대로 ---------- */
.gallery-year { margin-bottom: 36px; }
.gallery-year .pub-year { margin-top: 8px; }
.gallery { display: block; columns: 3 280px; column-gap: 16px; }
.gallery figure { break-inside: avoid; margin: 0 0 18px; cursor: zoom-in; }
.gallery img { width: 100%; height: auto; aspect-ratio: auto; object-fit: initial; border-radius: 3px; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.lightbox .lb-close { position: absolute; top: 14px; right: 18px; }
.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: 0; color: #fff; font-size: 34px;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
}
.lightbox .lb-prev { left: 16px; } .lightbox .lb-next { right: 16px; }
.lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: rgba(255,255,255,.25); }
.lightbox img { max-height: 80vh; max-width: calc(100% - 120px); }
@media (max-width: 760px) { .lightbox img { max-width: 100%; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 16px; transform: none; } }
/* 갤러리: 왼쪽→오른쪽 순서대로, 같은 크기 칸에 사진 전체가 보이게 */
.gallery { display: grid; columns: auto; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 16px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: contain; background: #eef2f1; }
