/* ==========================================================================
   Yuna Han — Academic Homepage
   Design system: editorial academic layout, light/dark, KO/EN bilingual.
   Single stylesheet. No external fonts, no CDN, no build step.
   ========================================================================== */

:root {
  /* Brand — ACSL-SWU 로고(남색 → 하늘색 그라디언트)에서 뽑은 색입니다. */
  --navy: #16294d;          /* 로고 "A" 의 짙은 남색 */
  --navy-deep: #0d1b36;
  --brand: #1e6fd9;         /* 로고 "S" 의 파랑 — 버튼 · 링크 · 강조 */
  --brand-deep: #1857ad;
  --cyan: #17a3d9;          /* 로고 "-SWU" 의 하늘색 */
  --teal: #2a6f66;          /* "모집 중" 배지 등 상태 표시용 */

  /* Light theme surfaces */
  --bg: #fbfcfe;
  --bg-alt: #eff3f9;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --text: #191c20;
  --text-soft: #454b53;
  --muted: #6c727b;
  --line: #e0e3ea;
  --line-strong: #c8cdd8;
  --accent: var(--brand);
  --accent-soft: #e4eefc;
  --primary: var(--navy);
  --primary-soft: #e7edf7;
  --ring: rgba(30, 111, 217, .35);
  --shadow-sm: 0 2px 10px rgba(20, 32, 48, .05);
  --shadow: 0 16px 44px rgba(20, 32, 48, .10);
  --shadow-lg: 0 30px 70px rgba(20, 32, 48, .16);

  /* Metrics */
  --radius: 16px;
  --radius-lg: 26px;
  --max: 1600px;
  --measure: none;   /* 본문 폭 제한 없음 — 창을 넓히면 글도 함께 넓어집니다 */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", "Apple SD Gothic Neo",
          system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}

