/* ==========================================================================
   Jae-Young Kim's group — site styles
   Colours are defined once as tokens; dark mode redefines the tokens only.
   ========================================================================== */

:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #e9eef3;
  --ink: #121922;
  --ink-2: #2f3a46;
  --ink-3: #56616d;
  --line: #dce2e8;
  --line-2: #c6cfd8;
  /* UNIST colours, taken from the official logo: navy #001B54, teal #44C1C4 */
  --brand: #001b54;
  --accent: #1a6f8d;
  --accent-bright: #44c1c4;
  --accent-soft: #e3f5f6;
  --cool: #16636e;
  --cool-soft: #e2f0f1;
  --banner-ink: #ffffff;
  --banner-shade: rgba(8, 13, 20, 0.55);

  --sans: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: var(--sans);   /* one family everywhere: Helvetica */
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1100px;
  --prose: 100%;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d12;
    --surface: #0f1720;
    --surface-2: #18212d;
    --ink: #e7edf4;
    --ink-2: #c3ccd6;
    --ink-3: #8f9aa6;
    --line: #1e2936;
    --line-2: #2c3947;
    --brand: #9dbcff;
    --accent: #62d0d3;
    --accent-bright: #44c1c4;
    --accent-soft: #0b2830;
    --cool: #55b9c4;
    --cool-soft: #0e2427;
    --banner-shade: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080d12;
  --surface: #0f1720;
  --surface-2: #18212d;
  --ink: #e7edf4;
  --ink-2: #c3ccd6;
  --ink-3: #8f9aa6;
  --line: #1e2936;
  --line-2: #2c3947;
  --brand: #9dbcff;
  --accent: #62d0d3;
  --accent-bright: #44c1c4;
  --accent-soft: #0b2830;
  --cool: #55b9c4;
  --cool-soft: #0e2427;
  --banner-shade: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.24; text-wrap: balance; margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 50; }

