:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #1b1b2b;
  --text-soft: var(--text-soft);
  --muted: #6c6c82;
  --line: #ecebf3;
  --accent: #6d5efc;
  --accent-ink: #4b3fd6;
  --accent-soft: #efecff;
  --accent2: #ff7a90;
  --mint: #14c8a6;
  --amber: #ffb020;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(27,27,43,.04), 0 8px 24px rgba(27,27,43,.06);
  --shadow-hover: 0 2px 4px rgba(27,27,43,.05), 0 18px 40px rgba(109,94,252,.14);
  --maxw: 860px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* soft ambient blobs */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 420px at 12% -6%, rgba(109,94,252,.14), transparent 60%),
    radial-gradient(480px 380px at 98% 4%, rgba(255,122,144,.12), transparent 60%),
    radial-gradient(600px 500px at 60% 105%, rgba(20,200,166,.08), transparent 60%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Outfit", sans-serif; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0; }

/* ---------- nav ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: rgba(247,247,251,.72);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-family: "Outfit"; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 7px 12px; border-radius: 999px; transition: .18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-ink); background: var(--accent-soft); }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 96px; }
section { padding-top: 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Outfit"; font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.section-title { font-size: 30px; margin-bottom: 8px; }
.section-sub { color: var(--muted); margin: 0 0 28px; font-size: 15.5px; }

/* ---------- hero ---------- */
.hero { padding-top: 56px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.hi { display: inline-flex; align-items: center; gap: 8px; font-family: "Outfit"; font-weight: 600; color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.hi .wave { display: inline-block; animation: wave 2.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 10%{transform:rotate(16deg)} 20%{transform:rotate(-8deg)} 30%{transform:rotate(16deg)} 40%{transform:rotate(-4deg)} 50%{transform:rotate(10deg)} }
.hero h1 { font-size: 46px; font-weight: 800; margin-bottom: 10px; }
.hero h1 .kr { font-size: 26px; color: var(--muted); font-weight: 600; margin-left: 8px; }
.role { font-family: "Outfit"; font-weight: 600; font-size: 19px; margin-bottom: 6px; }
.role .hl { color: var(--accent-ink); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 2px; }
.affil { color: var(--muted); font-size: 15.5px; margin-bottom: 20px; }
.affil a { color: var(--accent-ink); font-weight: 500; border-bottom: 1.5px solid var(--accent-soft); }
.links { display: flex; flex-wrap: wrap; gap: 9px; }
.links a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: .18s;
}
.links a:hover { transform: translateY(-2px); border-color: transparent; box-shadow: var(--shadow-hover); color: var(--accent-ink); }
.links svg { width: 16px; height: 16px; }
.avatar-wrap { position: relative; }
.avatar {
  width: 172px; height: 172px; border-radius: 32px; object-fit: cover;
  box-shadow: var(--shadow); border: 4px solid var(--surface);
}
.avatar-wrap::after {
  content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 42px;
  background: conic-gradient(from 120deg, var(--accent), var(--accent2), var(--mint), var(--accent));
  filter: blur(14px); opacity: .35;
}
.badge-float {
  position: absolute; bottom: -10px; left: -14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 14px; padding: 7px 12px; font-size: 13px; font-weight: 600; font-family: "Outfit";
  display: flex; align-items: center; gap: 6px;
}

/* ---------- research cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card .emoji { font-size: 26px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 14px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .tags span { font-size: 11.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.intro-p { font-size: 16px; color: var(--text-soft); max-width: 62ch; }

/* ---------- publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: "Outfit"; font-weight: 600; font-size: 13.5px;
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: .16s;
}
.chip:hover { color: var(--accent-ink); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 16px rgba(109,94,252,.3); }
.pub-group { margin-bottom: 30px; }
.pub-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pub-group-head h3 { font-size: 16px; }
.pub-count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--line); padding: 2px 9px; border-radius: 999px; }
.pub {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px; margin-bottom: 10px; transition: .18s;
}
.pub:hover { border-color: var(--accent-soft); box-shadow: var(--shadow); transform: translateX(3px); }
.pub-title { font-family: "Outfit"; font-weight: 600; font-size: 15.5px; line-height: 1.4; margin-bottom: 5px; }
.pub-meta { font-size: 13.5px; color: var(--muted); }
.pub-authors b { color: var(--text); }
.pub-venue { font-style: normal; }
.pub-venue .v { color: var(--accent-ink); font-weight: 600; }
.pub-links { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap; }
.pub-links a {
  font-size: 12px; font-weight: 600; font-family: "Outfit";
  padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); transition: .15s;
}
.pub-links a:hover { background: var(--accent); color: #fff; }
.star { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; font-family:"Outfit"; color: var(--amber); }

/* ---------- news ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.news li:last-child { border-bottom: 0; }
.news .date { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--accent-ink); white-space: nowrap; padding-top: 1px; min-width: 74px; }
.news .what { font-size: 15px; }

/* ---------- awards ---------- */
.awards { columns: 2; column-gap: 28px; }
.award { break-inside: avoid; display: flex; gap: 12px; padding: 8px 0; font-size: 14px; }
.award .yr { font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.award .t { color: var(--text-soft); }

/* ---------- contact / footer ---------- */
.contact-card {
  background: linear-gradient(135deg, #1b1b2b, #2a2450);
  color: #fff; border-radius: 28px; padding: 40px; text-align: center; box-shadow: var(--shadow);
}
.contact-card h2 { color: #fff; font-size: 28px; margin-bottom: 8px; }
.contact-card p { color: #b9b7d6; margin: 0 0 22px; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); transition: .18s;
}
.contact-links a:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 0 8px; }

/* ---------- education & experience ---------- */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cv-col-title { font-size: 15px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.tl { position: relative; }
.tl-item { position: relative; padding: 0 0 18px 20px; border-left: 2px solid var(--line); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-when { font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--accent-ink); }
.tl-what { font-size: 14.5px; color: var(--text-soft); margin-top: 2px; }
.tl-what b { color: var(--text); }

/* ---------- show more ---------- */
.show-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; cursor: pointer;
  font-family: "Outfit"; font-weight: 600; font-size: 13px; color: var(--accent-ink);
  background: var(--accent-soft); border: 0; padding: 8px 15px; border-radius: 999px; transition: .16s;
}
.show-more:hover { background: var(--accent); color: #fff; }
.show-more .ar { transition: transform .2s; }
.show-more.open .ar { transform: rotate(180deg); }

code { font-family: "JetBrains Mono", monospace; font-size: .88em; background: var(--accent-soft); color: var(--accent-ink); padding: 1px 6px; border-radius: 6px; }

/* ---------- diffusion (masked-denoise) reveal ---------- */
.dz-char { transition: filter .55s cubic-bezier(.22,.7,.25,1), opacity .55s ease, color .55s ease; }
.dz-char.masked { filter: blur(5px); opacity: .12; color: var(--accent); }
.role { cursor: default; width: fit-content; }
@media (prefers-reduced-motion: no-preference) {
  .avatar-wrap::after { animation: ringspin 10s linear infinite; }
}
@keyframes ringspin { to { transform: rotate(360deg); } }

/* interactive noise->denoise field + timestep HUD */
.hero { position: relative; }
.hero > div { position: relative; z-index: 1; }
.hero-field { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.dz-step {
  position: absolute; top: 0; right: 0; z-index: 2;
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; letter-spacing: .02em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 4px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  opacity: 0; transition: opacity .45s ease; pointer-events: none; white-space: nowrap;
}
.dz-step.on { opacity: 1; }
.dz-step .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dzpulse 1s ease-in-out infinite; }
@keyframes dzpulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(.55); opacity: .5 } }

/* ---------- dark mode ---------- */
:root[data-theme="dark"] {
  --bg: #0e0f16;
  --surface: #181a24;
  --text: #e9e9f3;
  --text-soft: #c6c6d8;
  --muted: #9494ab;
  --line: #262838;
  --accent: #8b7dff;
  --accent-ink: #b7adff;
  --accent-soft: #241f3d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.5);
}
:root[data-theme="dark"] nav { background: rgba(14,15,22,.72); }
:root[data-theme="dark"] .pub-count { color: var(--text); }
body, nav { transition: background-color .35s ease, border-color .35s ease; }

.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  width: 36px; height: 36px; border-radius: 999px; cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: .18s; flex: none;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- award trophy + tooltip ---------- */
.trophy { position: relative; cursor: help; font-size: .92em; margin-left: 5px; outline: none; }
.trophy::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--text); color: var(--bg);
  font-family: "Inter", sans-serif; font-size: 12px; font-weight: 500; line-height: 1.4; text-align: center;
  padding: 7px 11px; border-radius: 9px; width: max-content; max-width: 230px;
  opacity: 0; pointer-events: none; transition: .16s; z-index: 30; box-shadow: var(--shadow-hover);
}
.trophy::before {
  content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--text); opacity: 0; transition: .16s; z-index: 30;
}
.trophy:hover::after, .trophy:focus::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.trophy:hover::before, .trophy:focus::before { opacity: 1; }

