:root {
  --bg: #ffffff;
  --text: #1d1d1f;
  --text-2: #424245;
  --muted: #86868b;
  --line: #e8e8ed;
  --link: #0066cc;
  --frame: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --muted: #8e8e93;
    --line: #2c2c2e;
    --link: #4ea1ff;
    --frame: #ffffff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 16px; }
.top-inner { max-width: 1100px; margin: 0 auto; padding: 6px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.about-btn { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.about-btn:hover { color: var(--text); }
.about-pop { position: fixed; inset: auto; top: 112px; right: max(16px, calc(50vw - 526px)); margin: 0; max-width: min(380px, calc(100vw - 32px)); padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text-2); font-size: 15px; line-height: 1.6; box-shadow: 0 12px 40px rgba(0, 0, 0, .16); }
.about-pop p { margin: 0; }
.top .name { color: var(--text); font-weight: 600; font-size: 18px; white-space: nowrap; }
.top .name { display: inline-flex; flex-direction: column; line-height: 1.25; }
.top .name:hover { text-decoration: none; }
.tagline { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.top nav { display: flex; align-items: center; }
.top nav a { color: var(--muted); margin-left: 22px; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav a.icon { display: inline-flex; }
.top nav a.icon svg { width: 22px; height: 22px; }
.lang { display: inline-flex; align-items: center; gap: 8px; margin-left: 22px; }
.top nav .lang a { margin-left: 0; display: inline-flex; opacity: .45; transition: opacity .15s; }
.top nav .lang a:hover, .top nav .lang a.active { opacity: 1; }
.lang svg { width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[id] { scroll-margin-top: 120px; }
.lang-note { font-size: 14px; color: var(--muted); margin: 0; }

.intro { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.top nav .head-avatar { margin-left: 20px; display: inline-flex; }
.head-avatar img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.intro h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.025em; font-weight: 700; margin: 0 0 8px; }
.intro .role { font-size: 20px; color: var(--muted); margin: 0 0 28px; }
.intro p { color: var(--text-2); margin: 0 0 14px; max-width: 640px; }
.intro .links { margin-top: 22px; font-size: 15px; }
.intro .links a { margin-right: 20px; }

/* project list */
h2.section { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 56px 0 8px; }
.project { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.project:last-of-type { border-bottom: 0; }
.project .thumb { background: var(--frame); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; }
.project .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.project .thumb.svg { background: transparent; }
.project .thumb.svg img { object-fit: cover; object-position: left top; padding: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.tag { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--link); background: color-mix(in srgb, var(--link) 10%, transparent); border-radius: 999px; padding: 2px 10px; }
.project h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; font-weight: 600; }
.project h3 a { color: var(--text); }
.project p { color: var(--text-2); margin: 0 0 10px; font-size: 16px; }
.meta { font-size: 14px; color: var(--muted); }
.meta a { margin-right: 16px; }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 56px; font-size: 14px; color: var(--muted); }

/* licence popover */
.lic-btn { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; }
.lic-btn:hover { text-decoration: underline; }
.lic-pop { max-width: min(380px, calc(100vw - 32px)); margin: auto; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text-2); font-size: 14.5px; line-height: 1.55; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.lic-pop::backdrop { background: rgba(0, 0, 0, .25); }
.lic-pop p { margin: 0 0 8px; }
.lic-pop ul { margin: 0 0 10px; padding-left: 20px; }
.lic-pop .lic-title { font-weight: 700; color: var(--text); font-size: 16px; margin-bottom: 2px; }
.lic-pop .lic-name { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.lic-pop .lic-note { color: var(--muted); font-size: 13px; }
.lic-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.lic-actions button { font: inherit; font-size: 14px; color: var(--text); background: color-mix(in srgb, var(--line) 60%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; cursor: pointer; }

/* case study */
.back { font-size: 15px; display: inline-block; margin-top: 8px; }
.case-head { padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.case-head h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 700; }
.case-head .lede { font-size: 20px; color: var(--text-2); margin: 0 0 18px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; font-size: 15px; }
.facts dt { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 4px 0 0; color: var(--text); }

article h2 { font-size: 26px; letter-spacing: -.015em; margin: 52px 0 12px; font-weight: 700; }
article p, article li { color: var(--text-2); }
article strong { color: var(--text); font-weight: 600; }
figure { margin: 28px 0; }
figure img { background: var(--frame); border-radius: 8px; border: 1px solid var(--line); padding: 10px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.equation { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 15px; background: color-mix(in srgb, var(--line) 45%, transparent); padding: 14px 16px; border-radius: 8px; overflow-x: auto; color: var(--text); }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.chosen td { color: var(--text); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.note { border-left: 2px solid var(--line); padding-left: 16px; color: var(--muted); font-size: 15px; }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .intro { padding: 40px 0 40px; }
  .intro h1 { font-size: 34px; }
  .project { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project .thumb { aspect-ratio: 16 / 9; }
  .case-head h1 { font-size: 30px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* header photo: click to enlarge */
.head-avatar { background: none; border: 0; padding: 0; cursor: zoom-in; border-radius: 50%; }
.head-avatar:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.photo-pop { margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.photo-pop::backdrop { background: rgba(0, 0, 0, .55); }
.photo-pop button { display: block; padding: 0; border: 0; background: none; cursor: zoom-out; border-radius: 50%; }
.photo-pop img { display: block; width: min(360px, 80vw); height: min(360px, 80vw); border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }

/* certificates */
.top nav a[aria-current="page"] { color: var(--text); }
.cert-head { border-bottom: 0; padding-bottom: 12px; }
.cert-head .lede strong { color: var(--text); font-weight: 600; }
.cert-hint { font-size: 14px; color: var(--muted); margin: 6px 0 10px; }
.linkedin-all { display: inline-block; font-size: 15px; font-weight: 500; }
.cert-group { padding: 40px 0 12px; border-top: 1px solid var(--line); margin-top: 28px; }
.cert-issuer { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; }
.cert-issuer > div { min-width: 0; }
.cert-issuer h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.logo-tile { flex: none; display: inline-flex; align-items: center; justify-content: center; height: 72px; min-width: 72px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.logo-tile img { height: 46px; width: auto; max-width: 220px; object-fit: contain; }
.logo-tile.square { padding: 6px; }
.logo-tile.square img { height: 58px; border-radius: 6px; }
.cert-meta { display: block; font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.edu-no { margin-top: 6px; }
.edu-no span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.cert-img { display: block; aspect-ratio: 1000 / 773; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; }
.cert-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.cert-img:hover img { transform: scale(1.02); }
.cert { margin: 0; }
.cert figcaption { margin-top: 10px; }
.cert-title { display: block; color: var(--text); font-weight: 600; font-size: 16px; line-height: 1.4; }
.cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 8px; }

.programme { margin: 0 0 40px; }
.programme-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--link) 4%, var(--bg)); }
.programme-main .cert-img { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--link); background: color-mix(in srgb, var(--link) 12%, transparent); border-radius: 999px; padding: 3px 11px; }
.programme-text h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.015em; margin: 12px 0 6px; font-weight: 700; }
.programme-text h3 a { color: var(--text); }
.courses-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 24px 0 14px; }
.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.course .cert-title { font-size: 14px; font-weight: 500; line-height: 1.35; margin-top: 2px; }
.course .cert-meta { font-size: 12px; margin: 0; }

.cert-pop { margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.cert-pop::backdrop { background: rgba(0, 0, 0, .6); }
.cert-pop button { display: block; padding: 0; border: 0; background: none; cursor: zoom-out; }
.cert-pop img { width: auto; max-width: min(1000px, 94vw); max-height: 90vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); background: #fff; }
@media (max-width: 760px) {
  .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .cert-head .lede { font-size: 17px; }
  .cert-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .programme-main { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cert-issuer { gap: 14px; }
  .cert-issuer h2 { font-size: 19px; }
  .logo-tile { height: 60px; min-width: 60px; padding: 10px 12px; }
  .logo-tile img { height: 38px; max-width: 130px; }
  .logo-tile.square img { height: 46px; }
}

/* site menu: inline on wide screens, a dropdown behind the menu button below 900px */
.menu-btn { display: none; }
.menu { display: flex; align-items: center; position: static; inset: auto; width: auto; height: auto; margin: 0; border: 0; padding: 0; overflow: visible; background: none; color: inherit; }
@media (max-width: 900px) {
  .top-inner { position: relative; flex-wrap: wrap; justify-content: flex-start; align-content: center; column-gap: 16px; row-gap: 8px; min-height: 98px; padding: 6px 130px 0 24px; }
  .top nav { display: contents; }
  .top .name { order: 1; }
  .menu-btn { order: 5; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 15px; color: var(--text); background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px 11px 4px 8px; cursor: pointer; }
  .menu-btn svg { width: 18px; height: 18px; }
  .menu-btn:hover { background: color-mix(in srgb, var(--line) 50%, transparent); }
  .top-inner::after { content: ""; order: 3; flex-basis: 100%; }
  .top nav a.icon, .top nav .lang { order: 4; margin-left: 0; }
  .top nav .head-avatar { position: absolute; right: 24px; bottom: 0; margin: 0; }
  .menu { display: block; position: fixed; inset: auto; top: 108px; right: 16px; min-width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 40px rgba(0, 0, 0, .16); }
  .menu:not(:popover-open) { display: none; }
  .top nav .menu > a, .menu > .about-btn { display: block; width: 100%; text-align: left; margin: 0; padding: 10px 14px; border-radius: 8px; font-size: 16px; color: var(--text); }
  .top nav .menu > a:hover, .menu > .about-btn:hover { background: color-mix(in srgb, var(--line) 60%, transparent); }
  .top nav .menu > a[aria-current="page"] { color: var(--link); }
}
@media (max-width: 680px) {
  .top { font-size: 14px; }
  .tagline { font-size: 12px; }
  .top-inner { min-height: 70px; padding: 6px 94px 0 16px; column-gap: 14px; row-gap: 6px; }
  .top .name { font-size: 16px; }
  .top nav .head-avatar { right: 16px; }
  .head-avatar img { width: 64px; height: 64px; }
  .lang { gap: 6px; }
  .lang svg { width: 20px; height: 14px; }
  .menu { top: 98px; }
  .about-pop { top: 100px; }
}
@media (max-width: 420px) {
  .top-inner { min-height: 64px; padding-right: 84px; column-gap: 12px; }
  .top .name { font-size: 15px; }
  .top nav a.icon svg { width: 19px; height: 19px; }
  .lang svg { width: 18px; height: 12px; }
  .head-avatar img { width: 58px; height: 58px; }
  .menu { top: 92px; }
}
@media (max-width: 360px) {
  .logo-tile img { max-width: 105px; }
  .top .name { font-size: 14px; }
  .menu-btn { padding: 3px 8px 3px 6px; font-size: 14px; }
}

/* education */
.edu-list { border-top: 1px solid var(--line); }
.edu-item { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); }
.edu-item:last-child { border-bottom: 0; }
.edu-item .logo-tile { width: 100%; height: 96px; }
.edu-item .logo-tile img { height: 56px; max-width: 200px; }
.edu-text h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.015em; font-weight: 700; margin: 10px 0 4px; }
.edu-school { margin: 0; color: var(--text-2); font-weight: 500; }
@media (max-width: 680px) {
  .edu-item { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .edu-item .logo-tile { width: auto; justify-self: start; height: 76px; }
  .edu-item .logo-tile img { height: 46px; max-width: 220px; }
  .edu-text h2 { font-size: 19px; }
}

/* the tagline is two lines, so the header is taller below 900px */
@media (max-width: 900px) {
  .menu { top: 124px; }
  .about-pop { top: 126px; }
}
@media (max-width: 680px) {
  .menu { top: 114px; }
  .about-pop { top: 116px; }
}
@media (max-width: 420px) {
  .menu { top: 108px; }
  .about-pop { top: 110px; }
}

/* workshop page */
.ws-links { margin-top: 20px; }
.ws-links a { margin-right: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 8px; }
.photo-grid .photo { margin: 0; }
.photo-grid .cert-img { aspect-ratio: 4 / 3; background: var(--line); }
.photo-grid .cert-img img { object-fit: cover; padding: 0; border: 0; border-radius: 0; background: none; }
.photo-grid figcaption { font-size: 13px; margin-top: 6px; }
@media (max-width: 680px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
article h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; margin: 32px 0 8px; color: var(--text); }
details.refs { margin: 28px 0 8px; font-size: 14px; color: var(--muted); }
details.refs summary { cursor: pointer; color: var(--text); font-weight: 500; }
details.refs ol { padding-left: 20px; margin: 12px 0 0; }
details.refs li { margin: 0 0 8px; color: var(--text-2); overflow-wrap: anywhere; }
.globe-row { display: flex; align-items: center; gap: 24px; margin: 8px 0 4px; }
.globe-row p { margin: 0; }
.globe { flex: none; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 24px rgba(15, 30, 80, .25); }
.globe img { width: 100%; height: 100%; object-fit: cover; padding: 0; border: 0; border-radius: 0; }
@media (max-width: 680px) {
  .globe-row { flex-direction: column; align-items: center; text-align: left; gap: 16px; }
  .globe { width: 130px; height: 130px; }
}
.about-pop .about-more { margin-top: 10px; font-size: 14px; }
footer a { color: var(--link); }