/* ---------------------------------------------------------------- header */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
}
.masthead-in { max-width: var(--maxw); margin: 0 auto; padding-inline: 16px; }
.brandrow { display: flex; align-items: center; gap: 12px; padding-block: 12px 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--brand); }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand svg { display: block; color: var(--ink-2); }
.brand-name { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.themebtn {
  margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  font-family: var(--mono); font-size: 11px; padding: 5px 9px; border-radius: 4px; cursor: pointer;
}
.themebtn:hover { border-color: var(--accent); color: var(--accent); }
nav.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a {
  color: var(--ink-2); font-size: 13.5px; font-weight: 500; padding: 8px 10px 9px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
nav.tabs a:hover { color: var(--ink); text-decoration: none; }
nav.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- banners */
.banner {
  position: relative;
  width: 100%;
  height: min(calc(100vw / 2.1), 78vh);   /* medium (default) */
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  background-color: #111a24;
  background-size: cover;
  background-position: center;
  color: var(--banner-ink);
}
.banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, var(--banner-shade));
}
.banner.plain {
  height: auto;
  min-height: 200px;
  background-image:
    radial-gradient(ellipse 60% 90% at 78% 40%, rgba(217,138,31,.28), transparent 60%),
    repeating-radial-gradient(ellipse at 78% 40%, transparent 0 22px, rgba(255,255,255,.05) 22px 23px),
    linear-gradient(120deg, #0d1520, #1b2a3a);
}
.banner-in { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 28px 16px 22px; }
.banner h1 { font-size: clamp(28px, 4.6vw, 40px); letter-spacing: -0.02em; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero { height: min(calc(100vw / 1.55), 90vh); min-height: 420px; background-position: center 70%; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); }
.hero .sub { margin: 10px 0 0; font-size: clamp(15px, 2vw, 19px); opacity: .92; text-shadow: 0 1px 10px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 36px 16px 72px; }
.prose { max-width: var(--prose); }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose h2 { font-size: 24px; margin-top: 2em; padding-top: .2em; }
.prose h3 { font-size: 19px; margin-top: 1.7em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 1em 0 0; }
.prose li + li { margin-top: .45em; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }

/* figures: an image with alt text becomes a captioned figure */
figure { margin: 1.6em 0; }
figure img { display: block; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.ph {
  position: relative; display: block; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 4 / 3;
}
.ph svg { display: block; width: 100%; height: 100%; }
.ph .slot {
  position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: 10px;
  color: var(--ink-3); background: var(--surface); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 3px;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin: 1.6em 0; max-width: none; }
.gallery figure { margin: 0; }
.gallery figure img, .gallery .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .gallery { max-width: none; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.buttons a {
  display: inline-block; padding: 8px 15px; border-radius: 5px; font-size: 14px; font-weight: 500;
  background: var(--brand); color: var(--surface);
}
.buttons a:hover { background: var(--accent); text-decoration: none; }

.toc { font-size: 14px; }
.ko-note, .notice .ko { color: var(--ink-3); font-size: 14px; }

.notice {
  display: flex; gap: 14px; align-items: flex-start; margin: 26px 0 0; max-width: var(--prose);
  background: var(--accent-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--accent-bright); border-radius: 0 6px 6px 0; padding: 14px 18px;
}
.notice .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--accent);
  border: 1px solid var(--accent); padding: 2px 6px; border-radius: 3px; flex: none; margin-top: 3px;
}
.notice p { margin: 0; color: var(--ink); font-size: 15px; }
.notice p + p { margin-top: 4px; }

/* CV-style rows: list items written as  "2024-2026 | text"  */
.prose li.row { list-style: none; display: grid; grid-template-columns: 8.5em 1fr; gap: 14px; margin-left: -1.2em; }
.prose li.row .when { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .prose li.row { grid-template-columns: 1fr; gap: 0; } }

.profile { display: grid; grid-template-columns: 1fr minmax(260px, 400px); gap: 28px; align-items: start; }
.profile .photo img, .profile .photo .ph { width: 100%; aspect-ratio: auto; border-radius: 8px; }
.profile .photo .ph { aspect-ratio: 4 / 5; }
.profile-lines { font-size: 16px; color: var(--ink) !important; line-height: 1.75; }
@media (max-width: 720px) { .profile { grid-template-columns: 1fr; } .profile .photo { max-width: 420px; order: -1; } }

.address { font-size: 15px; line-height: 1.8; }
iframe.map { width: 100%; max-width: none; aspect-ratio: 16 / 9; min-height: 360px; border: 1px solid var(--line); border-radius: 6px; margin-top: 1.6em; }

.section-label {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--ink-3); margin: 44px 0 18px; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------- highlight cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; align-items: stretch; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent-bright); transform: translateY(-2px); }
.card .img { display: block; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.card .img img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.card .img .ph { border: 0; border-radius: 0; }
.card .body { padding: 14px 16px 16px; }
.card h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.card .links { margin: 8px 0 0; font-size: 13.5px; }
.card .links a + a::before { content: "·"; color: var(--ink-3); margin: 0 .45em; display: inline-block; }
.card .note { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.more { margin-top: 20px; }

/* ---------------------------------------------------------------- members */
.members-intro { max-width: var(--prose); color: var(--ink-2); margin: 0; }
.group { margin-top: 36px; }
.group h2 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding-block: 12px; border-bottom: 1px solid var(--line); max-width: 900px; }
.people .who { margin: 0; color: var(--ink-2); }
.people .who strong { color: var(--ink); font-weight: 600; }
.people .topic { margin: 3px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------------------------------------------------------------- publications */
.pubstats { margin: 26px 0 8px; }
.pubstats .nums { display: flex; gap: 14px; flex-wrap: wrap; }
.pubstats .nums div { flex: 1 1 160px; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.pubstats .nums b { display: block; font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.pubstats .nums span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.pubchart { width: 100%; height: auto; margin-top: 18px; display: block; }
.pubchart rect { fill: var(--accent-bright); }
.pubchart text { font-family: var(--mono); font-size: 10px; fill: var(--ink-3); text-anchor: middle; }
.pubchart text.n { fill: var(--ink); }
.pubstats .src { font-family: var(--mono); font-size: 11px; color: var(--ink-3); text-align: center; margin: 6px 0 0; }
.pubyear { font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin: 30px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding-block: 11px; border-bottom: 1px solid var(--line); }
.pubs .t { color: var(--ink); }
.pubs .m { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); padding-block: 26px; font-size: 12.5px; color: var(--ink-3); }
footer .in { max-width: var(--maxw); margin: 0 auto; padding-inline: 16px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; }

/* wide figure (e.g. Research summary) breaks out of the text column */
.prose figure.wide { width: 100%; }
.prose figure.wide img { width: 100%; }
/* highlight cards inside a page */
.related { max-width: none; width: 100%; margin: 1.4em 0 2.2em; }
.related .cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.related .card h3 { font-size: 14px; }
.related .card .note { display: none; }
.prose .callout { background: var(--accent-soft); border-left: 3px solid var(--accent-bright); padding: 12px 16px; border-radius: 0 6px 6px 0; color: var(--ink); }
.prose .cookie { margin-top: 3em; padding: 14px 18px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 14px; color: var(--ink-3); }
.prose .cookie strong { color: var(--ink-2); }
.prose .address, .prose iframe.map { max-width: none; }

.prose figure img { width: 100%; }
.gallery figure img { width: 100%; }
.notice { max-width: none; }

/* justified body text: both edges aligned with the images */
.prose p, .prose li, .members-intro, .people .topic {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.prose li.row span, .card p, .buttons, .toc, .address { text-align: left; hyphens: manual; }

/* fixed-shape image frame for cards: the whole figure stays visible, a blurred copy fills the frame */
.thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #10151c; }
.thumb::before { content: none;
  filter: blur(22px) brightness(.6) saturate(1.1); }
.thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.card .img .thumb img { height: 100%; }

/* home: research programs */
.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 18px; }
.program { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.program:hover { border-color: var(--accent-bright); transform: translateY(-2px); }
.program .thumb { aspect-ratio: 16 / 9; }
.program .body { display: block; padding: 14px 16px 18px; }
.program .num { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 4px; padding: 0 6px; margin-right: 8px; }
.program strong { font-family: var(--serif, inherit); font-size: 16.5px; line-height: 1.35; color: var(--ink); }
.program .txt { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }

/* home: one-line publication numbers */
.statline { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; margin: 8px 0 30px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 8px; color: var(--ink-3); font-size: 14px; text-decoration: none; }
.statline b { color: var(--accent); font-size: 22px; font-weight: 600; margin-right: 4px; }
.statline .go { margin-left: auto; color: var(--accent); }
.statline:hover { border-color: var(--accent-bright); }

/* research: jump links to the three programs */
.prose .chips { display: flex; flex-wrap: wrap; gap: 10px; text-align: left; }
.prose .chips a { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; font-size: 14px; text-decoration: none; }
.prose .chips a:hover { border-color: var(--accent-bright); }

/* members: full-width rows, two columns on wide screens */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 36px; }
.people li { max-width: none; }

/* short lines: justified text leaves gaps, so align left */
.people .topic { text-align: left; }
@media (max-width: 640px) {
  .prose p, .prose li, .members-intro { text-align: left; hyphens: manual; }
  .people { grid-template-columns: 1fr; }
}

/* research: "In plain words" boxes with a diagram */
.prose .explain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: center;
  margin: 1.2em 0 1.6em; padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent-bright); border-radius: 0 10px 10px 0; }
.prose .explain p { margin: 0; font-size: 15.5px; text-align: left; hyphens: manual; }
.prose .explain figure { margin: 0; }
.prose .explain figure img { border-radius: 8px; }
.prose .explain figcaption { display: none; }
@media (max-width: 820px) { .prose .explain { grid-template-columns: 1fr; } }

/* research: project / facility cards */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin: 1em 0 2em; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.project .img { display: block; border-bottom: 1px solid var(--line); }
.project .thumb { aspect-ratio: 16 / 9; }
.project .body { padding: 14px 16px 18px; }
.project h3 { font-size: 17px; margin: 0 0 8px; }
.project h3 a { color: var(--ink); text-decoration: none; }
.project h3 a:hover { color: var(--accent); }
.project p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); text-align: left; hyphens: manual; }
.project .role { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.project .role span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }

