/* UDTLab — 흰 바탕 · 먹색 글자 · 남색 포인트 3색 (마스코트 주황은 로고·홈에만) */
:root {
  --bg: #ffffff;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #6b7280;
  --line: #e5e7eb;
  --soft: #f5f6f8;
  /* 테마 색 — 아래 [data-theme] 블록이 이 값들만 바꿉니다 */
  --accent: #1e3a8a;
  --accent-hover: #172f70;
  --accent-soft: #eef2fb;
  --accent-line: #c9d3ea;
  --hero-base: #05132e;
  --ov-1: 5, 19, 46;
  --ov-2: 11, 42, 91;
  --ov-3: 16, 43, 130;
  --on-dark-1: #e6ebf7;
  --on-dark-2: #d3dbef;
  --on-dark-3: #aab8da;
  --mid: 30, 58, 138;
  --band-bg: var(--accent);
  /* 첫 화면 레이어 진하기: 왼쪽(글씨 쪽) → 오른쪽(사진 쪽) */
  --a-left: 0.96;
  --a-right: 0.2;

  --radius: 8px;
  --wrap: 1120px;
  --gutter: 32px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* 글자 크기 체계 */
  --fs-display: clamp(2.5rem, 4.6vw, 3.5rem);
  --fs-h1: clamp(2rem, 3.4vw, 2.5rem);
  --fs-h2: 1.375rem;
  --fs-h3: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.8125rem;
}

/* 비교용 테마 (남색이 기본). 모던 계열은 왼쪽을 무채색 먹색으로 두고 오른쪽에만 색을 띄움 */
[data-theme="ember"] {
  --accent: #d92d20;
  --accent-hover: #b42318;
  --accent-soft: #fef3f2;
  --accent-line: #fecdca;
  --hero-base: #0c0a0a;
  --ov-1: 12, 10, 11;
  --ov-2: 30, 20, 20;
  --ov-3: 180, 35, 24;
  --on-dark-1: #f4f4f5;
  --on-dark-2: #d4d4d8;
  --on-dark-3: #a1a1aa;
  --band-bg: #18181b;
}
[data-theme="crimson"] {
  --accent: #be123c;
  --accent-hover: #9f1239;
  --accent-soft: #fff1f2;
  --accent-line: #fecdd3;
  --hero-base: #12060a;
  --ov-1: 18, 6, 10;
  --ov-2: 60, 10, 30;
  --ov-3: 159, 18, 57;
  --on-dark-1: #fdf2f4;
  --on-dark-2: #f1d5dc;
  --on-dark-3: #c9a0ab;
  --band-bg: #4c0519;
}
[data-theme="emerald"] {
  --accent: #047857;
  --accent-hover: #065f46;
  --accent-soft: #ecfdf5;
  --accent-line: #a7f3d0;
  --hero-base: #08100e;
  --ov-1: 9, 12, 11;
  --ov-2: 18, 28, 25;
  --ov-3: 4, 120, 87;
  --on-dark-1: #f4f4f5;
  --on-dark-2: #d4d4d8;
  --on-dark-3: #a1a1aa;
  --band-bg: #18181b;
}
[data-theme="teal"] {
  --accent: #0f766e;
  --accent-hover: #115e59;
  --accent-soft: #f0fdfa;
  --accent-line: #99f6e4;
  --hero-base: #042f2e;
  --ov-1: 4, 26, 26;
  --ov-2: 8, 51, 50;
  --ov-3: 15, 118, 110;
  --on-dark-1: #e6f7f5;
  --on-dark-2: #c5e9e4;
  --on-dark-3: #94cfc7;
  --band-bg: #134e4a;
}

