/* SKKU–Rice workshop site.
   Fonts are served from this site (no external font requests): Inter and IBM Plex Mono, SIL Open Font License.
   Palette: neutral graphite and warm paper, one signal red (the Bloch vector). No blue or navy. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Version A: light */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #141414;
  --text: #2c2c2c;
  --muted: #666666;
  --rule: #dedede;
  --rule-strong: #141414;
  --tint: #eeeeee;
  --signal: #141414;      /* no separate accent: interaction is ink black */
  --skku: #124532;        /* SKKU dark green (Pantone 3435C) */
  --rice: #00205b;        /* Rice blue (Pantone 280) */
  --rice-gray: #7c7e7f;   /* Rice gray (Pantone 425) */
  --link: #141414;
  --bar: rgba(246, 245, 241, .95);
  --hero-bg: #f6f5f1;
  --hero-ink: #141414;
  --hero-text: #3a3a3a;
  --hero-muted: #6e6c66;
  --hero-line: #141414;
  --dots: rgba(20, 20, 20, .09);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 64.6rem;  /* = 1240px at the 120% root; grows with the 137.5% root on wide screens so text and width scale together */
  color-scheme: light;
}
/* Version B: dark graphite */
[data-theme="dark"] {
  --bg: #111112;
  --surface: #18181a;
  --ink: #f1efea;
  --text: #d3d1cb;
  --muted: #8f8d87;
  --rule: #2a2a2d;
  --rule-strong: #5a5955;
  --tint: #1d1d20;
  --signal: #ff4d42;
  --link: #f1efea;
  --bar: rgba(17, 17, 18, .93);
  --hero-bg: #111112;
  --hero-ink: #f6f4ef;
  --hero-text: #cfcdc7;
  --hero-muted: #8f8d87;
  --hero-line: #e9e7e1;
  --dots: rgba(241, 239, 234, .07);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 120%; }
@media (min-width: 1600px) { html { font-size: 137.5%; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--sans); }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hero-photos :focus-visible { outline-color: #fff; }
h1, h2, h3 { font-family: var(--sans); color: var(--ink); font-weight: 650; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: 1.45rem; letter-spacing: -.015em; }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol, dl { margin: 0; padding: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--wrap); }  /* narrow pages share the left edge of the header and footer */
.narrow > * { max-width: none; }  /* lists span the header width; long paragraphs keep a readable measure below */
.muted { color: var(--muted); }
.tba { color: var(--muted); font-style: italic; }
.label { font: 500 .8rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9em; }
.label a { color: inherit; text-decoration: none; }
.label a:hover { color: var(--ink); }
.print-only { display: none; }
.nw { white-space: nowrap; }
.tt { display: inline-block; }  /* title halves around a colon: each wraps as a unit */
h1, h2, h3, .row-name, .t-title, .row-title { text-wrap: balance; }
p, li, dd, figcaption, .lead { text-wrap: pretty; }

