/* ============================================================
 *  색상·글꼴은 아래 변수만 바꾸면 사이트 전체에 적용됩니다.
 *  --accent : 포인트 색 (링크, 배지, 버튼 강조)
 * ============================================================ */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1d1c1a;
  --text-2: #56524c;
  --text-3: #8b867e;
  --border: #e5e1d8;
  --accent: #0d7a64;
  --accent-text: #0a6453;
  --accent-soft: #e4f2ed;
  --hot: #d6453d;
  --shadow: 0 1px 2px rgba(29, 28, 26, 0.04), 0 6px 20px -8px rgba(29, 28, 26, 0.08);
  --radius: 16px;
  --maxw: 880px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111312;
  --surface: #191c1b;
  --surface-2: #232725;
  --text: #ecebe6;
  --text-2: #b3afa7;
  --text-3: #85817a;
  --border: #2b2f2d;
  --accent: #4ccfa9;
  --accent-text: #74dcbd;
  --accent-soft: rgba(76, 207, 169, 0.11);
  --hot: #ff7a70;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent-text);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
b,
strong {
  font-weight: 650;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--text);
}
[data-theme="dark"] .i-moon,
:root:not([data-theme="dark"]) .i-sun {
  display: none;
}

/* ---------- main / footer ---------- */
main {
  padding-top: 28px;
  padding-bottom: 72px;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}
