/* Noto Sans KR (SIL Open Font License 1.1, assets/fonts/OFL.txt). Self-hosted subset. */
@font-face {
  font-family: "Noto Sans KR";
  src: url("fonts/NotoSansKR-subset.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #ffffff; --text: #1f2933; --muted: #5f6b7a; --faint: #8a94a3;
  --line: #e4e7eb; --accent: #2b5a83; --card: #f7f8fa; --maxw: 940px; --label: 180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c; --text: #e6e9ee; --muted: #a9b2be; --faint: #7d8794;
    --line: #2a313b; --accent: #8cb8de; --card: #1a2029;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { font-weight: 700; font-size: 14px; letter-spacing: .04em; color: var(--text); }
.brand:hover { text-decoration: none; }
nav.links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
nav.links a.page { color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
nav.links a.page:hover { color: var(--text); text-decoration: none; }
nav.links a.page[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.lang { display: flex; gap: 12px; padding-left: 22px; border-left: 1px solid var(--line); }
.lang button { background: none; border: 0; padding: 2px 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--faint); border-bottom: 2px solid transparent; }
.lang button[aria-pressed="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }

/* Hero (About) */
.hero { padding: 72px 0 40px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 8px; }
.name h1 { margin: 0; font-size: clamp(40px, 7vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.name .alt { font-size: 20px; color: var(--muted); }
.role { color: var(--muted); font-size: 15px; margin: 0; }
.contact { margin: 10px 0 0; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.contact .em { font-weight: 500; }
.contact .sep { color: var(--faint); margin: 0 10px; }
.intro { margin: 36px 0 0 var(--label); }
.intro h2 { font-size: clamp(20px, 3vw, 25px); font-weight: 500; line-height: 1.55; margin: 0 0 18px; }
.intro p { color: var(--muted); font-size: 15px; margin: 0; }

/* Page title (Research, CV) */
.pagehead { padding: 64px 0 8px; }
.pagehead h1 { margin: 0; font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.pagehead p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Sections */
section.block { display: grid; grid-template-columns: var(--label) 1fr; padding: 48px 0; border-top: 1px solid var(--line); }
section.block > h2 { font-size: 15px; font-weight: 700; margin: 2px 0 16px; padding-right: 16px; }
h3.topic { font-size: 19px; margin: 0 0 12px; }
h3.topic:not(:first-child) { margin-top: 44px; }
.content p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.content p b { color: var(--text); }

/* Publications: status in the left column */
section.pubs { padding: 48px 0; border-top: 1px solid var(--line); }
section.pubs > h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.pub { display: grid; grid-template-columns: var(--label) 1fr; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub .status { padding-right: 16px; line-height: 1.5; padding-top: 1px; }
.pub .status .year { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.pub .status .state { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pub .title { font-size: 17px; font-weight: 500; margin: 0 0 8px; line-height: 1.5; color: var(--text); }
.pub .title a { color: var(--accent); }
.pub .authors { font-size: 14px; color: var(--muted); margin: 0; }
.pub .authors b { color: var(--text); }
.pub .venue { font-size: 14px; color: var(--muted); font-style: italic; margin: 2px 0 0; }
sup.corr { font-size: .8em; margin-left: 1px; color: var(--text); cursor: help; }

/* Figures */
.figs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 18px 0 8px; }
figure { margin: 0; }
figure .ph { aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
figure img.contain { object-fit: contain; background: #fff; }
figure .ph.missing::after { content: "image"; color: var(--faint); font-size: 12px; }
figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.facilities { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 22px; }
.facilities h4 { font-size: 13.5px; margin: 0 0 12px; }
.fac { display: grid; grid-template-columns: 118px 1fr; margin-bottom: 12px; font-size: 14px; }
.fac a { font-weight: 700; }
.fac div { color: var(--muted); line-height: 1.6; }

/* Skills, education */
.skills h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.skills ul { list-style: none; margin: 0 0 26px; padding: 0; }
.skills ul:last-child { margin-bottom: 0; }
.skills li { display: grid; grid-template-columns: 190px 1fr; gap: 0 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.skills li:last-child { border-bottom: 0; }
.skills li span:first-child { font-weight: 500; }
.skills li span:last-child { color: var(--muted); }
.edu { display: grid; grid-template-columns: 134px 1fr; gap: 18px 0; }
.edu .when { font-size: 13.5px; color: var(--muted); }
.edu .what b { display: block; font-size: 15.5px; }
.edu .what span { font-size: 14px; color: var(--muted); }
.edu .what p.desc { font-size: 14px; color: var(--muted); margin: 8px 0 0; line-height: 1.65; }

/* CV page */
.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 6px; font-size: 14.5px; font-weight: 500; border: 1px solid var(--line); color: var(--text); background: var(--bg); }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.cv-meta { font-size: 13px; color: var(--faint); margin: 0 0 14px; }
.cv-frame { width: 100%; height: 80vh; min-height: 520px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); display: block; }
.cv-mobile-note { display: none; font-size: 14px; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 22px 0 40px; margin-top: 24px; }
footer .wrap { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); }
footer a { color: var(--faint); }

[data-lang-block] { display: none; }
html[data-lang="ko"] [data-lang-block="ko"], html[data-lang="en"] [data-lang-block="en"] { display: block; }

@media (max-width: 760px) {
  :root { --label: 1fr; }
  nav.links { gap: 14px; }
  .lang { border-left: 0; padding-left: 4px; gap: 8px; }
  .hero { padding: 44px 0 28px; }
  .intro { margin: 28px 0 0; }
  .pagehead { padding: 40px 0 4px; }
  section.block { grid-template-columns: 1fr; padding: 36px 0; }
  .pub { grid-template-columns: 1fr; }
  .pub .status { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
  .pub .status .year { font-size: 13px; color: var(--accent); }
  .pub .status .state { margin-top: 0; }
  .figs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  figcaption { font-size: 12px; }
  .edu { grid-template-columns: 1fr; gap: 2px 0; }
  .edu .what { margin-bottom: 12px; }
  .skills li { grid-template-columns: 1fr; }
  .cv-frame { display: none; }
  .cv-mobile-note { display: block; }
}
@media print { header.top, footer, .lang, .cv-actions { display: none; } }

/* research topics: short text + one figure */
.rtopic { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.rtopic.nofig { grid-template-columns: 1fr; }
.rtopic + .rtopic { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.rtopic h3.topic { margin: 0 0 10px; }
.rtopic p { margin: 0; }
.reflinks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px !important; font-size: 14px; }
.reflinks .soon { color: var(--faint); }
@media (max-width: 760px) {
  .rtopic { grid-template-columns: 1fr; gap: 16px; }
  .rtopic figure { width: min(100%, 240px); }
}
