/* ==========================================================================
   MindScale Lab — design system
   Palette: deep navy + teal accent on warm white
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #0d2436;
  --navy-800: #12314a;
  --navy-700: #1b4165;
  --teal-700: #0f6f7a;
  --teal-600: #0e7480;
  --teal-500: #1a9aa8;
  --teal-100: #e3f2f4;

  /* Neutrals */
  --ink:        #17242e;
  --ink-soft:   #465a67;
  --ink-faint:  #526873;
  --rule:       #dfe5e9;
  --rule-soft:  #eef2f4;
  --paper:      #ffffff;
  --paper-warm: #f7f9fa;
  --paper-deep: #eef3f5;

  /* Type */
  --serif: "Source Serif 4", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --sans:  "Inter", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI",
           "Noto Sans KR", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(13, 36, 54, .06), 0 2px 8px rgba(13, 36, 54, .05);
  --shadow-md: 0 2px 6px rgba(13, 36, 54, .07), 0 12px 32px rgba(13, 36, 54, .09);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-600); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy-900); line-height: 1.22; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 3px; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.section { padding: 68px 0; }
.section--tight { padding: 44px 0; }
.section--warm { background: var(--paper-warm); border-block: 1px solid var(--rule-soft); }
.section--deep { background: var(--navy-900); color: #d6e2ea; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep a { color: var(--teal-100); }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin: 0 0 .7rem;
}
.section-head { margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); max-width: 62ch; margin-bottom: 0; }
.lede { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 14px;
  min-height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--serif); font-size: 1.26rem; font-weight: 600;
  color: var(--navy-900); letter-spacing: -.015em;
}
.brand-sub {
  font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint); white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 10px; border-radius: 7px;
  font-size: .91rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap;
}
.nav-links a:hover { background: var(--paper-deep); color: var(--navy-800); text-decoration: none; }
.nav-links a.is-active { color: var(--navy-900); font-weight: 650; }
/* the underline space is reserved on every item so the active one does not shift the row */
.nav-links a::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: transparent; margin-top: 4px;
}
.nav-links a.is-active::after { background: var(--teal-600); }

.nav-toggle {
  display: none; width: 40px; height: 40px; border: 1px solid var(--rule);
  border-radius: 8px; background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 17px; height: 2px; background: var(--navy-800); border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after  { position: absolute; top: 5px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1000px 460px at 12% -10%, rgba(26,154,168,.16), transparent 62%),
    radial-gradient(760px 420px at 96% 8%, rgba(27,65,101,.14), transparent 60%),
    var(--paper-warm);
  border-bottom: 1px solid var(--rule);
  padding: 76px 0 68px;
}
.hero-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .hero-tag {
  font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem);
  font-weight: 600; line-height: 1.35;
  color: var(--teal-700); margin-bottom: 1.1em;
}
.hero p.lede { font-size: 1.12rem; max-width: 56ch; }

.portrait-frame { position: relative; }
.portrait {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  background: var(--paper-deep);
}
.portrait-caption { margin-top: .85rem; font-size: .84rem; color: var(--ink-faint); text-align: center; }

/* ---------- buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: .93rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--navy-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy-800); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--teal-600); color: var(--teal-700); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.stat { background: var(--paper); padding: 28px 20px; text-align: center; }
.stat-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--teal-700); line-height: 1; }
.stat-label { font-size: .78rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin-top: .55rem; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: #c9d6dd; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--teal-100);
  display: grid; place-items: center; margin-bottom: 1rem; color: var(--teal-700);
}
.card-num {
  font-family: var(--serif); font-size: .82rem; font-weight: 700; letter-spacing: .1em;
  color: var(--teal-600); margin-bottom: .5rem;
}

/* ---------- people ---------- */
.person {
  display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--rule-soft);
}
.person:last-child { border-bottom: 0; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(140deg, var(--teal-100), var(--paper-deep));
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--teal-700);
}
.person h3 { margin-bottom: .15em; font-size: 1.08rem; }
.person .role { font-size: .88rem; font-weight: 600; color: var(--teal-700); margin-bottom: .35em; }
.person p { font-size: .94rem; color: var(--ink-soft); margin-bottom: .3em; }