/* 흙빛 계열 3종: 버튼은 진한 색, 배경 레이어는 [data-hero]로 진하기 선택 */
[data-theme="olive"] {
  --accent: #414a26;
  --accent-hover: #323a1d;
  --accent-soft: #f1f3ea;
  --accent-line: #cfd4bd;
  --hero-base: #14170c;
  --ov-1: 20, 23, 12;
  --ov-2: 40, 46, 22;
  --ov-3: 65, 74, 38;
  --mid: 92, 101, 58;
  --on-dark-1: #f5f3ee;
  --on-dark-2: #e3ded3;
  --on-dark-3: #c2baab;
}
[data-theme="oxblood"] {
  --accent: #5e1412;
  --accent-hover: #4a0f0e;
  --accent-soft: #f8eeed;
  --accent-line: #e2c4c2;
  --hero-base: #180807;
  --ov-1: 24, 8, 7;
  --ov-2: 52, 14, 12;
  --ov-3: 94, 20, 18;
  --mid: 128, 44, 38;
  --on-dark-1: #f5f3ee;
  --on-dark-2: #e3ded3;
  --on-dark-3: #c2baab;
}
[data-theme="mocha"] {
  --accent: #483528;
  --accent-hover: #38291f;
  --accent-soft: #f4f0ec;
  --accent-line: #d6cbc2;
  --hero-base: #16110d;
  --ov-1: 22, 17, 13;
  --ov-2: 46, 35, 27;
  --ov-3: 72, 53, 40;
  --mid: 110, 88, 72;
  --on-dark-1: #f5f3ee;
  --on-dark-2: #e3ded3;
  --on-dark-3: #c2baab;
}

[data-theme="graphite"] {
  --accent: #2b2f36;
  --accent-hover: #1c1f24;
  --accent-soft: #f1f2f4;
  --accent-line: #d3d6db;
  --hero-base: #0a0b0d;
  --ov-1: 10, 11, 13;
  --ov-2: 22, 24, 28;
  --ov-3: 43, 47, 54;
  --mid: 70, 75, 84;
  --on-dark-1: #f4f4f5;
  --on-dark-2: #d4d4d8;
  --on-dark-3: #a1a1aa;
}

* { box-sizing: border-box; }
/* 스크롤바 자리를 항상 비워 둬서 짧은 페이지와 긴 페이지의 가로 위치가 같게 */
html { -webkit-text-size-adjust: 100%; scrollbar-color: #c7ccd6 transparent; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ko { color: var(--ink-3); }
.num, time { font-variant-numeric: tabular-nums; }
.h-sub { display: block; margin-top: 0.35em; font-size: 0.42em; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.skip { position: absolute; left: 16px; top: -48px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 100; }
.skip:focus { top: 12px; }
.arrow { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }

/* 상단 메뉴 */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.02em; }
.brand-sub { color: var(--ink-3); font-size: var(--fs-tiny); font-weight: 500; }
.nav { display: flex; height: 100%; }
.nav a { display: flex; align-items: center; height: 100%; padding: 0 14px; color: #374151; font-size: 0.96875rem; font-weight: 600; position: relative; transition: color 0.2s; }
.nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform 0.35s var(--ease); }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 800; }
.nav a[aria-current="page"]::after, .nav a:hover::after { transform: scaleX(1); }
.nav a:hover:not([aria-current])::after { background: var(--line); }

