/* Morning-light blue. One font per language; the hero name keeps its serif in all three. */
:root {
  --ice: #f7fcfe;
  --sky: #ddf3fa;
  --deepest: #0d3d5d;
  --heading-blue: #075370;
  --text: #244e66;
  --brand: #23afe5;
  --white: #ffffff;
  --line: rgb(7 83 112 / 0.18);
  --header: 64px;
  --gap: clamp(72px, 10vw, 128px);
  --name-font: "Source Serif 4", Georgia, serif;
  --cjk-fallback: "PingFang SC", "Microsoft YaHei", sans-serif;
  --font: "Source Sans Pro", "Noto Sans SC", var(--cjk-fallback);
}
html:lang(zh-Hans) { --font: "Noto Sans SC", var(--cjk-fallback); }
html:lang(id) { --font: "Plus Jakarta Sans", "Noto Sans SC", var(--cjk-fallback); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ice); color: var(--text); font: 400 1.1875rem/1.65 var(--font); overflow-wrap: break-word; }
html:lang(zh-Hans) body { font-size: 1.125rem; line-height: 1.85; }
html:lang(id) body { font-size: 1.0625rem; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { color: var(--heading-blue); font-weight: 600; line-height: 1.2; text-wrap: balance; }
h2 { font-family: var(--font); font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
html:lang(zh-Hans) :is(h2, h3) { line-height: 1.4; word-break: auto-phrase; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--heading-blue); outline-offset: 3px; }
#main:focus { outline: none; }

.wrap { width: min(1080px, 100% - clamp(40px, 9vw, 128px)); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 30; background: var(--heading-blue); color: var(--white); padding: 8px 16px; }
.skip:focus { top: 10px; }

/* Header: language only */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ice); border-bottom: 1px solid var(--line); }
.header-row { display: flex; justify-content: flex-end; align-items: center; min-height: calc(var(--header) - 1px); }
html:not(.js) .lang { visibility: hidden; }
.lang { display: flex; gap: clamp(14px, 3vw, 28px); }
.lang button { min-height: 44px; padding: 8px 2px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text); font: 400 1rem/1.3 var(--font); cursor: pointer; }
.lang button:hover { color: var(--deepest); }
.lang button[aria-pressed="true"] { color: var(--heading-blue); border-bottom-color: var(--brand); font-weight: 600; }

.text-link { display: inline-block; padding-block: 10px; color: var(--heading-blue); font-weight: 600; text-underline-offset: 6px; text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
.text-link:hover { color: var(--deepest); text-decoration-thickness: 3px; }

/* 1. Name card */
.card { background: linear-gradient(165deg, var(--ice) 15%, var(--sky)); }
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 6vw, 88px); min-height: calc(100svh - var(--header)); padding-block: 40px; }
.card h1 { color: var(--deepest); font-family: var(--name-font); font-size: clamp(2.75rem, 5.6vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.08; }
.role { margin-top: 10px; color: var(--text); font-size: 1.4rem; font-weight: 600; }
.belief { max-width: 21em; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); color: var(--deepest); font-family: var(--font); font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.38; text-wrap: balance; }
html:lang(zh-Hans) .belief { white-space: pre-line; line-height: 1.6; }
html:lang(id) .belief { font-size: clamp(1.5rem, 2.35vw, 1.9rem); line-height: 1.45; }
.down { margin-top: 28px; }
.portrait { display: block; width: clamp(320px, min(41vw, (100svh - 150px) * 0.8), 500px); }
.portrait img { width: 100%; }

/* 2. Story: one centred reading column */
.section { padding-block: var(--gap); }
.story .wrap { border-bottom: 1px solid var(--line); padding-block: var(--gap); }
.story { padding-block: 0; }
.story-column { max-width: 34em; margin-inline: auto; font-size: clamp(1.25rem, 2.1vw, 1.5rem); }
.story h2 { margin-bottom: 28px; }
.story p { color: var(--text); font-family: var(--font); line-height: 1.7; }
html:lang(zh-Hans) .story p { line-height: 2; }