/* ---------------------------------------------------------------- 2026-09-27 revision */
/* banner sizes per page (front matter: banner_size: small | medium | large) */
.banner.size-small  { height: min(calc(100vw / 4.2), 320px); min-height: 180px; }
.banner.size-medium { height: min(calc(100vw / 3.4), 440px); min-height: 200px; }   /* all pages except Home */
.banner.size-large  { height: min(calc(100vw / 1.8), 82vh); }

/* under-construction notice */
.construction { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.construction .in { max-width: var(--maxw); margin: 0 auto; padding: 7px 16px; }
.construction strong { color: var(--brand); }

/* headings: Helvetica, a little bolder */
h1, h2, h3, h4, .brand-name { font-family: var(--sans); font-weight: 700; letter-spacing: -0.01em; }
.card h3, .program strong, .project h3 { font-weight: 700; }

/* readability: slightly larger small text */
.card .note { font-size: 13.5px; }
.card .links { font-size: 14px; }
.people .topic { font-size: 15.5px; color: var(--ink-2); }
.people .who { font-size: 17px; }

/* members: clear group headings */
.group h2 { font-family: var(--sans); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; text-transform: none;
  color: var(--brand); padding-bottom: 8px; border-bottom: 2px solid var(--accent-bright); }
.group { margin-top: 44px; }

/* profile page: personal note, small and quiet */
.prose .aside { font-size: 14px; color: var(--ink-3); margin-top: 3em; text-align: left; }

/* figures inside "In plain words" and facility cards: show the credit */
.prose .explain figcaption { display: block; font-size: 12px; color: var(--ink-3); margin-top: 6px; text-align: left; }
.project .credit { font-size: 11.5px; color: var(--ink-3); margin: 8px 0 0; }

/* contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 28px; align-items: stretch; margin-top: 8px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; }
.contact-card figure.logo { margin: 0 0 18px; max-width: 360px; }
.contact-card figure.logo img { width: 100%; height: auto; border-radius: 4px; }
.contact-card p { margin: 0 0 14px; line-height: 1.65; text-align: left; }
.contact-card p.ko { font-size: 14.5px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }
.contact-grid iframe { width: 100%; height: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* publications: insight panels */
.pubgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
@media (max-width: 820px) { .pubgrid { grid-template-columns: 1fr; } }
.pubpanel .pubchart text { font-size: 13px; }
.pubpanel .pubchart text.n { font-size: 12px; }
.pubpanel { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--surface); }
.pubpanel h3 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
.pubpanel ol, .pubpanel ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.pubpanel li { margin-bottom: 6px; text-align: left; }
.pubpanel li .c { font-family: var(--mono); font-size: 12px; color: var(--accent); white-space: nowrap; }
.pubchart rect.first { fill: var(--brand); }
.pubchart rect.team { fill: var(--accent); }
.pubchart rect.collab { fill: var(--accent-bright); opacity: .75; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; justify-content: center; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------------------------------------------------------------- 2026-09-27 (2) */
/* banner titles: centred, near the bottom; home hero centred in the middle */
.banner { justify-content: center; }
.banner-in { text-align: center; }
.hero { align-items: center; }
.hero .banner-in { padding-bottom: 0; }
/* plain banner (no photo): UNIST navy */
.banner.plain { background-image: linear-gradient(120deg, #001b54, #0b3a6e 60%, #1a6f8d); min-height: 0; height: auto; }
.banner.plain.size-small, .banner.plain.size-medium { height: auto; min-height: 0; }
.banner.plain .banner-in { padding: 44px 16px 36px; }

/* two figures side by side: theory/illustration + our observation */
.prose .figpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 1.2em 0 1.6em; align-items: start; }
.prose .figpair figure { margin: 0; }
.prose .figpair img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; background: #0b1220; }
.prose .figpair figcaption { font-size: 13px; color: var(--ink-3); text-align: left; margin-top: 6px; }
@media (max-width: 720px) { .prose .figpair { grid-template-columns: 1fr; } }

/* a figure beside the text */
.prose figure.side { float: right; width: 34%; margin: 0.3em 0 1em 28px; }
.prose figure.side figcaption { font-size: 12.5px; text-align: left; }
.prose h3 { clear: both; }
@media (max-width: 720px) { .prose figure.side { float: none; width: 100%; margin: 0 0 1em; } }

/* facility cards: two per row */
.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .projects { grid-template-columns: 1fr; } }

/* profile photo: whole picture, centred, text-column width */
.prose figure.portrait { max-width: 760px; margin: 0 auto 1.8em; }
.prose figure.portrait img { width: 100%; height: auto; border-radius: 8px; }

/* publications: papers we led */
.led { margin-top: 30px; }
.led h2 { font-size: 22px; margin-bottom: 4px; }
.led .sub { color: var(--ink-3); font-size: 14px; margin: 0 0 8px; }
.led h3 { font-size: 16px; margin: 20px 0 4px; color: var(--brand); }
.banner-credit { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: rgba(255,255,255,.75); text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ph.ph-plain { display: block; position: relative; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; }
.ph.ph-plain svg { display: block; width: 100%; height: auto; }
.ph.ph-plain .slot { position: absolute; inset: auto 8px 8px 8px; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.prose figure > a { display: block; }
.banner.size-small { height: min(calc(100vw / 6), 230px); min-height: 150px; }
.pubpanel.wide { grid-column: 1 / -1; }
.pubpanel ul.hi { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.pubpanel ul.hi strong { color: var(--brand); }
.pubpanel ul.hi details summary { cursor: pointer; }
.pubpanel ul.hi details ol { margin: 6px 0 4px; font-size: 13px; }
.pubstats .metrics-note { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-3); }
.publinks { margin-top: 26px; }
.prose .publinks-row { text-align: left; font-size: 15px; color: var(--ink-2); }
.prose .publinks-row a { display: inline-block; margin: 4px 0 4px 10px; padding: 5px 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; }
.prose .publinks-row a:hover { border-color: var(--accent-bright); }

/* small language switch / divider */
.prose .langswitch { text-align: right; font-size: 13.5px; margin: 0 0 8px; }
.prose .langmark { margin-top: 3.5em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }
/* contact: photo above the map, both in the right column */
.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-side figure { margin: 0; }
.contact-side figure img { width: 100%; height: auto; border-radius: 10px; }
.contact-side iframe.map { margin: 0; min-height: 320px; }

/* highlight cards: show each picture whole, at its own shape (like the original site) */
.cards { align-items: start; }
.card .thumb { aspect-ratio: auto; background: none !important; }
.card .img .thumb img, .card .thumb img { height: auto; }
.pubstats .nums span { font-family: var(--sans); font-size: 13px; }

/* Contact: the UNIST logo file has a white background */
.contact-card figure.logo img { background: #fff; border: 0; }
/* facility table */
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 1em 0 1.6em; }
.prose table th, .prose table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose table td:first-child { font-weight: 600; color: var(--brand); white-space: nowrap; }
.projects { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.project p { font-size: 14px; }
.publinks-top { margin-bottom: 24px; }

/* home: research overview figure + three programs as text */
.home-figure { margin: 8px 0 18px; }
.home-figure img { width: 100%; height: auto; border-radius: 8px; }
.home-figure figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.programs-text { margin: 0 0 30px; padding-left: 22px; }
.programs-text li { margin: 0 0 10px; line-height: 1.55; }
.programs-text li strong { color: var(--brand); }
.programs-text .txt { display: block; color: var(--ink-2); font-size: 15px; }
/* banner titles: centred in the middle */
.banner { align-items: center; }
.banner-in { padding-top: 16px; padding-bottom: 16px; }

/* Research: reading note and Methods cards */
.prose .note { font-size: 14.5px; color: var(--ink-2); border-left: 3px solid var(--accent-bright); padding: 2px 0 2px 14px; }
.prose .methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1.2em 0 1.6em; }
.prose .method { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 12px 16px; background: var(--surface, transparent); }
.prose .method h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.prose .method p { margin: 0; font-size: 14px; color: var(--ink-2); text-align: left; hyphens: auto; }

@media (max-width: 560px) { .prose .methods { grid-template-columns: 1fr; } }

/* Publications: "What the numbers mean" panel */
.pubpanel.context .defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 4px 0 0; }
.pubpanel.context .defs dt { font-weight: 600; font-size: 14px; color: var(--ink); }
.pubpanel.context .defs dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 720px) { .pubpanel.context .defs { grid-template-columns: 1fr; } }

/* Banner captions: short description + credit */
.banner-credit { max-width: min(560px, 70%); text-align: right; line-height: 1.35; }

/* Teaching: course lists (definition lists) */
.prose dl { margin: 0.6em 0 1.4em; }
.prose dl dt { margin-top: 1em; color: var(--ink); }
.prose dl dd { margin: 3px 0 0 0; padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--ink-2); }

