:root {
  --ink: #28323c;
  --muted: #626d78;
  --accent: #235b91;
  --line: #dfe4e8;
  --wash: #f6f8fa;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.75 -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1000px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 10px; background: #fff; z-index: 20; }
.skip-link:focus { top: 8px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; min-height: 86px; }
.wordmark { font-size: 23px; font-weight: 600; color: var(--ink); white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; gap: 23px; }
nav a { color: var(--muted); font-size: 14px; padding: 9px 0; border-bottom: 2px solid transparent; }
nav a[aria-current='page'] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
main { padding-block: 46px 70px; min-height: calc(100vh - 170px); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.3; font-weight: 600; margin-bottom: 24px; }
h2 { font-size: 23px; font-weight: 600; line-height: 1.4; margin: 38px 0 20px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
h3 { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
p { margin-bottom: 16px; }
ul { padding-left: 22px; }
li { margin-bottom: 8px; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 42px; align-items: center; }
.profile-photo { width: 100%; height: auto; border-radius: 6px; margin-top: 0; }
.profile h1 { margin-bottom: 3px; }
.position { color: var(--muted); margin-bottom: 20px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.philosophy { font-style: italic; }
.page-intro, .pending { color: var(--muted); }
.empty-state { padding-block: 20px; }
.publication-year { margin: 28px 0 12px; font-size: 21px; color: var(--muted); }
.publication-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: center; padding-block: 24px; border-bottom: 1px solid var(--line); }
.publication-thumbnail, .thumbnail-placeholder { aspect-ratio: 4 / 3; width: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; padding: 10px; }
.publication-thumbnail img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbnail-placeholder { color: var(--muted); background: var(--wash); font-size: 12px; }
.publication-details { min-width: 0; }
.publication-details h3 { font-size: 18px; }
.publication-row p, .domestic-paper p { font-size: 14px; margin-bottom: 7px; }
.publication-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.venue-badge { display: inline-block; font-size: 11px; font-weight: 600; background: #eaf1f8; color: var(--accent); border-radius: 3px; padding: 3px 8px; }
.topic-tag { color: var(--muted); font-size: 11px; }
.publication-venue { color: var(--muted); font-style: italic; }
.publication-links { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; margin-top: 10px; }
.publication-note, .source-note { font-size: 12px; color: var(--muted); }
.source-note { margin-top: 30px; }
.domestic-paper { padding-block: 20px; border-bottom: 1px solid var(--line); }
.domestic-paper h3 { margin-top: 10px; }
.record { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 24px; padding-block: 10px 20px; }
.record-date { color: var(--muted); font-size: 14px; }
.site-footer { display: flex; gap: 22px; border-top: 1px solid var(--line); padding-block: 22px; font-size: 12px; color: var(--muted); }
.site-footer span { margin-right: auto; }
@media (max-width: 800px) {
  .header-inner { display: block; padding-block: 18px 8px; }
  nav { gap: 20px; margin-top: 10px; }
  .profile { grid-template-columns: minmax(0, 1fr) 145px; gap: 28px; }
  .publication-row { grid-template-columns: 175px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 36px); }
  main { padding-block: 30px 48px; }
  nav { gap: 6px 18px; }
  nav a { font-size: 13px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .profile { grid-template-columns: 1fr; gap: 22px; }
  .profile-photo { width: 120px; justify-self: end; grid-row: 1; }
  .publication-row { grid-template-columns: 1fr; gap: 18px; }
  .publication-thumbnail, .thumbnail-placeholder { max-width: 300px; }
  .record { grid-template-columns: 1fr; gap: 2px; }
}
@media print {
  .wrap { width: 100%; }
  nav, .skip-link, .site-footer { display: none; }
  main { padding-block: 20px; }
  .publication-row, .record { break-inside: avoid; }
}

.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 3px; background: #f0f0f6; color: #515773; font-size: 11px; font-weight: 500; }
.type-badge.journal { background: #edf5ee; color: #36704b; }
.type-badge img { flex: none; }
.organization-tag { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 10px; background: #fff; }
.organization-tag img { width: 66px; height: 24px; object-fit: contain; }
.organization-tag span { font-size: 11px; color: var(--muted); }
.section-jumps { display: flex; flex-wrap: wrap; gap: 12px 22px; font-size: 14px; margin-bottom: 28px; }
.award-year { margin-top: 24px; font-size: 17px; color: var(--muted); }
.download-link { display: inline-block; border: 1px solid var(--accent); border-radius: 4px; padding: 9px 15px; }
.profile > div { min-width: 0; }

.organization-tag img.logo-on-dark { background: #243953; border-radius: 2px; padding: 3px; }

.track-badge { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; background: #fff4df; color: #795416; }
.resource-tag { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 11px; border: 1px solid #c7d8e8; border-radius: 4px; background: #f1f6fb; color: var(--accent); font-size: 12px; font-weight: 600; }
.resource-tag.code { border-color: #d5dbe1; background: #f6f8fa; color: #394653; }
.resource-tag:hover { background: #e3edf7; border-color: var(--accent); text-decoration: none; }
.resource-tag.code:hover { background: #e9edf1; border-color: #626d78; }

/* Shared publication metadata keeps domestic and international tags aligned. */
.publication-meta > span { display: inline-flex; align-items: center; gap: 5px; min-height: 27px; padding: 3px 9px; border-radius: 6px; line-height: 19px; font-size: 11px; font-weight: 600; }
.type-badge { border: 1px solid #d8e1ed; background: #f0f4fa; color: #49617e; }
.type-badge.journal { border-color: #cce4da; background: #edf7f2; color: #2f6b53; }
.type-badge.workshop { border-color: #dfd4ec; background: #f5f0fa; color: #72518d; }
.type-badge img { opacity: .8; }
.domestic-paper h3 { margin-top: 0; }
.publication-thumbnail { position: relative; cursor: zoom-in; background: #fff; transition: border-color .15s, box-shadow .15s; }
.publication-thumbnail:hover { border-color: #8aa9c6; box-shadow: 0 3px 14px #235b9112; }
.zoom-hint { position: absolute; right: 5px; bottom: 3px; color: #617a90; font-size: 16px; }
.figure-dialog { width: min(1400px, 96vw); max-width: 96vw; max-height: 94vh; border: 0; border-radius: 10px; padding: 48px 24px 22px; box-shadow: 0 20px 80px #0004; }
.figure-dialog::backdrop { background: #182431ba; }
.figure-dialog figure { margin: 0; }
.figure-dialog figure img { display: block; width: 100%; height: auto; max-height: 74vh; object-fit: contain; }
.figure-dialog figcaption { margin-top: 16px; color: var(--muted); font-size: 14px; text-align: center; }
.figure-close { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--wash); color: var(--ink); font-size: 25px; cursor: pointer; }
.figure-close:focus-visible { outline: 2px solid var(--accent); }
.record-aside .record-date { margin-bottom: 10px; }
.record-aside .organization-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border: 0; padding: 0; margin: 0; }
.record-aside .organization-tag img { width: 88px; height: 30px; object-fit: contain; object-position: left center; }
.record-aside .organization-tag span { font-size: 11px; }
@media (max-width: 560px) {
  .record-aside { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
  .record-aside .record-date { margin: 0; }
  .record-aside .organization-tag img { width: 80px; height: 28px; }
  .figure-dialog { padding: 48px 12px 18px; }
}

.record-aside .organization-tag { min-height: 0; }
.jbnu-emblem { display: block; width: 36px; height: 36px; background: url('../images/organizations/jbnu-emblem-en.png') -15px -2px / 123px 40px no-repeat; }
.project-affiliation { font-size: 13px; color: var(--muted); }

.news-list { list-style: none; padding: 0; }
.news-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin-bottom: 12px; font-size: 14px; }
.news-icon { font-size: 18px; line-height: 1.4; text-align: center; }
.record-aside .university-symbol img { width: 36px; height: 36px; }
@media (max-width: 560px) {
  .profile { grid-template-columns: minmax(0, 1fr) 88px; gap: 18px 16px; align-items: center; }
  .profile-copy { display: contents; }
  .profile-heading { grid-column: 1; grid-row: 1; }
  .profile-heading h1 { font-size: 26px; }
  .profile-heading .position { font-size: 13px; margin-bottom: 0; }
  .profile-photo { width: 88px; grid-column: 2; grid-row: 1; justify-self: end; }
  .profile-copy > p, .profile-links { grid-column: 1 / -1; margin-bottom: 0; }
  .profile-links { gap: 8px 18px; }
  .news-list li { margin-bottom: 16px; }
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.brand-loopy { display: block; width: 36px; height: 36px; object-fit: contain; flex: none; }

.record-aside .university-signature img { width: 88px; height: 40px; object-fit: contain; }
.university-signature-crop { display: block; width: 88px; height: auto; overflow: hidden; }

/* Featured research and dated updates on the home page. */
.research-summary { color: var(--ink); }
.all-publications { margin-top: 20px; }
.dated-news li { grid-template-columns: 90px minmax(0, 1fr); gap: 16px; }
.dated-news time { color: var(--muted); white-space: nowrap; }
#selected-research .publication-thumbnail { cursor: pointer; }
.publication-row[id] { scroll-margin-top: 24px; }
@media (max-width: 560px) {
  .dated-news li { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
}
