/* =========================================================================
   이종수 교수 연구실 — 멀티페이지 / 흰 배경 + 서울대 블루
   Fonts: Pretendard (본문/UI), Lora (영문 디스플레이)
   ========================================================================= */
:root {
  --snu: #003087;           /* 서울대 블루 (PANTONE 287C) */
  --snu-2: #0a47b0;         /* 밝은 블루 (링크/호버) */
  --snu-ink: #00205b;       /* 더 진한 네이비 */
  --ink: #1b2330;
  --ink-2: #4a5462;
  --muted: #828c99;
  --line: #e6e9ef;
  --line-2: #eef1f6;
  --bg: #ffffff;
  --bg-alt: #f6f7fa;
  --bg-soft: #eef2f8;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, .05), 0 2px 10px rgba(20, 30, 50, .05);
  --shadow-md: 0 10px 34px rgba(0, 48, 135, .10);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --hdr: 70px;
  --ease: cubic-bezier(.16, .8, .3, 1);
  --font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --serif: "Lora", "Pretendard", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.72; letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.muted-text { color: var(--muted); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--hdr); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
  background: var(--snu); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .02em;
}
.brand-text { font-size: 1.04rem; }
.brand-text strong { font-weight: 800; }
.brand-sub { font-size: .66rem; font-weight: 700; letter-spacing: .14em; color: var(--snu); margin-left: 5px; vertical-align: middle; }

.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  position: relative; padding: 9px 15px; border-radius: 8px; font-size: .94rem; font-weight: 600;
  color: var(--ink-2); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--snu); background: var(--bg-alt); }
.nav-links a.active { color: var(--snu); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px; height: 2px;
  background: var(--snu); border-radius: 2px;
}

.lang-toggle {
  flex: none; margin-left: 6px; min-width: 50px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .03em;
  background: var(--snu); color: #fff; border: 1px solid var(--snu); transition: .2s;
}
.lang-toggle:hover { background: var(--snu-2); border-color: var(--snu-2); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Pages (router) ===== */
.page { display: none; }
.page.active { display: block; animation: fadeUp .45s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-body { padding: 64px 28px 96px; }
.page-head { max-width: 760px; margin-bottom: 44px; }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

/* kicker (블루 라벨) */
.kicker { display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--snu); margin-bottom: 12px; }
.block-desc { margin-top: 14px; color: var(--ink-2); font-size: 1.04rem; }

/* ===== Home: hero ===== */
.home-hero { position: relative; border-bottom: 1px solid var(--line); background:
    radial-gradient(900px 360px at 88% -10%, rgba(0, 48, 135, .06), transparent 70%); overflow: hidden; }
.home-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--snu); }
.home-hero-inner { display: grid; grid-template-columns: 1.4fr .85fr; gap: 56px; align-items: center; padding: 84px 28px 76px; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .04em; color: var(--snu); }
.hero-name {
  font-family: var(--serif); font-weight: 700; font-size: clamp(2.8rem, 6.4vw, 4.6rem); line-height: 1.04;
  letter-spacing: -.01em; margin: 14px 0 6px; color: var(--ink); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 18px;
}
.hero-name-en { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: clamp(1rem, 2.2vw, 1.6rem); color: var(--snu); }
.hero-title { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.hero-tagline { margin-top: 22px; font-size: 1.12rem; line-height: 1.75; color: var(--ink); max-width: 34ch; border-left: 3px solid var(--snu); padding-left: 18px; }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: .94rem; cursor: pointer; border: 1.5px solid transparent; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--snu); color: #fff; }
.btn-primary:hover { background: var(--snu-2); transform: translateY(-2px); }
.btn-ghost { color: var(--snu); border-color: var(--snu); }
.btn-ghost:hover { background: var(--snu); color: #fff; transform: translateY(-2px); }

.home-hero-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-md); }
.portrait { position: relative; aspect-ratio: 4 / 4.4; border-radius: 12px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, #eaf0fb, #dbe6f7); border: 1px solid var(--line); margin-bottom: 18px; }
.portrait-ph { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--snu); letter-spacing: .25em; padding-left: .25em; }
.portrait-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease); }
.portrait.has-photo .portrait-img { opacity: 1; }
.portrait.has-photo .portrait-ph { display: none; }
.hero-meta li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.hero-meta li:last-child { border-bottom: 0; }
.hero-meta .k { color: var(--muted); font-weight: 600; }
.hero-meta .v { color: var(--ink); font-weight: 600; word-break: break-all; }
.hero-meta a:hover { color: var(--snu); }