/* Members: optional short bio and links */
.people .bio { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.people .links { margin: 4px 0 0; font-size: 13.5px; }
.people .links a + a::before { content: " · "; color: var(--ink-3); }

/* Labelled list items written as  "Label | text"  (no year) */
.prose li.labelled { margin-bottom: 0.8em; }
.prose li.labelled .label { display: block; font-weight: 600; color: var(--ink); }

/* Publications number tiles: even rows at every width (no single tile left alone on a row) */
.pubstats .nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pubstats .nums div { min-width: 0; padding: 12px 14px; }
@media (max-width: 1000px) { .pubstats .nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .pubstats .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.prose .table-wrap table { margin: 0; }
.prose a { overflow-wrap: anywhere; }

/* Pages without a banner: title on the page itself */
.page-head { max-width: var(--maxw); margin: 0 auto; padding: 36px 16px 0; }
.page-head + main { padding-top: 24px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); color: var(--ink); border-bottom: 2px solid var(--accent-bright); padding-bottom: 12px; }

/* Join Us: FAQ */
.prose .faq { margin: 0.6em 0 1.6em; border-top: 1px solid var(--line); }
.prose .faq details { border-bottom: 1px solid var(--line); padding: 0; }
.prose .faq summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 2px; font-weight: 600; color: var(--ink); position: relative; }
.prose .faq summary::-webkit-details-marker { display: none; }
.prose .faq summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-size: 22px; font-weight: 400; color: var(--accent); }
.prose .faq details[open] summary::after { content: "–"; }
.prose .faq summary:hover { color: var(--accent); }
.prose .faq details > *:not(summary) { margin: 0 2px 14px; color: var(--ink-2); }