/* 공통 블록 */
.section { padding-top: 72px; }
main > .section:last-child { padding-bottom: 96px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding-bottom: 14px; border-bottom: 1.5px solid var(--ink); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head h2 span { color: var(--ink-3); font-weight: 500; font-size: var(--fs-small); letter-spacing: 0; margin-left: 8px; }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; }
.more:hover { text-decoration: none; }
.more:hover .arrow { transform: translateX(3px); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 0.9375rem; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent-line); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-invert { background: #fff; color: var(--accent); border-color: #fff; }
.btn-invert:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn-invert:focus-visible { outline-color: #fff; }
.tag { display: inline-block; flex-shrink: 0; font-size: 0.75rem; font-weight: 600; line-height: 1.5; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 4px; }
.empty { color: var(--ink-3); padding: 24px 0; }

/* 홈 첫 화면 */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--hero-base); color: #fff; }
.hero-slides { position: absolute; inset: 0; z-index: -2; }
/* 배경 이미지 전환: 1.6초 동안 겹치며 바뀌고, 보이는 동안 아주 천천히 당겨짐 */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; opacity: 0; transform: scale(1.05); transition: opacity 1.6s var(--ease), transform 7s linear; }
.hero-bg.is-active { opacity: 1; transform: scale(1); }
/* 남색 반투명 레이어: 글씨가 올라가는 왼쪽은 진하게(96%), 사진이 보이는 오른쪽은 중간(20%)까지 옅게 */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--ov-1), var(--a-left)) 0%, rgba(var(--ov-2), calc(var(--a-left) - (var(--a-left) - var(--a-right)) * 0.1)) 36%, rgba(var(--ov-3), calc(var(--a-right) + (var(--a-left) - var(--a-right)) * 0.4)) 66%, rgba(var(--ov-3), var(--a-right)) 100%); }
.hero-inner { min-height: clamp(520px, 68vh, 680px); display: flex; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { max-width: 13em; font-size: var(--fs-display); letter-spacing: -0.03em; line-height: 1.15; }
.hero h1 .h-sub { font-size: 0.4em; margin-top: 0.5em; letter-spacing: -0.01em; color: var(--on-dark-2); }
.lead { font-size: 1.25rem; font-weight: 500; line-height: 1.55; margin-top: 28px; max-width: 34em; }
.hero .lead { color: var(--on-dark-1); }
.affiliation { margin-top: 40px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.22); font-size: var(--fs-small); color: var(--on-dark-2); max-width: 34em; }
.affiliation span { display: block; color: var(--on-dark-3); font-size: var(--fs-tiny); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-line:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.hero :focus-visible { outline-color: #fff; }
.hero ::selection { background: #fff; color: var(--accent); }

/* 연구 분야 목록(홈) */
.area-row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr 16px; align-items: center; gap: 24px; padding: 22px 4px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background-color 0.2s; }
.area-row:hover { text-decoration: none; background: var(--soft); }
.area-row:hover .area-title { color: var(--accent); }
.area-row:hover .arrow { transform: translateX(4px); color: var(--accent); }
.area-title { font-weight: 700; font-size: var(--fs-h3); letter-spacing: -0.01em; transition: color 0.2s; }
.area-title small { display: block; font-weight: 500; font-size: var(--fs-tiny); color: var(--ink-3); letter-spacing: 0; }
.area-summary { color: var(--ink-2); }
.area-row .arrow { color: var(--ink-3); }

.about { padding-top: 20px; font-size: 1.125rem; line-height: 1.75; max-width: 64ch; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

/* 논문 */
.pub-list { list-style: none; padding: 0; }
.pub-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub-title { font-weight: 600; line-height: 1.5; margin-top: 6px; }
.pub-list-compact .pub-title { margin-top: 0; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { color: var(--ink-2); font-size: var(--fs-small); margin-top: 4px; }
.pub-venue { color: var(--ink-3); font-size: var(--fs-small); margin-top: 2px; }
.pub-summary { color: var(--ink-2); font-size: var(--fs-small); margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: inherit; font-size: var(--fs-small); font-weight: 500; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; min-height: 38px; padding: 0 16px; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.filters button:hover { border-color: var(--ink-3); color: var(--ink); }
.filters button[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }

/* 소식 */
.news-list { list-style: none; padding: 0; }
.news-list li { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-list time { flex-shrink: 0; width: 92px; color: var(--ink-3); font-size: var(--fs-small); }
.news-list a { color: var(--ink); font-weight: 500; }
.news-list a:hover { color: var(--accent); }
.news-list-full { border-top: 1.5px solid var(--ink); }
.post { padding-top: 48px; padding-bottom: 96px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 500; }
.back:hover { text-decoration: none; }
.back:hover .arrow-back { transform: translateX(-3px); }
.post-head { margin: 32px 0 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--fs-small); }
.post h1 { font-size: var(--fs-h1); margin-top: 12px; }
.prose { font-size: 1.0625rem; line-height: 1.85; max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose a { text-decoration: underline; }

/* 학생 모집 띠(홈) */
.band { margin-top: 96px; background: var(--band-bg); color: #fff; }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.band h2 { font-size: 1.5rem; margin-bottom: 8px; }
.band p { color: var(--on-dark-2); max-width: 44em; }
.band .band-ko { color: var(--on-dark-3); font-size: var(--fs-small); margin-top: 6px; }

/* 하위 페이지 머리 */
.page-head { padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
.page-head .h-sub { font-size: 0.45em; }
.page-head .lead { font-size: 1.0625rem; font-weight: 400; color: var(--ink-2); margin-top: 16px; }

/* 연구 페이지 */
.research-item { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.research-item:first-child { padding-top: 8px; }
.research-item h2 { font-size: 1.5rem; }
.research-item h2 .h-sub { font-size: 0.58em; }
.research-body p { color: var(--ink-2); max-width: 68ch; }
.research-img { margin-top: 24px; border-radius: var(--radius); border: 1px solid var(--line); max-height: 420px; width: auto; }
.keywords { list-style: none; padding: 0; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.keywords li { font-size: var(--fs-tiny); font-weight: 500; color: var(--ink-2); background: var(--soft); padding: 4px 10px; border-radius: 4px; }
.research-item:target h2 { color: var(--accent); }

/* 표 — 전부 가운데 정렬 */
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; }
.table th, .table td { text-align: center; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.table th { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.status { font-size: var(--fs-tiny); font-weight: 600; color: var(--ink-3); }
.status-on { color: var(--accent); }

/* 구성원 */
.avatar { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--soft); }
.avatar-empty { display: flex; align-items: center; justify-content: center; }
.avatar-empty svg { width: 42%; height: 42%; fill: none; stroke: #b9bfca; stroke-width: 1.4; stroke-linecap: round; }
.pi { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding-top: 24px; }
.pi-body h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.pi-body h3 .h-sub { font-size: 0.55em; }
.pi-body .role { color: var(--ink-3); font-size: var(--fs-small); margin-top: 6px; }
.pi-body .bio { margin-top: 18px; max-width: 68ch; }
.pi-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.pi-cols h4 { font-size: var(--fs-small); color: var(--ink-3); font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }
.pi-cols ul { padding-left: 18px; color: var(--ink-2); font-size: 0.9375rem; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; font-size: 0.9375rem; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.member { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.member .avatar { border-radius: 50%; }
.member h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
.member .ko { font-size: var(--fs-tiny); }
.member .interests { font-size: var(--fs-small); color: var(--ink-2); margin-top: 8px; }
.member .email { display: inline-block; font-size: var(--fs-tiny); margin-top: 6px; }

/* 연락처 */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.contact-list { display: grid; grid-template-columns: 96px minmax(0, 1fr); margin: 0; border-top: 1.5px solid var(--ink); }
.contact-list dt, .contact-list dd { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--ink-3); font-size: var(--fs-small); font-weight: 500; padding-top: 18px; }
.contact-list dd { margin: 0; }
.recruit { background: var(--soft); border-radius: 12px; padding: 32px; }
.recruit h2 { font-size: 1.25rem; margin-bottom: 10px; }
.recruit p { color: var(--ink-2); }
.recruit .ko { color: var(--ink-3); font-size: var(--fs-small); margin-top: 10px; }
.recruit .btn { margin-top: 24px; }
.map-links { display: flex; gap: 20px; }
.map { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--soft); }
.map iframe { display: block; width: 100%; height: 440px; border: 0; }

/* 하단 */
.site-footer { margin-top: 0; border-top: 1px solid var(--line); background: var(--soft); font-size: var(--fs-small); color: var(--ink-3); }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer-name { color: var(--ink); font-weight: 800; font-size: 1rem; margin-bottom: 6px; }
.footer-name span { font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 28px; align-content: start; }
.footer-nav a { color: var(--ink-2); white-space: nowrap; }
.footer-meta { position: relative; display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 28px; font-size: var(--fs-tiny); }
/* 구분선을 본문 폭(좌우 여백 안쪽)에 맞춤 */
.footer-meta::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--line); }

/* 태블릿 */
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .header-inner { height: auto; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 14px; }
  .nav { height: 48px; margin-left: -14px; }
  .research-item { grid-template-columns: 1fr; gap: 14px; }
  .split { grid-template-columns: 1fr; gap: 0; }
}

/* 모바일 */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-header { position: static; }
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); height: auto; width: calc(100% + 28px); margin: 6px -14px 0; }
  .nav a { height: 42px; padding: 0 14px; font-size: 0.875rem; }
  .nav a::after { bottom: 6px; }
  .section { padding-top: 56px; }
  .hero-inner { min-height: 0; padding-top: 56px; padding-bottom: 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(var(--ov-1), calc(var(--a-left) - 0.02)) 0%, rgba(var(--ov-2), calc(var(--a-left) - 0.08)) 60%, rgba(var(--ov-3), calc(var(--a-right) + (var(--a-left) - var(--a-right)) * 0.65)) 100%); }
  .hero-bg { object-position: 70% center; }
  .lead { font-size: 1.125rem; margin-top: 20px; }
  .actions { margin-top: 28px; }
  .actions .btn { flex: 1 1 auto; white-space: nowrap; }
  .affiliation { margin-top: 32px; }
  .area-row { grid-template-columns: 1fr 16px; gap: 4px 12px; padding: 18px 0; }
  .area-row .area-summary { grid-column: 1; grid-row: 2; font-size: var(--fs-small); }
  .area-row .arrow { grid-column: 2; grid-row: 1 / span 2; }
  .about { font-size: 1rem; }
  .band { margin-top: 72px; }
  .band-inner { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
  .band .btn { width: 100%; }
  .page-head { padding: 40px 0 32px; }
  .pi { grid-template-columns: 1fr; gap: 20px; }
  .pi .avatar { width: 132px; }
  .pi-cols { grid-template-columns: 1fr; gap: 20px; }
  .member-grid { grid-template-columns: 1fr; }
  .member { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 20px 0; }
  .news-list li { flex-wrap: wrap; gap: 2px 10px; padding: 14px 0; }
  .news-list time { width: auto; }
  .news-list a { flex-basis: 100%; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-list { grid-template-columns: 76px minmax(0, 1fr); }
  .recruit { padding: 24px; }
  .map iframe { height: 320px; }
  .map-links { gap: 14px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
  .footer-meta { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .hero-bg, .hero-bg.is-active { transform: none; transition: opacity 1.6s ease !important; }
}


/* 밝게: 따뜻한 흰색을 덮고 글자는 먹색, 버튼은 테마색 */
[data-hero="light"] .hero { background: #f5f3ee; color: var(--ink); }
[data-hero="light"] .hero::before { background: linear-gradient(90deg, rgba(250, 248, 244, var(--a-left)) 0%, rgba(250, 248, 244, calc(var(--a-left) - (var(--a-left) - var(--a-right)) * 0.1)) 36%, rgba(250, 248, 244, calc(var(--a-right) + (var(--a-left) - var(--a-right)) * 0.4)) 66%, rgba(250, 248, 244, var(--a-right)) 100%); }
[data-hero="light"] .hero h1 .h-sub { color: var(--accent); }
[data-hero="light"] .hero .lead { color: var(--ink-2); }
[data-hero="light"] .affiliation { color: var(--ink-2); border-top-color: var(--line); }
[data-hero="light"] .affiliation span { color: var(--ink-3); }
[data-hero="light"] .hero .btn-invert { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-hero="light"] .hero .btn-invert:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
[data-hero="light"] .hero .btn-line { color: var(--accent); border-color: var(--accent-line); }
[data-hero="light"] .hero .btn-line:hover { background: var(--accent-soft); border-color: var(--accent); }
[data-hero="light"] .hero :focus-visible { outline-color: var(--accent); }
@media (max-width: 640px) {
  [data-hero="light"] .hero::before { background: linear-gradient(180deg, rgba(250, 248, 244, calc(var(--a-left) - 0.04)) 0%, rgba(250, 248, 244, calc(var(--a-right) + (var(--a-left) - var(--a-right)) * 0.7)) 100%); }
}
/* 비교용: 배경 사진 색 빼기 */
[data-bg="mono"] .hero-bg { filter: grayscale(1) contrast(1.05); }

/* 디자인 조정 패널 (?tune 으로 열림, 디자인 확정 후 삭제) */
.tune { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 300px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(17, 24, 39, 0.18); font-size: 13px; line-height: 1.4; }
.tune-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); font-weight: 700; }
.tune-head button { font: inherit; font-weight: 500; font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 8px; cursor: pointer; color: var(--ink-2); }
.tune-body { padding: 4px 14px 14px; }
.tune.closed .tune-body { display: none; }
.tune-label { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tune-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tune-imgs button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; overflow: hidden; }
.tune-imgs img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tune-imgs span { display: block; font-size: 10px; color: var(--ink-2); padding: 2px 0; }
.tune-imgs button[aria-pressed="true"] { border-color: var(--ink); }
.tune-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tune-row button { font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.tune-row button i { width: 12px; height: 12px; border-radius: 50%; }
.tune-row button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.tune-range { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.tune-range input { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); }
.tune-range output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.tune-now { margin-top: 12px; padding: 8px 10px; background: var(--soft); border-radius: 6px; font-size: 12px; color: var(--ink-2); }

.lead-404 { color: var(--ink-2); font-size: 1.0625rem; }

/* SANBUL 시뮬레이터 탭 — 메뉴와 떨어진 독립 버튼, 화면 크기와 상관없이 상단 막대 오른쪽 끝 */
.sanbul-tab { position: absolute; right: 24px; top: 32px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 1.0625rem; font-weight: 800; letter-spacing: 0.06em; transition: background-color 0.2s; }
.sanbul-tab svg { width: 13px; height: 13px; fill: currentColor; }
.sanbul-tab:hover { background: var(--accent-hover); text-decoration: none; }
.sanbul-tab:focus-visible { outline-offset: 3px; }
/* 버튼 자리만큼 메뉴를 왼쪽으로 비켜 준다(본문 폭 밖에 버튼이 들어갈 여유가 없는 화면) */
@media (min-width: 961px) and (max-width: 1380px) {
  .header-inner { padding-right: 190px; }
}
.sim-frame { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); overflow: hidden; }
.sim-frame iframe { display: block; width: 100%; height: clamp(560px, 78vh, 860px); border: 0; }
.sim-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.sim-note { font-size: var(--fs-small); color: var(--ink-2); }
.sim-section { padding-top: 40px; }
.sim-pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 360px; padding: 32px; text-align: center; }
.sim-title { font-weight: 700; font-size: 1.125rem; }
@media (max-width: 960px) {
  .sanbul-tab { top: 32px; right: var(--gutter); }
}
@media (max-width: 640px) {
  .site-header { position: relative; }
  .sanbul-tab { height: 34px; padding: 0 14px; font-size: 0.9375rem; }
  .sim-pending { min-height: 240px; }
  .sim-bar { flex-direction: column; gap: 6px; }
  .sim-frame iframe { height: 72vh; }
}

/* Research 처럼 하위 항목이 있는 메뉴: 마우스를 올리면 아래로 펼침(넓은 화면) */
.nav-item { position: relative; display: flex; height: 100%; }
.subnav-menu { position: absolute; top: calc(100% + 1px); left: 4px; min-width: 180px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.18s, transform 0.18s, visibility 0.18s; z-index: 20; }
.has-sub:hover .subnav-menu, .has-sub:focus-within .subnav-menu { opacity: 1; visibility: visible; transform: none; }
.nav .subnav-menu a { white-space: nowrap; height: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 12px; border-radius: 6px; font-weight: 600; color: var(--ink); }
.nav .subnav-menu a::after { display: none; }
.nav .subnav-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.subnav-menu span { font-size: var(--fs-tiny); font-weight: 500; color: var(--ink-3); }

/* 페이지 안의 하위 탭(연구 분야 / 연구 과제) */
.subtabs { border-bottom: 1px solid var(--line); background: var(--bg); }
.page-head:has(+ .subtabs) { border-bottom: 0; padding-bottom: 28px; }
.subtabs-inner { display: flex; gap: 6px; }
.subtabs a { position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding: 14px 4px; margin-right: 20px; color: var(--ink-2); font-weight: 600; }
.subtabs a span { font-size: var(--fs-tiny); font-weight: 500; color: var(--ink-3); }
.subtabs a:hover { color: var(--ink); text-decoration: none; }
.subtabs a[aria-current="page"] { color: var(--accent); font-weight: 800; }
.subtabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); }

/* 연구 과제 카드 */
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; padding-top: 20px; }
.project { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s; }
.project:hover { border-color: var(--accent); box-shadow: 0 8px 24px rgba(30, 58, 138, 0.08); text-decoration: none; }
.project:hover h3 { color: var(--accent); }
.project-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: var(--fs-small); font-weight: 700; color: var(--accent); }
.project:hover .project-more .arrow { transform: translateX(3px); }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--fs-small); color: var(--ink-3); }
.project h3 { margin-top: 14px; font-size: 1.125rem; line-height: 1.4; }
.project-points { margin-top: 12px; padding-left: 18px; color: var(--ink-2); font-size: 0.9375rem; }
.project-points li + li { margin-top: 4px; }
.project-funder { margin-top: auto; padding-top: 16px; font-size: var(--fs-small); color: var(--ink-3); }

