/* K: the old Google Sites home page rebuilt as it is. Sizes, colours and places are measured from www.dykim.me/home at 1319 px wide. */
/* colours: the old site's own in light; in dark the same roles on a near-black page. index.html sets data-theme before the first paint. */
:root { color-scheme: light; --bg: #fff; --ink: #000; --strong: #000; --ink-2: #434343; --nav: #1c1c1c; --link: #2b63c0; --head: #073763; --line: #d9d9d9; --rule: #666; --won: #c00; --chip: rgb(0 0 0 / 0.055); --chip-2: rgb(43 99 192 / 0.13); --lift: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 24px rgb(0 0 0 / 0.1); }
:root[data-theme="dark"] { color-scheme: dark; --bg: #1a1c20; --ink: #d9dde2; --strong: #f3f4f6; --ink-2: #a9b0b9; --nav: #e4e7eb; --link: #8ab4f8; --head: #a9cdf2; --line: #3e434b; --rule: #8b9199; --won: #ff7b72; --chip: rgb(255 255 255 / 0.08); --chip-2: rgb(138 180 248 / 0.18); --lift: 0 1px 2px rgb(0 0 0 / 0.5), 0 10px 28px rgb(0 0 0 / 0.5); }
/* Lato, kept with the site (latin subset) so no page waits on another host */
@font-face { font-family: Lato; font-weight: 400; font-display: swap; src: url("fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: Lato; font-weight: 700; font-display: swap; src: url("fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: Lato; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/lato-400-italic.woff2") format("woff2"); }
* { box-sizing: border-box; }
html { scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 16px/24px Lato, sans-serif; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
h1, h3, b { color: var(--strong); }   /* in dark, names and titles are a step brighter than the running text */
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
/* links in the text: a line draws in under them from the left */
main a:not(:has(img)) { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.28s ease; }
main a:not(:has(img)):hover { background-size: 100% 1px; }
button, .links a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* the bar: the page shows through it, blurred; a hairline appears under it once the page has moved */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; height: 56px; padding: 0 20px 0 28px; background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; color: var(--nav); animation: hairline linear both; animation-timeline: scroll(); animation-range: 0 64px; }
@keyframes hairline { to { border-bottom-color: var(--line); } }
.top a, .top button { color: inherit; font: 400 16px/23px Lato, sans-serif; white-space: nowrap; }
.top a:hover { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 20px !important; }
.brand img { width: 40px; height: 40px; object-fit: contain; transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.top nav { margin-left: auto; }
.navin { display: flex; align-items: center; gap: 2px; }
/* each entry is a soft pill: filled for the page you are on, filling under the pointer */
.navin > a, .drop > button { display: flex; align-items: center; gap: 2px; padding: 6px 13px; border: 0; border-radius: 999px; background: none; cursor: pointer; transition: background-color 0.2s ease; }
.navin > a:hover, .drop:hover > button, .drop:focus-within > button { background: var(--chip); }
.top [aria-current] { background: var(--chip); font-weight: 700; }
.drop { position: relative; }
.drop svg { width: 20px; height: 20px; margin-right: -6px; fill: currentColor; transition: transform 0.25s ease; }
.drop:hover svg, .drop:focus-within svg { transform: rotate(180deg); }
.drop ul { position: absolute; top: calc(100% + 6px); left: 0; min-width: 10rem; padding: 6px; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--lift); opacity: 0; visibility: hidden; transform: translateY(-4px) scale(0.98); transform-origin: 20% 0; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s; }
.drop ul::before { content: ""; position: absolute; inset: -8px 0 100% 0; }   /* keeps the menu open while the pointer crosses the gap */
.drop:hover ul, .drop:focus-within ul { opacity: 1; visibility: visible; transform: none; }
.drop li a { display: block; padding: 7px 12px; border-radius: 9px; transition: background-color 0.15s ease; }
.drop li a:hover { background: var(--chip); }
/* colour mode: one round button, one glyph. A sun for light, a moon for dark, a monitor while it follows the device */
.theme { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-left: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); color: inherit; cursor: pointer; transition: background-color 0.2s ease; }
.theme:hover { background: var(--chip-2); }
.theme svg { width: 18px; height: 18px; overflow: visible; transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1); }
.theme .orb { fill: currentColor; }
.theme .rays, .theme .sys { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme .orb, .theme .cut, .theme .rays, .theme .sys { transform-box: view-box; transform-origin: 12px 12px; transition: transform 0.55s cubic-bezier(0.3, 1.3, 0.5, 1), opacity 0.25s ease; }
.theme .cut { transform: translate(-14px, -12px); }
.theme .sys { stroke-linejoin: round; opacity: 0; transform: scale(0.4); }
[data-mode="dark"] .theme svg { transform: rotate(90deg); }   /* the sun turns clockwise into the moon; drawn a quarter turn back so it ends upright */
[data-mode="dark"] .theme .orb { transform: scale(1.75); }
[data-mode="dark"] .theme .cut { transform: none; }
[data-mode="dark"] .theme .rays, [data-mode="system"] .theme .rays { transform: rotate(-60deg) scale(0.3); opacity: 0; }
[data-mode="system"] .theme .orb { transform: scale(0); opacity: 0; }
[data-mode="system"] .theme .sys { opacity: 1; transform: none; }
/* under the pointer the glyph stirs: the sun's rays turn, the moon leans a little and grows, the monitor's stand dips */
.theme .sys path { transform-box: fill-box; transform-origin: center; transition: transform 0.3s ease; }
@media (hover: hover) {
  [data-mode="light"] .theme:hover .rays { transform: rotate(45deg); }
  [data-mode="dark"] .theme:hover svg { transform: rotate(76deg) scale(1.12); }
  [data-mode="system"] .theme:hover .sys path { transform: translateY(1.5px); }
  [data-mode="system"] .theme:hover .sys { transform: translateY(-1px); }
}
/* the menu button, phones only: three lines that turn into a cross */
.burger { display: none; flex: none; position: relative; width: 38px; height: 38px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.burger i { position: absolute; left: 10px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease; }
.burger i:nth-child(1) { top: 12px; } .burger i:nth-child(2) { top: 18px; } .burger i:nth-child(3) { top: 24px; }
.open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.open .burger i:nth-child(2) { transform: scaleX(0); opacity: 0; }
.open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* changing theme: the new colours open in a circle from the button (index.html sets where and how far) */
.vt .top { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: open 0.65s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes open { from { clip-path: circle(0 at var(--vx) var(--vy)); } to { clip-path: circle(var(--vr) at var(--vx) var(--vy)); } }

main { flex: 1; width: min(1200px, 90%); margin: 0 auto; }
section { border-top: 1px solid var(--line); }
section.intro { border-top: 0; }
/* twelve columns: the picture takes the first four (the portrait three, from the second), the words the other eight */
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.row > .txt { grid-column: 5 / 13; padding: 0 10px 0 16px; }

.intro { padding: 16px 0 33px; }
.intro .pic { grid-column: 2 / 5; padding: 0 16px 0 1px; }
.intro .pic img { width: 100%; }
h1 { margin-top: 12px; font-size: 32px; line-height: 44px; font-weight: 700; }
.role { margin-top: 2px; line-height: 29px; }
.role:first-of-type { margin-top: 25px; }
.rule { margin-top: 17px; font-size: 10.67px; line-height: 16px; color: var(--rule); }
.say { margin-top: 12px; }
/* a few lines on what the research is about */
.about { margin-top: 10px; max-width: 44rem; font-size: 14.67px; line-height: 23px; color: var(--ink-2); text-wrap: pretty; }
.mail { margin-top: 10px; }
/* the five links under the email: line glyphs on soft discs; under the pointer only the colour changes */
.social { display: flex; gap: 10px; margin: 16px 0 0 -3px; list-style: none; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--chip); color: var(--ink); background-size: auto; transition: background-color 0.2s ease, color 0.2s ease; }
.social a:hover { background: var(--chip-2); color: var(--link); }
/* its name (the link's aria-label) fades in above the disc; it does not move */
.social a { position: relative; }
.social b { font-size: 11.5px; letter-spacing: 0.02em; }
.social svg, .links svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.social svg { width: 17px; height: 17px; }
.links .mv { transform-box: fill-box; transform-origin: center; transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }

h2 { margin-top: 38px; padding-left: 8px; font-size: 26.67px; line-height: 37px; font-weight: 700; color: var(--head); }
h3 { font-size: 14.67px; line-height: 24px; font-weight: 700; }
main li, .pubs p { font-size: 14.67px; }
main ul ul, .exp ul, .won, .list { list-style: square; }
main li li, .won li, .list > li { margin-top: 6px; }
main li::marker { color: var(--ink); }
section:has(.list) h2 { margin-top: 42px; }

/* experience: two by two, each place's logo beside its lines */
.exp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; padding: 43px 0 33px; list-style: none; }
.exp > li { display: grid; grid-template-columns: 79px minmax(0, 1fr); column-gap: 27px; padding-right: 24px; }
.exp > li:nth-child(even) { padding-left: 11px; column-gap: 28px; }
.exp > li > div { padding-top: 9px; }
.exp ul { padding-left: 20px; }
/* one place, two roles: each role's dates beside its title, the earlier role under the later */
.exp .when { margin-left: 6px; font-size: 13.33px; font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.exp .then { margin-top: 14px; }

.pubs .row { padding: 24px 0 25px; border-top: 1px solid var(--line); }
.pubs .row.first { margin-top: 15px; padding-top: 26px; border-top: 0; }
.pubs .thumb { grid-column: 1 / 5; padding-right: 15px; }
.pubs .thumb img, .pubs iframe { border-radius: 8px; }
.pubs .thumb img { width: 100%; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pubs .row:hover .thumb img { transform: scale(1.025); }
.pubs iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.pubs .txt { padding-top: 5px; }
.pubs .first .txt { padding-top: 10px; }
.pubs h3 { margin-bottom: 2px; font-size: 18.67px; line-height: 26px; }
.pubs p, .won { margin-top: 8px; }
/* a paper, top to bottom: where it appeared (a small tag), its title, the people (quiet), what it does, any award, its links */
.pubs .venue { display: inline-block; margin: 0 0 7px; padding: 1px 9px 2px; border-radius: 999px; background: var(--chip-2); color: var(--link); font-size: 12.5px; line-height: 18px; font-weight: 700; letter-spacing: 0.02em; }
.pubs h3 { margin-bottom: 0; }
.pubs .who { margin-top: 5px; font-size: 13.67px; line-height: 21px; color: var(--ink-2); }
.pubs .who a { color: inherit; }
.pubs .who a:hover { color: var(--link); }
.pubs .who b { color: var(--strong); }
.pubs .desc { max-width: 46rem; margin-top: 11px; line-height: 23px; text-wrap: pretty; }
.pubs .won { margin-top: 9px; }
.pubs .links { margin-top: 13px; }
/* a paper's links: quiet chips that take the link colour under the pointer */
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.links a { display: inline-flex; align-items: center; gap: 5px; padding: 2px 11px 3px 9px; border-radius: 999px; background: var(--chip); font-size: 13.33px; transition: background-color 0.2s ease, transform 0.15s ease; }
.links a:hover { background: var(--chip-2); }
.links a:active { transform: scale(0.96); }
/* a link out from the middle of a line (thesis, certificate): a small arrow glyph; its name shows above it under the pointer */
main a.ext { position: relative; display: inline-block; margin-left: 1px; padding: 2px; border-radius: 5px; vertical-align: middle; translate: 0 -1px; background: none; line-height: 0; transition: background-color 0.2s ease; }
main a.ext:hover { background: var(--chip-2); }
.ext svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social a::after, .ext::after { content: attr(aria-label); position: absolute; z-index: 1; bottom: calc(100% + 7px); left: 50%; translate: -50% 0; padding: 4px 9px; border-radius: 7px; background: var(--ink); color: var(--bg); font: 400 12px/16px Lato, sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; }
.social a:hover::after, .social a:focus-visible::after, .ext:hover::after, .ext:focus-visible::after { opacity: 1; }
.links svg { flex: none; width: 13px; height: 13px; stroke-width: 2; }
.links a:hover .g-page .mv { transform: translate(1.5px, -1.5px); }
.links a:hover .g-doc .mv { transform: translate(-1px, 1px) scale(1.15); }
.links a:hover .g-code .l { transform: translateX(-2px); } .links a:hover .g-code .r { transform: translateX(2px); }
.links a:hover .g-play .mv { transform: translateX(1.5px) scale(1.15); }
.links a:hover .g-data .mv { transform: translateY(2px); }
.links a:hover .g-post .mv { transform: scale(1.14); }
.links a:hover .g-clip .mv { transform: rotate(-14deg); }
.links a:hover .g-cup .mv { transform: translateY(-2px); }
.won { padding-left: 20px; }
.won li { margin-top: 0; font-size: 13.33px; }
.won span { color: var(--won); }

.list { padding: 19px 0 36px 28px; }
.list > li { font-size: 16px; }
.list ul { padding-left: 20px; color: var(--ink-2); }
.list ul.ink { color: var(--ink); }
.list.wide { padding-bottom: 0; }
.foot { margin: 9px 0 60px 28px; font-size: 13.33px; }

/* dark: the black logos turn white, the Yonsei seal loses its white square, and the papers' figures (drawn for white paper) sit on white cards */
[data-theme="dark"] .exp img[src*="aic"], [data-theme="dark"] .exp img[src*="sait"] { filter: invert(1); }
[data-theme="dark"] .exp img[src*="yonsei"] { border-radius: 50%; }
[data-theme="dark"] .pubs .thumb img { background: #fff; filter: brightness(0.9); transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease; }
[data-theme="dark"] .pubs .row:hover .thumb img { filter: none; }   /* the white figures are dimmed a little until you look at one */
[data-theme="dark"] .exp img[src*="sony"] { filter: brightness(1.35) saturate(0.9); }
[data-theme="dark"] body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }   /* light letters on dark look heavier without this */

.top .here { background: var(--chip); font-weight: 700; }

/* a paper's own page: one centred column; title, people, links, then its sections */
.paper { max-width: 60rem; margin: 0 auto; padding: 20px 0 64px; }
.paper header { padding-bottom: 28px; text-align: center; }
.paper h1 { margin-top: 12px; font-size: 30px; line-height: 1.3; text-wrap: balance; }
.paper .authors { margin-top: 18px; text-wrap: balance; }
.paper .aff { margin-top: 6px; font-size: 14.67px; color: var(--ink-2); }
.paper .venue { margin-top: 10px; font-weight: 700; color: var(--strong); }
.paper sup { font-size: 0.7em; line-height: 0; }
.paper .links { justify-content: center; margin-top: 16px; }
.paper section { padding: 30px 0; }
.paper h2 { margin: 0 0 18px; padding: 0; font-size: 21px; line-height: 1.3; color: var(--strong); text-align: center; }
.paper section > p, .paper .split p { font-size: 15px; line-height: 1.7; text-wrap: pretty; }
.paper .split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: center; }
.paper .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fig { margin: 0; }
.fig + .fig, .notes + .fig, .video + .fig, .fig + .notes { margin-top: 22px; }
.fig img, .fig video, .video { display: block; width: 100%; height: auto; border-radius: 8px; }
.fig figcaption { margin-top: 10px; font-size: 13.33px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.pair figcaption { text-align: center; }
.pair .fig + .fig { margin-top: 0; }
.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 0; background: #000; }
/* a film is its still picture with a play mark until it is pressed; only then is YouTube loaded */
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video i { position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px -34px; border-radius: 14px; background: rgb(0 0 0 / 0.7); transition: background-color 0.2s ease, transform 0.2s ease; }
.video i::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -10px -7px; border: solid transparent; border-width: 10px 0 10px 18px; border-left-color: #fff; }
.video:hover i { background: #f00; transform: scale(1.06); }
.notes { padding-left: 24px; list-style: square; }
.notes li { margin-top: 6px; }
.notes + .video { margin-top: 22px; }
.bib { margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 10px; background: var(--chip); font: 12.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .fig img { background: #fff; }

/* gallery: rows of photographs, each as wide as its shape asks so the row ends flush */
.gallery { padding: 20px 0 64px; }
.gallery h1 { color: var(--head); text-align: center; }
.gallery p { margin: 18px 0 22px; }
.shots { display: flex; gap: 12px; margin-top: 12px; }
.shots img { flex: var(--r) 1 0; min-width: 0; width: 0; height: auto; border-radius: 8px; }

@media (max-width: 47.99rem) {
  /* the bar: name, theme button and menu button on one line; the menu opens beneath them */
  .top { height: auto; min-height: 56px; flex-wrap: wrap; padding: 0 12px 0 16px; }
  .top.open { border-bottom-color: var(--line); }
  .brand { gap: 10px; height: 56px; margin-right: auto; }
  .burger { display: block; }
  .top nav { flex: 1 0 100%; order: 3; display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.38s; }
  .top.open nav { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
  .navin { min-height: 0; overflow: hidden; flex-direction: column; align-items: stretch; gap: 2px; }
  .navin > :last-child { margin-bottom: 12px; }
  .navin > a, .drop > button { width: 100%; padding: 10px 14px; border-radius: 12px; font-size: 17px; text-align: left; }
  .drop > button { cursor: default; background: none !important; }
  .drop svg { display: none; }
  .drop ul { position: static; min-width: 0; margin: 0 0 2px 14px; padding: 0 0 0 8px; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; opacity: 1; visibility: inherit; transform: none; transition: none; background: none; }
  .drop ul::before { content: none; }
  .drop li a { padding: 9px 12px; }
  main { width: calc(100% - 40px); }
  h2 { font-size: 24px; }
  .exp .when { display: block; margin-left: 0; }
  .row { display: block; }
  .row > .txt { padding-left: 0; }
  .intro .pic { max-width: 220px; margin: 0 auto; padding: 0; }
  .intro .txt { text-align: center; }
  .social { justify-content: center; margin-left: 0; }
  .exp { grid-template-columns: minmax(0, 1fr); }
  .exp > li:nth-child(even) { padding-left: 0; column-gap: 27px; }
  .pubs .thumb { padding-right: 0; }
  .pubs .txt { padding: 10px 0 0; }
  .paper h1 { font-size: 24px; }
  .paper .split, .paper .pair { grid-template-columns: minmax(0, 1fr); }
  .shots { gap: 8px; margin-top: 8px; }
}
/* arriving: the portrait and the lines beside it come up once, one after another */
/* fingers: the small links get room to be pressed */
@media (pointer: coarse) {
  .links { gap: 8px; }
  .links a { padding: 7px 14px 8px 11px; font-size: 14px; }
  .social { gap: 12px; }
  .social a { width: 42px; height: 42px; }
  .social svg { width: 20px; height: 20px; }
  main a.ext { padding: 7px; margin: -7px -3px -7px -2px; vertical-align: middle; }   /* a larger place to press without moving the glyph off its line */
}

@media (prefers-reduced-motion: no-preference) {
  .intro .pic, .intro .txt > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .intro .txt > :nth-child(2) { animation-delay: 0.06s; } .intro .txt > :nth-child(3) { animation-delay: 0.1s; } .intro .txt > :nth-child(4) { animation-delay: 0.14s; }
  .intro .txt > :nth-child(5) { animation-delay: 0.18s; } .intro .txt > :nth-child(6) { animation-delay: 0.22s; } .intro .txt > :nth-child(7) { animation-delay: 0.26s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation: none !important; } }