html[data-theme="dark"] {
  --bg: #10141a;
  --bg-alt: #151b23;
  --surface: #182029;
  --surface-2: #1e2732;
  --text: #eef1f5;
  --text-soft: #c3ccd6;
  --muted: #8e99a6;
  --line: #2a343f;
  --line-strong: #3a4653;
  --accent: #6fb3f5;
  --accent-soft: #17263c;
  --primary: #9fc3e6;
  --primary-soft: #1b2836;
  --ring: rgba(111, 179, 245, .45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --shadow: 0 16px 44px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -.01em;
  word-break: keep-all;      /* 한국어는 어절 단위로만 줄바꿈 */
  overflow-wrap: break-word; /* 긴 URL 등 넘칠 때만 끊기 (anywhere 는 칸 폭까지 좁혀서 사용하지 않음) */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { letter-spacing: -.035em; line-height: 1.18; margin: 0; font-weight: 800; }

/* Bilingual switching. Korean is the no-JS default. */
html[data-lang="en"] [data-ko] { display: none; }
html[data-lang="ko"] [data-en] { display: none; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 2000;
  background: var(--primary); color: #fff; padding: 12px 18px;
  border-radius: 10px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  margin: 0 0 14px; font-family: var(--mono); font-size: .72rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.eyebrow.muted-eyebrow { color: var(--muted); }
.lead { color: var(--text-soft); font-size: 1.06rem; max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ------------------------------------------------------------- header --- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: 18px; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-logo { flex: none; width: auto; height: 30px; display: block; }
html[data-theme="dark"] .brand-logo.light,
html:not([data-theme="dark"]) .brand-logo.dark { display: none; }
.brand-text { display: block; font-weight: 800; font-size: 1rem; line-height: 1.2; letter-spacing: -.03em; }
.brand-text small {
  display: block; margin-top: 3px; font-family: var(--mono); font-size: .62rem;
  font-weight: 600; letter-spacing: .12em; color: var(--muted); text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 9px 13px; border-radius: 10px; text-decoration: none;
  font-size: .9rem; font-weight: 700; color: var(--text-soft); white-space: nowrap;
  transition: background .18s, color .18s;
}
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  font-size: .74rem; font-weight: 800; font-family: var(--mono); letter-spacing: .04em;
  transition: border-color .18s, transform .18s;
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html:not([data-theme="dark"]) .theme-icon-moon { display: none; }
.menu-toggle { display: none; }

/* ---------------------------------------------------------------- hero --- */
.hero { position: relative; overflow: hidden; padding: 84px 0 68px; }
.hero::before {
  content: ""; position: absolute; inset: auto -180px auto auto; top: -280px;
  width: 640px; height: 640px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 16%, transparent), transparent 66%);
}
.hero::after {
  content: ""; position: absolute; left: -240px; bottom: -300px;
  width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 18%, transparent), transparent 68%);
}
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); letter-spacing: -.055em; line-height: 1.04; }
.hero h1 .accent { color: var(--accent); display: block; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
/* 버튼이 하나뿐인 CTA — 패널 폭을 꽉 채워 단독 행동 유도로 읽히게 합니다 */
.hero-actions.single { display: block; }
.hero-actions.single .btn { display: flex; width: 100%; }

/* Lab hero (index.html) — logo mark, lab name, one-paragraph statement. */
.lab-hero { padding: 76px 0 64px; text-align: center; }
.lab-hero .container { position: relative; z-index: 1; }
.lab-mark { width: min(260px, 62vw); height: auto; margin: 0 auto 26px; display: block; }
html[data-theme="dark"] .lab-mark.light,
html:not([data-theme="dark"]) .lab-mark.dark { display: none; }
.lab-hero h1 {
  margin: 0; font-size: clamp(2.6rem, 6.6vw, 4.4rem); font-weight: 800;
  letter-spacing: -.05em; line-height: 1.02;
  background: linear-gradient(100deg, var(--navy) 8%, var(--brand) 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .lab-hero h1 {
  background: linear-gradient(100deg, #9db6e8 8%, #6fb3f5 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
}
.lab-sub {
  margin: 12px 0 0; font-family: var(--mono); font-size: .82rem; font-weight: 600;
  letter-spacing: .1em; color: var(--muted);
}
.lab-intro {
  margin: 26px auto 0; max-width: none; font-size: 1.02rem; line-height: 1.85; color: var(--text-soft);
}
.lab-hero .hero-actions, .lab-hero .status-badge { justify-content: center; }
.lab-hero .hero-actions { justify-content: center; margin-top: 32px; }
.lab-hero .status-badge { margin-inline: auto; }

/* Lab keywords (index.html, bottom) */
.keyword-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.keyword {
  padding: 28px 22px; text-align: center; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.keyword:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.keyword strong {
  display: block; font-size: 1.12rem; letter-spacing: -.03em;
  background: linear-gradient(100deg, var(--navy), var(--brand) 70%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .keyword strong {
  background: linear-gradient(100deg, #9db6e8, #6fb3f5 70%, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
}
.keyword span { display: block; margin-top: 9px; font-size: .87rem; color: var(--text-soft); line-height: 1.65; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 12px;
  text-decoration: none; font-weight: 750; font-size: .94rem;
  border: 1px solid transparent; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 12px 26px rgba(30, 111, 217, .26); }
.btn.primary:hover { background: var(--brand-deep); }
.btn.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.is-disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }

.status-badge {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px; border-radius: 999px; font-size: .87rem; font-weight: 750;
  background: var(--surface-2); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal);
}
html[data-theme="dark"] .status-badge { color: #6fc0b3; }
.status-badge.closed { background: color-mix(in srgb, #a05b13 14%, transparent); color: #a05b13; }
html[data-theme="dark"] .status-badge.closed { color: #d69a56; }
.status-badge .dot {
  width: 9px; height: 9px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent);
}

/* -------------------------------------------------------------- pieces --- */
.page-hero { padding: 68px 0 46px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.page-hero p { margin: 18px 0 0; max-width: var(--measure); color: var(--text-soft); font-size: 1.04rem; }

.section { padding: 84px 0; }
.section.alt { background: var(--bg-alt); }
.section.tight { padding: 56px 0; }
.section-head { margin-bottom: 40px; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-lead { margin: 16px 0 0; max-width: var(--measure); color: var(--text-soft); }

.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.split.reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.stack > * + * { margin-top: 14px; }

.rule-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.rule-list > * { border-bottom: 1px solid var(--line); padding: 18px 0; }

/* Marquee facts */

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  position: relative; padding: 30px 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-num {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.card h3 { margin: 16px 0 0; font-size: 1.2rem; }
.card h3 small { display: block; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.card p { margin: 12px 0 0; font-size: .95rem; color: var(--text-soft); }

.icon-box {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 4px;
}
.icon-box.teal { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.icon-box.navy { background: var(--primary-soft); color: var(--primary); }
.icon-box svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 5px 11px; border-radius: 999px; font-size: .75rem; font-weight: 650;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-soft);
}

/* Timeline */
.timeline { display: grid; gap: 0; }
.timeline-item {
  position: relative; padding: 20px 0 20px 30px; border-bottom: 1px solid var(--line);
}
.timeline-item::before {
  content: ""; position: absolute; left: 4px; top: 28px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.timeline-item::after {
  content: ""; position: absolute; left: 8px; top: 37px; bottom: -1px; width: 1px; background: var(--line);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item:last-child::after { display: none; }
.timeline-item strong { display: block; font-size: 1rem; letter-spacing: -.025em; color: var(--text); }
.timeline-item span { display: block; margin-top: 4px; font-size: .89rem; color: var(--muted); }
/* 제목 <strong> 안의 KO/EN 전환용 span 은 아래 설명 span 스타일을 물려받지 않습니다 */
.timeline-item strong span {
  display: inline; margin-top: 0; font-size: inherit; font-weight: inherit; color: inherit;
}
.timeline-item .when { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }

/* Flow / process */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.flow-step {
  padding: 24px 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
}
.flow-step b { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--muted); }
.flow-step strong { display: block; margin-top: 10px; font-size: 1.02rem; }
.flow-step span { display: block; margin-top: 7px; font-size: .87rem; color: var(--text-soft); }

/* News */
.news-list { display: grid; border-top: 1px solid var(--line); }
.news-item {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 18px; align-items: center;
  padding: 17px 0; border-bottom: 1px solid var(--line);
}
.news-date { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.news-title { font-weight: 650; font-size: .97rem; }
.news-title a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.news-title a:hover { color: var(--accent); }
.news-type {
  font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  padding: 4px 9px; border-radius: 6px; background: var(--primary-soft); color: var(--primary);
}
.news-type.recruit { background: var(--accent-soft); color: var(--accent); }

/* Publications */

.pub-list { display: grid; border-top: 1px solid var(--line); }
.pub-item {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.pub-year { font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.pub-item h3 { margin: 8px 0 0; font-size: 1.06rem; font-weight: 750; line-height: 1.4; letter-spacing: -.02em; }
.pub-meta { margin-top: 9px; font-size: .88rem; color: var(--muted); }
.pub-meta strong { color: var(--text); font-weight: 750; }
.pub-badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-family: var(--mono); font-size: .67rem; font-weight: 700; letter-spacing: .06em;
  padding: 4px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-soft);
}
.badge.hl { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pub-link {
  align-self: center; white-space: nowrap; text-decoration: none; font-size: .85rem; font-weight: 750;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text-soft);
  transition: background .18s, color .18s, border-color .18s;
}
.pub-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
html[data-theme="dark"] .pub-link:hover { color: var(--bg); }


/* Section anchor bar (publications.html) */
/* Sits directly under the 74px site header, which is sticky at z-index 1000. */
.anchor-nav { position: sticky; top: 74px; z-index: 20; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
html:has(.anchor-nav) { scroll-padding-top: 140px; }
.anchor-nav .container { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 10px; }
.anchor-nav a {
  padding: 8px 15px; border-radius: 999px; text-decoration: none;
  font-size: .86rem; font-weight: 700; color: var(--text-soft);
  transition: background .18s, color .18s;
}
.anchor-nav a:hover { background: var(--surface); color: var(--accent); }

/* Group heading shared by journal / conference lists */
.group-head {
  display: flex; align-items: center; gap: 12px; margin: 34px 0 4px;
  font-size: 1.05rem; letter-spacing: -.02em;
}
.group-head:first-of-type { margin-top: 0; }
.group-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.group-head em {
  order: 3; font-style: normal; font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; color: var(--accent); background: var(--accent-soft);
  padding: 4px 9px; border-radius: 6px;
}


/* Reference list — journals, conferences, projects, patents */
.ref-list { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: ref; color: var(--text-soft); }
.ref-list li {
  counter-increment: ref;
  position: relative;
  margin: 0; padding: 12px 0 12px 3.2em; border-bottom: 1px solid var(--line);
  font-size: .95rem; line-height: 1.7;
}
.ref-list li::before {
  content: "[" counter(ref) "]";
  position: absolute; left: 0; top: 12px; padding-top: 2px;
  font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: var(--muted);
}
.ref-list li:last-child { border-bottom: 0; }
.ref-list em { font-style: italic; color: var(--text); }
.ref-list strong { color: var(--text); font-weight: 750; }

/* Research projects reuse the reference list, but on a single tighter line:
   과제명 옆에 발주처 · 기간 · 역할을 작은 글씨로 덧붙인다. */
.project-list li { padding-block: 8px; line-height: 1.6; }
.project-list li::before { top: 8px; }
.ref-title { margin: 0; font-size: .97rem; font-weight: 650; color: var(--text); letter-spacing: -.015em; }
.ref-meta {
  margin-left: .6em; font-size: .82rem; font-weight: 400;
  color: var(--muted); letter-spacing: 0;
}
.ref-sub { margin: 4px 0 0; font-size: .87rem; color: var(--muted); }

/* Honors and awards */
.award-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.award-list li {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 18px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.award-year {
  grid-row: 1 / span 2; font-family: var(--mono); font-size: .76rem; font-weight: 700;
  letter-spacing: .06em; color: var(--accent); line-height: 1.5; padding-top: 2px;
}
.award-title { margin: 0; font-size: .97rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.5; }
.award-note { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }

/* Panels, callouts, prose */
.panel {
  padding: 32px 30px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.panel h2, .panel h3 { margin-top: 0; }
.callout {
  padding: 20px 24px; border-radius: var(--radius); border-left: 4px solid var(--accent);
  background: var(--surface-2); font-size: .93rem; color: var(--text-soft);
}
.callout.teal { border-left-color: var(--teal); }
.callout strong { color: var(--text); }

.prose { max-width: var(--measure); }
.prose h2 { margin: 46px 0 16px; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 30px 0 10px; font-size: 1.1rem; }
.prose p { margin: 0 0 16px; color: var(--text-soft); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; color: var(--text-soft); }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }

.contact-list { display: grid; gap: 14px; margin: 0; padding: 0; }
.contact-list div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; }
.contact-list dt {
  font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.contact-list dd { margin: 0; font-size: .95rem; }

.social-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a {
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-size: .85rem; font-weight: 700; color: var(--text-soft);
  transition: border-color .18s, color .18s, transform .18s;
}
.social-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.social-links a.is-disabled { opacity: .4; pointer-events: none; }

/* Profile block */
.profile-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 52px; align-items: start; }
.profile-photo { border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; object-position: top center; width: 100%; }

/* Research detail */
.research-detail {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 46px;
  padding: 52px 0; border-bottom: 1px solid var(--line);
}
.research-detail:last-of-type { border-bottom: 0; }
.research-detail h2 { margin: 14px 0 0; font-size: 1.8rem; }
.research-detail .question {
  margin: 18px 0 0; padding-left: 18px; border-left: 3px solid var(--accent);
  font-size: 1rem; font-weight: 650; color: var(--text);
}

/* Figure plate — light-background diagrams stay readable in dark mode */
.figure-plate { margin: 0; }
.figure-plate img {
  /* 원본이 960px 이므로 그 이상 늘리지 않습니다 — 확대에 따른 화질 저하 방지.
     box-sizing 이 border-box 이므로 좌우 padding(14px×2)과 border(1px×2)를
     더해야 이미지 픽셀이 정확히 960px 로 표시됩니다. */
  width: 100%; max-width: calc(960px + 28px + 2px); height: auto;
  margin-inline: auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; padding: 14px;
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .figure-plate img { border-color: var(--line-strong); box-shadow: none; }
.figure-plate figcaption {
  margin-top: 14px; font-size: .9rem; color: var(--muted); text-align: center;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
thead th { background: var(--surface-2); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }

/* Programme table (students.html) — full-width, four columns */
.track-table { min-width: 780px; }
.track-table th, .track-table td { vertical-align: top; }
.track-table th:nth-child(1), .track-table td:nth-child(1) { width: 14%; }
.track-table th:nth-child(2), .track-table td:nth-child(2) { width: 37%; }
.track-table th:nth-child(3), .track-table td:nth-child(3) { width: 14%; white-space: nowrap; }
.track-table th:nth-child(4), .track-table td:nth-child(4) { width: 35%; }
/* 컬럼명(트랙 · 주요 연구 활동 · 예상 참여 기간 · 기대 연구 성과)은
   본문 셀과 같은 서체·크기·굵기로 — 전역 thead th 의 mono/대문자/자간 규칙을 되돌린다. */
.track-table thead th {
  font-family: inherit; font-size: .9rem; font-weight: 400;
  letter-spacing: inherit; text-transform: none; color: var(--text);
}
.track-table tbody td:first-child { font-weight: 700; color: var(--text); }
.track-table tbody tr:hover { background: var(--surface-2); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; background: none; border: 0; text-align: left; font-size: 1rem; font-weight: 700;
}
.faq-question::after { content: "+"; font-size: 1.3rem; color: var(--accent); flex: none; }
.faq-item.open .faq-question::after { content: "–"; }
.faq-answer { display: none; padding: 0 0 22px; color: var(--text-soft); font-size: .94rem; max-width: var(--measure); }
.faq-item.open .faq-answer { display: block; }

/* CTA band */
.cta-band {
  padding: 54px 46px; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy) 50%, var(--brand-deep));
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { margin: 16px 0 0; max-width: none; color: rgba(255, 255, 255, .84); }
.cta-band .eyebrow { color: #9ecdff; }
.cta-band .btn.primary { background: #fff; color: var(--navy-deep); box-shadow: none; }
.cta-band .btn.primary:hover { background: #f2f2f2; }
.cta-band .btn.secondary { background: transparent; border-color: rgba(255, 255, 255, .4); color: #fff; }
.cta-band .btn.secondary:hover { border-color: #fff; color: #fff; }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 30px 0; }
.cta-card { padding: 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); }
.cta-card strong { display: block; font-size: .98rem; }
.cta-card span { display: block; margin-top: 6px; font-size: .85rem; color: rgba(255, 255, 255, .78); }

/* Recruitment calls (students.html) */
.call-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: call; }
.call-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 26px; align-items: start;
  padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
}
.call-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.call-item.closed { background: var(--surface-2); opacity: .72; }
.call-num {
  display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; color: var(--accent); background: var(--accent-soft);
  padding: 5px 10px; border-radius: 999px;
}
.call-item.closed .call-num { color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.call-body h3 { margin: 14px 0 0; font-size: 1.22rem; letter-spacing: -.03em; }
.call-body p { margin: 10px 0 0; font-size: .94rem; color: var(--text-soft); }
.call-meta { display: grid; gap: 8px; margin: 18px 0 0; }
.call-meta > div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.call-meta dt {
  font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.call-meta dd { margin: 0; font-size: .89rem; color: var(--text-soft); }
.call-side {
  display: grid; gap: 10px; justify-items: start; padding-left: 26px; border-left: 1px solid var(--line);
}
.call-status {
  font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 13%, transparent); color: var(--teal);
}
html[data-theme="dark"] .call-status { color: #6fc0b3; }
.call-item.closed .call-status { background: var(--bg-alt); color: var(--muted); }
.call-deadline { display: grid; gap: 2px; }
.call-deadline b { font-family: var(--mono); font-size: 1.02rem; letter-spacing: -.02em; color: var(--text); }
.call-deadline em { font-style: normal; font-size: .8rem; color: var(--muted); }

/* Required / optional markers and the "what to attach" list */
.req, .opt {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
  vertical-align: 2px;
}
.req { background: var(--accent-soft); color: var(--accent); }
.opt { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.doc-list li { margin: 0; padding-left: 15px; position: relative; }
.doc-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.doc-list strong { font-size: .95rem; color: var(--text); }
.doc-desc { display: block; margin-top: 4px; font-size: .87rem; color: var(--text-soft); }

/* Steps */
.steps { display: grid; gap: 12px; counter-reset: step; }
.step {
  position: relative; padding: 16px 18px 16px 56px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 18px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
}
.step strong { display: block; font-size: .96rem; }
.step span { display: block; margin-top: 3px; font-size: .86rem; color: var(--muted); }

/* -------------------------------------------------------------- footer --- */
.site-footer { padding: 56px 0 34px; background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-logo { width: 210px; height: auto; margin-bottom: 16px; }
html[data-theme="dark"] .footer-logo.light,
html:not([data-theme="dark"]) .footer-logo.dark { display: none; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.footer-grid p { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { font-size: .9rem; font-weight: 650; color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}

/* Error page */
.error-wrap { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 70px 0; }
.error-code { font-family: var(--mono); font-size: 4.5rem; font-weight: 800; color: var(--accent); letter-spacing: -.04em; }

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1020px) {
  .keyword-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; gap: 34px; }
  .profile-photo { max-width: 300px; }
  .split, .split.reverse, .research-detail { grid-template-columns: 1fr; gap: 30px; }
  .call-item { grid-template-columns: 1fr; gap: 20px; }
  .call-side {
    padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line);
    grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 8px 18px;
  }
}

@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: 74px 0 auto; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); transform: translateY(-14px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s; max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { padding: 13px 14px; font-size: .98rem; }
  .section { padding: 62px 0; }
  .hero { padding: 56px 0 48px; }
  .cta-band { padding: 36px 26px; }
  .news-item { grid-template-columns: 1fr auto; row-gap: 6px; }
  .news-date { grid-column: 1 / -1; }
  .pub-item { grid-template-columns: 1fr; gap: 14px; }
  .pub-link { justify-self: start; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  /* 좁은 화면에서는 과제 메타 정보를 과제명 아래 줄로 내린다. */
  .ref-meta { display: block; margin-left: 0; margin-top: 1px; }
  .award-list li { grid-template-columns: 1fr; gap: 2px; }
  .award-year { grid-row: auto; }
  .call-item { padding: 22px 20px; }
  .call-side { grid-template-columns: 1fr; }
  .call-meta > div { grid-template-columns: 1fr; gap: 2px; }
  .keyword-grid { grid-template-columns: 1fr; }
  .brand-text { display: none; }
}

/* ------------------------------------------------------------ printing --- */
@media print {
  .site-header, .site-footer, .hero-actions, .social-links, .skip-link, .cta-band, .anchor-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-hero { padding: 12pt 0; }
  .card, .panel, .timeline-item, .call-item { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