@media (max-width: 960px) {
  .subnav-menu { display: none; }
  .nav-item { height: auto; }
}
@media (max-width: 640px) {
  .project-list { grid-template-columns: 1fr; }
  .subtabs a { margin-right: 12px; }
}

/* 접기 부품(macros/fold.njk) — 논문 연도 등 어디서나 같은 모양 */
.fold { border-bottom: 1px solid var(--line); }
.fold-head { display: flex; align-items: baseline; gap: 12px; padding: 18px 4px; cursor: pointer; list-style: none; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head:hover .fold-title { color: var(--accent); }
.fold-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.fold-sub { font-size: var(--fs-small); color: var(--ink-3); }
.fold-count { margin-left: auto; font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.fold-icon { align-self: center; width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.fold[open] > .fold-head .fold-icon { transform: rotate(180deg); }
.fold-count + .fold-icon { margin-left: 0; }
.fold-head:not(:has(.fold-count)) .fold-icon { margin-left: auto; }
.fold-body { padding: 0 4px 12px; }
.fold-controls { display: flex; gap: 6px; }
.fold-controls button { font: inherit; font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.fold-controls button:hover { color: var(--accent); border-color: var(--accent); }
.pub-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 8px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.pub-total { font-size: var(--fs-small); color: var(--ink-3); }
.pub-total .num { font-weight: 800; color: var(--ink); }
.fold .pub-list li:first-child { padding-top: 4px; }
.fold .pub-list li:last-child { border-bottom: 0; }

/* 논문 바로가기 링크 줄 */
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pub-links a { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 4px; padding: 1px 8px; }
.pub-links a:hover { background: var(--accent-soft); text-decoration: none; }

/* 연구 과제 상세 */
.project-head .back { margin-bottom: 20px; }
.project-head .project-meta { justify-content: flex-start; margin-bottom: 12px; }
.project-head h1 { max-width: 28em; }
.project-detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.project-img { border-radius: 12px; border: 1px solid var(--line); margin-bottom: 28px; }
.detail-h { font-size: var(--fs-h2); margin: 40px 0 12px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.project-facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); margin: 0; border-top: 1.5px solid var(--ink); position: sticky; top: 88px; }
.project-facts dt, .project-facts dd { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.project-facts dt { color: var(--ink-3); font-weight: 600; font-size: var(--fs-small); padding-top: 14px; }
.project-facts dd { margin: 0; }
@media (max-width: 960px) {
  .project-detail { grid-template-columns: 1fr; gap: 32px; }
  .project-facts { position: static; grid-row: 1; }
}