.pi-card {
  display: grid; grid-template-columns: 200px 1fr; gap: 34px; align-items: start;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 32px;
}
.pi-card .portrait { aspect-ratio: 1/1; border-radius: var(--radius); }

/* ---------- publications ---------- */
.pub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.chip {
  font: inherit; font-size: .85rem; font-weight: 600;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--rule);
  background: #fff; color: var(--ink-soft); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip:hover { border-color: var(--teal-600); }

.pub-year {
  font-family: var(--serif); font-size: 1.35rem; color: var(--navy-900);
  padding-bottom: .3rem; border-bottom: 2px solid var(--teal-100);
  margin: 2.4rem 0 1rem;
}
.pub-year:first-of-type { margin-top: 0; }
.pub {
  padding: 14px 0 14px 20px; border-left: 2px solid var(--rule-soft);
  margin-bottom: 2px; transition: border-color .15s ease;
}
.pub:hover { border-left-color: var(--teal-500); }
.pub-title { font-weight: 600; color: var(--navy-900); display: block; margin-bottom: .2em; }
.pub-authors { font-size: .93rem; color: var(--ink-soft); }
.pub-venue { font-size: .93rem; color: var(--ink-faint); font-style: italic; }
.pub-links { margin-top: .35em; display: flex; gap: 14px; flex-wrap: wrap; }
.pub-links a { font-size: .82rem; font-weight: 600; }
.me { color: var(--navy-900); font-weight: 700; }

.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--teal-100); color: var(--teal-700); vertical-align: middle;
}
.tag-muted { background: var(--paper-deep); color: var(--ink-faint); }

/* ---------- timeline / lists ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid; grid-template-columns: 150px 1fr; gap: 22px;
  padding: 16px 0; border-bottom: 1px solid var(--rule-soft);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-size: .87rem; font-weight: 600; color: var(--teal-700); font-variant-numeric: tabular-nums; }
.timeline .what strong { display: block; color: var(--navy-900); font-weight: 600; }
.timeline .what span { font-size: .93rem; color: var(--ink-soft); }

.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: .96rem; color: var(--ink-soft); }
.plain-list li:last-child { border-bottom: 0; }

/* ---------- course cards ---------- */
.course { border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; background: #fff; }
.course .code { font-family: var(--mono); font-size: .78rem; font-weight: 600; color: var(--teal-700); letter-spacing: .04em; }
.course h3 { margin: .35em 0 .3em; font-size: 1.06rem; }
.course p { font-size: .94rem; color: var(--ink-soft); margin-bottom: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px; }
.contact-item { display: grid; grid-template-columns: 26px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.contact-item .value { font-size: .98rem; color: var(--ink); }
.contact-item svg { color: var(--teal-700); margin-top: 4px; }

.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.link-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--rule);
  background: #fff; font-size: .88rem; font-weight: 600; color: var(--navy-800);
}
.link-pill:hover { border-color: var(--teal-600); color: var(--teal-700); text-decoration: none; }

.callout {
  background: var(--teal-100); border-left: 3px solid var(--teal-600);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 26px;
}
.callout p:last-child { margin-bottom: 0; }
.callout h3 { margin-bottom: .4em; }