.site-footer p {
  margin: 0;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 36px;
  padding: 36px 40px;
}
.name {
  margin: 0 0 8px;
  font-size: clamp(30px, 4.6vw, 40px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.name-local {
  margin-left: 4px;
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-3);
  vertical-align: middle;
}
.position {
  margin: 0;
  font-weight: 600;
}
.affils {
  margin: 2px 0 0;
  color: var(--text-2);
}
.hero-groups {
  margin-top: 18px;
}
.hero-groups ul {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  transform: translateY(-1px);
}
.hero-photo {
  width: 200px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.35);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- callout ---------- */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.callout .icon {
  margin-top: 4px;
  color: var(--accent);
}
.callout p {
  margin: 0;
}

/* ---------- about ---------- */
.about {
  margin-top: 16px;
  padding: 26px 30px;
}
.prose p {
  margin: 0 0 0.8em;
}
.prose p:last-child {
  margin-bottom: 0;
}
.about-more {
  margin-top: 0.8em;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-3);
}
.btn-ghost .icon {
  transition: transform 0.2s;
}
.btn-ghost[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}
.interests {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- sections ---------- */
.section {
  margin-top: 52px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.more-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.more-link:hover {
  color: var(--accent-text);
  text-decoration: none;
}
.more-link:hover .icon {
  transform: translateX(2px);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-head {
  margin: 16px 0 26px;
}
.page-head h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.page-head p {
  margin: 6px 0 0;
  color: var(--text-2);
}
.page-foot {
  margin-top: 28px;
  text-align: right;
}
.group + .group {
  margin-top: 32px;
}
.group > .eyebrow {
  margin: 0 0 12px;
}

/* ---------- news ---------- */
.news {
  margin: 0;
  padding: 4px 26px;
  list-style: none;
}
.news li {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.news li:first-child {
  border-top: 0;
}
.news time {
  padding-top: 2px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  white-space: nowrap;
}
.news p {
  margin: 0;
}
.new-badge {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--hot);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}
[data-theme="dark"] .new-badge {
  color: #1a0d0c;
}

/* ---------- publications ---------- */
.pub {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: 22px;
  padding: 18px;
}
.pub-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 18% 22%, hsl(var(--h) 72% 82%), transparent 58%),
    radial-gradient(circle at 85% 80%, hsl(calc(var(--h) + 70) 65% 80%), transparent 55%),
    hsl(var(--h) 28% 94%);
}
.thumb-ph span {
  padding: 0 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: hsl(var(--h) 35% 28%);
  opacity: 0.8;
}
[data-theme="dark"] .thumb-ph {
  background:
    radial-gradient(circle at 18% 22%, hsl(var(--h) 45% 30%), transparent 58%),
    radial-gradient(circle at 85% 80%, hsl(calc(var(--h) + 70) 40% 26%), transparent 55%),
    hsl(var(--h) 14% 16%);
}
[data-theme="dark"] .thumb-ph span {
  color: hsl(var(--h) 50% 82%);
}
.pub-body {
  min-width: 0;
}
.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}
.badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}
.badge-hot {
  background: color-mix(in srgb, var(--hot) 13%, transparent);
  color: var(--hot);
}
.venue-full {
  font-size: 12.5px;
  color: var(--text-3);
}
.pub-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.015em;
}
.pub-title a {
  color: var(--text);
}
.pub-title a:hover {
  color: var(--accent-text);
}
.pub-authors {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
}
.pub-authors .me {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.pub-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-3);
}
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-sm .icon {
  width: 14px;
  height: 14px;
}
.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
}
.btn-sm[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--text);
}
.bibtex {
  position: relative;
  margin-top: 12px;
}
.bibtex pre {
  margin: 0;
  padding: 40px 16px 14px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
}
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.copy .icon {
  width: 13px;
  height: 13px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.filter:hover {
  color: var(--text);
}
.filter[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.filter .count {
  margin-left: 2px;
  opacity: 0.6;
}
.year-group {
  margin-top: 30px;
}
.year {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- experience ---------- */
.exp {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 20px 24px;
}
.exp-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.logo-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: hsl(var(--h) 50% 92%);
  color: hsl(var(--h) 45% 30%);
  font-size: 16px;
  font-weight: 700;
}
[data-theme="dark"] .exp-logo {
  background: var(--surface-2);
}
[data-theme="dark"] .logo-ph {
  background: hsl(var(--h) 25% 20%);
  color: hsl(var(--h) 55% 80%);
}
.exp-body {
  min-width: 0;
}
.exp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
}
.exp-top h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.period {
  font-size: 13.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.exp-org {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--text-2);
}
.sep {
  color: var(--text-3);
}
.exp-note {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: var(--text-2);
}
.exp-details {
  margin-top: 12px;
}
.exp-details summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.exp-details summary::-webkit-details-marker {
  display: none;
}
.exp-details summary:hover {
  color: var(--text);
}
.exp-details summary .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}
.exp-details[open] summary .icon {
  transform: rotate(180deg);
}
.exp-details ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--text-2);
}
.exp-list {
  margin: 0;
  padding: 4px 24px;
  list-style: none;
}
.exp-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.exp-row:first-child {
  border-top: 0;
}
.exp-row .exp-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.exp-row .logo-ph {
  font-size: 14px;
}
.exp-row strong {
  display: block;
  line-height: 1.4;
}
.exp-row strong a {
  color: var(--text);
}
.exp-row .sub,
.exp-row .muted {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.exp-row .muted {
  font-size: 13.5px;
  color: var(--text-3);
}
.list-foot {
  padding: 0 24px 20px;
}
.list-foot .btn-ghost {
  margin-top: 0;
}

/* ---------- honors ---------- */
.honors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.honor {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
}
.year-badge {
  flex: none;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.honor h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.45;
}
.honor-org {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.honor-desc {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--text-3);
}
.honor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* ---------- entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  main > * {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  main > :nth-child(2) { animation-delay: 0.05s; }
  main > :nth-child(3) { animation-delay: 0.1s; }
  main > :nth-child(4) { animation-delay: 0.15s; }
  main > :nth-child(n + 5) { animation-delay: 0.2s; }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 680px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 22px;
  }
  .hero-photo {
    order: -1;
    width: 120px;
    border-radius: 16px;
  }
  .about {
    padding: 22px;
  }
  .pub {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }
  .honors {
    grid-template-columns: 1fr;
  }
  .exp {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 18px;
  }
  .exp > .exp-logo {
    width: 44px;
    height: 44px;
  }
  .news {
    padding: 4px 20px;
  }
  .exp-list {
    padding: 4px 18px;
  }
  .list-foot {
    padding: 0 18px 18px;
  }
}
@media (max-width: 560px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px 8px;
    row-gap: 6px;
  }
  .theme-toggle {
    margin-left: auto;
    width: 32px;
    height: 32px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .nav-links a {
    padding: 5px 8px;
    font-size: 13.5px;
  }
  .news li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .exp-row {
    grid-template-columns: 44px 1fr;
  }
  .exp-row .period {
    grid-column: 2;
    margin-top: -8px;
  }
}