/* Mobile menu: a button with the current page name opens the full list */
.navbtn { display: none; }
@media (max-width: 760px) {
  .navbtn {
    display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
    background: none; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink);
    font: 600 14px var(--sans); padding: 7px 10px; cursor: pointer;
  }
  .navbtn svg { transition: transform .15s; }
  .masthead.nav-open .navbtn svg { transform: rotate(180deg); }
  .brandrow .themebtn { margin-left: 8px; }
  .brand-name { font-size: 15px; }
  nav.tabs { display: none; }
  .masthead.nav-open nav.tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin: 0; padding: 4px 0 12px;
  }
  .masthead.nav-open nav.tabs a {
    border-bottom: 0; border-left: 3px solid transparent; padding: 10px 10px; font-size: 15px; white-space: normal;
  }
  .masthead.nav-open nav.tabs a[aria-current="page"] { border-left-color: var(--accent); background: var(--accent-soft); }
}
@media (max-width: 380px) { .brand-name { font-size: 13.5px; } }

/* Quick links at the top of long pages */
.prose .chips.toc { margin: 0 0 1.6em; gap: 8px; }
.prose .chips.toc a { font-size: 13.5px; padding: 4px 12px; background: var(--surface); }
.prose .chips.toc a[href="#frequently-asked-questions"] { background: var(--accent-soft); border-color: var(--accent-bright); font-weight: 600; }
.publinks-top + .prose .chips.toc { margin-top: 14px; }