/* 3. Care: three short passages, one under another */
.care h2 { max-width: 18em; margin-bottom: 48px; }
.moment { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 8px 48px; padding-block: 28px; border-top: 1px solid var(--line); }
.moment h3 { font-family: var(--font); font-size: 1.45rem; }
.moment p { max-width: 34em; }

/* 4. Background: two independent columns, about 2:1 */
.care { padding-bottom: clamp(44px, 5vw, 60px); }
.background { padding-block: 0 clamp(64px, 7vw, 88px); }
.background .ruled { padding-top: 40px; border-top: 1px solid var(--line); }
.background h3 { margin-bottom: 14px; font-size: 1.25rem; }
.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 48px clamp(40px, 6vw, 80px); margin-top: 36px; }
.block + .block { margin-top: 52px; }
.record li, .schools li { padding-block: 16px; border-top: 1px solid var(--line); line-height: 1.5; }
.record li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); align-items: baseline; gap: 2px 20px; }
.record .when { font-variant-numeric: tabular-nums; }
.what { color: var(--heading-blue); font-weight: 600; }
.graduation img, .zoom img { width: 100%; }
figcaption { margin-top: 8px; color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.awards { margin-top: 44px; line-height: 1.55; }
.awards h3 { margin-bottom: 6px; }
.plaques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.zoom { display: block; cursor: zoom-in; }

/* Footer */
.site-footer { padding-block: 40px 48px; border-top: 1px solid var(--line); background: linear-gradient(var(--ice), var(--sky)); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; }
.footer-name { color: var(--deepest); font-size: 1.25rem; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 8px 24px; border-radius: 4px; background: var(--heading-blue); color: var(--white); font-size: 1rem; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--deepest); }
.footer-links .text-link { font-size: 1rem; }

/* Plaque viewer */
.viewer { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; border: 0; border-radius: 6px; background: var(--deepest); color: var(--white); }
.viewer::backdrop { background: rgb(13 61 93 / 0.9); }
.viewer form { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.viewer button { min-height: 44px; padding: 8px 20px; border: 1px solid var(--white); border-radius: 4px; background: none; color: var(--white); font: 600 1rem var(--font); cursor: pointer; }
.viewer :focus-visible { outline-color: var(--white); }
.viewer img { width: auto; max-height: calc(100dvh - 180px); margin-inline: auto; }
.viewer figcaption { color: var(--white); text-align: center; }
body:has(.viewer[open]) { overflow: hidden; }

@media (max-width: 820px) {
  :root { --header: 56px; }
  body, html:lang(zh-Hans) body { font-size: 1.125rem; }
  html:lang(id) body { font-size: 1.0625rem; }
  .wrap { width: calc(100% - 40px); max-width: 640px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 20px; min-height: 0; padding-block: 24px 48px; }
  .card h1 { font-size: clamp(2.2rem, 11vw, 3.25rem); }
  .role { margin-top: 6px; font-size: 1.25rem; }
  .belief { margin-top: 18px; padding-top: 18px; font-size: clamp(1.35rem, 6vw, 1.75rem); line-height: 1.35; }
  html:lang(zh-Hans) .belief { font-size: clamp(1.35rem, 6.2vw, 1.75rem); line-height: 1.55; }
  .down { margin-top: 8px; }
  .portrait { width: 100%; max-width: 440px; }
  .moment, .columns { grid-template-columns: minmax(0, 1fr); }
  .columns { gap: 28px; }
  .column { width: 100%; max-width: 440px; }
  .column:first-child { max-width: none; }
  html:lang(id) .belief { font-size: clamp(1.25rem, 5.5vw, 1.65rem); line-height: 1.45; }
  .care h2 { margin-bottom: 32px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .record li { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