/* ---------- selected papers strip ---------- */
.selected-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
.sel-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 16px; padding: 16px; box-shadow: var(--shadow); transition: .2s; position: relative;
}
.sel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.sel-badge { font-family: "Outfit"; font-weight: 700; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent-ink); }
.sel-title { font-family: "Outfit"; font-weight: 600; font-size: 14.5px; line-height: 1.35; margin: 5px 0 6px; color: var(--text); }
.sel-meta { font-size: 12.5px; color: var(--muted); }

/* ---------- cite button ---------- */
.pub-links button.cite {
  font-size: 12px; font-weight: 600; font-family: "Outfit"; cursor: pointer;
  padding: 4px 11px; border-radius: 999px; background: transparent; color: var(--muted);
  border: 1px solid var(--line); transition: .15s;
}
.pub-links button.cite:hover { color: var(--accent-ink); border-color: var(--accent-soft); background: var(--accent-soft); }

/* trophy inside the Recognition list */
.award .trophy { margin-left: 0; margin-right: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .selected-strip { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; text-align: left; }
  .avatar-wrap { order: -1; }
  .avatar { width: 120px; height: 120px; border-radius: 26px; }
  .hero h1 { font-size: 34px; }
  .cards { grid-template-columns: 1fr; }
  .cv-grid { grid-template-columns: 1fr; }
  .awards { columns: 1; }
  .nav-links { display: none; }
  .dz-step { display: none; }
  .contact-card { padding: 28px 20px; }
}
