/* Self-hosted fonts (SIL Open Font License 1.1, see assets/fonts/OFL-*.txt).
   Only the subsets a page actually uses are downloaded, thanks to unicode-range. */
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/be-vietnam-pro-vietnamese-500-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/be-vietnam-pro-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/be-vietnam-pro-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/be-vietnam-pro-vietnamese-600-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/be-vietnam-pro-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/be-vietnam-pro-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Literata';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/literata-vietnamese-400-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Literata';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/literata-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Literata';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/literata-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Literata';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/literata-vietnamese-400-italic.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Literata';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/literata-latin-ext-400-italic.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Literata';font-style:italic;font-weight:400;font-display:swap;src:url('../fonts/literata-latin-400-italic.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Literata';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/literata-vietnamese-600-normal.woff2') format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;}
@font-face{font-family:'Literata';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/literata-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Literata';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/literata-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

/* ---------- Tokens ---------- */
:root {
  --paper: #ffffff;
  --surface: #f2f4f5;
  --ink: #1b232c;
  --muted: #5b6671;
  --rule: #e1e5e8;
  --underline: #b7c0c7;
  --hot: #c13a2c;
  /* News markers cool down with age, like a thermal image: newest is hottest. */
  --heat-1: #f5a300;
  --heat-2: #ef7b17;
  --heat-3: #e0531f;
  --heat-4: #c13a2c;
  --heat-5: #93433a;
  --heat-6: #7e6c68;
  --heat-7: #9aa3aa;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 44rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111518;
    --surface: #1a2026;
    --ink: #e8ecef;
    --muted: #9aa5af;
    --rule: #2a3138;
    --underline: #4b555e;
    --hot: #ff7246;
    --heat-1: #ffc233;
    --heat-2: #ff9d45;
    --heat-3: #ff7246;
    --heat-4: #f2544a;
    --heat-5: #c9665c;
    --heat-6: #9c8c88;
    --heat-7: #66717b;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.125rem, 1.5rem + 2.4vw, 2.875rem); letter-spacing: -0.02em; }
h2 { font-size: 1.375rem; letter-spacing: -0.01em; margin: 4rem 0 1.25rem; }
h3 { font-size: 1.0625rem; margin: 2.25rem 0 0.6rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }
cite { font-style: italic; }
img { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--hot); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--heat-1) 35%, transparent); }

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: 1.5rem; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 1; background: var(--paper); padding: 0.5rem 0.75rem; }

/* ---------- Header and footer ---------- */
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
}
.header-inner nav { flex: none; }
.home .header-inner { justify-content: flex-end; }
.site-name { font-family: var(--sans); font-weight: 600; text-decoration: none; white-space: nowrap; }
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hot); }

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}
.footer-inner { padding-block: 1.75rem 3rem; }
.footer-inner p { margin: 0 0 0.35rem; }

/* ---------- Intro ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  grid-template-areas: "head portrait" "body body";
  column-gap: 2.5rem;
  margin-top: 1rem;
}
.intro-head { grid-area: head; align-self: center; }
.portrait { grid-area: portrait; display: block; width: 100%; border-radius: 3px; }
.intro-body { grid-area: body; margin-top: 2.25rem; }
.role { font-family: var(--sans); font-weight: 500; color: var(--muted); font-size: 1rem; margin: 0.6rem 0 1.5rem; }
.lede { font-size: 1.375rem; line-height: 1.4; margin-bottom: 0; }
.hyphen { margin-inline: -0.06em; }
.contact {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
}
.contact.profiles { margin-top: 0.6rem; }

/* ---------- News timeline (the one bold element) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: var(--rule);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0 0 1.1rem 1.75rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--heat, var(--heat-7));
  box-shadow: 0 0 0 3px var(--paper);
}
.timeline li:first-child::before {
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 7px color-mix(in srgb, var(--heat-1) 25%, transparent);
}
.timeline time {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.15em;
}
.timeline p { margin: 0; }
.heat-1 { --heat: var(--heat-1); }
.heat-2 { --heat: var(--heat-2); }
.heat-3 { --heat: var(--heat-3); }
.heat-4 { --heat: var(--heat-4); }
.heat-5 { --heat: var(--heat-5); }
.heat-6 { --heat: var(--heat-6); }
.heat-7 { --heat: var(--heat-7); }

/* ---------- Lists, publications, rows ---------- */
.plain { margin: 0; padding-left: 1.1rem; }
.plain li { margin-bottom: 0.6rem; }
.plain li::marker { color: var(--muted); }