/* Where we publish: journal metrics */
.journals li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.journals .jm { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pubpanel .jsrc { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; line-height: 1.45; }
@media (max-width: 760px) {
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .navbtn, .brandrow .themebtn { flex: none; }
}
@media (max-width: 760px) {
  .brand-name { white-space: normal; overflow: hidden; text-overflow: clip; font-size: 13.5px; line-height: 1.2;
                display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .brand img { height: 30px; }
  .brandrow .themebtn { font-size: 0; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .brandrow .themebtn::before { content: "◐"; font-size: 15px; }
}
/* Banner credits move just below the picture on phones, so they never cover the title */
@media (max-width: 560px) {
  .banner:has(.banner-credit) { margin-bottom: 46px; overflow: visible; }
  .banner .banner-credit { top: 100%; bottom: auto; right: 0; left: 0; max-width: none; padding: 5px 16px 0;
                           color: var(--ink-3); text-shadow: none; font-size: 10.5px; text-align: right; }
}

/* ==========================================================================
   2026-09-27 (3) — calmer design
   Fewer boxes and borders, one typeface, white page, a narrower text column,
   uniform picture frames. Everything above still applies; this only overrides.
   ========================================================================== */
:root { --bg: #ffffff; --surface: #ffffff; --surface-2: #f1f4f7; --line: #e3e8ed; --mono: var(--sans); --maxw: 1000px; --gap: 24px; }
:root[data-theme="dark"] { --bg: #0b1016; --surface: #0b1016; --surface-2: #151d27; --mono: var(--sans); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0b1016; --surface: #0b1016; --surface-2: #151d27; } }

/* header: lighter menu, plain theme switch */
.masthead { border-bottom-color: var(--line); }
.brandrow { padding-block: 14px 6px; }
nav.tabs { gap: 4px; }
nav.tabs a { font-size: 14px; color: var(--ink-3); padding: 8px 9px 10px; }
nav.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.themebtn { border: 0; font-family: var(--sans); font-size: 12px; letter-spacing: .02em; color: var(--ink-3); text-transform: lowercase; }
.themebtn:hover { color: var(--accent); }

/* banners: a slimmer strip on inner pages, a shorter hero on Home */
.banner.size-medium { height: min(calc(100vw / 4.4), 300px); min-height: 170px; }
.hero { height: min(calc(100vw / 2.3), 72vh); min-height: 380px; }
.banner h1 { font-size: clamp(28px, 4vw, 38px); }

main { padding-top: 44px; }
.prose h2 { font-size: 25px; margin-top: 2.2em; }
.prose h3 { font-size: 19px; }

/* section titles: normal headings instead of small capitals */
.section-label { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; text-transform: none; color: var(--ink);
  border: 0; padding: 0; margin: 52px 0 16px; }

/* quick links: a quiet line of text links instead of pills */
.prose .chips, .prose .chips.toc { gap: 4px 0; font-size: 14.5px; }
.prose .chips a, .prose .chips.toc a { border: 0; border-radius: 0; background: none; padding: 0; font-size: 14.5px; }
.prose .chips a + a::before { content: "·"; color: var(--ink-3); margin: 0 .6em; display: inline-block; }
.prose .chips.toc { padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.prose .chips.toc a[href="#frequently-asked-questions"] { background: none; border: 0; font-weight: 700; }

/* buttons: outlined, not filled */
.buttons a { background: none; color: var(--accent); border: 1px solid var(--line-2); padding: 6px 14px; font-size: 14px; }
.buttons a:hover { background: none; border-color: var(--accent); color: var(--accent); }

/* callouts and notices: a thin rule on the left, no coloured box */
.prose .callout, .notice { background: none; border: 0; border-left: 3px solid var(--accent-bright); border-radius: 0; padding: 4px 0 4px 16px; }
.notice { margin-top: 28px; }
.notice .tag { border: 0; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--accent); margin-top: 1px; }

/* Home: "start here" links */
.start { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 0; margin: 22px 0 0; font-size: 15px; }
.start span { font-weight: 700; color: var(--ink); margin-right: 14px; }
.start a + a::before { content: "·"; color: var(--ink-3); margin: 0 .6em; display: inline-block; }

/* highlight cards: same-size picture frames, no boxes */
.cards { gap: 36px 28px; align-items: start; }
.card { border: 0; border-radius: 0; background: none; overflow: visible; }
.card:hover { transform: none; }
.card .img { border: 0; background: none; }
.card .thumb, .card .img .thumb { aspect-ratio: 16 / 10; background: var(--surface-2) !important; border-radius: 6px; overflow: hidden; }
.card .thumb img, .card .img .thumb img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 12px 0 0; }
.card h3 { font-size: 16px; }
.l-home .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .l-home .cards { grid-template-columns: 1fr; } }

/* Research: related papers as a compact list with small pictures */
.related { margin: 1em 0 2em; }
.prose .results { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
.prose .results li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; margin: 0; }
.prose .results .thumb { aspect-ratio: 4 / 3; background: var(--surface-2) !important; border-radius: 4px; }
.prose .results .thumb img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; }
.prose .results p { margin: 0; text-align: left; hyphens: manual; line-height: 1.4; }
.prose .results .t { font-size: 14.5px; font-weight: 600; }
.prose .results .t a { color: var(--ink); }
.prose .results .t a:hover { color: var(--accent); }
.prose .results .links { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.prose .results .links > * + *::before { content: " · "; color: var(--ink-3); }
@media (max-width: 640px) { .prose .results { grid-template-columns: 1fr; } .prose .results li { grid-template-columns: 88px minmax(0, 1fr); } }

/* Research: facility cards without boxes, same-size pictures */
.projects { gap: 34px 28px; }
.project { border: 0; border-radius: 0; background: none; }
.project .img { border: 0; }
.project .thumb { aspect-ratio: 16 / 9; border-radius: 6px; }
.project .body { padding: 12px 0 0; }
.project .role { border-top: 0; padding-top: 0; }
.project .role span { font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; color: var(--ink); }

/* Research: methods as a plain two-column list */
.prose .methods { gap: 18px 32px; }
.prose .method { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 0; background: none; }

/* collapsible notes (glossary, Korean summary, definitions) */
.prose details.fold, details.numdefs { margin: 1.2em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose details.fold > summary, details.numdefs > summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.prose details.fold > summary:hover, details.numdefs > summary:hover { color: var(--accent); }
.prose details.fold > *:not(summary) { margin: 0 0 12px; }
.prose details.fold dl { margin: 0 0 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 28px; }
.prose details.fold dl dt { margin: 0; font-weight: 600; font-size: 14.5px; }
.prose details.fold dl dd { margin: 2px 0 0; padding: 0; border: 0; font-size: 14px; }
@media (max-width: 640px) { .prose details.fold dl { grid-template-columns: 1fr; } }
details.numdefs { margin: 18px 0 0; }
details.numdefs .defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 4px 0 14px; }
details.numdefs dt { font-weight: 600; font-size: 14px; }
details.numdefs dd { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 720px) { details.numdefs .defs { grid-template-columns: 1fr; } }

/* Publications: numbers without boxes, panels with a top rule only */
.pubstats .nums div { border: 0; border-top: 2px solid var(--line); border-radius: 0; padding: 10px 2px 0; }
.pubstats .nums b { color: var(--ink); font-size: 28px; }
.pubpanel { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 0; background: none; }
.pubgrid { gap: 34px 40px; margin-top: 30px; }
.pubs .m, .pubpanel li .c, .pubyear, .prose li.row .when, .pubchart text { font-variant-numeric: tabular-nums; }
.pubyear { font-size: 15px; font-weight: 700; color: var(--ink); }
.pubs .m { font-size: 12.5px; }
.prose .publinks-row a { border-radius: 4px; }

/* Members: headings a little quieter */
.group h2 { color: var(--ink); border-bottom: 1px solid var(--line); font-size: 20px; }

/* figures: no frame lines */
figure img { border: 0; }
footer { margin-top: 24px; }

/* ---------------------------------------------------------------- one grid for every page
   Header, banner title, text, pictures and footer share the same left and right edges.
   Picture rows use one gutter (--gap) and fixed shapes, so rows line up exactly:
   3 columns (cards, facilities), 2 columns (figure pairs, lists), 1/3 (side figure). */
figure img, .thumb, .card .thumb, .project .thumb, .prose .results .thumb, .prose .figpair img,
.home-figure img, .prose figure.portrait img, .contact-side figure img, .contact-grid iframe, iframe.map { border-radius: 2px; }
.prose figure { margin: 1.8em 0; }
figcaption, .prose .figpair figcaption { font-size: 13px; line-height: 1.5; margin-top: 8px; text-align: left; }

.cards, .l-home .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--gap); }
.projects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--gap); }
.gallery, .prose .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.prose .figpair, .prose .results, .prose .methods, .pubgrid, details.numdefs .defs, .prose details.fold dl { column-gap: var(--gap); }
.prose .figpair { gap: var(--gap); margin: 1.8em 0; }
.pubstats .nums { gap: var(--gap); }
.people { column-gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* one picture shape per kind: highlights and facilities 16:10, figure pairs and small list pictures 4:3 */
.card .thumb, .card .img .thumb, .project .thumb { aspect-ratio: 16 / 10; }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prose .figpair img { aspect-ratio: 4 / 3; }

/* a figure beside the text takes exactly one of the three columns */
.prose figure.side { width: calc((100% - 2 * var(--gap)) / 3); margin: 0.3em 0 1em var(--gap); }
.prose figure.side img { aspect-ratio: 4 / 3; object-fit: cover; }

/* card text starts on the same line in every column */
.card .body, .project .body { padding-top: 14px; }
.card h3, .project h3 { font-size: 16px; line-height: 1.35; margin: 0; }
.project h3 { margin-bottom: 6px; }

/* contact: address in one column, photo and map across the other two */
.contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); }
.contact-card { border: 0; border-radius: 0; padding: 0; background: none; }

