:root {
  --text: #1a1a1a;
  --muted: #666;
  --link: #1772d0;
  --link-hover: #f09228;
  --highlight: #e3f2fd;
  --award: #c62828;
  --code-bg: #f5f5f5;
  --border: #e5e5e5;
  --bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e6;
    --muted: #9a9a9a;
    --link: #6cb0f5;
    --link-hover: #f5a84c;
    --highlight: #15283a;
    --award: #ff8a80;
    --code-bg: #1f1f1f;
    --border: #333;
    --bg: #121212;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
strong, b { font-weight: 700; }

.container { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; }

h2 { font-size: 22px; font-weight: 400; margin: 40px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin: -6px 0 4px; }

/* ── 상단 메뉴 ── */
.site-nav {
  max-width: 800px; margin: 0 auto; padding: 16px 16px 0;
  display: flex; justify-content: flex-end; align-items: center;
  font-size: 15px;
}
.nav-links a { margin-left: 20px; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { border-bottom: 2px solid var(--link); padding-bottom: 2px; }

/* ── 상단 소개 ── */
.intro { display: flex; gap: 32px; align-items: center; }
.intro-text { flex: 1; }
.name { text-align: center; font-size: 32px; font-weight: 400; margin: 0 0 16px; }
.interests { margin: 0 0 12px; }
.links { text-align: center; }
.intro-photo img {
  width: 200px; height: 200px; object-fit: cover; border-radius: 50%;
  background: var(--code-bg);
}

/* ── 글 목록 ── */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 4px 0; }

/* ── 논문 ── */
.pub { display: flex; gap: 20px; padding: 16px 12px; border-radius: 6px; }
.pub.highlight { background: var(--highlight); }
.pub-img { width: 160px; flex-shrink: 0; }
.pub-img img { width: 100%; border-radius: 4px; }
.pub-title { font-weight: 700; font-size: 16px; }
.award { color: var(--award); margin-left: 8px; }
.pub-summary { margin: 6px 0 0; }

/* ── 소식 ── */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: flex; gap: 16px; padding: 3px 0; }
.news-date { flex-shrink: 0; width: 72px; color: var(--muted); }

/* ── 학력 ── */
.edu { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.edu .muted { white-space: nowrap; }

/* ── 블로그 글 ── */
.back { margin: 0 0 24px; }
.post-title { font-size: 32px; font-weight: 700; line-height: 1.25; margin: 0 0 6px; }
.post-meta { color: var(--muted); margin: 0 0 28px; }
.post-cover { width: 100%; border-radius: 6px; margin-bottom: 24px; }
.post-body { font-size: 17px; line-height: 1.75; }
.post-body h2 { font-size: 24px; font-weight: 700; margin-top: 36px; }
.post-body h3 { font-size: 19px; margin-top: 28px; }
.post-body img { max-width: 100%; border-radius: 4px; }
.post-body blockquote {
  margin: 20px 0; padding: 4px 16px; color: var(--muted);
  border-left: 3px solid var(--border);
}
.post-body code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.88em;
  background: var(--code-bg); padding: 2px 5px; border-radius: 4px;
}
.post-body pre {
  background: var(--code-bg); padding: 14px 16px; border-radius: 6px; overflow-x: auto;
}
.post-body pre code { background: none; padding: 0; }
.post-body .katex-display { overflow-x: auto; overflow-y: hidden; }
.share { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); }

/* ── CV ── */
.cv-actions { margin: 0 0 16px; }
.cv-frame {
  display: block; width: 100%; height: 1100px;
  border: 1px solid var(--border); border-radius: 6px;
}

footer { margin-top: 56px; text-align: center; font-size: 13px; color: var(--muted); }

/* ── 모바일 ── */
@media (max-width: 640px) {
  .intro { flex-direction: column-reverse; gap: 16px; }
  .intro-photo img { width: 140px; height: 140px; }
  .pub { flex-direction: column; gap: 10px; }
  .pub-img { width: 100%; max-width: 320px; }
  .edu { flex-direction: column; gap: 0; }
  .news li { flex-direction: column; gap: 0; }
  .post-title { font-size: 26px; }
  .cv-frame { height: 75vh; }
}
