/* =====================================================================
   Jintae Park — personal site (compact academic layout)
   Palette variants (html[data-design]): a light (default) · b dark · c classic blue
   ===================================================================== */

/* Palette and type follow kyudan1.github.io: white ground, #1a1a1a text, #999 muted, #e0e0e0 rules, Inter. */
:root {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --ink: #1a1a1a;
  --ink-2: #1a1a1a;
  --ink-3: #999999;
  --line: #e0e0e0;
  --line-2: #ececec;
  --accent: #2155A4;
  --accent-ink: #2155A4;
  --accent-soft: #EAF0F9;
  --warn: #a67900;
  --paper: #FFFFFF;
  --paper-edge: #e0e0e0;
  --media-bg: #111111;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px -12px rgba(0, 0, 0, .18);
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --media-w: 420px;
  --photo-w: 200px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, video { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
time { font-variant-numeric: tabular-nums; }
.i { width: 13px; height: 13px; fill: currentColor; flex: none; }
.i-s { width: 11px; height: 11px; fill: currentColor; flex: none; }
.hf { font-size: 13px; line-height: 1; }

.wrap { max-width: 880px; margin: 0 auto; padding: 44px 22px 56px; }
.section { margin-top: 43px; }
.h2 { font-family: var(--font-display); font-size: 16.2px; font-weight: 500; letter-spacing: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; }
.h2-note { font-family: var(--font-body); font-size: .74rem; font-weight: 400; color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { display: flex; gap: 36px; align-items: flex-start; }
.hero-info { flex: 1; min-width: 0; }
.name { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.name-kaist { color: #004C98; }
.name-ko { font-family: var(--font-body); font-size: .45em; font-weight: 400; color: var(--ink-3); margin-left: 6px; vertical-align: .3em; letter-spacing: 0; }
.affil { margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14.8px; }
.hero-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.hero-links a:hover { color: var(--accent); text-decoration: none; }
.email { margin-top: 6px; font-size: 14.8px; color: var(--ink-3); }
.bio { margin-top: 14px; font-size: 15.8px; line-height: 1.8; color: var(--ink); }
.bio strong { color: var(--ink); font-weight: 600; }
.bio .ul { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: #2155A4; }
.bio a.plain { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line); }
.bio a.plain:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- portrait photos ---------- */
.hero-photo { flex: none; width: var(--photo-w); max-width: 100%; }
.photo-stack { position: relative; }
.photo-stack .edge { position: absolute; inset: 0; border-radius: 8px; border: 1px solid var(--paper-edge); background: var(--paper); pointer-events: none; }
.photo-stack .edge-1 { transform: translate(4px, 4px); }
.photo-stack .edge-2 { transform: translate(8px, 8px); opacity: .75; }
.photo-stack .carousel { position: relative; z-index: 1; box-shadow: none; }
.carousel.photo .slide { aspect-ratio: 3 / 4; cursor: pointer; background: var(--media-bg); }
.slide-photo img { object-fit: cover; }
.carousel.photo .cnav { width: 28px; height: 28px; opacity: 1; background: rgba(26, 26, 26, .78); color: #fff; box-shadow: none; }
.carousel.photo .cnav:hover { background: rgba(26, 26, 26, .95); }
.carousel.photo .cnav svg { width: 16px; height: 16px; }
.carousel.photo .dots button { background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.carousel.photo .dots button.on { background: #fff; }
.carousel.photo .cnav.prev { left: 5px; } .carousel.photo .cnav.next { right: 5px; }

/* ---------- news ---------- */
.news li { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: 12px; padding: 5px 0; font-size: .86rem; color: var(--ink-2); }
.news time { font-size: .74rem; color: var(--ink-3); padding-top: .2em; }
.news strong { color: var(--ink); font-weight: 600; }

/* ---------- publications ---------- */
.pub { display: flex; gap: 24px; align-items: flex-start; padding: 19px 0; border-bottom: 1px solid var(--line-2); }
.pub:last-child { border-bottom: none; }
.pub-text { padding: 6px 0 10px; }
.pub-media { flex: 0 0 var(--media-w); width: var(--media-w); }
.pub-body { flex: 1; min-width: 0; }
.pub-title { font-family: var(--font-body); font-size: 16.2px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
.pub-title a { color: inherit; }
.pub-title a:hover { color: var(--accent); text-decoration: none; }
.pub-authors { margin-top: 8px; font-size: 14.8px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b8b8b8; }
.pub-authors u { text-decoration: none; font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--accent); }
.anon { color: var(--ink-3); font-size: .92em; }
.pub-venue { margin-top: 2px; font-size: 14.8px; color: var(--ink); }
.pub-venue strong { font-weight: 500; color: #b5527a; background: #fdf0f5; padding: 1px 6px; border-radius: 3px; font-size: 11.7px; vertical-align: 1px; }
.pub-note { margin-top: 6px; font-size: .81rem; color: var(--ink-3); line-height: 1.5; }
.pub-keys { margin-top: 6px; font-size: 14.4px; line-height: 1.75; color: #666; max-width: 120ch; }
.pub-keys span + span::before { content: "·"; margin: 0 6px; color: var(--line); }
.pub-keys br + span::before { content: none; }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.plink { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 4px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 500; line-height: 1.4; transition: border-color .15s, color .15s, background .15s; }
.plink:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.plink.muted { color: var(--ink-3); border-style: dashed; cursor: default; }
.stat { display: inline-flex; align-items: center; gap: 2px; margin-left: 3px; padding-left: 6px; border-left: 1px solid var(--line); font-size: 11.5px; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.plink:hover .stat { color: inherit; }

/* carousel */
.carousel { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow); outline-offset: 3px; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; width: 100%; min-height: 0; aspect-ratio: 16 / 9; scroll-snap-align: start; scroll-snap-stop: always; position: relative; cursor: zoom-in; overflow: hidden; }
.slide img, .slide video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.slide-vid { background: var(--media-bg); }
.slide-vid video { object-fit: cover; }
#pub-nav .slide { aspect-ratio: 1876 / 934; }
#pub-nav .slide-vid video { object-fit: contain; }
.slide-light { background: #fff; }
.slide-light video { object-fit: contain; }
.slide-img { background: #fff; }
.slide-img img { object-fit: contain; }
.badge { position: absolute; left: 7px; top: 7px; font-size: 10.5px; font-weight: 500; letter-spacing: .04em; color: #fff; background: rgba(0, 0, 0, .55); padding: 1px 6px; border-radius: 4px; pointer-events: none; }
.cnav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #161C19; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .15s, background .15s; z-index: 2; }
.cnav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cnav.prev { left: 6px; } .cnav.next { right: 6px; }
.carousel:hover .cnav, .carousel:focus-within .cnav { opacity: 1; }
.cnav:hover { background: #fff; }
.carousel.single .cnav, .carousel.single .dots { display: none; }
.dots { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 5px; z-index: 2; pointer-events: none; }
.dots button { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); pointer-events: auto; transition: transform .15s, background .15s; }
.dots button.on { background: #fff; transform: scale(1.25); }
@media (hover: none) { .cnav { opacity: 1; } }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; color: #fff; }
.lightbox::backdrop { background: rgba(6, 9, 8, .9); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; }
.lb-stage { width: min(96vw, 1400px); max-height: 84vh; display: grid; place-items: center; align-self: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 84vh; width: auto; height: auto; border-radius: 6px; background: #000; }
.lb-caption { justify-self: stretch; padding: 10px 64px 18px; text-align: center; font-size: .82rem; color: #C9D1CC; max-width: 90ch; margin: 0 auto; }
.lb-caption::before { content: attr(data-count) "  "; font-family: var(--font-mono); color: #7F8A83; }
.lb-close, .lb-nav { position: fixed; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; transition: background .15s; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lightbox.single .lb-nav { display: none; }
.lb-close svg, .lb-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- experience / education ---------- */
.rows li { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rows li:last-child { border-bottom: none; }
.logo { width: 132px; height: 50px; display: flex; align-items: center; justify-content: flex-start; background: transparent; border: 0; border-radius: 0; padding: 0; }
.logo img { height: 36px; width: auto; max-width: 140px; object-fit: contain; object-position: left center; display: block; }
.logo-lg img { height: 48px; }
.logo-sm { justify-content: center; }
.logo-sm img { height: 52px; object-position: center; }
.row-title { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.5; }
.row-sub { display: block; font-size: 14.4px; font-weight: 400; color: #666; }
.row-desc { font-size: 13.5px; color: var(--ink); margin-top: 1px; }
.rows time { font-size: 13px; color: var(--ink-3); white-space: nowrap; padding-top: .1em; }

/* ---------- awards ---------- */
.awards li { font-size: 14.8px; color: #666; padding: 4px 0 4px 14px; position: relative; }
.awards li::before { content: ""; position: absolute; left: 0; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.awards strong { color: var(--ink); font-weight: 500; }

/* ---------- footer ---------- */

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .wrap { padding: 28px 18px 48px; }
  .hero { flex-direction: column; gap: 22px; }
  .hero-photo { align-self: flex-start; }
  .name { font-size: 1.8rem; }
  .pub { flex-direction: column; gap: 12px; }
  .pub-media { width: 100%; flex: none; }
  .rows li { grid-template-columns: 100px minmax(0, 1fr); }
  .logo { width: 100px; height: 40px; }
  .logo img { height: 30px; max-width: 100px; }
  .logo-lg img { height: 36px; }
  .logo-sm img { height: 40px; }
  .rows time { grid-column: 2; padding-top: 0; }
  .news li { grid-template-columns: 1fr; gap: 0; }
  .lb-caption { padding: 8px 14px 14px; }
  .lb-nav { top: auto; bottom: 8px; transform: none; }
}


/* link icons, each in its own colour */
.li { width: 12px; height: 12px; fill: currentColor; flex: none; }
.li-img { width: 14px; height: 14px; object-fit: contain; }
.emo { font-size: 11px; line-height: 1; }
.star { fill: #F5B301; stroke: #D69A00; stroke-width: 1; }
.ic-arxiv { color: #B31B1B; }
.ic-github { color: #24292F; }
.ic-web { color: #2563EB; }
.ic-hf { font-size: 12px; line-height: 1; }
.ic-yt { color: #FF0000; }
.ic-play { color: #7C3AED; }
.ic-pipe { color: #0891B2; }
.plink.muted .li { opacity: .55; }

/* button colours by link type */
.plink.t-paper { background: #FDECEC; border-color: #F5C2C2; color: #A11B1B; }
.plink.t-code  { background: #EDEFF2; border-color: #CDD3DA; color: #1F2328; }
.plink.t-web   { background: #E8EFFD; border-color: #BFD1F7; color: #1E4FC2; }
.plink.t-data  { background: #FFF3C4; border-color: #F2D77A; color: #7A5A00; }
.plink.t-yt    { background: #FFE6E6; border-color: #F7B3B3; color: #CC0000; }
.plink.t-paper .li, .plink.t-code .li, .plink.t-web .li, .plink.t-yt .li { color: inherit; }
.plink.t-paper .stat, .plink.t-code .stat, .plink.t-web .stat, .plink.t-data .stat, .plink.t-yt .stat { border-left-color: currentColor; opacity: .85; color: inherit; }
.plink.t-paper:hover { background: #FBDADA; border-color: #E89A9A; color: #8A1515; }
.plink.t-code:hover  { background: #E1E5EA; border-color: #AEB7C2; }
.plink.t-web:hover   { background: #D9E5FB; border-color: #9DB8F0; }
.plink.t-data:hover  { background: #FFEBA3; border-color: #E5C24E; }
.plink.t-yt:hover    { background: #FFD4D4; border-color: #EE9A9A; }
.plink.muted.t-paper { background: transparent; color: #B36B6B; border-style: dashed; }

/* keyword tags under the bio (outlined, like the reference site) */
.keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.keywords li { font-size: 11.7px; font-weight: 500; letter-spacing: .03em; padding: 2px 8px; border-radius: 3px; border: .5px solid currentColor; color: #666; background: transparent; line-height: 1.6; }
.keywords li:nth-child(1) { color: #2155A4; }
.keywords li:nth-child(2) { color: #7654a3; }
.keywords li:nth-child(3) { color: #276f96; }
.keywords li:nth-child(4) { color: #a67900; }
