/* Layout: quiet academic site in one sans family. About = photo + plain prose;
   Publications = left topic rail + year-grouped list; detail pages = one column with figure. */
:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --fg: #1c2423;
  --muted: #5f6b68;
  --line: #dde3e0;
  --accent: #2f6f64;
  --accent-soft: #e4efec;
  --award: #85570f;
  --award-soft: #f6eddc;
  --t1: #3c6e8f; --t2: #7a5a9b; --t3: #9a6a2e; --t4: #5f6b68; --t5: #2f6f64;
  --display: "Poppins", "Noto Sans KR", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Helvetica Neue", "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
  --measure: 66ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131817; --surface: #1a201f; --fg: #e6ebe9; --muted: #9ba8a5; --line: #2c3533;
    --accent: #7cc3b4; --accent-soft: #1f302c; --award: #e0b46a; --award-soft: #2e271a;
    --t1: #8ab8d6; --t2: #bca1db; --t3: #d9aa6e; --t4: #a5b1ae; --t5: #7cc3b4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131817; --surface: #1a201f; --fg: #e6ebe9; --muted: #9ba8a5; --line: #2c3533;
  --accent: #7cc3b4; --accent-soft: #1f302c; --award: #e0b46a; --award-soft: #2e271a;
  --t1: #8ab8d6; --t2: #bca1db; --t3: #d9aa6e; --t4: #a5b1ae; --t5: #7cc3b4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16.5px; font-weight: 400; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, .brand, .entry .title, .art-title { font-family: var(--display); }
h1, h2, h3 { font-weight: 600; line-height: 1.3; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
b, strong { font-weight: 700; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 18px; } body { font-size: 16px; } }

/* top bar */
header.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding-block: 16px; flex-wrap: wrap; }
.brand { font-size: 1.1rem; font-weight: 600; color: var(--fg); text-decoration: none; }
.brand small { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 8px; }
nav.main { display: flex; gap: 22px; font-size: .92rem; }
nav.main a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav.main a:hover { color: var(--fg); }
nav.main a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