/* ===== Home: stats ===== */
.home-stats { background: var(--snu); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.home-stats .stat { text-align: center; padding: 30px 16px; border-left: 1px solid rgba(255, 255, 255, .14); }
.home-stats .stat:first-child { border-left: 0; }
.home-stats .num { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: #fff; line-height: 1; }
.home-stats .lbl { display: block; margin-top: 8px; font-size: .84rem; color: rgba(255, 255, 255, .8); font-weight: 500; }

/* ===== Intro block ===== */
.intro-block { max-width: 860px; margin-bottom: 64px; }
.lead { font-size: 1.16rem; line-height: 1.9; color: var(--ink); }
.creed { margin-top: 24px; font-family: var(--serif); font-style: italic; font-size: 1.24rem; line-height: 1.7; color: var(--snu); padding: 4px 0 4px 22px; border-left: 4px solid var(--snu); }

.block-head { max-width: 760px; margin-bottom: 30px; }
.block-head h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.sub-head { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin-bottom: 22px; }

/* ===== Cards (research areas) ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; transition: transform .28s var(--ease), box-shadow .28s, border-color .28s; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--snu); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card-num { font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--snu); }
.card h3 { font-size: 1.18rem; font-weight: 700; margin: 8px 0 8px; color: var(--ink); }
.card p { color: var(--ink-2); font-size: .95rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.about-side h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 26px 0 12px; }
.about-side h3:first-child { margin-top: 0; }
.plain li { padding: 6px 0; }
.plain strong { font-weight: 700; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--snu); }
.tag-list.muted .tag { background: var(--bg-alt); border-color: transparent; color: var(--ink-2); }

.career-list { display: grid; grid-template-columns: 1fr; }
.career { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.career-period { font-size: .85rem; font-weight: 700; color: var(--snu); }
.career-role { color: var(--ink); font-size: .96rem; }
.career.award { background: rgba(0, 48, 135, .05); border-radius: var(--radius-sm); padding: 13px 14px; border-bottom: 0; }
.career.award .career-role { font-weight: 700; }
.badge { display: inline-block; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--snu); color: #fff; vertical-align: middle; margin-left: 6px; }

/* ===== People ===== */
.people-group { margin-bottom: 44px; }
.people-group:last-child { margin-bottom: 0; }
.people-group-title { font-size: 1.3rem; font-weight: 800; color: var(--ink); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.people-group-title::before { content: ""; width: 4px; height: 22px; border-radius: 4px; background: var(--snu); }
.people-count { font-size: .8rem; font-weight: 700; color: var(--snu); background: var(--bg-soft); border-radius: 999px; padding: 2px 11px; }
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.people-grid.alumni { grid-template-columns: repeat(4, 1fr); }
.person { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 18px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.person-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--snu); }
.people-grid.alumni .person-av { background: #8ea6cf; }
.person-body { min-width: 0; }
.person-name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.person-topic { font-size: .84rem; color: var(--ink-2); margin-top: 2px; line-height: 1.45; }

/* ===== Toolbar / search / chips ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search { flex: 1 1 280px; min-width: 240px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; font-family: inherit; background: #fff; transition: border-color .2s, box-shadow .2s; }
.search:focus { outline: none; border-color: var(--snu); box-shadow: 0 0 0 4px rgba(0, 48, 135, .1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: .86rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--snu); color: var(--snu); }
.chip.on { background: var(--snu); border-color: var(--snu); color: #fff; }
.result-count { font-size: .86rem; color: var(--muted); margin-bottom: 16px; }

/* ===== Publications ===== */
.pub-list { display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: 66px 1fr; gap: 20px; padding: 20px 6px; border-bottom: 1px solid var(--line); transition: background .2s; }
.pub:hover { background: var(--bg-alt); }
.pub-year { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--snu); }
.pub-title { font-size: 1.03rem; font-weight: 600; color: var(--ink); line-height: 1.5; }
.pub-authors { font-size: .9rem; color: var(--ink-2); margin-top: 5px; }
.pub-authors .me { color: var(--snu); font-weight: 700; }
.pub-venue { font-size: .88rem; color: var(--muted); font-style: italic; margin-top: 3px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ===== Projects ===== */
.proj-list { display: flex; flex-direction: column; }
.proj { display: flex; align-items: flex-start; gap: 18px; padding: 16px 6px; border-bottom: 1px solid var(--line); transition: background .2s; }
.proj:hover { background: var(--bg-alt); }
.proj-main { flex: 1; min-width: 0; }
.proj-title { font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.45; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; font-size: .86rem; }
.proj-spon { color: var(--snu); font-weight: 600; }
.proj-period { color: var(--muted); }
.role { flex: none; font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.r-lead { background: #e7eefb; color: var(--snu); }
.r-co { background: #eef2f8; color: var(--ink-2); }
.r-part { background: #eaf5ec; color: #2f7a44; }
.r-prog { background: #f0eefb; color: #5a4aa3; }
.r-progl { background: #fbeef0; color: #a23a68; }

/* ===== Pagination ===== */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; }
.page-btn { min-width: 38px; height: 38px; padding: 0 13px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 9px; font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: .2s; }
.page-btn:hover:not(:disabled) { border-color: var(--snu); color: var(--snu); }
.page-btn.on { background: var(--snu); border-color: var(--snu); color: #fff; }
.page-btn.edge { font-weight: 500; }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-dots { color: var(--muted); padding: 0 2px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.contact-card h3 { font-size: 1.3rem; font-weight: 800; color: var(--snu); }
.contact-meta { margin-top: 18px; }
.contact-meta li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-meta li:last-child { border-bottom: 0; }
.contact-meta .k { flex: none; width: 64px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.contact-meta .v { color: var(--ink); font-weight: 600; }
.contact-meta a:hover { color: var(--snu); text-decoration: underline; }

/* ===== Footer ===== */
.site-footer { background: var(--snu-ink); color: rgba(255, 255, 255, .8); padding: 50px 0 38px; margin-top: 40px; }
.footer-lab { font-size: 1.04rem; color: #fff; }
.footer-lab strong { font-weight: 800; }
.footer-copy { margin-top: 12px; font-size: .9rem; line-height: 1.7; color: rgba(255, 255, 255, .62); }
.footer-fine { margin-top: 20px; font-size: .82rem; color: rgba(255, 255, 255, .45); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; }

/* ===== To-top ===== */
.to-top { position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--snu); color: #fff; display: grid; place-items: center; font-size: 1.25rem; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .3s var(--ease); z-index: 90; }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--snu-2); }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .home-hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 56px 28px; }
  .home-hero-card { max-width: 420px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .people-grid, .people-grid.alumni { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--hdr); left: 0; right: 0; flex-direction: column; gap: 2px;
    background: #fff; padding: 12px; box-shadow: var(--shadow-md); border-top: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .26s var(--ease);
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--bg-alt); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .home-stats .stat:nth-child(3) { border-left: 0; }
  .cards { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 4px; }
  .career { grid-template-columns: 1fr; gap: 2px; }
  .proj { flex-direction: column; gap: 8px; }
  .page-body { padding: 44px 24px 72px; }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .people-grid, .people-grid.alumni { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .page.active { animation: none; }
}
