/* ==========================================================================
   Prof. Moongee Jeon — personal academic site
   Palette: deep navy + neutral grey, restrained steel-blue accent
   ========================================================================== */

:root {
  --navy-900: #0e1a2e;
  --navy-800: #142440;
  --navy-700: #1c3253;
  --navy-600: #2a4670;

  --ink:      #1c2530;
  --ink-soft: #47535f;
  --muted:    #7b8794;
  --line:     #e2e6ec;
  --line-soft:#eef1f5;
  --surface:  #ffffff;
  --surface-2:#f6f8fa;

  --accent:   #3f6597;
  --accent-2: #7d97bd;
  --gold:     #a98a4b;

  --sidebar-w: 288px;
  --content-max: 880px;

  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 26, 40, .06), 0 2px 8px rgba(16, 26, 40, .04);

  --sans: "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Noto Serif KR", serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

::selection { background: #d7e2f2; }

/* --------------------------------------------------------------- layout -- */

.layout { display: flex; min-height: 100vh; align-items: stretch; }

/* --------------------------------------------------------------- sidebar -- */

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(170deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #dfe5ee;
  padding: 40px 28px 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

.brand { text-align: center; }

.brand__photo {
  display: block;
  width: 132px; height: 132px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 6px 22px rgba(0,0,0,.32);
  background: #24354f;
}
.brand__photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;   /* profile.jpg 는 얼굴 기준으로 이미 정사각 크롭됨 */
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.brand__photo:hover img { transform: scale(1.04); }

.brand__name {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: #ffffff;
  margin: 0 0 2px;
  line-height: 1.3;
}
.brand__name-ko {
  font-size: .82rem;
  color: var(--accent-2);
  letter-spacing: .16em;
  margin: 0 0 14px;
}
.brand__role {
  font-size: .8rem;
  line-height: 1.6;
  color: #9fb2ce;
  margin: 0;
}
.brand__role strong { color: #cfdaea; font-weight: 500; }

.brand__rule {
  width: 40px; height: 1px;
  background: rgba(255,255,255,.22);
  margin: 22px auto;
  border: 0;
}

/* nav */
.nav { display: flex; flex-direction: column; gap: 2px; }

.nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: #b9c6da;
  font-size: .93rem;
  letter-spacing: .01em;
  border-left: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.nav__link:hover { background: rgba(255,255,255,.06); color: #ffffff; text-decoration: none; }
.nav__link.is-active {
  background: rgba(255,255,255,.09);
  color: #ffffff;
  border-left-color: var(--accent-2);
  font-weight: 500;
}
.nav__num {
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.34);
  min-width: 16px;
}

/* contact */
.contact { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.contact__title {
  font-size: .65rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.42); margin: 0 0 12px;
}
.contact__item {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .82rem; line-height: 1.55; color: #a7b6cc;
  margin-bottom: 9px; word-break: break-word;
}
.contact__item a { color: #a7b6cc; }
.contact__item a:hover { color: #ffffff; }
.contact__icon { flex: 0 0 14px; margin-top: 4px; opacity: .6; }

.sidebar__foot {
  margin-top: 26px;
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  line-height: 1.6;
}

/* mobile nav toggle (hidden on desktop) */
.navbar { display: none; }

/* --------------------------------------------------------------- content -- */

.content {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--surface);
}

.wrap { max-width: var(--content-max); padding: 0 48px 96px; margin: 0 auto; }

/* hero — custom illustration: big data, EEG/ERP, eye tracking, text analysis.
   Never cropped: the image keeps its own aspect ratio at every width, and on
   very wide screens it is centred on a matching navy field instead of scaled up. */
.hero {
  position: relative; margin-bottom: 44px;
  display: flex; justify-content: center;
  background: linear-gradient(120deg, #0c1728 0%, #132340 55%, #1d3457 100%);
}
.hero__img {
  display: block;
  width: 100%; max-width: 1400px; height: auto;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.05) 0%, rgba(12,23,40,0) 30%, rgba(12,23,40,.28) 100%);
  pointer-events: none;
}

/* section header */
.section { display: none; animation: fade .32s ease both; }
.section.is-visible { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.page-head { padding-top: 40px; margin-bottom: 34px; }
.section--home .page-head { padding-top: 0; }

.eyebrow {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 10px;
}
.page-title {
  font-family: var(--serif);
  font-size: 2.1rem; font-weight: 600; letter-spacing: -.015em;
  color: var(--navy-900); margin: 0 0 14px; line-height: 1.2;
}
.page-title-ko {
  display: inline-block;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 500;
  color: var(--ink-soft); letter-spacing: 0;
  margin-left: 14px; padding-left: 15px; border-left: 1px solid var(--line);
  vertical-align: 6px;
}
.page-title-dept {
  display: block; font-size: .82rem; font-weight: 400; color: var(--muted); margin-top: 1px;
}

.page-lead { font-size: 1rem; color: var(--ink-soft); margin: 0; max-width: 62ch; }
.page-head::after {
  content: ""; display: block; width: 52px; height: 3px;
  background: var(--navy-700); margin-top: 22px; border-radius: 2px;
}

/* home */
.bio p { font-size: 1.02rem; color: var(--ink-soft); margin: 0 0 20px; max-width: 68ch; }
.bio p strong { color: var(--ink); font-weight: 600; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin: 36px 0 40px;
}
.stat { background: var(--surface); padding: 20px 18px; text-align: center; }
.stat__num {
  font-family: var(--serif); font-size: 1.72rem; font-weight: 600;
  color: var(--navy-800); line-height: 1.1; display: block;
}
.stat__label {
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px; display: block;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px; margin-top: 12px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: #cbd5e2; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.card__tag {
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.card__title { font-size: 1.02rem; font-weight: 600; color: var(--navy-800); margin: 7px 0 6px; }
.card__body { font-size: .86rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* group heading */
.group { margin-bottom: 46px; }
.group__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding-bottom: 9px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.group__title {
  font-size: .78rem; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 600; color: var(--navy-700); margin: 0;
}
.group__count {
  font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* entry list */
.entries { list-style: none; margin: 0; padding: 0; }

.entry {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 0 18px;
  padding: 13px 0 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .935rem;
  line-height: 1.72;
  color: var(--ink-soft);
}
.entry:last-child { border-bottom: 0; }
.entry[hidden], .group[hidden] { display: none !important; }
.entry:hover { background: linear-gradient(90deg, rgba(63,101,151,.035), transparent 70%); }

.entry__year {
  font-variant-numeric: tabular-nums;
  font-size: .8rem; font-weight: 600;
  color: var(--navy-600);
  padding-top: 2px;
  letter-spacing: .02em;
}
.entry__body > a { font-weight: 500; }
.entry__body i { color: var(--ink); }

.tag {
  display: inline-block;
  font-size: .655rem; font-weight: 600; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line);
  margin-left: 6px; vertical-align: 2px;
  white-space: nowrap;
}
.tag--ssci { background: #eef3fa; color: #2f5183; border-color: #d6e2f2; }
.tag--scopus { background: #f0f5f1; color: #3c6448; border-color: #dbe8de; }
.tag--kci { background: #f7f6f2; color: #6f6248; border-color: #e9e5da; }

.award {
  display: block; margin-top: 6px;
  font-size: .8rem; color: var(--gold); font-weight: 500;
}

/* simple bullet list (research interests, memberships) */
.plain { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 34px; }
.plain li {
  break-inside: avoid;
  padding: 7px 0 7px 18px;
  position: relative;
  font-size: .93rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.plain li::before {
  content: ""; position: absolute; left: 0; top: 17px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2);
}
.plain li strong { color: var(--ink); font-weight: 600; display: block; }
.plain li .en { display: block; color: var(--muted); font-size: .81rem; line-height: 1.45; }
.plain--interests li { padding-top: 9px; padding-bottom: 9px; }

a.group__count { color: var(--accent); font-weight: 500; }
a.group__count:hover { text-decoration: none; color: var(--navy-800); }

/* timeline (experience) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px;
  width: 1px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 22px 0; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent-2);
}
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline__period {
  display: block; font-size: .74rem; letter-spacing: .07em;
  color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 1px;
}
.timeline__role { font-size: .96rem; color: var(--ink); display: block; }
.timeline__ko { display: block; font-size: .86rem; color: var(--muted); margin-top: 1px; }
.timeline__project {
  display: block; font-size: .89rem; color: var(--ink-soft);
  margin-top: 4px; padding-left: 11px; border-left: 2px solid var(--line);
}
.timeline__meta {
  display: block; font-size: .78rem; color: var(--muted);
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.live, .done {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 20px;
  font-size: .64rem; font-weight: 600; letter-spacing: .04em;
  text-transform: none; vertical-align: 1px;
}
.live { background: #eef4ec; color: #3c6448; border: 1px solid #d8e6db; }
.done { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* systems */
.system {
  border: 1px solid var(--line); border-left: 3px solid var(--navy-700);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px; margin-bottom: 16px; background: var(--surface);
  transition: box-shadow .2s ease;
}
.system:hover { box-shadow: var(--shadow-sm); }
.system__name {
  font-family: var(--serif); font-size: 1.24rem; font-weight: 600;
  color: var(--navy-800); margin: 0 0 4px; letter-spacing: .01em;
}
.system__status { font-size: .9rem; color: var(--ink); margin: 0 0 10px; }
.system__meta { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.75; }

/* contact page */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 4px;
}
.contact-card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; background: var(--surface); color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.contact-card:hover {
  text-decoration: none; border-color: #cbd5e2;
  box-shadow: var(--shadow-sm); transform: translateY(-2px);
}
.contact-card__label {
  display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 9px;
}
.contact-card__value {
  display: block; font-family: var(--serif); font-size: 1.08rem; font-weight: 600;
  color: var(--navy-800); line-height: 1.4; word-break: break-word;
}
a.contact-card .contact-card__value { color: var(--accent); }
.contact-card__note {
  display: block; margin-top: 8px; font-size: .84rem; color: var(--ink-soft); line-height: 1.6;
}

/* teaching */
.group__title-ko {
  font-size: .74rem; letter-spacing: .04em; text-transform: none;
  color: var(--muted); font-weight: 400; margin-left: 8px;
}

.courses { list-style: none; margin: 0; padding: 0; }

.course {
  display: grid; grid-template-columns: 40px 1fr; gap: 0 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line-soft);
}
.course:last-child { border-bottom: 0; }
.course__no {
  font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 600;
  color: var(--accent-2); padding-top: 5px; letter-spacing: .04em;
}
.course__title {
  font-family: var(--sans);
  font-size: 1.12rem; font-weight: 600;
  color: var(--navy-800); margin: 0 0 10px; line-height: 1.45; letter-spacing: -.005em;
}
.course__term {
  display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 20px;
  font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  color: var(--navy-700); background: var(--surface-2); border: 1px solid var(--line);
  vertical-align: 3px; white-space: nowrap;
}
.course__en {
  display: block; font-family: var(--sans);
  font-size: .68rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold); margin-top: 5px;
}
.course__desc { margin: 0; max-width: 66ch; }
.course__desc--ko { font-size: .93rem; color: var(--ink-soft); line-height: 1.78; }
.course__desc--en {
  font-size: .855rem; color: var(--muted); line-height: 1.72;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}

/* research equipment */
.equips { list-style: none; margin: 0; padding: 0; }

.equip {
  display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 16px; background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.equip:hover { border-color: #cbd5e2; box-shadow: var(--shadow-sm); }

.equip__media {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 12px; min-height: 150px;
}
.equip__media img {
  width: 100%; height: auto; max-height: 175px; object-fit: contain;
  mix-blend-mode: multiply;
}
.equip__media img + img { max-width: 48%; }

.equip__name {
  font-family: var(--sans); font-size: 1.04rem; font-weight: 600;
  color: var(--navy-800); margin: 0 0 6px; line-height: 1.45; letter-spacing: -.005em;
}
.equip__desc { font-size: .93rem; color: var(--ink-soft); margin: 0; line-height: 1.65; }

.equip__specs-title {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin: 14px 0 6px;
}
.equip__specs { list-style: none; margin: 0; padding: 0; }
.equip__specs li {
  position: relative; padding: 2px 0 2px 14px;
  font-size: .85rem; color: var(--ink-soft); line-height: 1.6;
}
.equip__specs li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2);
}

/* search toolbar */
.toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 30px;
  position: sticky; top: 0; z-index: 5;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(8px);
  padding: 14px 0 14px;
  border-bottom: 1px solid var(--line-soft);
}
.search {
  flex: 1 1 210px; min-width: 180px; position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 13px; opacity: .42; pointer-events: none; }
.search input {
  width: 100%;
  font: inherit; font-size: .92rem;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--ink);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: 0; background: var(--surface);
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(63,101,151,.12);
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .78rem; cursor: pointer; white-space: nowrap;
  padding: 7px 11px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft);
  transition: all .16s ease;
}
.chip:hover { border-color: var(--accent-2); color: var(--navy-700); }
.chip.is-on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.result-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.empty {
  display: none; padding: 44px 0; text-align: center; color: var(--muted); font-size: .92rem;
}
.is-empty .empty { display: block; }

mark { background: #fdf0c8; color: inherit; padding: 0 1px; border-radius: 2px; }

/* print button */
.print-btn {
  font: inherit; font-size: .78rem; cursor: pointer; white-space: nowrap; margin-left: auto;
  padding: 7px 12px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.print-btn:hover { border-color: var(--accent-2); color: var(--navy-700); }

/* back-to-top */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 20;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s ease; color: var(--navy-700);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent-2); }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  :root { --sidebar-w: 250px; }
  .wrap { padding: 0 34px 80px; }
}

@media (max-width: 860px) {
  .layout { display: block; }

  .sidebar {
    position: relative; width: auto; flex: none; height: auto;
    padding: 18px 18px 16px;
  }
  .brand { display: flex; align-items: center; gap: 15px; text-align: left; padding-right: 52px; }
  .brand__photo { width: 58px; height: 58px; margin: 0; flex: 0 0 58px; }
  .brand__name { font-size: 1.1rem; }
  .brand__name-ko { font-size: .74rem; margin-bottom: 3px; letter-spacing: .1em; }
  .brand__role { font-size: .72rem; line-height: 1.5; }
  .brand__rule { display: none; }

  .navbar { display: block; position: absolute; top: 18px; right: 18px; }
  .nav-toggle {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    color: #dfe5ee; border-radius: 7px; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }

  .nav { display: none; margin-top: 16px; }
  .nav.is-open { display: flex; }
  .contact { display: none; }
  .contact.is-open { display: block; }
  .sidebar__foot { display: none; }

  .wrap { padding: 0 20px 64px; }
  .hero { margin-bottom: 30px; }
  .page-head { padding-top: 28px; }
  .page-title { font-size: 1.62rem; }
  .page-title-ko {
    display: block; margin: 8px 0 0; padding: 0 0 0 12px;
    border-left: 2px solid var(--line); vertical-align: baseline; font-size: .94rem;
  }
  .stats { grid-template-columns: 1fr; }
  .plain { columns: 1; }
  .entry { grid-template-columns: 1fr; gap: 2px; }
  .entry__year { padding-top: 0; }
  .course { grid-template-columns: 1fr; gap: 4px; }
  .equip { grid-template-columns: 1fr; gap: 16px; padding: 16px 18px; }
  .equip__media { min-height: 0; }
  .equip__media img { max-height: 190px; }
  .course__no { padding-top: 0; }
  .group__title-ko { display: block; margin: 4px 0 0; }
  .toolbar { position: static; backdrop-filter: none; }
}

/* --------------------------------------------------------------- print CV -- */

@media print {
  :root { --content-max: 100%; }

  body { font-size: 10.5pt; line-height: 1.5; color: #000; }

  .sidebar, .navbar, .toolbar, .to-top, .hero, .stats, .cards,
  .section--home .group, .empty { display: none !important; }

  .layout { display: block; }
  .wrap { max-width: 100%; padding: 0; margin: 0; }

  .section { display: block !important; animation: none; page-break-before: always; }
  .section--home { page-break-before: avoid; }

  /* "Print Publications" button: print that section only, starting on page 1 */
  body[data-print-only="publications"] .section:not(#publications) { display: none !important; }
  body[data-print-only="publications"] #publications { page-break-before: avoid; }

  .page-head { padding-top: 0; margin-bottom: 16pt; }
  .page-head::after { width: 100%; height: 1px; background: #000; margin-top: 8pt; }
  .page-title { font-size: 17pt; color: #000; }
  .page-title-ko { font-size: 10pt; color: #333; border-left: .5pt solid #999; vertical-align: 3pt; }
  .page-title-dept { font-size: 8.5pt; color: #555; }
  .eyebrow { color: #444; }

  .group { margin-bottom: 18pt; }
  .group__head { border-bottom: .5pt solid #999; page-break-after: avoid; break-after: avoid; }
  .group__title { color: #000; }

  .entry {
    grid-template-columns: 46pt 1fr;
    padding: 3pt 0; border-bottom: 0;
    page-break-inside: avoid; font-size: 9.5pt; line-height: 1.45; color: #000;
  }
  .entry:hover { background: none; }
  .entry__year { color: #333; font-size: 9pt; }
  .entry__body a { color: #000; text-decoration: none; }

  .tag { border: .5pt solid #aaa; background: none !important; color: #333 !important; }
  .plain { columns: 2; }
  .plain li { border-bottom: 0; padding: 2pt 0 2pt 10pt; page-break-inside: avoid; color: #000; }
  .timeline__ko, .timeline__meta { color: #333; }
  .timeline__project { color: #000; border-left: .5pt solid #999; }
  .live, .done { border: .5pt solid #999; background: none !important; color: #333 !important; }
  .course__term { border: .5pt solid #999; background: none; color: #333; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 6pt; }
  .contact-card { border: .5pt solid #999; padding: 6pt 8pt; page-break-inside: avoid; }
  .contact-card__value { font-size: 10pt; color: #000 !important; }
  .course { page-break-inside: avoid; padding: 6pt 0; border-bottom: 0; grid-template-columns: 24pt 1fr; }
  .course__title { font-size: 11pt; color: #000; margin-bottom: 4pt; }
  .course__en { color: #444; }
  .course__desc { max-width: 100%; }
  .course__desc--ko { font-size: 9.5pt; color: #000; line-height: 1.5; }
  .course__desc--en { font-size: 9pt; color: #333; margin-top: 4pt; padding-top: 4pt; }
  .timeline li { padding-bottom: 8pt; page-break-inside: avoid; }
  .system { border: .5pt solid #999; page-break-inside: avoid; margin-bottom: 8pt; }
  .equip {
    grid-template-columns: 110pt 1fr; gap: 12pt; border: .5pt solid #999;
    padding: 6pt 8pt; margin-bottom: 8pt; page-break-inside: avoid;
  }
  .equip__media { border: 0; background: none; padding: 0; min-height: 0; }
  .equip__media img { max-height: 80pt; }
  .equip__name { font-size: 10.5pt; color: #000; }
  .equip__desc, .equip__specs li { font-size: 9pt; color: #000; }
  .equip__specs-title { color: #444; }
  .bio p { color: #000; max-width: 100%; }
  mark { background: none; }
}

/* -------------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   관리자 섹션 편집 UI
   .editable__bar / .editable__editor 는 관리자에게만 렌더된다(th:if="${isAdmin}").
   ========================================================================== */

.editable {
  position: relative;
}

/* 편집기는 편집 모드에서만 보인다 */
.editable__editor {
  display: none;
  width: 100%;
  min-height: 420px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.6;
  tab-size: 2;
  resize: vertical;
}

.editable__editor:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  background: var(--surface);
}

.editable.is-editing .editable__view { display: none; }
.editable.is-editing .editable__editor { display: block; }

/* 버튼 줄 */
.editable__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.editable__btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.editable__btn:hover { background: var(--surface-2); border-color: var(--accent-2); color: var(--ink); }
.editable__btn:disabled { opacity: .5; cursor: default; }

.editable__btn--save {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.editable__btn--save:hover { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }

/* 편집 모드에 따라 노출되는 버튼이 달라진다 */
.editable [data-act="cancel"],
.editable [data-act="save"] { display: none; }

.editable.is-editing [data-act="edit"] { display: none; }
.editable.is-editing [data-act="cancel"],
.editable.is-editing [data-act="save"] { display: inline-block; }

.editable__status {
  margin-right: auto;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .78rem;
}

.editable__status.is-error { color: #b3261e; }

/* 인쇄물에는 편집 UI가 나오지 않는다 */
@media print {
  .editable__bar,
  .editable__editor { display: none !important; }
}
