/* ============================================================
   SER Lab — 공용 스타일시트
   색상·폰트를 바꾸려면 아래 :root 변수만 수정하면 전체에 반영됩니다.
   ============================================================ */
:root {
  --ink: #16202c;          /* 본문 글자색 */
  --sub: #5b6b82;          /* 보조 글자색 */
  --accent: #1a73e8;       /* 포인트 색 (링크·버튼·배지) */
  --accent-dark: #0d47a1;
  --navy: #0e1a2b;         /* 헤더·히어로 배경 */
  --line: #e3e8f0;
  --bg: #ffffff;
  --soft: #f5f7fa;
  --maxw: 1080px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- 상단 내비게이션 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav .in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 26px; height: 62px;
}
.nav .logo img { height: 38px; display: block; }
.nav .logo:hover { text-decoration: none; }
.nav .in > ul { list-style: none; display: flex; gap: 4px; margin-left: auto; }
.nav li { position: relative; }
.nav li a {
  display: block; padding: 8px 13px; font-size: 14.5px; font-weight: 600;
  color: var(--sub); border-radius: 8px; white-space: nowrap;
}
.nav li a:hover { color: var(--accent); background: var(--soft); text-decoration: none; }
.nav li a.on { color: var(--accent); }
/* 드롭다운 하위 메뉴 */
.nav ul.sub {
  display: none; position: absolute; top: 100%; left: 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; min-width: 172px; box-shadow: 0 10px 28px rgba(20,40,80,0.12);
}
.nav li:hover > ul.sub, .nav li:focus-within > ul.sub { display: block; }
.nav .burger { display: none; margin-left: auto; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink); }
.nav .search-btn {
  background: none; border: 0; cursor: pointer; color: var(--sub); padding: 8px; border-radius: 8px;
  display: flex; align-items: center; flex: 0 0 auto;
}
.nav .search-btn:hover { color: var(--accent); background: var(--soft); }
@media (max-width: 860px) {
  .nav .in > ul {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 10px 16px 16px;
  }
  .nav .in > ul.open { display: flex; }
  .nav .burger { display: block; }
  /* 모바일에서는 하위 메뉴를 항상 펼쳐서 들여쓰기로 표시 */
  .nav ul.sub {
    display: block; position: static; border: none; box-shadow: none;
    padding: 0 0 0 16px; min-width: 0;
  }
}

/* ---------- 히어로 (홈) ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #14304f 60%, #0d47a1 130%);
  color: #fff; padding: 96px 0 88px;
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.hero .tag { margin-top: 16px; font-size: clamp(15px, 2vw, 19px); color: #b9cbe4; max-width: 640px; }
.hero .cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px; font-weight: 700;
  font-size: 15px; background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.ghost { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.35); }
.btn.ghost:hover { background: rgba(255,255,255,0.22); }

/* ---------- 페이지 머리글 (서브페이지) ---------- */
.pagehead { background: var(--navy); color: #fff; padding: 52px 0 44px; }
.pagehead h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.5px; }
.pagehead p { margin-top: 8px; color: #b9cbe4; font-size: 15px; }

/* ---------- 공통 섹션 ---------- */
.sec { padding: 64px 0; }
.sec.alt { background: var(--soft); }
.sec h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.sec .sub { color: var(--sub); margin-bottom: 30px; max-width: 700px; }
.sec .more { font-weight: 600; font-size: 14px; }

/* ---------- 카드 그리드 ---------- */
.grid { display: grid; gap: 22px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover { box-shadow: 0 8px 26px rgba(20,40,80,0.10); transform: translateY(-2px); }
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--sub); }
.card .ico { font-size: 30px; margin-bottom: 12px; }
.card img.fig {
  width: 100%; height: auto; display: block; border-radius: 10px;
  background: #fff; margin-bottom: 14px;   /* 원본 비율 그대로 — 잘리지 않음 */
}

