/* Layout: 학자 개인 사이트처럼 절제된 구성 — 흰 바탕, 오른쪽 위 메뉴, 페이지마다 가운데 큰 가는 제목, 본문은 카드 없이 글줄로. 제목 색만 대표 사진의 초록 계열 */
:root {
  --bg: #FFFFFF;
  --ink: #1D2320;
  --muted: #69736D;
  --line: #E6EAE7;
  --accent: #2E6B4A;     /* 페이지 제목·링크 */
  --tint: #EEF7F1;       /* 뉴스레터 칸 바탕 */
  --latin: "Lato", "Noto Sans KR", system-ui, sans-serif;
  --body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #121614; --ink: #E4EAE6; --muted: #98A39C; --line: #28302C; --accent: #8FD1AA; --tint: #1A2420; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #121614; --ink: #E4EAE6; --muted: #98A39C; --line: #28302C; --accent: #8FD1AA; --tint: #1A2420; color-scheme: dark; }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15.5px; line-height: 1.8; font-weight: 400; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }

.draft-note { background: var(--tint); color: var(--accent); font-size: 12.5px; text-align: center; padding-block: 6px; padding-inline: 16px; }

header.top { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 18px; padding-inline: 24px; }
.brand .hj { color: var(--muted); font-size: 15px; margin-left: 2px; }
.name-story { word-break: keep-all; max-width: 680px; margin: 56px auto 0; text-align: center; }
.name-story .ns-title { font-size: 20px; color: var(--ink); margin: 0; }
.name-story .ns-title .hj { color: var(--accent); margin-left: 6px; }
.name-story .verse { margin: 18px 0 4px; font-size: 17px; letter-spacing: .12em; color: var(--accent); }
.name-story .verse-ko { font-size: 13px; color: var(--muted); margin: 0; }
.name-story .verse-tr { font-size: 15.5px; color: var(--ink); margin: 10px 0 22px; }
.name-story .ns-body p { font-size: 14.5px; line-height: 1.9; color: var(--muted); margin: 0 0 6px; }
.brand { font-family: var(--body); font-size: 18px; font-weight: 400; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-family: var(--latin); font-size: 15px; }
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

main { max-width: 980px; margin: 0 auto; padding-inline: 20px; padding-block: 8px 80px; }
.page-title { font-family: var(--latin); font-weight: 300; font-size: clamp(40px, 6vw, 60px); color: var(--accent); text-align: center; letter-spacing: 0.01em; padding-block: 28px 44px; }
.lead { color: var(--muted); text-align: center; max-width: 60ch; margin: -24px auto 40px; font-size: 14.5px; }

/* About */
.about { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.about figure { margin: 0; }
.about img.portrait { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; background: #AAE1B6; }
.about .text { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 64ch; }
.tagline { font-family: var(--latin); font-size: 19px; line-height: 1.6; font-weight: 400; }
.role { font-family: var(--latin); font-size: 14px; color: var(--muted); }
.role strong { color: var(--ink); font-weight: 700; }
.about .text hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.socials { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 12px; }
.socials a { position: relative; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.socials a:hover { border-color: var(--muted); }
.socials img { width: 20px; height: 20px; object-fit: contain; display: block; }
.socials .badge { position: absolute; right: -6px; bottom: -6px; width: 18px; height: 18px; border-radius: 50%; background: #7A2436; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.socials .badge svg { width: 10px; height: 10px; }

.newsletter { margin-top: 64px; padding: 36px 32px; background: var(--tint); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.nl-name { font-size: clamp(24px, 3.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.nl-name .ho { color: var(--accent); }
.nl-meaning { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; color: var(--muted); }
.nl-meaning .hanja { font-size: 20px; color: var(--ink); letter-spacing: 0.08em; }
.nl-meaning .en { font-family: var(--latin); font-style: italic; }
.nl-desc { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.subscribe { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.sub-btn { display: inline-block; padding: 13px 28px; background: var(--accent); color: var(--bg); font-weight: 500; font-size: 16px; border-radius: 4px; text-decoration: none; }
.sub-btn:hover { opacity: .9; }
.newsletter label { font-size: 13px; color: var(--muted); }
.newsletter .row { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input { flex: 1 1 200px; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; font-family: var(--body); border-radius: 4px; }
.newsletter button { padding: 11px 20px; border: 0; background: var(--accent); color: var(--bg); font-weight: 500; font-size: 15px; font-family: var(--body); border-radius: 4px; cursor: pointer; }
.newsletter .fine { font-size: 12.5px; color: var(--muted); }

.highlights h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }
.highlights ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.highlights li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
.highlights .d { font-family: var(--latin); color: var(--muted); font-variant-numeric: tabular-nums; }
.highlights a { color: var(--ink); text-decoration-color: var(--line); }
.highlights a:hover { color: var(--accent); }

/* 목록형 페이지 공통 */
.year { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px; padding-block: 18px; border-top: 1px solid var(--line); }
.year h3 { font-family: var(--latin); font-weight: 300; font-size: 26px; color: var(--accent); line-height: 1.3; }
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entries li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
.entries .d { font-family: var(--latin); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.entries a { color: var(--ink); text-decoration-color: var(--line); }
.entries a:hover { color: var(--accent); text-decoration-color: currentColor; }
.entries .sub { display: block; font-size: 14px; color: var(--muted); }
.entries .outlet { font-weight: 500; margin-right: 8px; }
.entries li.hl { background: var(--tint); margin-inline: -10px; padding: 6px 10px; border-left: 3px solid var(--accent); }
.entries .tag { font-size: 11.5px; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0 6px; margin-right: 8px; vertical-align: 1px; }

.feature { text-align: center; margin: 0 auto 36px; max-width: 640px; }
.gallery-old { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 48px; }
.gallery figure { margin: 0; min-width: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--line); }
.gallery figcaption { font-size: 12.5px; color: var(--muted); padding-top: 6px; line-height: 1.5; }
.feature .kicker { font-family: var(--latin); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.feature h2 { font-size: 21px; font-weight: 500; line-height: 1.5; margin-block: 6px 8px; }
.other { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.other h3, .cv h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--ink); margin-bottom: 10px; }
.other ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 40px; font-size: 14.5px; }

.carousel { position: relative; margin-bottom: 44px; }
.track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 auto; scroll-snap-align: start; }
.slide img { height: clamp(220px, 38vw, 380px); width: auto; max-width: 86vw; object-fit: cover; display: block; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.nav-btn.prev { left: -8px; } .nav-btn.next { right: -8px; }
@media (prefers-reduced-motion: reduce) { .track { scroll-behavior: auto; } }
.talk-list { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; columns: 2; column-gap: 48px; }
.talk-list li { break-inside: avoid; padding-block: 9px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.talk-list .host { display: block; font-size: 12.5px; color: var(--muted); }
.talk-list a { color: var(--ink); text-decoration-color: var(--line); }
.talk-list a:hover { color: var(--accent); }

.sub-title { font-family: var(--latin); font-weight: 300; font-size: clamp(26px, 4vw, 34px); color: var(--accent); text-align: center; margin-top: 64px; padding-bottom: 36px; }

.videos { list-style: none; margin: 0 auto 8px; padding: 0; max-width: 860px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.videos a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding-block: 10px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.videos a:hover .vt { color: var(--accent); }
.videos .play { width: 28px; margin-top: 4px; }
.videos .play img { width: 28px; height: auto; display: block; }
.videos .ch { display: block; font-size: 12.5px; color: var(--muted); }
.videos .vt { display: block; font-size: 15px; line-height: 1.5; }

.tgroup { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; padding-block: 28px; border-top: 1px solid var(--line); }
.tg-head { display: flex; flex-direction: column; gap: 2px; }
.tg-en { font-family: var(--latin); font-weight: 300; font-size: 26px; color: var(--accent); line-height: 1.2; }
.tg-head h3 { font-size: 14px; font-weight: 500; color: var(--ink); }
.tg-n { font-family: var(--latin); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tiles li { background: var(--tint); padding: 12px 14px; border-radius: 6px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; }
.tiles li.wide { grid-column: 1 / -1; }
.tiles .host b { color: var(--accent); font-weight: 500; }
.tiles .host { font-size: 12px; color: var(--muted); line-height: 1.4; order: 2; }
.tiles .ev { font-size: 14.5px; font-weight: 500; line-height: 1.45; }

.hcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin: 0 auto 32px; }
.hcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; min-width: 0; }
.hcard:hover { border-color: var(--accent); }
.hcard .hd { font-family: var(--latin); font-size: 13px; color: var(--accent); }
.hcard .ht { font-size: 14.5px; line-height: 1.5; font-weight: 500; }

.talks-tiles { max-width: 980px; margin: 0 auto; }
.talks-tiles li { gap: 3px; }
.talks-tiles .org { font-size: 14.5px; font-weight: 500; line-height: 1.45; display: flex; align-items: center; gap: 7px; }
.talks-tiles .gov { width: 18px; height: 18px; flex-shrink: 0; }
.talks-tiles .evn { font-size: 12px; color: var(--muted); line-height: 1.45; }
.talks-tiles .ptag { align-self: flex-start; font-size: 11px; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0 6px; margin-top: 2px; }
.talks-tiles li.more { background: transparent; border: 1px dashed var(--line); }
.talks-tiles li.more .org { color: var(--muted); font-weight: 400; }

/* 글 */
.posts { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.posts li { display: grid; grid-template-columns: 96px 64px minmax(0, 1fr); gap: 12px; padding-block: 14px; border-top: 1px solid var(--line); }
.posts .d { font-family: var(--latin); color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.posts .c { font-size: 13px; color: var(--accent); }
.posts .sample { font-size: 11px; color: var(--muted); margin-left: 6px; }

.wtabs { display: flex; justify-content: center; gap: 6px; margin: -8px auto 28px; }
.wtab { font-family: var(--body); font-size: 14px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.ltab { font-family: var(--body); font-size: 14px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); cursor: pointer; }
.ltab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.wtab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.posts-empty { text-align: center; color: var(--muted); font-size: 14.5px; padding-block: 24px; }

/* 글 본문 */
.post { max-width: 680px; margin: 0 auto; padding-top: 28px; }
.post-meta { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--latin); font-size: 13.5px; color: var(--muted); }
.post-meta a { color: var(--muted); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }
.post-title { font-size: clamp(26px, 4.4vw, 36px); font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; margin-block: 18px 36px; text-wrap: balance; }
.post-body { display: flex; flex-direction: column; gap: 22px; font-size: 17px; line-height: 1.95; }
.post-foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* 서재 */
.stacks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; max-width: 900px; margin: 0 auto 24px; align-items: end; }
.stack { min-width: 0; }
.stack-label { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.stack-label span { font-family: var(--latin); font-size: 20px; font-weight: 300; color: var(--accent); margin-right: 8px; }
.pile { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.book { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 8px 14px; background: var(--c); color: #F7F4EE; border-radius: 3px; text-decoration: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), inset 0 2px 0 rgba(255,255,255,.08); transition: transform .15s ease; }
.book:hover { transform: translateX(6px); }
.book .bt { font-size: 14px; font-weight: 500; line-height: 1.35; min-width: 0; }
.book .eb { font-size: 10px; font-weight: 400; opacity: .75; margin-left: 8px; border: 1px solid currentColor; border-radius: 2px; padding: 0 4px; vertical-align: 1px; }
.book .ba { font-size: 12px; opacity: .8; white-space: nowrap; flex-shrink: 0; }
.stack .board { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .book { transition: none; } }
.sample-tag { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); padding: 1px 8px; border-radius: 3px; margin-left: 6px; white-space: nowrap; }
.shelf { max-width: 860px; margin: 0 auto 40px; }
.shelf-label { text-align: center; font-size: 13px; color: var(--muted); padding-top: 10px; }
.shelf-label span { font-family: var(--latin); color: var(--accent); margin-right: 4px; }
.books { display: flex; align-items: flex-end; justify-content: safe center; gap: 6px; padding-top: 12px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
.books::-webkit-scrollbar { display: none; }
.spine { flex: 0 0 auto; width: 48px; height: 236px; text-decoration: none; background: var(--c); color: #F6F3EE; border-radius: 3px 3px 1px 1px; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: space-between; padding-block: 14px 10px; box-shadow: inset -4px 0 0 rgba(0,0,0,.14), inset 3px 0 0 rgba(255,255,255,.08); transition: transform .2s ease; }
.spine:hover { transform: translateY(-8px); }
.spine .st { font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-height: 160px; font-weight: 500; letter-spacing: .04em; }
.spine .sa { font-size: 10.5px; opacity: .8; }
.board { height: 14px; background: #B89A74; border-radius: 2px; box-shadow: 0 6px 12px -6px rgba(0,0,0,.35); }
@media (prefers-reduced-motion: reduce) { .spine { transition: none; } }
.notes-empty { text-align: center; color: var(--muted); font-size: 14.5px; max-width: 520px; margin: 0 auto; padding: 28px 20px; border: 1px dashed var(--line); border-radius: 6px; }
.spine.has-note { position: relative; cursor: pointer; }
.spine.has-note::after { content: ""; position: absolute; top: -10px; left: 50%; width: 10px; height: 22px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); transform: translateX(-50%); }
.notes { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.notes li { display: grid; grid-template-columns: 180px 120px minmax(0, 1fr); gap: 12px; padding-block: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.notes .bt { font-weight: 500; }
.notes .ba, .notes .bn { color: var(--muted); }

/* CV */
.cv[hidden] { display: none; }
.cv { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; font-size: 14.5px; }
.cv ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cv li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; }
.cv .d { font-family: var(--latin); color: var(--muted); font-variant-numeric: tabular-nums; }
.cv .sub { color: var(--muted); }
.cv figure { margin: 12px 0 0 164px; max-width: 380px; }
.cv figure img { width: 100%; display: block; }
.cv figcaption { font-size: 12.5px; color: var(--muted); padding-top: 6px; }

footer { text-align: center; font-size: 12.5px; color: var(--muted); padding-block: 28px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .about, .newsletter { grid-template-columns: 1fr; }
  .talk-list { columns: 1; }
  .notes li { grid-template-columns: 1fr; gap: 2px; }
  .stacks { grid-template-columns: 1fr; }
  .tgroup { grid-template-columns: 1fr; gap: 14px; }
  .hcards { grid-template-columns: 1fr 1fr; }
  .videos { grid-template-columns: 1fr; }
  .nav-btn { display: none; }
  .about figure { max-width: 220px; }
  .year { grid-template-columns: 1fr; gap: 6px; }
  .posts li { grid-template-columns: 1fr; gap: 2px; }
  .cv li { grid-template-columns: 1fr; gap: 0; }
  .cv figure { margin-left: 0; }
  .other ul { columns: 1; }
  .newsletter { padding: 28px 20px; }
  header.top { padding-inline: 16px; }
}

.post-body h2 { font-size: 21px; font-weight: 700; margin-top: 12px; }
.post-body h3 { font-size: 18px; font-weight: 700; }
.post-body blockquote { margin: 0; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.post-body img { max-width: 100%; height: auto; display: block; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0; }
.post-body a { color: var(--accent); }
.post-title { word-break: keep-all; }
