
  :root {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --fg: #171613;
    --muted: #6a675e;
    --line: #e4e1d8;
    --accent: #b4451f;
    --accent-soft: #fdf1ea;
    --shadow: 0 1px 2px rgba(23,22,19,.04), 0 8px 24px rgba(23,22,19,.05);
    --radius: 14px;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #100f0d;
      --surface: #191815;
      --fg: #eeece5;
      --muted: #9b978c;
      --line: #2a2823;
      --accent: #f08b56;
      --accent-soft: #2a1d15;
      --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    }
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }

  a { color: inherit; }

  /* ---------------------------------------------------------------- nav -- */
  nav {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: saturate(180%) blur(12px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
  }
  nav .wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 4rem; gap: 1rem;
  }
  .brand { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
  .nav-links { display: flex; gap: 1.75rem; font-size: 0.92rem; color: var(--muted); }
  .nav-links a { text-decoration: none; }
  .nav-links a:hover { color: var(--accent); }
  @media (max-width: 40rem) { .nav-links { display: none; } }

  /* --------------------------------------------------------------- hero -- */
  .hero {
    padding: 6.5rem 0 4.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
  }
  .hero picture { display: contents; }
  .hero-photo {
    grid-column: 2; grid-row: 1;
    width: 100%;
    height: auto;          /* beat the width/height attribute presentational hints */
    max-width: 20rem;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    justify-self: end;
  }
  .hero h1 {
    font-family: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-weight: 500;
    font-size: clamp(2.1rem, 5.2vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.022em;
    margin: 0 0 1.4rem;
    max-width: 24ch;
  }
  .hero h1 em { font-style: italic; color: var(--accent); }
  .hero .lede {
    font-size: 1.15rem; color: var(--muted);
    max-width: 50ch; margin: 0 0 2.25rem;
  }
  .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
  .btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.62rem 1.15rem; border-radius: 999px;
    font-size: 0.95rem; font-weight: 500; text-decoration: none;
    border: 1px solid var(--line); background: var(--surface);
    transition: border-color .15s, color .15s, transform .15s;
  }
  .btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
  .btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

  /* ------------------------------------------------------------ section -- */
  section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
  .section-head { margin-bottom: 2.5rem; }
  .section-head p.eyebrow {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--accent); font-weight: 600; margin: 0 0 0.6rem; max-width: none;
  }
  h2 {
    font-family: ui-serif, "Iowan Old Style", Georgia, serif;
    font-weight: 500; font-size: 1.7rem; letter-spacing: -0.015em;
    margin: 0; max-width: 26ch;
  }
  .section-head p { color: var(--muted); max-width: 52ch; margin: 0.75rem 0 0; }

  /* --------------------------------------------------------------- story -- */
  .story { max-width: 44rem; }
  .story p { margin: 0 0 1.35rem; }
  .story p:last-child { margin-bottom: 0; }
  .story .big {
    font-family: ui-serif, "Iowan Old Style", Georgia, serif;
    font-size: 1.35rem; line-height: 1.5; letter-spacing: -0.01em;
  }
  .story .quote {
    font-family: ui-serif, "Iowan Old Style", Georgia, serif;
    font-style: italic; font-size: 1.3rem; color: var(--accent);
    border-left: 2px solid var(--accent);
    padding-left: 1.25rem; margin: 2rem 0;
  }

  /* --------------------------------------------------------------- cards -- */
  .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
  .card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.5rem;
    text-decoration: none; box-shadow: var(--shadow);
    transition: transform .15s, border-color .15s;
  }
  .card:hover { transform: translateY(-2px); border-color: var(--accent); }
  .card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .card h3 { font-size: 1.08rem; font-weight: 600; margin: 0; }
  .year { color: var(--muted); font-size: 0.82rem; }
  .card p { color: var(--muted); font-size: 0.95rem; margin: 0.6rem 0 1.1rem; }
  .tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .tag {
    font-size: 0.75rem; color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.6rem;
  }

  /* --------------------------------------------------------------- talks -- */
  .talk { text-decoration: none; display: block; }
  .thumb {
    aspect-ratio: 16 / 9; width: 100%; border-radius: 10px;
    background: var(--surface) center/cover no-repeat;
    border: 1px solid var(--line); margin-bottom: 0.85rem;
  }
  .talk h3 { font-size: 1rem; font-weight: 550; margin: 0; line-height: 1.4; }
  .talk:hover h3 { color: var(--accent); }

  /* featured talk: one large card above the grid */
  .featured {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2rem; align-items: center;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.25rem;
    box-shadow: var(--shadow); text-decoration: none;
    margin-bottom: 2.5rem;
  }
  .featured .thumb { margin: 0; border-radius: 10px; display: block; }
  .featured h3 a { text-decoration: none; }
  .featured h3 a:hover { color: var(--accent); }
  .featured-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--accent); font-weight: 600; margin: 0 0 0.6rem;
  }
  .featured h3 {
    font-family: ui-serif, "Iowan Old Style", Georgia, serif;
    font-weight: 500; font-size: 1.5rem; letter-spacing: -0.015em;
    line-height: 1.25; margin: 0 0 0.75rem;
  }
  .featured p { color: var(--muted); font-size: 0.98rem; margin: 0 0 1.25rem; }
  @media (max-width: 46rem) { .featured { grid-template-columns: 1fr; gap: 1.25rem; } }

  /* -------------------------------------------------------------- lists -- */
  .rows { border-top: 1px solid var(--line); }
  .row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
    padding: 1.05rem 0; border-bottom: 1px solid var(--line);
    text-decoration: none;
  }
  .row .label { font-weight: 500; }
  .row .meta { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
  a.row:hover .label { color: var(--accent); }

  /* ------------------------------------------------------------ contact -- */
  .contact { text-align: center; padding: 6rem 0; }
  .contact h2 { margin: 0 auto 1rem; font-size: clamp(1.8rem, 4vw, 2.4rem); }
  .contact p { color: var(--muted); max-width: 40ch; margin: 0 auto 2rem; }

  footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0 3rem;
    display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
    justify-content: space-between;
    color: var(--muted); font-size: 0.88rem;
  }
  footer a { text-decoration: none; }
  footer a:hover { color: var(--accent); }
  .social { display: flex; gap: 1.5rem; }

  @media (max-width: 46rem) {
    .hero { padding: 4rem 0 3rem; grid-template-columns: 1fr; gap: 2.25rem; }
    .hero-photo { grid-column: 1; grid-row: auto; max-width: 14rem; justify-self: start; }
    section { padding: 3.5rem 0; }
    .row { flex-direction: column; gap: 0.2rem; }
    .row .meta { white-space: normal; }
  }

  /* Blog: the same paper, ink and serif typography as the profile. */
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
  .skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 30; background: var(--surface); padding: .7rem 1rem; }
  .skip-link:focus { top: .5rem; }
  .eyebrow { color: var(--accent); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
  .nav-links a { transition: color .15s; }
  .nav-links a[aria-current] { color: var(--accent); }
  .latest-article .section-head { margin-bottom: .75rem; }
  .latest-article h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
  .latest-article h2 a, .article-list h2 a { text-decoration: none; }
  .latest-article h2 a:hover, .article-list h2 a:hover { color: var(--accent); }
  .article-description { max-width: 44rem; color: var(--muted); margin: 1rem 0 1.6rem; }
  .text-link { text-underline-offset: .3em; text-decoration-color: var(--line); transition: color .15s, text-decoration-color .15s; }
  .text-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
  .latest-article .actions { gap: 1.5rem; }
  .blog-index { max-width: 50rem; padding-top: 5rem; padding-bottom: 6rem; min-height: calc(100svh - 12rem); }
  .blog-header { padding-bottom: 2.5rem; }
  .blog-header h1, .article-header h1 {
    font-family: ui-serif, "Iowan Old Style", Georgia, serif;
    font-weight: 500; letter-spacing: -.035em; line-height: 1.1;
    font-size: clamp(2.6rem, 6vw, 4rem); margin: .6rem 0 1.2rem;
  }
  .blog-header > p:last-child { color: var(--muted); max-width: 36rem; }
  .article-list { list-style: none; margin: 0; padding: 0; }
  .article-list-item { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; }
  .article-list-item:last-child { border-bottom: 1px solid var(--line); }
  .article-list h2 { font-size: 2rem; max-width: none; }
  .article-list-item > p:not(.article-meta) { color: var(--muted); max-width: 40rem; }
  .article-meta { color: var(--muted); display: flex; flex-wrap: wrap; gap: .65rem; font-size: .85rem; margin: .75rem 0; }
  .article-page { max-width: 49rem; padding-top: 2rem; padding-bottom: 5rem; }
  .article-header { margin-bottom: 1.25rem; }
  .article-header h1 { margin: .75rem 0 .5rem; }
  .article-byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.25rem; }
  .article-byline .article-meta { margin: 0; }
  .article-cover { margin: 1.25rem 0 0; }
  .article-cover img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; min-height: 6rem; object-fit: cover; object-position: center 55%; border: 1px solid var(--line); border-radius: 8px; }
  .back-link { color: var(--muted); font-size: .9rem; text-decoration: none; }
  .back-link:hover { color: var(--accent); }
  .article-author { font-size: .9rem; margin: 0; }
  .article-toc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1.25rem 0 1.5rem; padding: .75rem 0; }
  .article-toc summary { cursor: pointer; font-weight: 500; }
  .article-toc ol { padding-left: 1.5rem; font-size: .95rem; }
  .article-toc li { padding: .2rem 0; }
  .article-toc a { text-decoration: none; color: var(--muted); }
  .article-toc a:hover { color: var(--accent); }
  .prose { font-size: 1.08rem; line-height: 1.85; overflow-wrap: anywhere; }
  .prose > :first-child { margin-top: 0; }
  .prose p { margin: 1.3rem 0; }
  .prose h2, .prose h3, .prose h4 { line-height: 1.3; max-width: none; scroll-margin-top: 1rem; }
  .prose h2 { font-size: clamp(1.65rem, 4vw, 2rem); margin: 3.4rem 0 1.3rem; }
  .prose h3 { font-size: 1.3rem; margin: 2.5rem 0 1rem; }
  .prose a { color: var(--accent); text-underline-offset: .2em; }
  .prose li { margin: .5rem 0; }
  .prose blockquote { border-left: 2px solid var(--accent); margin: 2rem 0; padding: 0 1.5rem; color: var(--muted); }
  .prose img { max-width: 100%; height: auto; }
  .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84em; background: var(--accent-soft); border-radius: 3px; padding: .15em .3em; }
  .prose pre { overflow-x: auto; position: relative; font-size: .91rem; line-height: 1.65; padding: 2.7rem 1.35rem 1.35rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); tab-size: 4; margin: 1.6rem 0; }
  .prose pre::before { content: attr(data-language); display: block; position: absolute; top: .75rem; left: 1.35rem; color: var(--muted); font-family: ui-sans-serif, sans-serif; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
  .prose pre code { display: block; width: max-content; min-width: 100%; font-size: inherit; padding: 0; background: none; border-radius: 0; overflow-wrap: normal; }
  .prose pre[data-language="Output"] { background: transparent; }
  .prose .katex { font-size: 1.08em; }
  .prose .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: .8rem .2rem; margin: 1.5rem 0; }
  .prose .katex-display > .katex { white-space: nowrap; width: max-content; min-width: 100%; text-align: center; }
  .hljs-comment { color: #6b705f; font-style: italic; }
  .hljs-keyword, .hljs-literal { color: #9b3629; }
  .hljs-string { color: #3e6c45; }
  .hljs-number, .hljs-built_in { color: #80521d; }
  .hljs-title, .hljs-function { color: #3f617d; }
  .share-article { margin-top: 3rem; padding: 1.5rem 0 0; }
  .share-article h2 { font: 600 1rem/1.5 ui-sans-serif, -apple-system, "Segoe UI", sans-serif; }
  .share-controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .85rem; }
  .share-controls .btn { min-height: 2.75rem; cursor: pointer; font-family: inherit; color: var(--fg); }
  .share-controls .btn:hover { color: var(--accent); }
  .share-controls .btn:disabled { opacity: .65; cursor: wait; }
  .share-article [hidden] { display: none; }
  .share-preview-note, .share-status, .share-fallback { font-size: .85rem; color: var(--muted); }
  .share-preview-note { margin: 1rem 0 0; }
  .share-status { min-height: 1.5em; margin: .6rem 0 0; }
  .share-fallback { margin-top: .75rem; }
  .share-fallback label { display: block; margin-bottom: .4rem; }
  .share-fallback input { width: 100%; min-height: 2.75rem; padding: .6rem; border: 1px solid var(--line); border-radius: 6px; color: var(--fg); background: var(--surface); font: inherit; }
  .share-fallback p { margin: .4rem 0 0; }
  .author-contact { margin-top: 2rem; padding: 2rem 0 0; }
  .author-contact .eyebrow { margin: 0 0 .5rem; }
  .author-contact > p:not(.eyebrow) { color: var(--muted); margin: .8rem 0; }
  .author-contact-links { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; list-style: none; margin: 0; padding: 0; }
  .author-contact-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); text-underline-offset: .3em; text-decoration-color: var(--line); transition: text-decoration-color .15s; }
  .author-contact-links a:hover { text-decoration-color: var(--accent); }
  .article-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 2rem; font-size: .9rem; }
  @media (prefers-color-scheme: dark) {
    .hljs-comment { color: #a5ad97; }
    .hljs-keyword, .hljs-literal { color: #f29b86; }
    .hljs-string { color: #a6c795; }
    .hljs-number, .hljs-built_in { color: #e9c08a; }
    .hljs-title, .hljs-function { color: #a0c6e4; }
  }
  @media (max-width: 56rem) {
    nav .wrap { height: auto; min-height: 4rem; flex-wrap: wrap; padding-top: .75rem; padding-bottom: .75rem; gap: .5rem 1.5rem; }
    .nav-links { display: flex; flex-wrap: wrap; gap: .15rem 1.2rem; font-size: .85rem; }
    .nav-links a { display: inline-flex; align-items: center; min-height: 2.5rem; }
  }
  @media (max-width: 40rem) {
    .blog-index { padding-top: 2.5rem; padding-bottom: 4rem; }
    .article-page { padding-top: 1.5rem; }
    .article-header h1 { font-size: 2.5rem; }
    .prose { font-size: 1rem; line-height: 1.8; }
    .prose pre { font-size: .8rem; padding-left: 1rem; padding-right: 1rem; }
    .prose pre::before { left: 1rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
  }
