/* PLRG site: the minimal layout of es-meta.github.io on a neutral white/slate
   palette, with the PLRG logo navy as accent. Sections follow the pages:
   base · top bar · home · page heads · publications · members · Markdown pages
   (courses, member pages) · talks & trips · research · conferences · widgets. */

/* ---------------------------------------------------------------- colors */
:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #5b6470;
  /* a lighter grey for secondary text (still 4.8:1 on white) */
  --faint: #6b7280;
  --accent: #2a408e;
  --accent-fg: #ffffff;
  --line: #e6e8eb;
  --soft: #f5f7fa;
  /* page width (content + 2 × 20px padding) */
  --page: 960px;
  --link: #2f4fb8;
  --award-bg: #fdf3d3;
  --award-line: #ecc764;
  /* awards: a dark red, the one strong color on the page */
  --award: #b42318;
  --now: #eef2fd;
  /* research topics (also used for the conference areas) */
  --t-analysis: #0f7b6c;
  --t-spec: #5b4fc4;
  --t-synthesis: #b25e09;
  --t-testing: #b02a7f;
  --t-security: #c62828;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --fg: #e6e8eb; --muted: #9aa3ae; --accent: #7d97f2; --accent-fg: #0f1218;
    --line: #2a2f37; --soft: #171b22; --link: #9db1f7; --award-bg: #3a2f14; --award-line: #6b5420; --now: #1c2440;
    --t-analysis: #4cc9b0; --t-spec: #a99cf5; --t-synthesis: #f0a54a; --t-testing: #f472b6; --t-security: #f87171;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .brand img { filter: brightness(1.8) saturate(.8); }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --fg: #e6e8eb; --muted: #9aa3ae; --accent: #7d97f2; --accent-fg: #0f1218;
  --line: #2a2f37; --soft: #171b22; --link: #9db1f7; --award-bg: #3a2f14; --award-line: #6b5420; --now: #1c2440;
  --t-analysis: #4cc9b0; --t-spec: #a99cf5; --t-synthesis: #f0a54a; --t-testing: #f472b6; --t-security: #f87171;
  color-scheme: dark;
}
:root[data-theme="dark"] .brand img { filter: brightness(1.8) saturate(.8); }

/* topics share one neutral look (no color per topic); --t is kept so a topic color can come back */
.t-spec, .t-analysis, .t-synthesis, .t-security { --t: var(--muted); }

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
main { max-width: var(--page); margin: 0 auto; padding: 0 20px 64px; }
/* links: the color of the text around them with a faint underline; blue on hover.
   Things that are clearly clickable by their place or shape (menu, titles, venues,
   chips, buttons, member photos, list rows) drop the underline below. */
a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link); text-decoration-color: currentColor; }
.brand, .links a, .lock-link, .trip-body a.title, a.venue, .pill, .button, .banner, .topics a, .people a,
.trip a.cover, details.drop .menu a, .hl-links a, .tools a, .fpapers .ci,
.mini-pubs a.venue, .chip { text-decoration: none; }
.links a:hover, .lock-link:hover, a.venue:hover, .pill:hover, .button:hover, .banner:hover,
.topics a:hover, .people a:hover, .trip-body a.title:hover, details.drop .menu a:hover,
.hl-links a:hover, .tools a:hover, .fpapers .ci:hover, .mini-pubs a.venue:hover { text-decoration: none; }
h2 { margin: 48px 0 12px; font-size: 24px; letter-spacing: -0.2px; }
h3 { margin: 32px 0 8px; font-size: 18px; }
main li { margin: 2px 0; }
main img { max-width: 100%; height: auto; }
main table { border-collapse: collapse; width: 100%; font-size: 15px; }
main th, main td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
main pre { background: var(--soft); padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
main pre code { background: none; padding: 0; }
code { font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--soft); }
.note { color: var(--muted); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
footer {
  margin: 0 auto; max-width: var(--page); padding: 24px 20px 48px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; text-align: center;
}

.button {
  display: inline-block; padding: 10px 22px; border-radius: 6px; cursor: pointer;
  font: inherit; font-weight: 600; border: 2px solid var(--accent);
}
.button:hover { text-decoration: none; }
.button.secondary { color: var(--fg); background: transparent; }
.button.secondary:hover { background: var(--line); }
.button.small { padding: 4px 14px; font-size: 14px; border-width: 1.5px; }

.callout { margin: 16px 0; padding: 14px 18px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); }
.callout p { margin: 0; }
.callout.success, .callout.info { border-color: var(--line); background: var(--soft); }
.callout.warning, .callout.error { border-color: var(--award-line); background: var(--award-bg); }