.draft { background: var(--tint); color: #555555; border-bottom: 1px solid var(--rule); font: 400 .76rem/1.4 var(--mono); text-align: center; padding: 6px 16px; }

/* masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: var(--bar); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 4rem; }
.wordmark { white-space: nowrap; display: flex; align-items: center; gap: 10px; color: var(--ink); font: 650 1.05rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; }
.mark { width: 1.5rem; height: 1.5rem; color: var(--ink); flex: none; }
.mark-dot { fill: var(--ink); }
.nav ul { display: flex; gap: 2px; list-style: none; }
.nav a { display: block; padding: 6px 10px; color: var(--muted); font-size: .92rem; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.nav-button { display: none; }

/* hero */
.hero { background: var(--hero-bg); color: var(--hero-text); position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px); background-size: 24px 24px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.75fr 1fr; gap: 40px; align-items: center; padding-top: 76px; padding-bottom: 76px; }
.hero h1 { color: var(--hero-ink); font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: .45em; }
.label-light { color: var(--hero-muted); }
.hero-lead { font-size: 1.2rem; max-width: 34em; color: var(--hero-text); }
.hero-facts { font: 400 .85rem/1.5 var(--mono); color: var(--hero-muted); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.hero-links a { color: var(--hero-ink); font-weight: 500; font-size: .95rem; text-decoration: none; border: 1px solid var(--hero-ink); padding: 8px 16px; }
.hero-links a::after { content: " →"; }
.hero-links a:first-child { background: var(--hero-ink); color: var(--hero-bg); }
.hero-links a:hover { border-color: var(--signal); }
.hero-links a:first-child:hover { background: #2c2c2c; border-color: #2c2c2c; color: #fff; }
.bloch { width: 100%; max-width: 420px; justify-self: end; color: var(--hero-line); }
.bloch .vec { color: var(--signal); }

/* photo hero: SKKU left, Rice right */
.hero-photos { display: block; border-bottom: 0; background: #111; }
.hero-photos::before { display: none; }
.hero-photo { position: absolute; top: 0; bottom: 0; width: 50%; background-size: cover; background-position: center 88%; }  /* both photos are 4:3 with the ground at 90 % of the height, so the ground lines meet */
.hero-left { left: 0; }
.hero-right { right: 0; }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 56% 46% at 50% 72%, rgba(10, 10, 12, .52), rgba(10, 10, 12, 0) 74%), linear-gradient(180deg, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 0) 55%, rgba(10, 10, 12, .38) 100%); }  /* dark only behind the text, photos stay bright */
.hero-cap { position: absolute; top: 18px; max-width: 70%; font: 400 .72rem/1.4 var(--mono); color: #fff; background: rgba(0, 0, 0, .45); padding: 5px 9px; z-index: 2; }
.hero-left .hero-cap { left: 18px; }
.hero-right .hero-cap { right: 18px; text-align: right; }
.hero-center { position: relative; z-index: 2; padding-top: clamp(300px, 46vh, 520px); padding-bottom: 64px; text-align: center; color: #fff; }
.hero-photos h1 { color: #fff; max-width: 16em; margin-left: auto; margin-right: auto; text-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 22px rgba(0, 0, 0, .55); }
.hero-photos .label-light { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 1px 10px rgba(0, 0, 0, .55); }
.hero-photos .label-light { color: rgba(255, 255, 255, .82); }
.hero-sub { font: 500 clamp(1.15rem, 2.1vw, 1.6rem)/1.3 var(--sans); letter-spacing: -.01em; color: #fff; margin: -.1em auto 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 2px 16px rgba(0, 0, 0, .55); }
.hero-sub span { display: inline-block; transform: skewX(-9deg); text-wrap: balance; }  /* slight slant; Inter has no italic file here */
.hero-photos .hero-lead { color: rgba(255, 255, 255, .9); margin-left: auto; margin-right: auto; }
.hero-photos .hero-facts { color: rgba(255, 255, 255, .72); }
.hero-photos .hero-links { justify-content: center; }
.hero-photos .hero-links a { color: #fff; border-color: rgba(255, 255, 255, .85); }
.hero-photos .hero-links a:first-child { background: #fff; color: #141414; border-color: #fff; }
.hero-photos .hero-links a:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.hero-photos .hero-links a:first-child:hover { background: #eeeeee; border-color: #eeeeee; color: #141414; }
.photo-credit { flex-basis: 100%; margin: 6px 0 0; text-align: left; font-size: .78rem; color: var(--muted); }
.photo-credit a { color: var(--muted); }

/* university identifiers (palette D) */
.uni::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; vertical-align: -.05em; background: var(--rice-gray); }
.uni-skku { color: var(--skku); }
.uni-skku::before { background: var(--skku); }
.uni-rice { color: var(--rice); }
.uni-rice::before { background: var(--rice); }

/* sections */
.section { padding: 64px 0; }
.section-rule { border-top: 1px solid var(--rule); }
.section-top { padding-top: 40px; padding-bottom: 64px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.more { font-size: .92rem; }
.more::after { content: " →"; }
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; }
.prose p { max-width: 40em; }
.columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.block { margin: 36px 0; }

.dates div { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); }
.dates div:last-child { border-bottom: 1px solid var(--rule); }
.dates dt { color: var(--muted); }
.dates dd { white-space: nowrap; margin: 0; font: 500 .92rem/1.6 var(--mono); color: var(--ink); text-align: right; }
.news { list-style: none; margin-top: 4px; margin-bottom: 28px; font-size: 1rem; }
.news li { padding: 8px 0; border-top: 1px solid var(--rule); }
.news time { color: var(--muted); font-family: var(--mono); font-size: .85rem; margin-right: 6px; }
aside .label:not(:first-child) { margin-top: 32px; }

.name-list { list-style: none; }
.name-list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); }
.name-list li:last-child { border-bottom: 1px solid var(--rule); }
.name-list a { color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.name-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.name-list span { color: var(--muted); font-size: .95rem; text-align: right; }

.directions div { padding: 12px 0; border-top: 1px solid var(--rule); }
.directions div:last-child { border-bottom: 1px solid var(--rule); }
.directions dt { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.directions dd { margin: 0; color: var(--text); }

/* page head */
.page-head { padding: 52px 0 30px; border-bottom: 1px solid var(--rule); }
.page-head .lead { color: var(--muted); font-size: 1.05rem; max-width: 46em; margin: 0; }
.text-button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { text-decoration-color: var(--signal); }

/* rows: speakers, posters, organizers */
.rows { list-style: none; }
.row { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.rows > .row:last-child { border-bottom: 1px solid var(--rule); }
.row-link:hover .row-name { text-decoration: underline; text-underline-offset: 3px; }
.row-name { font: 600 1.05rem/1.3 var(--sans); color: var(--ink); margin: 0 0 2px; letter-spacing: -.01em; }
.row-meta { color: var(--muted); font-size: .95rem; margin: 0 0 6px; }
.row-title { margin: 0; color: var(--text); font-size: .92rem; }  /* most talk and poster titles fit on one line on a laptop or wider */
.code { flex: none; width: 3.4em; padding-top: 3px; font: 500 .85rem/1.3 var(--mono); color: var(--muted); }
.photo { width: 4.5rem; height: 4.5rem; object-fit: cover; flex: none; filter: grayscale(.15); }
.photo-lg { width: 6rem; height: 6rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .9rem; }
.ext::after { content: " ↗"; font-size: .85em; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 28px 0 4px; }
.filters input, .filters select { font: inherit; font-size: .95rem; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--surface); color: var(--text); max-width: 100%; }
.filters input { flex: 1 1 280px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--ink); }
#f-count { font: 400 .8rem/1 var(--mono); margin-left: auto; color: var(--muted); }

/* program */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 18px 0; border-bottom: 1px solid var(--rule); position: sticky; top: 60px; background: var(--bg); z-index: 5; font-size: .92rem; font-weight: 500; }
.tabs a { text-decoration: none; color: var(--ink); }
.tabs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.day { padding-top: 36px; scroll-margin-top: 120px; }
.day h2 .label { display: block; margin-bottom: 4px; }
.time { flex: none; width: 10.6rem; white-space: nowrap; color: var(--muted); font: 400 .85rem/1.6 var(--mono); padding-top: 1px; }
.slot { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.slot-ceremony .what { color: var(--ink); font-weight: 500; }
.session { border-top: 1px solid var(--rule-strong); margin-top: 18px; scroll-margin-top: 120px; }
.session-head { display: flex; gap: 16px; padding: 14px 0 8px; }
.session-head .time { color: var(--ink); font-weight: 500; }
.session-head h3 { margin: 0; }
.session-head p { margin: 2px 0 0; font-size: .9rem; }
.talk-row { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.talk-row:hover { background: var(--tint); }
.what { display: flex; flex-direction: column; }
.t-title { color: var(--ink); font-weight: 500; font-size: .92rem; }  /* same size as the Speakers/Posters list titles */
.talk-row:hover .t-title { text-decoration: underline; text-underline-offset: 3px; }
.t-who { color: var(--muted); font-size: .95rem; }
.day-venue { display: block; margin-top: 4px; font-size: .95rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.remote { white-space: nowrap; }

/* talk detail */
.talk-h1 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin-bottom: 22px; }
.presenter { display: flex; gap: 16px; align-items: center; }
.presenter .row-meta { margin-bottom: 4px; }
.when { color: var(--muted); font-size: .93rem; margin: 18px 0 0; }
.detail { padding: 8px 0 24px; }
.detail h2 { font-size: 1.15rem; margin-top: 40px; }
.authors { margin: 0 0 4px; }
.affils { list-style: none; color: var(--muted); font-size: .88rem; margin-bottom: 20px; }
.abstract p { max-width: none; }
figure { margin: 28px 0; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); background: #fff; padding: 6px; }
figcaption { color: var(--muted); font-size: .88rem; margin-top: 10px; }
.refs { font-size: .88rem; color: var(--muted); padding-left: 1.4em; }
.refs li { margin-bottom: 4px; }
.frame { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--rule); background: var(--tint); margin-bottom: 12px; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 64px; border-top: 1px solid var(--rule); font-size: .92rem; }

/* abstract book */
.abs-section { padding-top: 40px; }
.abs-section > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 8px; }
.abs-item { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.abs-item h3 { font-size: 1.2rem; }
.abs-item h3 a { color: var(--ink); text-decoration: none; }
.abs-item h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* footer */
.footer { border-top: 1px solid var(--rule); margin-top: 40px; padding: 32px 0 40px; font-size: 1rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }
.footer-name { color: var(--ink); font-weight: 600; font-size: 1.05rem; }

/* medium screens: menu button and one-column lists */
/* Menu: 8 items no longer fit beside the wordmark below ~1080px, so the menu button starts earlier than the 1020px layout switch */
@media (max-width: 1080px) {
  .nav-button { display: block; position: relative; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 0; }
  .nav-button span, .nav-button span::before, .nav-button span::after { position: absolute; left: 9px; width: 22px; height: 1.6px; background: var(--ink); content: ""; }
  .nav-button span { top: 19px; }
  .nav-button span::before { top: -7px; left: 0; }
  .nav-button span::after { top: 7px; left: 0; }
  .nav { position: absolute; top: 4rem; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 6px 24px 12px; }
  html.js .nav { display: none; }
  html.js .nav.open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 10px 0; }
}
@media (max-width: 1020px) {
  .nav-button { display: block; position: relative; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 0; }
  .nav-button span, .nav-button span::before, .nav-button span::after { position: absolute; left: 9px; width: 22px; height: 1.6px; background: var(--ink); content: ""; }
  .nav-button span { top: 19px; }
  .nav-button span::before { top: -7px; left: 0; }
  .nav-button span::after { top: 7px; left: 0; }
  .nav { position: absolute; top: 4rem; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 6px 24px 12px; }
  html.js .nav { display: none; }
  html.js .nav.open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 10px 0; }
  .columns { grid-template-columns: 1fr; gap: 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; padding-bottom: 56px; }
  .bloch { max-width: 200px; justify-self: start; order: -1; }
}

/* small screens */
@media (max-width: 700px) {
  .hero-cap { display: none; }
  .hero-center { padding-top: 260px; padding-bottom: 40px; }
  .photo-credit { text-align: left; }
}
@media (max-width: 860px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 48px; }
  .bloch { max-width: 190px; justify-self: start; order: -1; }
  .split, .columns { grid-template-columns: 1fr; gap: 36px; }
  .time { width: auto; }
  .slot, .talk-row, .session-head { flex-direction: column; gap: 2px; }
  .name-list li { grid-template-columns: 1fr; gap: 2px; }
  .name-list span { text-align: left; }
}

@media print {
  @page { size: A4; margin: 14mm 17mm 13mm; }
  :root, [data-theme="dark"] { --bg: #fff; --ink: #000; --text: #111; --muted: #444; --rule: #ccc; --rule-strong: #000; }
  html { font-size: 100% !important; }
  body { font-size: 10pt; line-height: 1.42; background: #fff; }
  .masthead, .footer, .draft, .page-head, .pager, .filters, .tabs { display: none !important; }
  a { color: inherit; text-decoration: none; }
  .wrap, .narrow, .narrow > * { max-width: none !important; padding-left: 0; padding-right: 0; }
  .print-only { display: block; }
  /* abstract book: one abstract per A4 page */
  .abs-section { padding: 0; }
  .abs-section > h2, .abs-section > .muted { display: none; }
  .abs-item { break-before: page; break-inside: avoid; padding: 0; border: 0; height: 268mm; display: flex; flex-direction: column; }
  .abs-item > * { flex: none; }
  .abs-section:first-child .abs-item:first-of-type { break-before: auto; }
  .abs-run { display: flex; justify-content: space-between; gap: 12pt; font: 400 7.5pt/1.3 var(--mono); color: #555;
             border-bottom: .5pt solid #999; padding-bottom: 2.5mm; margin: 0 0 6mm; }
  .abs-item .label { font-size: 8pt; margin-bottom: 2.5mm; }
  .abs-kind { display: inline; }
  .abs-item h3 { font-size: 15pt; line-height: 1.25; margin: 0 0 3.5mm; }
  .abs-item .authors { font-size: 10pt; margin-bottom: 1.5mm; }
  .abs-item .affils { font-size: 8.5pt; margin-bottom: 4mm; }
  .abs-item .affils li { margin: 0; }
  .abs-item .abstract p { margin: 0 0 2.2mm; text-align: justify; hyphens: auto; }
  .abs-item figure { margin: 4mm 0 3mm; break-inside: avoid; flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .abs-item figure img { flex: 0 1 auto; min-height: 0; width: auto; max-width: 100%; max-height: 82mm; object-fit: contain; align-self: center; border: 0; padding: 0; }  /* shrinks only when the page is full */
  .abs-item figcaption { flex: none; }
  .abs-item figcaption { font-size: 8.5pt; margin-top: 2mm; }
  .abs-item .refs { font-size: 8pt; margin: 2mm 0 0; }
  .abs-item .refs li { margin-bottom: .6mm; }
}

/* background options (site.json "bg") */
[data-bg="white"] { --bg: #ffffff; --bar: rgba(255, 255, 255, .96); }
[data-bg="white"] .page-head, [data-bg="white"] .section-rule, [data-bg="white"] .draft { background: #f6f6f6; }
[data-bg="gray"] { --bg: #f6f6f6; --bar: rgba(246, 246, 246, .95); }
[data-bg="paper"] { --bg: #f6f5f1; --bar: rgba(246, 245, 241, .95); }

/* SKKU | Rice two-tone line under the header (site.json "two_tone_line") */
[data-line="on"] .masthead { border-bottom: 0; }
[data-line="on"] .masthead::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--skku) 0 50%, var(--rice) 50% 100%); }

/* university names in identity colors */
.uni-name.uni-skku { color: var(--skku); font-weight: 500; }
.uni-name.uni-rice { color: var(--rice); font-weight: 500; }

/* previous / next */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px; }
.pg-prev, .pg-next { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.pg-next { text-align: right; }
.pg-name { font-weight: 600; }
.pg-prev:hover .pg-name, .pg-next:hover .pg-name { text-decoration: underline; text-underline-offset: 3px; }
.pg-uni { font-size: .82rem; }
.pg-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pg-count { font: 400 .8rem/1.4 var(--mono); color: var(--muted); }

/* very narrow screens (small phones, or 300–400% zoom) */
@media (max-width: 520px) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pg-mid { grid-column: 1 / -1; grid-row: 1; margin-bottom: 6px; }
}
@media (max-width: 420px) {
  .masthead-inner { gap: 12px; }
  .wordmark { white-space: normal; font-size: .95rem; line-height: 1.2; min-width: 0; }
  .nav-button { flex: none; }
  .nw { white-space: normal; }
  .row { gap: 12px; }
  .code { width: 2.8em; }
  .row > div { min-width: 0; }
  .hero-links { gap: 8px; }
}

/* SKKU-RICE wordmark: one baseline */
.wordmark { gap: .55em; flex-wrap: nowrap; row-gap: 2px; align-items: baseline; }
.ket-logo { display: inline; white-space: nowrap; }
.ket { font: 700 1em/1 var(--mono); letter-spacing: -.02em; }
.ket-dash { color: var(--muted); margin: 0 .04em; }
.wm-rest { font-weight: 600; color: var(--ink); white-space: nowrap; }
@media (max-width: 340px) { .wordmark { flex-direction: column; align-items: center; gap: 2px; text-align: center; } }

/* speaker profile pages */
.photo { object-position: center 20%; }
.photo-xl { width: 12rem; height: 15rem; filter: none; }
.profile-head { display: flex; gap: 36px; align-items: center; }
.profile-h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 .25em; }
.profile-head .row-meta { font-size: 1.02rem; line-height: 1.5; }
.profile h2 { margin-top: 1.8em; }
.profile h2:first-child { margin-top: 0; }
.areas { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.areas li { border: 1px solid var(--rule-strong); padding: 4px 12px; font-size: .92rem; margin: 0; }
.pubs { color: var(--text); }
.pubs li { margin-bottom: 8px; }
.talk-link a { font-weight: 600; color: var(--ink); }
.src-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.small { font-size: .85rem; }
.name-list .org-name a { white-space: nowrap; }
/* Phones: fill each line before wrapping (balanced/pretty wrapping left short first lines such as "Department of") */
@media (max-width: 700px) {
  .row-title, .row-meta, .row-name, .row .tba { text-wrap: wrap; }
}
@media (min-width: 360px) and (max-width: 700px) {
  .row-meta .uni-name { white-space: nowrap; }  /* keep "Sungkyunkwan University" / "Rice University" on one line (too wide below 360px) */
}
@media (max-width: 520px) {
  .profile-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .photo-xl { width: 10rem; height: 12.5rem; }
}

/* Academic Partners */
.partners { padding-top: 40px; padding-bottom: 56px; }
.partner-list { list-style: none; padding: 0; margin: 0; }
.partner-list li { padding: 16px 0; border-top: 1px solid var(--rule); }
.partner-list li:last-child { border-bottom: 1px solid var(--rule); }
.partner-name { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.partner-name::after { content: " ↗"; font-weight: 400; font-size: .85em; color: var(--muted); }
.partner-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.partner-list p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* Organized by: logo cards. Logos share one height and one top line; a name under the logo when the logo has none. */
.ob-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }  /* 2 x 2: Rice row, then SKKU row (flyer order) */
.ob-card { display: flex; border: 1px solid var(--rule); background: #fff; color: var(--ink); text-decoration: none; container-type: inline-size; }
.ob-mark { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 2.2rem 28px; min-height: 9rem; }
.ob-logo { display: flex; align-items: center; justify-content: center; width: 100%; }
/* One emblem height for all four lockups: --em is the emblem height; the widest lockup (QE, 7.3 x emblem) must fit the card. */
.ob-logo img { --em: min(4rem, calc((100cqi - 60px) / 7.4)); height: calc(var(--em) / var(--ef, 1)); width: auto; max-width: 100%; }
.ob-text { font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; text-align: center; line-height: 1.3; }
.ob-only { font-size: 1.3rem; }
.ob-only span { display: block; font-weight: 400; font-size: .95rem; color: var(--muted); margin-top: 4px; }
a.ob-card:hover { border-color: var(--rule-strong); }
@media (max-width: 860px) { .ob-grid { grid-template-columns: 1fr; } .ob-mark { padding: 1.4rem 14px; min-height: 7rem; } }
.name-list .org-name { color: var(--ink); font-weight: 500; text-align: left; font-size: 1rem; }
.name-list .org-name a { color: var(--ink); text-decoration: none; }
.name-list .org-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.detail.profile { padding-top: 40px; }

/* "pure": white everywhere; sections and page heads are separated by thin rules only */
[data-bg="pure"] { --bg: #ffffff; --bar: rgba(255, 255, 255, .96); }
[data-bg="pure"] .page-head, [data-bg="pure"] .section-rule { background: #fff; }
[data-bg="pure"] .draft { background: #fff; border-bottom: 1px solid var(--rule); }
[data-bg="pure"] .ob-card { border-color: var(--rule); }

/* short bio as year | entry rows */

.timeline { margin: 0; }
.timeline div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; padding: 7px 0; border-top: 1px solid var(--rule); }
.timeline div:last-child { border-bottom: 1px solid var(--rule); }
.timeline dt { font: 400 .9rem/1.6 var(--mono); color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.timeline dd { margin: 0; }
@media (max-width: 520px) { .timeline div { grid-template-columns: 1fr; gap: 0; } }

/* undergraduate tag next to a name */
.ug { font-weight: 400; color: var(--muted); }

/* poster session: light tinted block so it stands apart from the talk sessions */
.session-poster { background: #f6f6f6; border-top-color: var(--rule-strong); padding: 0 18px 6px; margin-left: -18px; margin-right: -18px; }
.session-poster .talk-row { border-color: #e2e4e0; }
@media (max-width: 700px) { .session-poster { margin-left: -12px; margin-right: -12px; padding: 0 12px 4px; } }

/* university names in identity colors: larger and a little bolder */
.label.uni { font-size: .95rem; font-weight: 600; letter-spacing: .05em; }
.uni-name.uni-skku, .uni-name.uni-rice { font-weight: 600; font-size: 1.04em; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-top: 1px solid var(--rule); margin: 0; }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }
.pager > * { min-width: 0; }
.pg-uni, .pg-name { overflow-wrap: anywhere; }
.presenter > div, .profile-head > div { min-width: 0; }
.row-meta, .row-name { overflow-wrap: anywhere; }
.split.split-even { grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .split.split-even { grid-template-columns: 1fr; } }
/* readable line length for running text inside full-width pages */
.page-head .lead, .prose > p, .abstract p, .affils, .authors, .refs, .detail figcaption { max-width: 52rem; }
.talk-h1, .profile-h1 { max-width: 60rem; }
.filters { max-width: 920px; }
/* current positions under the name on speaker pages */
.head-positions { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
.head-positions li { margin: 0 0 4px; }
/* let the pointer reach the hero photos (their tooltip carries the photo credit); buttons stay clickable */
.hero-shade, .hero-center { pointer-events: none; }
.hero-center a { pointer-events: auto; }
.directions + .label { margin-top: 2.2rem; }  /* Venue: space between Rooms and Getting there */
#campus-map { position: absolute; inset: 0; }
.pin-label { font: 600 .8rem/1.3 var(--sans, inherit); color: #111; background: #fff; border: 1px solid #111; border-radius: 0; box-shadow: none; padding: 3px 7px; }
.pin-label::before { display: none; }
.reg-link { margin-top: 1.6rem; }
.reg-link a { display: inline-block; background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; padding: 10px 20px; border: 1px solid var(--ink); }
.reg-link a::after { content: " →"; }
.reg-link a:hover { background: #2c2c2c; }