.pubs { list-style: none; margin: 0; padding: 0; }
.pub { margin-bottom: 1.5rem; }
.pub p { margin: 0; }
.pub-title { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.pub-title a { text-decoration-color: var(--rule); }
.pub-title a:hover { text-decoration-color: var(--hot); }
.pub-authors { margin-top: 0.25rem !important; font-size: 1rem; color: var(--muted); }
.pub-authors strong { color: var(--ink); }
.pub-venue { font-size: 1rem; font-style: italic; color: var(--muted); }
.pub-links { margin-top: 0.3rem !important; display: flex; gap: 1rem; font-family: var(--sans); font-weight: 500; font-size: 0.875rem; }
.note { font-size: 0.9375rem; color: var(--muted); }
.year + .note, .post-list + .note { margin-top: 2.5rem; }

.rows { margin: 0; }
.row {
  display: grid;
  grid-template-columns: 7.25rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row dt { font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.1em; }
.row dd { margin: 0; }
.detail { display: inline-block; margin-top: 0.2rem; font-size: 1rem; color: var(--muted); }

/* ---------- Blog ---------- */
.page-header { margin: 1rem 0 2.5rem; }
.page-header .lede { margin-top: 1rem; color: var(--muted); font-size: 1.25rem; }
.year h2 { margin-top: 2.5rem; font-size: 1.125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}
.post-list time { font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; color: var(--muted); padding-top: 0.15em; font-variant-numeric: tabular-nums; }
.post-entry a { font-size: 1.1875rem; }
.summary { display: block; color: var(--muted); font-size: 1rem; margin-top: 0.15rem; }
.tag {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.35rem;
  white-space: nowrap;
}

.post-header { margin: 1rem 0 2.25rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.9rem 0 0; font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; color: var(--muted); }
.prose { font-size: 1.1875rem; line-height: 1.7; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose h2 { font-size: 1.375rem; margin: 2.5rem 0 0.8rem; }
.prose h3 { font-size: 1.125rem; margin: 2rem 0 0.6rem; }
.prose blockquote { margin: 1.6rem 0; padding-left: 1.25rem; border-left: 2px solid var(--heat-2); color: var(--muted); font-style: italic; }
.prose img { display: block; margin: 1.75rem auto; border-radius: 3px; }
.prose figure { margin: 1.75rem 0; }
.prose figcaption { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose code { font-family: var(--mono); font-size: 0.85em; }
.prose :not(pre) > code { background: var(--surface); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre { background: var(--surface); padding: 1rem 1.1rem; border-radius: 4px; overflow-x: auto; font-size: 0.95rem; line-height: 1.5; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; margin: 1.75rem 0; }
.prose th, .prose td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-family: var(--sans); font-weight: 600; font-size: 0.875rem; color: var(--muted); }
.prose td:first-child, .prose th:first-child { padding-left: 0; }
.prose .footnotes { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.9375rem; color: var(--muted); }
.post-footer { margin-top: 3rem; font-family: var(--sans); font-weight: 500; font-size: 0.9375rem; }

/* ---------- Small screens ---------- */
@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .wrap { padding-inline: 1.25rem; }
  .intro { grid-template-columns: 1fr; grid-template-areas: "portrait" "head" "body"; }
  .portrait { width: 7.5rem; margin-bottom: 1.25rem; }
  .intro-body { margin-top: 1.75rem; }
  .lede { font-size: 1.25rem; }
  h2 { margin-top: 3.25rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.15rem; }
  .row { grid-template-columns: 1fr; gap: 0.2rem; }
  .post-list li { grid-template-columns: 1fr; gap: 0.1rem; }
  .prose { font-size: 1.125rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .skip { display: none; }
  body { font-size: 11pt; }
  a { text-decoration: none; }
  .timeline li::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