/* ---------- 연구 분야 (Research 페이지: 좌측 이미지 + 우측 제목·요약) ---------- */
.rrow {
  display: grid; grid-template-columns: 290px 1fr; gap: 34px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.rrow:first-child { padding-top: 0; }
.rrow:last-child { border-bottom: 0; }
.rrow img {
  width: 100%; height: auto; display: block; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
}
.rrow h3 { font-size: 23px; font-weight: 800; margin-bottom: 10px; }
.rrow p { font-size: 16.5px; color: var(--sub); line-height: 1.8; }
@media (max-width: 760px) { .rrow { grid-template-columns: 1fr; gap: 14px; } }
/* 홈 화면 연구 카드의 제목 */
.card h3.rt { font-size: 16px; font-weight: 700; margin-bottom: 6px; }

/* ---------- 멤버 카드 (호버 시 상세 패널 확장) ---------- */
.person { text-align: left; position: relative; display: flex; flex-direction: column; }
/* 벽돌식 배치: 열린 카드만 길어지고 아래 카드들이 원래 크기 그대로 밀려남 */
.masonry { position: relative; display: block !important; }
.masonry .person {
  position: absolute; box-sizing: border-box;
  transition: top 0.35s ease, left 0.35s ease;
}
/* 직책 태그 (LAB LEADER 등) — 이름 바로 위 한 줄에 배지로 표시 */
.person .tags { margin: -4px 0 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.person .tag {
  display: inline-block; padding: 2px 9px 3px; border-radius: 20px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px;
  background: var(--soft); color: var(--accent); white-space: nowrap;
}
.person .tag.lead { background: var(--accent); color: #fff; }
.person .tag.vice { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.person .tag.founder { background: #fff1cc; color: #8a5a00; }        /* 창업(FOUNDER) — 프로필 '창업:'이 있으면 자동 */
.person .avatar {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  background: var(--soft); margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #b9c7da;
}
.person .nm { font-size: 17px; font-weight: 700; }
.person .role { color: var(--accent); font-size: 13px; font-weight: 700; margin: 2px 0 8px; }
.person .info { font-size: 13.5px; color: var(--sub); min-height: 44px; flex: 1; }
/* 상세 패널이 있는 카드 표시 */
.person .hint {
  margin-top: 12px; font-size: 11.5px; color: #aab2bf; letter-spacing: 0.4px;
  transition: opacity 0.2s;
}
.person.hasdetail { cursor: pointer; }
.person.hasdetail:hover { border-color: var(--accent); }
.person.hasdetail.open {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(20,40,80,0.14);
}
.person.hasdetail.open .hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }
/* 상세 패널 — 카드 안에서 펼쳐지며 아래 카드들이 같은 간격으로 자연스럽게 밀려남 */
.person .detail {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
}
.person.hasdetail.open .detail {
  max-height: 2400px; opacity: 1; margin-top: 10px;
}
.person .detail h4 {
  font-size: 11px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 6px;
}
.person .detail p { font-size: 13.5px; color: var(--ink); }
.person .detail p.startup b { font-weight: 700; }                    /* 창업 회사명 */
.person .detail p.startup + ul { margin-top: 2px; }
.person .detail ul { list-style: none; }
.person .detail li {
  font-size: 13px; color: var(--sub); padding: 4px 0 4px 14px; position: relative;
}
.person .detail li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ---------- 교수 프로필 ---------- */
.prof { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
@media (max-width: 720px) { .prof { grid-template-columns: 1fr; } }
.prof .photo {
  width: 100%; height: auto; display: block; border-radius: 14px; background: var(--soft);   /* 사진은 원본 비율 그대로 (교수 한 분만 사용) */
}
/* 사진(.jpg/.png)이 모두 없을 때 대신 표시되는 이니셜 — img 가 div 로 교체됨 */
.prof div.photo {
  aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800; color: #b9c7da;
}
.prof h3 { font-size: 24px; font-weight: 800; }
.prof .role { color: var(--accent); font-weight: 700; margin: 4px 0 14px; }
.prof dl { margin-top: 28px; }
.prof dt {
  font-size: 13px; font-weight: 800; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1px; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.prof dt:first-child { margin-top: 0; }
.prof dd { font-size: 15px; line-height: 1.55; color: var(--ink); margin-left: 0; padding-left: 0; }
.prof dd + dd { margin-top: 9px; }
.prof dd.lead { font-size: 16.5px; line-height: 1.65; }              /* 연구 분야 소개 문단 */
.prof dd span { color: var(--sub); }                                  /* 보조 설명(학위 논문 제목 등)은 회색 */
.prof dd b { font-weight: 700; }
/* 역할 꼬리표: <span class="tag">PI</span> */
.prof dd .tag {
  display: inline-block; padding: 1px 8px 2px; border-radius: 20px; margin-left: 6px; vertical-align: 2px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px; background: var(--soft); color: var(--accent); white-space: nowrap;
}
/* 연도가 있는 항목: 왼쪽 연도 칸(회색) + 오른쪽 내용. <dd class="dated"><time>연도</time><div>내용</div></dd> */
.prof dd.dated { display: grid; grid-template-columns: 136px 1fr; gap: 0 18px; }
.prof dd.dated time { color: var(--sub); font-size: 14px; padding-top: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prof dd.dated > div { min-width: 0; }
@media (max-width: 560px) {
  .prof dd.dated { grid-template-columns: 1fr; }
  .prof dd.dated time { font-size: 13px; padding-top: 0; }
  .prof dd.dated + dd.dated { margin-top: 12px; }
}

/* ---------- 뉴스 (연도별 그룹) ---------- */
.news-year { display: flex; align-items: center; gap: 18px; margin: 44px 0 6px; }
.news-year:first-child { margin-top: 4px; }
.news-year b { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.news-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.news-item { padding: 18px 2px; border-bottom: 1px solid var(--line); }
.news-item:last-of-type { border-bottom: 0; }
.news-item h3 { font-size: 16.5px; font-weight: 700; }
.news-item p { font-size: 14.5px; color: var(--sub); margin-top: 4px; }
/* 상장 스트립 — 연도 칸 맨 위에 같은 규격의 상장을 가로로 나열 */
.award-strip {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 16px 2px 10px; border-bottom: 1px solid var(--line);
}
.award { flex: 0 0 150px; text-decoration: none; color: inherit; text-align: center; }
.award .img {
  width: 150px; height: 200px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s;
}
.award .img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.award:hover .img { border-color: var(--accent); box-shadow: 0 6px 18px rgba(20,40,80,0.10); }
.award .cap {
  display: block; margin-top: 7px; font-size: 12px; line-height: 1.45; color: var(--sub);
}
.award:hover .cap { color: var(--accent); }

/* 사진이 있으면 왼쪽에 일정한 규격의 썸네일 */
.news-item .row.withthumb { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: start; }
.news-item .thumb {
  width: 132px; height: 92px; object-fit: cover; display: block;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
@media (max-width: 560px) {
  .news-item .row.withthumb { grid-template-columns: 96px 1fr; gap: 12px; }
  .news-item .thumb { width: 96px; height: 68px; }
}
/* 클릭하면 펼쳐지는 소식 (멤버 카드와 같은 방식) */
.news-item.hasmore { cursor: pointer; }
.news-item.hasmore:hover h3 { color: var(--accent); }
.news-item .hint { margin-top: 8px; font-size: 11.5px; color: #aab2bf; letter-spacing: 0.4px; transition: opacity 0.2s; }
.news-item.open .hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.news-item .more {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.25s ease, margin-top 0.35s ease;
}
.news-item.open .more { max-height: 1600px; opacity: 1; margin-top: 14px; }
.news-item.open .row.withthumb { grid-template-columns: 1fr; }   /* 펼치면 원본이 보이므로 */
.news-item.open .thumb { display: none; }                        /* 썸네일은 숨김 */
.news-item .more img.full {
  width: 100%; max-width: 560px; height: auto; display: block;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; margin-bottom: 12px;
}
.news-item .more p { font-size: 14.5px; color: var(--ink); line-height: 1.85; }
/* 링크가 달린 소식: 내용 칸 전체가 클릭 영역이 됨 */
.news-item a.body { color: inherit; text-decoration: none; display: block; border-radius: 10px; }
.news-item.linked { cursor: pointer; transition: background 0.15s; }
.news-item.linked:hover { background: var(--soft); }
.news-item.linked:hover h3 { color: var(--accent); }
.news-item .ext {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 20px;
  background: var(--soft); color: var(--accent); font-size: 11px; font-weight: 800;
  letter-spacing: 0.5px; vertical-align: 2px;
}

/* ---------- 갤러리 (연도 → 행사: 국문 제목·영문 제목 → 사진 가로 띠) ---------- */
.gal-event { margin: 22px 0 38px; scroll-margin-top: 90px; }
.gal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.gal-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.35; }
.gal-head p { margin-top: 4px; font-size: 14px; color: var(--sub); }
.gal-count {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--sub); background: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; margin-bottom: 2px;
}
.gal-strip-wrap { position: relative; }
.gal-strip {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px;
  scrollbar-width: thin; scrollbar-color: #c9d2df transparent;
}
.gal-strip figure {
  flex: 0 0 auto; height: 210px; border-radius: 12px; overflow: hidden; background: var(--soft);
  border: 1px solid var(--line); scroll-snap-align: start; cursor: zoom-in;
}
.gal-strip img { height: 100%; width: auto; display: block; transition: transform .25s ease; }
.gal-strip figure:hover img { transform: scale(1.03); }
/* 더 있음을 알리는 가장자리 흐림 + 화살표 (넘칠 때만 표시) */
.gal-strip-wrap::before, .gal-strip-wrap::after {
  content: ""; position: absolute; top: 2px; bottom: 10px; width: 48px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.gal-strip-wrap::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.gal-strip-wrap::after { right: 0; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }
.gal-strip-wrap.fade-l::before, .gal-strip-wrap.fade-r::after { opacity: 1; }
.gal-arrow {
  position: absolute; top: calc(50% - 4px); transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.96); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(20,40,80,.14); display: flex; align-items: center; justify-content: center; padding-bottom: 3px;
}
.gal-arrow:hover { color: var(--accent); }
.gal-arrow.prev { left: 8px; }
.gal-arrow.next { right: 8px; }
.gal-arrow[hidden] { display: none; }
@media (hover: none) { .gal-arrow { display: none; } }
.gal-soon {
  height: 96px; border: 1px dashed #d5dce6; border-radius: 12px; background: var(--soft);
  display: flex; align-items: center; justify-content: center; color: #9aa7b8; font-size: 13.5px;
}
.gal-none { color: var(--sub); }
@media (max-width: 560px) { .gal-strip figure { height: 150px; } .gal-head h3 { font-size: 17px; } .gal-head p { font-size: 13px; } }

/* 갤러리 확대 보기(라이트박스) */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 30px 16px 22px;
  background: rgba(11, 21, 38, 0.92); opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.lightbox.on { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(1100px, 94vw); max-height: 74vh; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); background: #fff;
}
.lightbox .cap { color: #fff; text-align: center; margin-top: 16px; max-width: 760px; }
.lightbox .cap b { font-size: 16px; }
.lightbox .cap .d { color: #9fb4d8; font-size: 12.5px; font-weight: 700; letter-spacing: 0.5px; margin-right: 8px; }
.lightbox .cap p { color: #c6d2e8; font-size: 13.5px; margin-top: 4px; }
.lightbox .cap .n { display: block; color: #9fb4d8; font-size: 12.5px; font-weight: 700; letter-spacing: .5px; margin-top: 8px; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,0.12);
  border-radius: 50%; width: 44px; height: 44px; font-size: 20px; line-height: 1;
  transition: background 0.15s;
}
.lightbox button:hover { background: rgba(255,255,255,0.28); }
.lightbox .x { top: 18px; right: 18px; }
.lightbox .prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox .prev, .lightbox .next { top: auto; bottom: 14px; transform: none; } }

/* ---------- 연락처 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid iframe { width: 100%; height: 360px; border: 0; border-radius: 14px; }
.clist { list-style: none; }
.clist li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 12px; }
.clist li b { min-width: 74px; color: var(--accent); }

/* ---------- 협력 기관 회전 배너 ---------- */
.marquee { overflow: hidden; position: relative; padding: 6px 0; }
.marquee::before, .marquee::after {   /* 양끝 페이드 */
  content: ""; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--soft), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--soft), transparent); }
.marquee .track {
  display: flex; align-items: center; gap: 56px; width: max-content;
  animation: marquee-scroll var(--dur, 28s) linear infinite;
}
.marquee:hover .track { animation-play-state: paused; }  /* 마우스 올리면 일시정지 */
@keyframes marquee-scroll { to { transform: translateX(-50%); } }
.marquee a { display: flex; align-items: center; text-decoration: none; }
.marquee img {
  height: 72px; width: auto; max-width: 240px; object-fit: contain;   /* 투명 배경 PNG 권장 */
}
@media (max-width: 560px) { .marquee img { height: 52px; max-width: 170px; } }
/* 배너가 든 회색 띠는 위아래 여백을 줄여 슬림하게 */
.sec.partners { padding: 26px 0; }
.marquee .txt {   /* 로고 이미지가 없을 때의 텍스트 대체 */
  padding: 10px 22px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 15px; font-weight: 700; color: var(--sub); background: #fff; white-space: nowrap;
}
.marquee a:hover .txt { color: var(--accent); border-color: var(--accent); }

/* ---------- 논문 위젯 (publications.html) ---------- */
.pubw .yearhead { display: flex; align-items: center; gap: 18px; margin: 44px 0 8px; }
.pubw .yearhead:first-child { margin-top: 8px; }
.pubw .yearhead b { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.pubw .yearhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pubw .item {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px;
  padding: 26px 4px; border-bottom: 1px solid #ececec; align-items: start;
}
.pubw .item.hasimg { grid-template-columns: 44px 104px 1fr; }
.pubw .num { color: var(--accent); font-weight: 700; font-size: 17px; padding-top: 2px; }
.pubw .thumb { width: 104px; height: 104px; border-radius: 8px; background: var(--soft); overflow: hidden; }
.pubw .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pubw .title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.pubw .title a { color: var(--ink); }
.pubw .title a:hover { color: var(--accent); text-decoration: none; }
.pubw .authors { margin-top: 7px; font-size: 14px; color: var(--sub); }
.pubw .authors b { color: var(--ink); }
.pubw .venue {
  margin-top: 7px; font-size: 14px; font-weight: 700; font-style: italic; color: var(--accent);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.pubw .bdg {
  font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.3px;
  padding: 2px 8px; border-radius: 99px; color: #fff; white-space: nowrap;
}
.pubw .bdg.if { background: #c0392b; }
.pubw .bdg.top { background: #b8860b; }
.pubw .bdg.man { background: #34495e; }
/* 특허 항목 줄 안의 뱃지는 앞 내용과 살짝 띄운다 */
.pubw .pat-item p .bdg { margin-left: 8px; vertical-align: 1px; }
.pubw .cites { color: #8a93a2; font-size: 12px; font-style: normal; font-weight: 400; }
.pubw .quick { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.pubw .quick a, .pubw .quick button {
  font-size: 12px; color: #8a93a2; background: none; border: 1px solid #e4e7ec;
  border-radius: 6px; padding: 2px 10px; cursor: pointer; font-family: inherit;
}
.pubw .quick a:hover, .pubw .quick button:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.pubw .bib {
  display: none; margin-top: 8px; font-size: 12px; background: var(--soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word; font-family: Consolas, monospace;
}
.pubw .bib.open { display: block; }
.pubw .state { text-align: center; padding: 60px 0; color: var(--sub); }
.pubw .notice {
  background: #fff8e6; border: 1px solid #eedca8; border-radius: 8px;
  padding: 10px 14px; font-size: 13px; color: #7a5c00; margin: 14px 0;
}
.pubw .credit { margin-top: 30px; text-align: right; font-size: 11.5px; color: #aab2bf; }

/* 특허 목록 */
.pat-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px;
  padding: 18px 4px; border-bottom: 1px solid #ececec;
}
.pat-item .num { color: var(--accent); font-weight: 700; }
.pat-item h3 { font-size: 15.5px; font-weight: 700; }
.pat-item p { font-size: 13.5px; color: var(--sub); margin-top: 3px; }

/* 탭 (Publications / Patents) */
.tabs { display: flex; gap: 8px; margin: 26px 0 6px; }
.tabs button {
  padding: 9px 22px; border: 1px solid var(--line); border-radius: 99px;
  background: #fff; font-size: 14.5px; font-weight: 700; color: var(--sub);
  cursor: pointer; font-family: inherit;
}
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 홈 최근 논문 ---------- */
.recent-pub { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin-bottom: 18px; }
.recent-pub .t { font-weight: 700; font-size: 15.5px; }
.recent-pub .v { font-size: 13.5px; color: var(--sub); font-style: italic; margin-top: 2px; }

/* ---------- 푸터 ---------- */
footer.site {
  background: var(--navy); color: #8fa3bd; padding: 44px 0 36px; margin-top: 40px; font-size: 13.5px;
}
footer.site .in { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
footer.site b { color: #dbe6f5; font-size: 15px; }
footer.site p { margin-top: 8px; }
footer.site a { color: #b9cbe4; }
/* 위쪽: 학교 로고(흰색 버전, 남색 바탕 위에 바로) + 연구실 이름·주소를 가로로 나란히 (좁은 화면에서는 세로로 쌓임) */
footer.site .foot-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
footer.site .foot-logo { flex: 0 0 auto; display: flex; opacity: .92; transition: opacity .15s; }
footer.site .foot-logo:hover { opacity: 1; }
footer.site .foot-logo img { height: 64px; width: auto; display: block; }  /* 오른쪽 글자 3줄(이름·주소·전화)의 잉크 높이에 맞춤 */
footer.site .foot-lab { flex: 1 1 320px; min-width: 0; }
footer.site .foot-lab p { margin-top: 6px; }
/* 아래쪽: 관리자 연락처·저작권 (얇은 구분선) */
footer.site .foot-sub { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
footer.site .foot-sub p { margin-top: 6px; }

/* ---------- 사이트 검색 (js/search.js) ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,0.45); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px;
}
.search-overlay[hidden] { display: none; }   /* 닫힌 상태 — 위의 display:flex 보다 우선해야 실제로 사라짐 */
.search-box {
  width: 100%; max-width: 660px; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(15,23,42,0.35);
}
.search-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--sub); }
.search-head input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--ink); background: transparent; min-width: 0; }
.search-head input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }   /* 브라우저 기본 × (입력 지우기) 숨김 — 닫기 × 와 혼동 방지 */
.search-close {   /* × 닫기 버튼 */
  flex: 0 0 auto; width: 34px; height: 34px; margin-right: -6px; border: 0; border-radius: 50%;
  background: transparent; color: var(--sub); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .12s, color .12s;
}
.search-close:hover, .search-close:focus-visible { background: var(--soft); color: var(--ink); outline: 0; }
.search-close svg { width: 20px; height: 20px; }
.search-results { max-height: 62vh; overflow-y: auto; padding: 8px; }
.search-hint { padding: 22px 12px; color: var(--sub); font-size: 14px; text-align: center; }
.search-hint .kw { display: block; margin-top: 6px; font-size: 13px; color: #9aa7b8; letter-spacing: .2px; }   /* 검색 대상 목록은 둘째 줄에 */
.search-group { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); padding: 12px 10px 6px; }
.search-group span { color: #aab2bf; margin-left: 4px; }
.search-item { display: block; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.search-item:hover, .search-item.active { background: var(--soft); text-decoration: none; }
.search-item b { display: block; font-size: 14.5px; font-weight: 700; }
.search-item span { display: block; font-size: 13px; color: var(--sub); margin-top: 2px; }
.search-item mark, .hl-mark { background: #fff2a8; color: inherit; padding: 0 2px; border-radius: 3px; }
body.search-open { overflow: hidden; }
/* 검색 결과에서 넘어왔을 때 해당 항목을 잠시 강조 */
.hl-target { animation: hl-pulse 3.4s ease-out; border-radius: 12px; }
@keyframes hl-pulse {
  0%, 55% { box-shadow: 0 0 0 4px rgba(37,99,235,0.38); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}
