@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

/* =========================================================================
   Lab AXIS — global stylesheet
   -------------------------------------------------------------------------
   색상·간격·글꼴은 아래 :root 변수만 바꾸면 사이트 전체에 반영됩니다.
   개별 페이지에서 색상 값(#hex)을 직접 쓰지 마세요. (해당 프리셋 사용 권장)
   ========================================================================= */

:root {
  /* Brand */
  --accent:        #0F6E56;
  --accent-bright: #1D9E75;
  --accent-tint:   #E1F5EE;

  /* Ink & surfaces */
  --ink:        #141412;
  --ink-soft:   #444441;
  --muted:      #5F5E5A;
  --faint:      #888780;
  --line:       #E5E3DC;
  --line-soft:  #F0EEE8;
  --bg:         #FFFFFF;
  --bg-tint:    #F7F6F2;

  /* Type */
  --font-serif: "Noto Serif KR", Georgia, "Times New Roman", serif;
  --font-sans:  "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
                "Apple SD Gothic Neo", "Malgun Gothic", Roboto, sans-serif;

  /* Layout */
  --wrap:    1080px;
  --wrap-sm: 780px;
  --gutter:  clamp(20px, 5vw, 48px);
  --radius:  4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
  word-break: keep-all;
}

/* ---------- Layout helpers ---------- */
.wrap    { max-width: var(--wrap);    margin-inline: auto; padding-inline: var(--gutter); }
.wrap-sm { max-width: var(--wrap-sm); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(26px, 3.5vw, 42px); }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.rule { width: 46px; height: 2px; background: var(--accent-bright); border: 0; margin: 18px 0 0; }
.lead { font-size: 17px; color: var(--muted);}
.muted { color: var(--muted); }

/* AXIS 머리글자 강조 — 홈 슬로건의 A · X · I · S */
.ax { color: var(--ink); font-weight: 600; }
.small { font-size: 14px; }

.page-head { padding-block: clamp(40px, 6vw, 64px) 0; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); }
.page-head .lead { margin-top: 14px; }

.section-title {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-family: var(--font-sans);
  font-weight: 500;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: var(--wrap); margin-inline: auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand .name {
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  letter-spacing: .07em; color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-size: 14px; color: var(--muted); padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent-bright); }

/* ---------- 하위 메뉴 (Members ▸ Faculty · Students) ----------
   마우스를 올리거나 키보드로 포커스가 들어오면 펼쳐집니다.
   .nav-item 에 여백을 두지 않고 .submenu 를 붙여 두어야
   메뉴와 하위 메뉴 사이에서 마우스가 빠지지 않습니다. */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-item > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-item > a.on { color: var(--accent); border-bottom-color: var(--accent-bright); }
.caret {
  width: 0; height: 0; margin-top: 1px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor; opacity: .55;
}

.submenu {
  position: absolute; top: 100%; left: -14px; z-index: 60;
  min-width: 148px; padding: 6px 0; margin-top: 9px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(20, 20, 18, .07);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
/* 메뉴와 목록 사이 빈틈을 메워 마우스가 지나갈 수 있게 합니다 */
.submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.submenu a {
  display: block; padding: 7px 16px; font-size: 13.5px;
  color: var(--muted); border-bottom: 0; white-space: nowrap;
}
.submenu a:hover { background: var(--bg-tint); color: var(--ink); }
.submenu a[aria-current="page"] { color: var(--accent); }

.nav-item:hover .submenu,
.nav-item:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.lang-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.lang-toggle button {
  font: inherit; font-size: 12px; letter-spacing: .04em;
  padding: 4px 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: transparent;
  border-radius: var(--radius); padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--ink);
}

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(56px, 9vw, 104px) clamp(40px, 6vw, 68px); }
.hero h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.01em; }
.hero .lead { margin-top: 20px; font-size: 17px; }

/* ---------- Grids & cards ---------- */
/* 구분선 없이 여백으로만 항목을 나눕니다. */
.grid { display: grid; gap: 28px; }
.grid > * { padding: 0; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.numbered .idx { font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.numbered h3 { font-size: 18px; margin: 8px 0 8px; }
.numbered p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.7; }

.cards { display: grid; gap: 26px 22px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---------- People ---------- */
.person { text-align: left; }
.person .photo {
  width: 100%; aspect-ratio: 7 / 9; object-fit: cover;
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius);
}
.person h3 { font-size: 17px; margin: 12px 0 2px; }
.person .role { font-size: 13.5px; color: var(--muted); }
.person .topic { font-size: 13px; color: var(--faint); margin-top: 6px; line-height: 1.6; }
.person .links { margin-top: 8px; display: flex; gap: 10px; font-size: 13px; }

.faculty { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); }
.faculty .photo { aspect-ratio: 7 / 9; }
.faculty h2 { font-size: 26px; }
.faculty .affil { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* 구성원 페이지의 지도교수 요약 카드 */
.faculty-brief {
  display: grid; grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px); align-items: start;
}
.faculty-brief .photo {
  width: 100%; aspect-ratio: 7 / 9; object-fit: cover;
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius);
}
.faculty-brief h3 {
  font-size: 22px; margin: 0 0 6px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px;
}
.faculty-brief h3 a { color: var(--ink); }
.faculty-brief .see-detail {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 400;
  color: var(--accent); white-space: nowrap;
}
.faculty-brief .brief-line { margin: 10px 0 6px; font-size: 15px; color: var(--muted); max-width: 60ch; }

.breadcrumb { font-size: 13.5px; margin: 0 0 24px; }