main { padding-block: 48px 96px; }
.eyebrow { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 28px; } }
.portrait {
  width: 100%; max-width: 240px; aspect-ratio: 4 / 5; border-radius: 4px;
  background: var(--accent-soft); display: grid; place-items: center;
  font-size: 3rem; font-weight: 500; color: var(--accent); overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text { min-width: 0; }
.about-text h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); }
.about-text .names { color: var(--muted); font-size: 1.05rem; margin-top: 2px; letter-spacing: .02em; }
.about-text p { margin: 0 0 1.1em; }
.about-text .prose { margin-top: 28px; }
.side { max-width: 240px; }
.side-news.mob { display: none; }
@media (max-width: 760px) {
  .side { max-width: none; }
  .side-news.desk { display: none; }
  .side-news.mob { display: block; margin-top: 40px; }
}
.contact { margin-top: 18px; font-size: .9rem; display: grid; gap: 4px; justify-items: start; }
@media (max-width: 760px) { .contact { display: flex; flex-wrap: wrap; gap: 6px 16px; } }
.contact .email { color: var(--muted); text-decoration: none; }
.contact .email:hover { color: var(--accent); text-decoration: underline; }
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .93rem; }
.side-news { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.side-news h2 { font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.side-news .news { font-size: .84rem; gap: 12px; }
.side-news .news li { grid-template-columns: 1fr; gap: 2px; padding-bottom: 12px; line-height: 1.5; }
.side-news .more { display: inline-block; margin-top: 12px; font-size: .84rem; text-decoration: none; }
.news-page .news { margin-top: 14px; }
.news li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.news-date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: 1px; }
@media (max-width: 600px) { .news li { grid-template-columns: 1fr; gap: 2px; } }

/* publications */
.proj { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .proj { grid-template-columns: 1fr; gap: 24px; } }
.proj > *, .about > * { min-width: 0; }
aside.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
aside.rail h2 { font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.topics a {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 8px 10px; border-radius: 4px; color: var(--fg); text-decoration: none; font-size: .88rem; line-height: 1.4;
}
.topics a > span:first-child { min-width: 0; }
.topics a:hover { background: var(--accent-soft); }
.topics a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.topics .n { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
@media (max-width: 860px) {
  aside.rail { position: static; }
  .topics { display: flex; flex-wrap: wrap; gap: 6px; }
  .topics a { border: 1px solid var(--line); padding: 6px 11px; border-radius: 99px; font-size: .82rem; gap: 6px; }
  .topics .n { display: none; }
  .topics .tdot { margin-right: 6px; }
  .t-full { display: none; }
  .t-short { display: inline; }
}
.rail-select {
  display: none; width: 100%; font: inherit; font-size: .95rem; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 40px 11px 14px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}

.proj-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); margin-top: 4px; }
.proj-head .sub { color: var(--muted); margin: 8px 0 0; }
.narrative { margin-top: 20px; }
.narrative p { margin: 0; }
.narrative p + p { margin-top: 14px; }

.group { margin-top: 44px; }
.group h2 { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.kind { font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kind .status { color: var(--accent); }
.entry .title { font-weight: 600; font-size: 1.02rem; line-height: 1.45; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.entry .title:hover { color: var(--accent); text-decoration: underline; }
.authors { font-size: .9rem; }
.authors b { font-weight: 700; }
.venue { font-size: .86rem; color: var(--muted); }
.venue .short { color: var(--fg); font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 6px; }
.chip {
  font-size: .74rem; line-height: 1; padding: 5px 9px 5px 7px; border-radius: 99px; text-decoration: none;
  border: 1px solid var(--line); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; background: var(--surface);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chip:hover { color: var(--fg); border-color: var(--muted); }
.award { font-size: .74rem; font-weight: 500; padding: 4px 8px; border-radius: 3px; background: var(--award-soft); color: var(--award); line-height: 1.4; }
.links-inline { display: flex; gap: 14px; font-size: .85rem; margin-left: auto; }
.empty { color: var(--muted); padding: 28px 0; }

/* detail */
.paper { min-width: 0; }
.back { font-size: .88rem; text-decoration: none; }
.paper .kind { margin-top: 20px; }
.paper h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-top: 8px; overflow-wrap: anywhere; }
.paper .authors { margin-top: 14px; font-size: .95rem; }
.paper .venue { margin-top: 4px; font-size: .9rem; }
.paper .meta { margin-top: 14px; }
figure { margin: 32px 0 0; }
.fig { max-width: 100%; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.fig img { width: 100%; height: auto; display: block; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.paper .summary { margin-top: 28px; }
.paper .summary p { margin: 0 0 16px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { font-size: .86rem; padding: 8px 14px; border-radius: 4px; text-decoration: none; border: 1px solid var(--accent); color: var(--accent); font-weight: 500; }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn:hover { background: var(--accent-soft); }
.btn.primary:hover { background: var(--accent); opacity: .9; }
.related { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 20px; }
.related h2 { font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .paper .back { display: none; } }

/* artwork */
.art-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 24px; }
.art-item a { color: inherit; text-decoration: none; display: block; }
.art-item a:hover .art-title { color: var(--accent); text-decoration: underline; }
.art-thumb {
  aspect-ratio: 16 / 9; max-width: 100%; border-radius: 4px; overflow: hidden; border: 1px solid var(--line);
  background: var(--accent-soft); display: grid; place-items: center; color: var(--muted); font-size: .75rem;
}
.art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.art-body { display: grid; gap: 2px; margin-top: 12px; justify-items: start; }
.art-title { font-weight: 600; font-size: 1rem; line-height: 1.4; }

footer { border-top: 1px solid var(--line); }
.ai-link { color: var(--muted); text-decoration: underline; text-decoration-style: dotted; }
.ai-link:hover { color: var(--accent); }
footer .wrap { padding-block: 24px; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .35s ease-out both; }
  @keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
}

/* about: topic cards */
.cards-head { font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 36px 0 14px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--muted); }
.card-kw { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tc); }
.card-name { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.card-blurb { font-size: .88rem; color: var(--muted); line-height: 1.55; flex: 1; }
.card-foot { font-size: .8rem; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* artwork detail */
.art-page { max-width: 880px; margin-inline: auto; }
.art-page h3 { font-size: 1.05rem; margin: 0 0 8px; }
.art-page .venue { margin-top: 6px; font-size: .95rem; }
.videos { display: grid; gap: 14px; margin-top: 28px; }
.video { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.secret { margin-top: 56px; font-size: .84rem; color: var(--muted); }
.secret a { color: var(--muted); }
.secret a:hover { color: var(--accent); }
button.yt { all: unset; display: block; width: 100%; cursor: pointer; }
button.yt:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.art-thumb { position: relative; }
.art-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 2rem; text-shadow: 0 2px 10px rgba(0,0,0,.5); opacity: .85; }
button.yt:hover .play { opacity: 1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 24px; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.gallery { align-items: start; }
.gallery img { width: 100%; height: auto; display: block; }
.art-sec { margin-top: 40px; }
.art-sec .gallery { margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.art-sec p { margin: 0 0 12px; }
.credits { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .88rem; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
@media (max-width: 600px) { .credits { grid-template-columns: 1fr; gap: 2px; } .credits dd { margin-bottom: 8px; } }
figure.stack { display: grid; gap: 10px; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .gallery.two { grid-template-columns: 1fr; } }
.t-short { display: none; }
@media (max-width: 860px) { .t-short { display: inline; } .t-full { display: none; } }
