/* Pretendard Variable (subset: Latin + KS X 1001 Hangul, wght 400-800), SIL OFL 1.1, self-hosted */
@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  src: url('assets/fonts/PretendardVariable-subset.woff2') format('woff2-variations'),
       url('assets/fonts/PretendardVariable-subset.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --bg: #fafaf8;
  --ink: #111111;
  --muted: #6b6b66;
  --line: #e4e4de;
  --soft: #f0f0ea;
  --accent: #1f6f4a;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', 'Apple SD Gothic Neo', 'Segoe UI', Roboto, sans-serif;
  --measure: 1080px;

  /* aliases used by the CV page styles */
  --bg-color: var(--bg);
  --text-color: var(--ink);
  --text-muted: var(--muted);
  --primary-color: var(--accent);
  --primary-hover: #17573a;
  --accent-color: var(--soft);
  --border-color: var(--line);
  --card-bg: var(--bg);
  --font-body: var(--font);
  --font-heading: var(--font);
  --transition: none;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.7 var(--font);
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s ease, border-color .15s ease; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 6px 12px;
}
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* hairline underlined link */
a.u { border-bottom: 1px solid var(--line); }
a.u:hover, .nav a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- layout ---------- */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 28px; }

.site-header { padding: 26px 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font-weight: 700; letter-spacing: -0.02em; }
.nav { display: flex; gap: 28px; align-items: center; font-size: 15px; font-weight: 500; list-style: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; }

.menu-btn {
  background: none; border: 0; color: var(--ink); cursor: pointer;
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
}
.menu-btn:hover { color: var(--accent); }
.menu-btn { display: none; }

main { display: block; }

/* ---------- typography ---------- */
h1.name {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
}
h1.name .ko { font-weight: 500; color: var(--muted); }
h1.title { font-size: clamp(32px, 5vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; }
.lede { font-size: 19px; line-height: 1.65; max-width: 36em; margin-top: 18px; }
.stats { font-size: 14.5px; color: var(--muted); margin-top: 18px; }
.stats b { color: var(--ink); font-weight: 600; }
.stats a:hover { color: var(--accent); }
.contact { margin-top: 22px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.label {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.date { font-size: 14.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; padding: 72px 0 64px; }
.photo { width: 120px; height: 150px; object-fit: cover; border-radius: 4px; display: block; filter: grayscale(.15); flex-shrink: 0; }
.page-head { padding: 56px 0 28px; }

/* ---------- rows ---------- */
.row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 36px 0; border-top: 1px solid var(--line); }
.item { padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: none; padding-top: 0; }
.item .t { font-weight: 600; line-height: 1.5; }
.item .m { font-size: 14.5px; color: var(--muted); }
.item .a { font-size: 14.5px; line-height: 1.55; margin: 2px 0; }
.item .a strong { font-weight: 700; }
.item a.t:hover, .item .t a:hover { color: var(--accent); }
.row .item:last-child { border-bottom: none; }

/* badges (Oral / Poster / Award) */
.badge {
  display: inline-block; font-size: 12px; font-weight: 500; line-height: 1.5;
  padding: 0 8px; margin-left: 6px; vertical-align: 1px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
}
.badge.award { color: var(--accent); border-color: var(--accent); }

/* collapsible list */
details.fold summary {
  cursor: pointer; list-style: none; font-size: 15px; color: var(--muted); padding: 2px 0 14px;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: "+ "; color: var(--accent); }
details.fold[open] summary::before { content: "- "; }
details.fold summary:hover { color: var(--accent); }

/* ---------- publications page ---------- */
.subnav { display: flex; gap: 22px; font-size: 15px; margin-top: 18px; }
.subnav a:hover { color: var(--accent); }
.pub-section { padding: 36px 0; border-top: 1px solid var(--line); }
.pub-section > h2 { font-size: 22px; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 4px; }
.pub-section > h3 {
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 22px 0 8px;
}
.pub-section .count { color: var(--muted); font-weight: 500; font-size: 15px; }

/* ---------- research: keywords ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 18px; }
.tags li { font-size: 14px; padding: 2px 13px; border: 1px solid var(--line); border-radius: 99px; }

/* ---------- research list ---------- */
.proj { padding: 22px 0; border-top: 1px solid var(--line); }
.proj h3 { font-size: 19px; line-height: 1.4; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 4px; }
.projects .proj:first-child { border-top: none; padding-top: 0; }
.proj p { color: var(--muted); font-size: 15.5px; }

/* ---------- footer ---------- */
.site-footer { font-size: 13.5px; color: var(--muted); padding: 40px 0 56px; margin-top: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .hero { flex-direction: column-reverse; padding: 40px 0 40px; gap: 24px; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 66px; z-index: 50;
    flex-direction: column; align-items: flex-start; gap: 14px;
    background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 18px 20px;
  }
  .nav.open { display: flex; }
  .site-header { position: relative; }
}

/* gentle entrance: opacity and 10px rise, once per page load */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  main > section, main > .hero { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
  main > :nth-child(2) { animation-delay: .06s; }
  main > :nth-child(3) { animation-delay: .12s; }
  main > :nth-child(4) { animation-delay: .18s; }
  main > :nth-child(n+5) { animation-delay: .24s; }
  html { scroll-behavior: smooth; }

}
@media print {
  .site-header, .site-footer, .skip { display: none !important; }
}