/* 수상 이력 목록 */
.award-list { counter-reset: award; }
.award-list li {
  position: relative; padding-left: 30px; font-size: 15px; color: var(--ink-soft);
}
.award-list li + li { margin-top: 10px; }
.award-list li::before {
  counter-increment: award; content: counter(award, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-size: 12px; letter-spacing: .06em; color: var(--faint);
}

.bio-block + .bio-block { margin-top: 30px; }
.bio-block h3 {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.bio-block p, .bio-block li { font-size: 15px; color: var(--ink-soft); }
.bio-block li + li { margin-top: 10px; }
.degree { margin: 0; }
.degree .d-title { color: var(--ink); }
.degree .d-meta { font-size: 13.5px; color: var(--muted); }

/* ---------- Publications ---------- */
.pub { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.pub .n { font-size: 13px; color: var(--faint); padding-top: 3px; }
.pub .title { font-family: var(--font-serif); font-size: 17.5px; color: var(--ink); line-height: 1.45; }
.pub .title a { color: inherit; }
.pub .authors { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.pub .venue { font-size: 13.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.tag {
  display: inline-block; font-size: 11.5px; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent);
  margin-left: 8px; vertical-align: 2px; font-style: normal;
}
.tag.grey { background: var(--bg-tint); color: var(--muted); }

/* ---------- Projects ---------- */
.project { padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.project h3 { font-size: 18px; line-height: 1.45; }
.project .collab { font-size: 14px; color: var(--muted); margin-top: 8px; }
.project .status { font-size: 13px; color: var(--accent); margin-top: 6px; }

/* ---------- News ---------- */
.news-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.news-item .date { font-size: 13px; color: var(--accent); letter-spacing: .04em; padding-top: 3px; }
.news-item h3 { font-size: 17px; margin-bottom: 6px; }
.news-item p { margin: 0; font-size: 14.5px; color: var(--muted); }
.news-item .who { font-size: 13px; color: var(--faint); margin-top: 6px; }

/* ---------- Collaborations ---------- */
.logo-grid {
  display: grid; gap: 14px; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  align-items: stretch;
}
.logo-grid > li { margin: 0; }
.logo-cell {
  height: 100%; min-height: 84px;
  display: flex; align-items: center; justify-content: center;
  padding: 2px 2px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.logo-cell img {
  max-width: 100%; max-height: 64px;
  width: auto; height: auto;
  object-fit: contain;
}

.logo-cell .logo-text {
  font-size: 13.5px; line-height: 1.45; text-align: center;
  color: var(--muted); word-break: keep-all;
}
.logo-grid a {
  display: block; height: 100%;
  transition: border-color .15s ease, transform .15s ease;
}
.logo-grid a:hover { text-decoration: none; }
.logo-grid a:hover .logo-cell { border-color: var(--accent-bright); }
.logo-grid a:focus-visible .logo-cell { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
  .logo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .logo-cell { min-height: 68px; padding: 8px 10px; }
  .logo-cell img { max-height: 52px; }
}

/* ---------- News gallery ---------- */
.news-gallery {
  display: grid; gap: 12px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.news-gallery .shot { margin: 0; }
.shot-btn {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.shot-btn img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--bg-tint); transition: opacity .15s ease;
}
.shot-btn:hover img { opacity: .88; }
.shot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-gallery figcaption {
  font-size: 12.5px; color: var(--faint); line-height: 1.5; margin-top: 6px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: clamp(20px, 5vw, 56px);
  background: rgba(12, 14, 13, .88); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1100px, 100%); max-height: 78vh;
  object-fit: contain; border-radius: var(--radius); cursor: default;
}
.lightbox .lb-cap {
  margin: 0; max-width: 60ch; text-align: center;
  font-size: 14px; color: rgba(255, 255, 255, .82);
}
.lightbox .lb-cap:empty { display: none; }
.lb-close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px; line-height: 1; font-size: 26px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.lb-close:hover { background: rgba(255, 255, 255, .22); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.contact-grid dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.contact-grid dd { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.7; }
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-tint); margin-top: 0; }
.site-footer .inner {
  max-width: var(--wrap); margin-inline: auto; padding: 36px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between;
}
.site-footer .f-name { font-size: 14px; font-weight: 600; letter-spacing: .07em; color: var(--ink); }
.site-footer p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.site-footer .f-links { display: flex; gap: 18px; font-size: 13.5px; align-items: flex-start; }

/* ---------- i18n ---------- */
html[lang="en"] [data-lang="ko"],
html[lang="ko"] [data-lang="en"] { display: none; }
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3 { word-break: keep-all; }

/* ---------- Utilities ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }
.loading { color: var(--faint); font-size: 14px; padding: 20px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faculty { grid-template-columns: 1fr; }
  .faculty .photo { max-width: 240px; }
  .faculty-brief { grid-template-columns: 170px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .site-header .bar { flex-wrap: wrap; }
  .nav {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: 2px; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 12px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 8px 0; border-bottom: 0; }

  /* 모바일에서는 펼침 없이 하위 항목을 들여쓰기해 바로 보여줍니다 */
  .nav-item { display: block; width: 100%; }
  .caret { display: none; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    margin: 0 0 0 14px; padding: 0; border: 0; box-shadow: none;
    background: transparent; min-width: 0;
  }
  .submenu::before { display: none; }
  .submenu a { padding: 7px 0; font-size: 13.5px; }
  .submenu a:hover { background: transparent; }
  .news-item, .pub { grid-template-columns: 1fr; gap: 6px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 16px; }
  .news-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

@media print {
  .site-header, .site-footer, .lang-toggle { display: none; }
}