.note {
  background: #fff8e6; border: 1px dashed #e0c168; border-radius: var(--radius);
  padding: 16px 20px; font-size: .9rem; color: #6b5310;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- university affiliation strip ---------- */
.affiliation {
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  padding: 26px 0;
}
.affiliation-inner {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
/* thin rule between the logo and the sentence, only when both are on one line */
.affiliation-inner p { border-left: 1px solid var(--rule); padding-left: 26px; }
@media (max-width: 620px) {
  .affiliation-inner p { border-left: 0; padding-left: 0; }
}
.uni-logo-link { display: inline-flex; align-items: center; flex: 0 0 auto; }
.uni-logo-link:hover { opacity: .8; }
.uni-logo { height: 28px; width: auto; }   /* logotype is ~11.8:1, so keep it short */
.affiliation p {
  margin: 0; font-size: .92rem; color: var(--ink-soft); max-width: 62ch;
}
/* when the logo file is absent the text sits on its own, which is fine */

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: #9fb4c2; padding: 52px 0 34px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 38px; margin-bottom: 34px; }
.site-footer h2 { color: #fff; font-family: var(--sans); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #c2d4df; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.footer-brand-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: #7d95a5; }

/* ---------- page banner ---------- */
.page-banner {
  background:
    radial-gradient(760px 320px at 10% 0%, rgba(26,154,168,.13), transparent 60%),
    var(--paper-warm);
  border-bottom: 1px solid var(--rule); padding: 56px 0 46px;
}
.page-banner h1 { margin-bottom: .3em; }
.page-banner p { color: var(--ink-soft); max-width: 64ch; margin-bottom: 0; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy-800); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
  font-size: .9rem; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; text-decoration: none; }

/* ---------- korean text ---------- */
[lang="ko"] { font-family: "Pretendard", "Noto Sans KR", var(--sans); word-break: keep-all; }
.name-ko { font-size: .82em; font-weight: 400; color: var(--ink-faint); margin-left: .2em; }
.pub-title-en {
  display: block; font-size: .93rem; font-style: italic; color: var(--ink-faint); margin-bottom: .15em;
}
.course-ko { font-size: .9rem; color: var(--ink-faint); margin-bottom: .6em !important; }

/* ---------- publication tweaks ---------- */
.pub-authors, .pub-venue { display: block; }
.pub-links { align-items: center; }
.pub-links .tag { font-size: .66rem; }

/* ---------- vision band ---------- */
.vision-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.vision-grid p { color: #c3d5e0; }
.vision-grid strong, .vision-grid em { color: #fff; }
.figure { margin: 0; }
.figure img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ---------- news ---------- */
.news-card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: .2rem;
}
.news-card h3 { font-size: 1.06rem; margin-bottom: .35em; }
.news-card p { font-size: .93rem; color: var(--ink-soft); margin-bottom: 0; }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: .8rem; flex-wrap: wrap; }
.news-date { font-size: .78rem; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.news-item {
  display: grid; grid-template-columns: 170px 1fr; gap: 30px;
  padding: 30px 0; border-bottom: 1px solid var(--rule-soft);
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: 0; }
.news-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.news-item h2 { font-size: 1.32rem; margin-bottom: .4em; }
.news-item p { color: var(--ink-soft); margin-bottom: 0; }
.news-item .pub-links { margin-top: .8em; }

/* ---------- people panel ---------- */
.people-panel {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 26px;
}
.mini-head {
  font-family: var(--sans); letter-spacing: .1em; text-transform: uppercase;
  font-size: .76rem; color: var(--ink-faint); font-weight: 700;
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .nav-links a { padding: 8px 7px; font-size: .87rem; }
  .brand-sub { display: none; }
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .vision-grid { grid-template-columns: 1fr; gap: 30px; }
  .news-item { grid-template-columns: 130px 1fr; gap: 20px; }
  .portrait-frame { max-width: 300px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .pi-card { grid-template-columns: 1fr; gap: 24px; }
  .pi-card .portrait { max-width: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { gap: 10px; flex-wrap: wrap; }
  .brand-name { font-size: 1.12rem; }
  .brand-sub { font-size: .6rem; letter-spacing: .07em; }
  .section { padding: 48px 0; }
  .nav-ready .nav-toggle { display: inline-flex; }
  .nav-links {
    display: flex; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--rule);
    padding: 8px 16px 14px; box-shadow: var(--shadow-md);
  }
  .nav-ready .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
  }
  .nav-ready .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--rule-soft); }
  .nav-links a::after { display: none; }
  .site-header { position: relative; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .person { grid-template-columns: 60px 1fr; gap: 14px; }
  .affiliation-inner { gap: 14px; }
  .uni-logo { height: 24px; }
  .news-item { grid-template-columns: 1fr; gap: 10px; }
  .news-side { flex-direction: row; align-items: center; }
  .people-panel { padding: 4px 18px; }
  .avatar { width: 60px; height: 60px; font-size: 1.15rem; }
}

@media print {
  .site-header, .site-footer, .btn-row, .pub-filters, .skip-link { display: none; }
  body { font-size: 11pt; }
}

/* Enhancement controls stay hidden when JavaScript is unavailable. */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#main { scroll-margin-top: 90px; }
.uni-logo { max-width: 100%; object-fit: contain; }
.pub, .contact-item .value { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