/* the phone and tablet steps */
@media (max-width: 900px) {
  .cards, .l-home .cards, .projects, .gallery, .prose .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .people { grid-template-columns: 1fr; }
  .prose figure.side { float: none; width: 100%; margin: 0 0 1em; }
}
@media (max-width: 560px) {
  .cards, .l-home .cards, .projects, .gallery, .prose .gallery { grid-template-columns: 1fr; }
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* menu text starts exactly at the column edge */
nav.tabs { margin-inline: 0; gap: 0 22px; }
nav.tabs a { padding-inline: 0; }
/* banner credit ends at the column's right edge */
.banner-credit { right: max(16px, calc((100% - var(--maxw)) / 2 + 16px)); }
/* highlight pictures sit on a mat inside the frame, so plots and photos look alike */
.card .thumb img, .card .img .thumb img, .prose .results .thumb img { padding: 6%; }
.prose .results .thumb img { padding: 5%; }
/* two folds in a row share one line */
.prose details.fold + details.fold { margin-top: -1.2em; border-top: 0; }
.prose details.fold[lang="ko"] > *:not(summary) { font-size: 15.5px; }
.prose details.fold ol, .prose details.fold ul { margin-top: 0; }
.prose .contact-side figure { margin: 0; }
.prose .contact-card figure.logo { margin: 0 0 18px; }

/* quick links: spacing instead of dots, so a wrapped line never starts with a dot */
.prose .chips, .prose .chips.toc, .start { gap: 6px 22px; }
.prose .chips a + a::before, .start a + a::before { content: none; }
.start span { margin-right: 0; }

/* profile photo across the full column */
.prose figure.portrait { max-width: none; margin: 0 0 1.8em; }

/* titles fill the column width (no narrow balanced lines) */
.card h3, .project h3, .prose .results .t { text-wrap: wrap; }
details.numdefs { border-bottom: 0; }
.pubstats .nums span { line-height: 1.35; display: block; margin-top: 4px; }
.prose .chips.toc { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 760px) { .brandrow .themebtn { border: 1px solid var(--line-2); border-radius: 50%; color: var(--ink-2); } }
/* tables: first column on the text edge, space before the facility cards */
.prose table th:first-child, .prose table td:first-child { padding-left: 0; }
.prose table th:last-child, .prose table td:last-child { padding-right: 0; }
.prose .table-wrap + .projects, .prose .table-wrap + * { margin-top: 2em; }
/* the menu wraps onto a second line on medium screens instead of scrolling sideways */
@media (min-width: 761px) { nav.tabs { flex-wrap: wrap; overflow: visible; } }
/* menu stays on one line down to tablet width */
@media (min-width: 761px) and (max-width: 940px) { nav.tabs { gap: 0 14px; } nav.tabs a { font-size: 13.5px; } }
/* Research list: extra lines (press releases, media) under the paper link */
.prose .results .note { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; border: 0; padding: 0; }
.prose .results .links a { color: var(--accent); }
/* side figures show the whole picture */
.prose figure.side img { aspect-ratio: auto; object-fit: initial; }

/* a paragraph with a picture beside it: the picture takes one of the three columns and is
   exactly as tall as the text, so both edges line up; the caption runs underneath */
.prose .textfig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 8px;
  grid-template-areas: "t t f" "c c c"; align-items: stretch; margin: 0; }