/* tags and chips (topics on papers, filters) */
/* topic tags: grey outline and grey text, like the filter chips */
.tag {
  font-size: 12px; font-weight: 500; padding: 0 7px; border-radius: 4px; line-height: 18px;
  color: var(--t); background: transparent; border: 1px solid var(--line);
}
a.tag:hover { text-decoration: none; color: var(--link); border-color: var(--link); }
.filters { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 16px 0 0; }
.chip {
  font: inherit; font-size: 13.5px; cursor: pointer; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px;
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--link); color: #fff; border-color: var(--link); }
.chip .n { margin-left: 5px; font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }
/* the awards chip uses the red of the award text */
.chip[data-award] { color: var(--award); }
.chip[data-award]:hover { border-color: var(--award); color: var(--award); }
.chip[data-award][aria-pressed="true"] { background: var(--award); border-color: var(--award); color: #fff; }
:root[data-theme="dark"] .chip[data-award]:not([aria-pressed="true"]) { color: #e3b448; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[data-award]:not([aria-pressed="true"]) { color: #e3b448; } }
.pill {
  display: inline-block; text-align: center; font-size: 12.5px; line-height: 20px; padding: 0 8px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 5px; color: var(--fg); background: var(--bg);
}
.pill:hover { border-color: var(--muted); text-decoration: none; }
/* venue: bold text (no block); a link to the venue */
.venue { font-size: 14px; font-weight: 700; color: var(--fg); }
a.venue:hover { color: var(--link); }

/* year bands (publications, talks, trips, past conferences); they stay under the top bar */
.year-group[hidden] { display: none; }
.year-group h3 {
  position: sticky; top: 56px; z-index: 4;
  display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 6px 0 4px;
  font-size: 18px; line-height: 1.5; letter-spacing: -0.3px; font-variant-numeric: tabular-nums;
  color: var(--fg); background: var(--bg); border-bottom: 1px solid var(--line);
}
.year-group:first-of-type h3 { margin-top: 12px; }
.year-group:has(.entries) h3 { margin: 14px 0 2px; }

/* --------------------------------------------------------------- top bar */
.topnav {
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.topnav-inner { max-width: var(--page); margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; flex: none; }
.brand img { height: 26px; width: auto; display: block; }
.links { display: flex; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.links::-webkit-scrollbar { display: none; }
.links a { color: var(--muted); font-size: 15px; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.links a:hover { color: var(--fg); text-decoration: none; }
.links a[aria-current="page"] { color: var(--fg); font-weight: 600; }
/* reserve the bold width so the current page does not shift the others */
.links a > span { display: inline-flex; flex-direction: column; align-items: center; }
.links a > span::after {
  content: attr(data-label); font-weight: 600; height: 0; overflow: hidden; visibility: hidden; user-select: none; pointer-events: none;
}
.icon { width: 14px; height: 14px; }
/* Internal: a lock button at the right end of the top bar */
.lock-link {
  flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line);
}
.lock-link:hover, .lock-link[aria-current="page"] { color: var(--fg); background: var(--soft); text-decoration: none; }
.lock-link .icon { width: 16px; height: 16px; }
.theme-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 999px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--fg); border: 1px solid var(--line);
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle svg { width: 18px; height: 18px; }
/* phones: the links fold into a menu under the hamburger button */
.menu-toggle, .nav-scrim { display: none; }
@media (max-width: 640px) {
  .topnav-inner { gap: 10px; }
  .brand { margin-right: auto; }
  .menu-toggle {
    display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; cursor: pointer;
    border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  }
  .menu-toggle svg { width: 18px; height: 18px; }
  .menu-toggle .i-close, .menu-open .menu-toggle .i-menu { display: none; }
  .menu-open .menu-toggle .i-close { display: block; }
  .links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; overflow: visible;
    padding: 8px 12px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
    border-radius: 0 0 16px 16px; box-shadow: 0 12px 24px rgb(0 0 0 / .12);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s, visibility .18s;
  }
  .menu-open .links { visibility: visible; opacity: 1; transform: none; }
  .links a { font-size: 16px; padding: 11px 12px; border-radius: 10px; }
  .links a[aria-current="page"] { background: var(--soft); color: var(--accent); }
  .links a > span { align-items: flex-start; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 9; background: rgb(0 0 0 / .3);
    visibility: hidden; opacity: 0; transition: opacity .18s, visibility .18s;
  }
  .menu-open .nav-scrim { visibility: visible; opacity: 1; }
  .menu-open body { overflow: hidden; }
  .menu-open .topnav { background: var(--bg); border-bottom-color: transparent; }
}

/* ------------------------------------------------------------------ home */
.banner {
  display: block; text-align: center; padding: 9px 20px; font-size: 14px;
  background: var(--now); color: var(--fg); border-bottom: 1px solid var(--line);
}
.banner strong, .banner span { color: var(--link); }
.banner:hover { text-decoration: none; }
.banner:hover strong { text-decoration: underline; }
/* home header: left-aligned, plain (name, place, one sentence) */
.hero { padding: 40px 0 24px; }
.hero h1 { margin: 0; font-size: 32px; line-height: 1.2; letter-spacing: -0.5px; }
.tagline { margin: 6px 0 0; color: var(--muted); font-size: 17px; }
/* the professor's name stands out in the grey line */
.tagline a.pi { color: var(--fg); font-weight: 600; }
.intro { margin: 16px 0 0; font-size: 16px; text-wrap: pretty; line-height: 1.65; color: var(--fg); }
@media (max-width: 560px) {
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 26px; }
  .intro { font-size: 16px; }
}

.topics { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.topics li { margin: 0; padding: 4px 0; border-bottom: 1px solid var(--line); }
/* the text lines up with the heading; on hover the background reaches a little past it on both sides */
.topics a {
  display: flex; align-items: center; gap: 20px; color: var(--fg);
  padding: 10px 12px; margin: 0 -12px; border-radius: 6px;
  transition: background .15s;
}
.topics a:hover { text-decoration: none; background: var(--soft); }
.topics .text { flex: 1; }
.topics strong { display: block; }
.topics .text span { color: var(--muted); font-size: 15px; }

.join .mail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.join .addr { font-weight: 600; font-size: 17px; }
footer p { margin: 0; }
footer address { margin: 4px 0 0; font-style: normal; font-size: 13px; color: var(--faint); }

/* photo slider */
/* the whole photo (16:10), at most 760px wide and centered, so it stays on the first screen */
/* home photos: the full column width, nothing on top of the photo; the caption and the
   previous / next buttons sit on one line under it. Swipe on phones, drag with a mouse. */
.slider { margin: 4px 0 8px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 6px; background: var(--soft); }
.slides::-webkit-scrollbar { display: none; }
.slides.dragging { scroll-snap-type: none; cursor: grabbing; }
@media (hover: hover) { .slides { cursor: grab; } }
/* a wide band (about 2:1) so the photo does not take over the first screen; 3:2 on phones */
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 2 / 1; overflow: hidden; }
@media (max-width: 560px) { .slide { aspect-ratio: 3 / 2; } }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; user-select: none; -webkit-user-drag: none; }
.slider-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.slider-bar .ctrl { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.slider-bar button {
  font: inherit; font-size: 20px; line-height: 1; width: 28px; height: 28px; padding: 0 0 2px; cursor: pointer;
  color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 6px;
}
.slider-bar button:hover { border-color: var(--line); background: var(--soft); }
/* home: the link to the full page, under a section */
.see-all { margin: 10px 0 0; font-size: 15px; }

/* ------------------------------------------------------------ page heads */
.page-head { padding: 28px 0 14px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: 30px; letter-spacing: -0.5px; line-height: 1.25; }
.page-head .tagline { margin-top: 6px; font-size: 16px; }
.kicker { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.kicker .jump { float: right; font-weight: 600; }
.schedule .row { scroll-margin-top: 72px; }

/* ---------------------------------------------------------- publications */
ul.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li {
  display: grid; grid-template-columns: 140px 1fr; column-gap: 16px; align-items: start;
  /* no line between papers (only the year headings have one); spacing separates them */
  margin: 0; padding: 5px 0; line-height: 1.5;
}
.pubs li[hidden] { display: none; }
.pubs .side { padding-top: 2px; }
.pubs .side .venue { font-weight: 400; line-height: 1.45; }
/* title > authors > links */
.pubs .title { font-size: 16px; font-weight: 650; letter-spacing: -.1px; line-height: 1.35; color: var(--fg); }
/* titles: the faintest underline (they are bold, so a normal one would be loud) */
a.title, .mini-pubs a:not(.venue) { text-decoration-color: var(--line); }
a.title:hover, .mini-pubs a:not(.venue):hover { color: var(--link); text-decoration-color: currentColor; }
/* authors and the links line: a lighter grey (still 4.8:1 on white), set close under the title */
.pubs { --pub-meta: var(--faint); }
.pubs .authors { margin-top: -1px; font-size: 14px; line-height: 1.4; color: var(--pub-meta); }
.pubs .authors .equal { white-space: nowrap; }
/* lab members: same color as co-authors, with a faint underline (they link to member pages) */
.pubs .authors a {
  color: inherit;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
}
.pubs .authors a:hover { color: var(--link); text-decoration-color: currentColor; }
.pubs .meta { display: flex; flex-wrap: wrap; gap: 2px 11px; align-items: center; margin-top: 1px; font-size: 13.5px; color: var(--pub-meta); }
/* PDF · Slides · ...: grey with a faint underline, blue on hover */
.pubs .meta a { color: var(--pub-meta); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pubs .meta a:hover { color: var(--link); text-decoration-color: currentColor; }
/* topics at the end of the links line, right-aligned: small grey words, not links */
.pubs .meta .tags { margin-left: auto; color: var(--pub-meta); font-size: 12.5px; }
.pubs .meta .tags .tag { padding: 0; border: 0; font-size: inherit; line-height: inherit; }
/* awards: the award's name in red text */
.pubs .award {
  margin: 2px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--award);
}
@media (max-width: 560px) {
  /* phones: keep the venue in a narrow left column (long names wrap) */
  .pubs li { grid-template-columns: 74px minmax(0, 1fr); column-gap: 10px; }
  .pubs .side .venue { white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; display: inline-block; }
  /* phones: no topic words on each paper (the filter chips above still work) */
  .pubs .meta .tags { display: none; }
}

/* --------------------------------------------------------------- members */
.pgroup h2, h2.alumni-head { font-size: 15px; font-weight: 600; color: var(--muted); margin: 20px 0 8px; letter-spacing: 0; }
h2.alumni-head { margin-top: 28px; }
ul.people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.people li { margin: 0; }
/* no box at rest; on hover the whole block (photo and name) gets a light background,
   so it reads as one button */
.people a {
  display: flex; flex-direction: column; align-items: center; text-align: center; width: 132px; padding: 10px 4px 8px;
  color: var(--fg); border-radius: 8px; transition: background .15s;
}
.people a:hover { text-decoration: none; background: var(--soft); }
.people a:hover .name { color: var(--link); }
/* portrait photos (3:4), like the ID photos they are; a thin line keeps white backgrounds framed */
.people img { width: 96px; height: 128px; border-radius: 6px; object-fit: cover; object-position: 50% 20%; margin-bottom: 8px; background: var(--soft);
  box-shadow: 0 0 0 1px var(--line); }
.people .name { font-weight: 600; font-size: 14.5px; line-height: 1.3; white-space: nowrap; }
.people .ko { color: var(--faint); font-size: 13px; }
@media (max-width: 640px) {
  ul.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
  .people a { width: auto; padding: 8px 4px; }
  .people img { width: 84px; height: 112px; }
  .people .name { white-space: normal; font-size: 13.5px; }
  .people .ko { font-size: 12.5px; }
}
/* alumni: aligned columns (name, Korean name, degree and year, where they went) */
ul.alumni { list-style: none; margin: 0; padding: 0; }
ul.alumni li { display: grid; grid-template-columns: 128px 46px 30px 36px minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 3px 0; margin: 0; }
ul.alumni a { justify-self: start; }
.alumni .ko, .alumni .note, .alumni .now { color: var(--faint); font-size: 14px; }
/* the name in bold (linked or not) */
ul.alumni li > :first-child { font-weight: 600; }
.alumni .year { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { ul.alumni li { grid-template-columns: 128px 52px 34px minmax(0, 1fr); } .alumni .now { grid-column: 1 / -1; } }

/* -------------------------------------- Markdown pages (courses, members) */
.page-head + .prose { margin-top: 16px; }
.page-head + .prose > :first-child { margin-top: 0; }
.prose h2 { margin: 34px 0 8px; font-size: 22px; }
.prose h3 { margin: 22px 0 6px; font-size: 17px; }
.prose p, .prose ul, .prose ol:not(.schedule) { margin: 6px 0; }
.prose ul:not(.schedule):not(.contact):not(.pubs), .prose ol:not(.schedule) { padding-left: 22px; }
.prose li > ul { margin: 2px 0; }
.prose a { overflow-wrap: anywhere; }
.prose h2 + *, .prose h3 + * { margin-top: 0; }
.prose h2:first-child { margin-top: 24px; }
.prose > div[style*="clear"] { height: 0; }
.prose img, .member p > img:not(.profile-img) { display: block; margin: 16px auto; border-radius: 12px; }
/* course and member pages: denser text */
.prose.course, .prose.member { font-size: 15px; line-height: 1.5; }
.prose.course h2, .prose.member h2 { font-size: 20px; margin: 26px 0 6px; }
.prose.course li, .prose.member li { margin: 0; }
.prose.course p, .prose.course ul:not(.schedule), .prose.member p, .prose.member ul:not(.pubs):not(.contact) { margin: 4px 0; }
.prose.course li > ul, .prose.member li > ul { margin: 0; }
.prose.member > div[style*="clear"] + h2 { margin-top: 20px; }
.member .profile-img { float: right; width: 160px; height: auto; margin: 4px 0 16px 24px; border-radius: 12px; object-fit: cover; }
@media (max-width: 560px) { .member .profile-img { float: none; display: block; width: 140px; margin: 16px auto; } }
ul.contact { list-style: none; padding: 0; margin: 6px 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
ul.contact li { display: contents; }
/* a former member's page: one plain sentence at the top */
.prose p.former { margin: 4px 0 8px; color: var(--muted); }
ul.contact .label { color: var(--muted); font-size: 15px; }
.prose p.office { margin: 0 0 10px; }
/* the link only as wide as its text (as a grid item it would fill the whole column) */
ul.contact a { justify-self: start; }

ul.venues a { font-weight: 600; }
.course-list h2 { font-size: 18px; margin: 28px 0 6px; color: var(--muted); }
.course-list ul { margin: 0; padding-left: 20px; }

/* course schedule: one line per lecture (# · date · title · homework · files) */
ol.schedule { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.prose h3 + ol.schedule, .prose ol.schedule { margin-top: 4px; }
.prose ol.schedule + h3 { margin-top: 18px; }
.prose h3:has(+ ol.schedule) { font-size: 14px; color: var(--muted); margin: 18px 0 4px; }
.schedule .row {
  display: grid; grid-template-columns: 26px 46px minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: center;
  margin: 0; padding: 6px 8px; font-size: 15px; border-bottom: 1px solid var(--line); transition: background .15s, opacity .15s;
}
.schedule .row:hover { background: var(--soft); }
.schedule .idx { color: var(--muted); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.schedule .date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.schedule .what a { color: var(--fg); font-weight: 500; }
.schedule .what a:hover { color: var(--link); }
.schedule .speaker { display: block; font-size: 14px; color: var(--muted); }
.schedule .speaker a { color: var(--fg); font-weight: 500; }
.schedule .hws { display: flex; flex-wrap: nowrap; gap: 4px; }
.schedule .hws-in { display: none; }
/* desktop: all parts share one grid (subgrid), so the columns line up */
@media (min-width: 641px) {
  .sched { display: grid; grid-template-columns: 26px 46px minmax(0, 1fr) auto auto; column-gap: 10px; }
  .sched > * { grid-column: 1 / -1; }
  .sched > ol.schedule { display: grid; grid-template-columns: subgrid; }
  .sched .schedule .row { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.schedule .files { display: flex; gap: 10px; min-width: 52px; justify-content: flex-end; justify-self: end; font-size: 13px; font-variant-numeric: tabular-nums; }
.schedule .updated { color: var(--muted); }
.hw {
  font-size: 12px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 1px 8px; border-radius: 4px; border: 1px solid var(--line); color: var(--fg);
}
.hw:hover { border-color: var(--accent); color: var(--link); text-decoration: none; }
.schedule .hw-due { font-size: 12px; color: var(--muted); margin: 0 6px 0 4px; align-self: center; }
.schedule .hw-sol { font-size: 12px; margin-right: 6px; align-self: center; }
.schedule .exam { background: var(--soft); }
.schedule .exam .what { grid-column: 3 / -1; }
/* while the semester is in progress (course.js) */
.schedule .row.past { opacity: .55; }
.schedule .row.past:hover { opacity: 1; }
.schedule .row.next { background: var(--now); opacity: 1; }
@media (max-width: 640px) {
  .schedule .row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
  .schedule .idx { width: 20px; flex: none; }
  .schedule .date { width: 42px; flex: none; }
  .schedule .what { flex: 1 1 calc(100% - 86px); }
  .schedule .hws { display: none; }
  .schedule .hws-in { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: 1px; }
  .schedule .files { min-width: 0; justify-content: flex-start; margin-left: 78px; }
  .schedule .files:empty { display: none; }
}

/* --------------------------------- talks and trips (date | title · place | links) */
ul.entries { list-style: none; margin: 0; padding: 0; }
.entries > li {
  display: grid; column-gap: 14px; align-items: start; margin: 0; padding: 7px 0;
  font-size: 15px; line-height: 1.45; border-bottom: 1px solid var(--line);
}
.entries > li:last-child { border-bottom: none; }
.entries > li[hidden] { display: none; }
.entries.talks > li { grid-template-columns: 48px minmax(0, 1fr) auto; }
.entries.trips > li { grid-template-columns: 100px minmax(0, 1fr) auto; }
.entries .when { display: block; padding-top: 1px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.entries .title { font-weight: 600; color: var(--fg); }
.entries .where { color: var(--muted); font-size: 14px; }
.entries .where::before { content: "·"; margin: 0 6px 0 2px; color: var(--muted); }
/* fixed link slots: Slides | Video (talks), Photos | Talk | Report (trips) */
.elinks.slots { display: grid; gap: 6px; justify-content: end; align-self: center; font-size: 14px; }
.talks .elinks.slots { grid-template-columns: 54px 58px; }
.trips .elinks.slots { grid-template-columns: 62px 76px 96px; align-items: center; position: relative; }
.trips .pill { width: 100%; }
@media (max-width: 640px) {
  .entries.talks > li { grid-template-columns: 48px minmax(0, 1fr); }
  .entries.trips > li { grid-template-columns: 96px minmax(0, 1fr); }
  .elinks.slots { grid-column: 2; justify-content: start; }
  .trips .elinks.slots { margin-top: 4px; }
  .talks .elinks.slots { display: flex; margin-top: 3px; }
  .talks .elinks.slots > span:empty { display: none; }
}
@media (max-width: 560px) { .entries .when { margin-bottom: 2px; } }
/* trips: one card per trip (album cover, dates, place, buttons); the cover opens the album */
ul.trip-cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.trip { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.trip .cover { display: block; aspect-ratio: 3 / 2; border-radius: 5px 5px 0 0; overflow: hidden; background: var(--soft); }
.trip .cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; }
/* no album yet: a faint photo icon */
.trip .cover.none { display: grid; place-items: center; color: color-mix(in srgb, var(--muted) 45%, transparent); background: var(--soft); }
.trip .cover.none svg { width: 36px; height: 36px; }
.trip-body { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 12px; flex: 1; font-size: 14px; line-height: 1.4; }
.trip-body .when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.trip-body .title { font-weight: 650; color: var(--fg); font-size: 15px; }
.trip-body a.title:hover { color: var(--link); text-decoration: none; }
.trip-body .where { color: var(--muted); font-size: 13px; }
.trip-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; font-size: 13px; }
.trip-links .pill { min-width: 0; }
@media (max-width: 480px) {
  /* phones: one trip per row (bigger photos, room for the talk titles) */
  ul.trip-cards { grid-template-columns: 1fr; gap: 12px; }
  /* a list opens under its button, as wide as the card */
  .trip-links details.drop { position: static; }
  .trip-links { position: relative; }
  .trip-links details.drop .menu { left: 0; right: 0; min-width: 0; width: auto; max-width: none; }
}

/* several files: a drop-down list */
details.drop { position: relative; }
details.drop > summary { list-style: none; cursor: pointer; }
details.drop > summary::-webkit-details-marker { display: none; }
details.drop > summary.pill { display: block; }
details.drop > summary::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 0 3px 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s;
}
details.drop[open] > summary { border-color: var(--muted); background: var(--soft); }
details.drop[open] > summary::after { transform: rotate(-135deg); margin-bottom: -1px; }
details.drop .menu {
  position: absolute; left: 0; text-align: left; top: calc(100% + 4px); z-index: 5; min-width: 150px; width: max-content; max-width: min(360px, calc(100vw - 16px));
  display: flex; flex-direction: column; padding: 4px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
}
details.drop .menu a { font-size: 14px; line-height: 1.35; padding: 5px 10px; border-radius: 6px; color: var(--fg); }
details.drop .menu a:hover { background: var(--soft); text-decoration: none; color: var(--link); }
details.drop .menu .ko { font-size: 12.5px; color: var(--faint); margin-left: 2px; }
/* a talk's presenter, on its own line under the title */
details.drop .menu .by { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  details.drop .menu { left: 0; right: auto; }
  /* the rightmost slot opens toward the left so the menu stays on screen */
  .elinks.slots > :last-child .menu { left: auto; right: 0; }
}

/* -------------------------------------------------------------- research */
.lead { font-size: 18px; line-height: 1.7; color: var(--muted); margin: 20px 0 16px; }
.nowrap { white-space: nowrap; }
.highlight { margin-top: 8px; }
.highlight .hl-name { font-weight: 700; font-size: 19px; color: var(--fg); }
.highlight p { margin: 4px 0 10px; }
.hl-links, .tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hl-links a, .tools a { font-size: 13.5px; padding: 2px 10px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); }
.hl-links a:hover, .tools a:hover { border-color: var(--accent); text-decoration: none; }
.tools { margin-bottom: 10px; }
.tools .label { margin-right: 4px; }
.tools .label, .label.recent { font-size: 13px; color: var(--muted); }
.label.recent { margin: 12px 0 2px; }
.figure { display: block; max-width: 100%; margin: 10px 0 12px; border-radius: 10px; background: #fff; padding: 8px; }
/* one plain section per topic: a heading over a thin line, no box */
.topic-sec { margin-top: 36px; scroll-margin-top: 72px; }
h2.topic-head { margin: 0; padding-bottom: 6px; font-size: 21px; color: var(--fg); border-bottom: 1px solid var(--line); }
.topic-body { padding: 12px 0 0; }
.topic-body > p { margin: 0 0 12px; }
/* research: selected papers, indented, one per line: the venue in a column, then the title */
ul.mini-pubs { list-style: none; padding: 0 0 0 18px; margin: 6px 0 6px; }
.mini-pubs li { display: grid; grid-template-columns: 128px minmax(0, 1fr); column-gap: 12px; align-items: baseline; margin: 0; padding: 4px 0; font-size: 15px; line-height: 1.5; }
.mini-pubs a { color: var(--fg); }
.mini-pubs a:hover { color: var(--link); }
.mini-pubs .where { color: var(--faint); font-size: 14px; }
.mini-pubs .award-mark { font-size: 14px; font-weight: 600; color: var(--award); }
@media (max-width: 560px) { ul.mini-pubs { padding-left: 12px; } .mini-pubs li { grid-template-columns: 1fr; row-gap: 1px; } }

/* ESMeta diagram: one SVG picture (fixed layout, scales with the width; on phones it keeps
   a readable size and scrolls sideways) */
.flow { margin: 14px 0 10px; }
.flow svg { display: block; width: 100%; height: auto; font-family: inherit; }
/* the wide picture, or the tall one on narrow screens */
.flow svg.narrow { display: none; max-width: 460px; margin: 0 auto; }
@media (max-width: 600px) { .flow svg.wide { display: none; } .flow svg.narrow { display: block; } }
.flow a { text-decoration: none; }
.flow .fbox { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.flow .fbox.src { stroke-dasharray: 5 4; stroke: var(--muted); }
.flow .fbox.tool, .flow .fbox.step { fill: #f1f2f4; }
.flow .fbox.hub { stroke: var(--accent); stroke-width: 2.5; }
.flow .flabel { font-size: 15px; font-weight: 650; text-anchor: middle; fill: var(--fg); }
.flow .flabel.hub { fill: var(--accent); }
.flow .fline { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: miter; }
.flow .fhead { fill: var(--fg); }
.flow .fsub { font-size: 12.5px; text-anchor: middle; fill: var(--faint); }
.flow .fbtn rect { fill: var(--bg); stroke: color-mix(in srgb, var(--fg) 45%, var(--bg)); stroke-width: 1; transition: stroke .15s, fill .15s; }
.flow .fbtn text { font-size: 12px; font-weight: 600; text-anchor: middle; fill: var(--fg); }
.flow .fbtn:hover rect { stroke: var(--link); fill: color-mix(in srgb, var(--link) 6%, var(--bg)); }
.flow .fbtn:hover text { fill: var(--link); }
.flow .fci rect { fill: color-mix(in srgb, #2e7d32 7%, var(--bg)); stroke: color-mix(in srgb, #2e7d32 55%, var(--bg)); stroke-width: 1; transition: stroke .15s; }
.flow .fci text { font-size: 12px; font-weight: 700; text-anchor: middle; fill: #2e7d32; }
.flow .fci:hover rect { stroke: #2e7d32; stroke-width: 1.5; }
.flow .flogo path { fill: none; stroke: var(--fg); stroke-width: 2.5; }
.flow .flogo path.in { fill: none; stroke-width: 1.5; }
.flow .flogo .e { font-size: 50px; font-weight: 400; text-anchor: middle; fill: var(--fg); }
.flow .flogo .bar { fill: var(--fg); }
.flow .flogo .name { font-size: 12px; letter-spacing: 3px; text-anchor: middle; fill: var(--bg); }
@media (max-width: 640px) {
}

/* ----------------------------------------------------------- conferences */
/* areas carry a color (it is information in this table): muted, text only on a faint tint */
.ctag-pl { --t: #3b4f9a; }
.ctag-se { --t: #1f7a6d; }
.ctag-sec { --t: #8a5a1f; }
.ctag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; line-height: 18px; vertical-align: 2px;
  border: 0; border-radius: 4px; color: var(--t); background: color-mix(in srgb, var(--t) 13%, transparent);
}
button.ctag { font-family: inherit; cursor: pointer; }
button.ctag:hover { background: color-mix(in srgb, var(--t) 26%, transparent); }
.chip.area-chip { font-weight: 600; color: var(--t); }
.chip.area-chip[aria-pressed="true"] { background: var(--t); border-color: var(--t); color: #fff; }
/* legend: areas | rankings */
.legend { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 12px 28px; align-items: start; margin: 12px 0 16px; font-size: 13px; color: var(--muted); }
.legend table { width: auto; justify-self: start; border-collapse: collapse; font-size: 13px; color: var(--muted); }
.legend th { font-size: 12px; font-weight: 600; color: var(--fg); text-align: left; padding: 0 10px 4px 0; border-bottom: 1px solid var(--line); }
.legend td { padding: 3px 12px 3px 0; border: 0; white-space: nowrap; }
.legend td:first-child a { font-weight: 600; }
.legend .ctag { margin-right: 4px; }
@media (max-width: 640px) {
  .legend { grid-template-columns: 1fr; }
  .legend td { white-space: normal; }
}
/* the table: Due | Left | Area | Conference | Dates | (Place) | map | BK21 | KIISE | CORE */
ul.confs { list-style: none; padding: 0; margin: 0; }
ul.confs > li {
  display: grid; align-items: center; column-gap: 8px; margin: 0; padding: 7px 4px;
  font-size: 14px; border-bottom: 1px solid var(--line);
}
ul.confs > li[hidden] { display: none; }
ul.confs > li.conf { transition: background .12s; border-radius: 6px; }
ul.confs > li.conf:hover { background: var(--soft); }
ul.confs > li.conf-head {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 4px 4px 6px; border-bottom: 1px solid color-mix(in srgb, var(--fg) 25%, var(--bg));
}
.conf-head a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.conf-head a:hover { color: var(--link); }
.conf-head .aoe { display: block; font-size: 11px; font-weight: 400; color: var(--faint); margin-top: -2px; }
.confs .due { font-variant-numeric: tabular-nums; color: var(--muted); cursor: help; }
.confs .countdown { display: block; padding-top: 1px; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: help; }
.confs .countdown .v { display: inline-block; min-width: 4.7em; text-align: right; font-variant-numeric: tabular-nums; }
.confs .countdown .ago { margin-left: .3em; }
.confs .soon .countdown { color: var(--t-security); }
.confs .area { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.conf-head .area { display: block; text-align: center; }
.confs .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confs .name > a { font-size: 15.5px; font-weight: 700; color: var(--fg); margin-right: 2px; text-decoration-color: var(--line); }
.confs .name > a:hover { color: var(--link); text-decoration-color: currentColor; }
.confs .round { font-size: 12px; color: var(--muted); margin-left: 6px; }
.confs .dates { font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; text-align: center; }
.conf-head .dates { text-align: center; color: var(--muted); }
.confs .place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.confs .place a { color: inherit; }
.confs .place a:hover { color: var(--link); }
.confs .pin a { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--muted); }
.confs .pin a:hover { color: var(--link); background: var(--soft); }
.confs .pin svg { width: 16px; height: 16px; }
.confs .rk { font-size: 13.5px; text-align: center; color: var(--fg); }
/* rankings as plain text, no colored blocks: the top tier (BK21 IF3–4, KIISE 최우수,
   CORE A*) bold, the next level normal, the lower ones grey */
.confs .rk > span { display: inline-block; min-width: 34px; text-align: center; }
.confs .rk { color: var(--faint); }
.confs .rk[data-lv="3"] { color: var(--fg); }
.confs .rk.top { color: var(--fg); font-weight: 700; }
.confs .rk a { color: inherit; text-decoration: none; }
.confs .rk a:hover { color: var(--link); }
.confs.past > li { opacity: .5; }
.confs.past > li:hover { opacity: 1; }
#past-group h3 { margin-top: 28px; }
@media (min-width: 761px) {
  ul.confs > li { grid-template-columns: 42px 98px 44px minmax(0, 1fr) 92px 26px 36px 48px 36px; }
  .confs .place { display: none; }
  /* the note wraps below the name only when there is no room */
  .confs .name { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; white-space: normal; overflow: visible; }
  .confs .name > a { white-space: nowrap; }
  .confs .round { margin-left: 0; white-space: nowrap; }
}
@media (max-width: 760px) {
  ul.confs > li { grid-template-columns: 100px auto auto auto minmax(0, 1fr); row-gap: 1px; }
  ul.confs > li.conf-head { display: none; }
  .confs .countdown { grid-row: 1; grid-column: 1; }
  .confs .countdown .v { min-width: 0; text-align: left; }
  .confs .due { grid-row: 2; grid-column: 1; font-size: 13px; }
  .confs .name { grid-row: 1; grid-column: 2 / -1; }
  .confs .dates { grid-row: 2; grid-column: 2; font-size: 13px; text-align: left; }
  .confs .place { grid-row: 2; grid-column: 3 / -1; font-size: 13px; }
  .confs .area { grid-row: 3; grid-column: 2; justify-content: flex-start; }
  .confs .pin { display: none; }
  .confs .rk { grid-row: 3; text-align: left; font-size: 13px; color: var(--muted); white-space: nowrap; }
  /* BK21 · KIISE · CORE side by side after the area tag (divs 8–10 of the row) */
  .confs .rk:nth-of-type(8) { grid-column: 3; }
  .confs .rk:nth-of-type(9) { grid-column: 4; }
  .confs .rk:nth-of-type(10) { grid-column: 5; }
}

/* ---------------------------------------------------------------- widgets */
@media (min-width: 641px) {
}

/* embedded course tools (COSE215 automata viewer) fit the page on phones */
.prose #viewer { width: auto; max-width: 800px; }
.prose #viewer #root { overflow-x: auto; }
@media (max-width: 640px) {
  .prose #viewer .dropdown { width: 130px; margin-right: 8px; }
  .prose #viewer #form #word-input, .prose #viewer #form #hidden-input, .prose #viewer #form .line { width: 100%; }
}