.prose .textfig > p { grid-area: t; margin: 0; }
.prose .textfig > figure { display: contents; }
.prose .textfig > figure > a { grid-area: f; display: block; min-height: 0; position: relative; }
.prose .textfig > figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.prose .textfig > figure figcaption { grid-area: c; margin: 0; }
@media (max-width: 720px) {
  .prose .textfig { grid-template-columns: 1fr; grid-template-areas: "t" "f" "c"; row-gap: 10px; }
  .prose .textfig > figure > a { aspect-ratio: 16 / 10; margin-top: 6px; }
}
.prose .textfig { margin-top: 1em; }
.prose .textfig > figure > a { margin-top: 6px; margin-bottom: 4px; }
.prose .textfig > figure.top img { object-position: 50% 25%; }
/* buttons: a light fill so they read as buttons */
.buttons a { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); font-weight: 600; }
.buttons a:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }

/* Resources: a one-line comment under each reference */
.prose .annot { display: block; font-size: 14.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; }
.prose .annot { text-align: left; hyphens: manual; }

/* Resources: reading list in collapsible topics */
.prose details.topic { border-top: 1px solid var(--line); margin: 0; }
.prose details.topic:last-of-type { border-bottom: 1px solid var(--line); }
.prose details.topic > summary { cursor: pointer; list-style: none; padding: 13px 34px 13px 0; font-weight: 700; color: var(--ink); position: relative; }
.prose details.topic > summary::-webkit-details-marker { display: none; }
.prose details.topic > summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 22px; font-weight: 400; color: var(--accent); }
.prose details.topic[open] > summary::after { content: "–"; }
.prose details.topic > summary:hover { color: var(--accent); }
.prose details.topic > summary .n { font-weight: 400; font-size: 13px; color: var(--ink-3); margin-left: 6px; }
.prose details.topic > ul { margin: 0 0 18px; }
.prose details.topic + details.topic { margin-top: 0; }
.prose details.topic + p, .prose details.topic + h2 { margin-top: 1.6em; }
.prose p + details.topic { margin-top: 1em; }
@media (min-width: 761px) and (max-width: 900px) { nav.tabs { gap: 0 11px; } nav.tabs a { font-size: 13px; } }
@media (min-width: 761px) and (max-width: 810px) { nav.tabs { gap: 0 8px; } nav.tabs a { font-size: 12.5px; } }

/* Menu item with a small sub-menu (e.g. Resources → 2.3m Radio Telescope) */
nav.tabs .has-sub { position: relative; display: inline-flex; }
nav.tabs .has-sub > a::after { content: "▾"; font-size: 10px; margin-left: 4px; color: var(--ink-3); }
nav.tabs .sub { display: none; position: absolute; top: 100%; left: -12px; z-index: 40; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.08); padding: 6px 0; }
nav.tabs .sub a { display: block; padding: 8px 12px; border: 0; white-space: nowrap; font-size: 14px; color: var(--ink-2); }
nav.tabs .sub a:hover, nav.tabs .sub a.on { color: var(--accent); background: var(--surface-2); text-decoration: none; }
nav.tabs .has-sub:hover .sub, nav.tabs .has-sub:focus-within .sub { display: block; }
@media (max-width: 760px) {
  nav.tabs .has-sub, nav.tabs .sub, .masthead.nav-open nav.tabs .has-sub, .masthead.nav-open nav.tabs .sub { display: contents; }
  nav.tabs .has-sub > a::after { content: none; }
  .masthead.nav-open nav.tabs .sub a { padding: 10px 10px; font-size: 15px; white-space: normal; background: none; border-left: 3px solid transparent; }
  .masthead.nav-open nav.tabs .sub a.on { border-left-color: var(--accent); background: var(--accent-soft); }
}
/* sub-menu entries: a title and a short line saying what is there */
nav.tabs .sub { min-width: 290px; padding: 6px 0; }
nav.tabs .sub a { white-space: normal; padding: 9px 14px; }
nav.tabs .sub a b { display: block; font-weight: 600; color: var(--ink); font-size: 14px; }
nav.tabs .sub a small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
nav.tabs .sub a:hover b, nav.tabs .sub a.on b { color: var(--accent); }
nav.tabs .sub a + a { border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .masthead.nav-open nav.tabs .has-sub > a { display: none; }
  .masthead.nav-open nav.tabs .sub a small { display: none; }
  .masthead.nav-open nav.tabs .sub a b { font-weight: inherit; color: inherit; font-size: inherit; }
  .masthead.nav-open nav.tabs .sub a + a { border-top: 0; }
}
/* Research: folded lists sit close to the text they belong to */
.prose details.topic.papers { margin-top: 1.2em; border-bottom: 1px solid var(--line); }
.prose details.topic > .related, .prose details.topic > .projects, .prose details.topic > .methods { margin: 4px 0 20px; }
.prose details.topic { border-bottom: 1px solid var(--line); }
.prose details.topic + details.topic { border-top: 0; }
.prose .figpair figure.cover img { object-fit: cover; }
/* a folded section with a one-line description under its title */
.prose details.topic > summary small.d { display: block; font-weight: 400; font-size: 14px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
