/* bolding.us, version 2. One stylesheet, no build step, no remote requests.
   Indigo (--primary) marks what you can click. Violet (--accent) marks David.
   The one gradient lives in --grad and is used by the brand mark, the block behind
   the portrait and the contact band.
   Motion is short and never loops: the --dur-* tokens and one ease-out curve, on opacity,
   transform, colors and underlines only. Reduced motion turns all of it off. */

@font-face {
  font-family: "ABeeZee";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/abeezee-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/opensans-latin.woff2") format("woff2");
}

/* Tokens ------------------------------------------------------------------- */

:root {
  color-scheme: light;
  --bg: #F7F7FB;
  --surface: #FFFFFF;
  --surface-tint: #EEEFFA;
  --text: #1B1B3A;
  --text-muted: #55577A;
  --primary: #3A3FBF;
  --primary-hover: #2E3299;
  --on-primary: #FFFFFF;
  --accent: #6B3FA0;
  --border: #D9DAE8;
  --border-control: #7C7FA3;
  --grad-from: #3A3FBF;
  --grad-to: #6B3FA0;
  --on-grad: #FFFFFF;
  --focus: #3A3FBF;

  --grad: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  --font-display: "ABeeZee", "Open Sans", system-ui, sans-serif;
  --font-text: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(3.5rem, 8vw, 6rem);
  --measure: 68ch;
  --radius-control: 6px;
  --radius-panel: 10px;
  --radius-portrait: 14px;

  /* Motion: hover and focus use --dur-1 or --dur-2, entrances --dur-3. */
  --dur-1: 150ms;
  --dur-2: 240ms;
  --dur-3: 450ms;
  --stagger: 50ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11132A;
    --surface: #1A1D3A;
    --surface-tint: #161935;
    --text: #E8E9F5;
    --text-muted: #A3A6C8;
    --primary: #9FB0FF;
    --primary-hover: #BCC8FF;
    --on-primary: #11132A;
    --accent: #C9A8FF;
    --border: #2E3257;
    --border-control: #666B9E;
    --grad-from: #2E3299;
    --grad-to: #5B2F8F;
    --on-grad: #F1F0FA;
    --focus: #9FB0FF;
  }
}

@media screen {
  [data-theme="dark"] {
    color-scheme: dark;
    --bg: #11132A;
    --surface: #1A1D3A;
    --surface-tint: #161935;
    --text: #E8E9F5;
    --text-muted: #A3A6C8;
    --primary: #9FB0FF;
    --primary-hover: #BCC8FF;
    --on-primary: #11132A;
    --accent: #C9A8FF;
    --border: #2E3257;
    --border-control: #666B9E;
    --grad-from: #2E3299;
    --grad-to: #5B2F8F;
    --on-grad: #F1F0FA;
    --focus: #9FB0FF;
  }
}

/* Base --------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h, 4.0625rem) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  text-wrap: balance;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-1) var(--ease-out), text-decoration-thickness var(--dur-1) var(--ease-out), text-underline-offset var(--dur-1) var(--ease-out);
}

/* Text links: the underline eases a little lower and thicker. */
a:hover,
a:focus-visible {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.26em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

#main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out);
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.btn-outline {
  border-color: var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--primary-hover);
  background: var(--surface-tint);
  color: var(--primary-hover);
}

.btn .icon {
  transition: transform var(--dur-2) var(--ease-out);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.9375rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: var(--border-control);
  color: var(--primary-hover);
}

#theme-toggle .icon {
  transition: transform var(--dur-3) var(--ease-out);
}

.text-btn {
  min-height: 2.25rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease-out), text-decoration-thickness var(--dur-1) var(--ease-out), text-underline-offset var(--dur-1) var(--ease-out);
}

.text-btn:hover,
.text-btn:focus-visible {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.26em;
}

/* Header and nav ----------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  min-height: 4rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
}

/* The brand mark is the site icon: a tile carrying the DB on a second tile offset down and right,
   the same device as the block behind the portrait. Two flat fills, no gradient. */
.brand-mark {
  display: inline-flex;
  flex: none;
  width: 2rem;
  height: 2rem;
  transition: transform var(--dur-2) var(--ease-out);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark__back {
  fill: var(--grad-to);
}

.brand-mark__front {
  fill: var(--grad-from);
}

.brand-mark__glyph {
  fill: none;
  stroke: var(--on-grad);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 0.125rem;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-control);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary-hover);
}

/* Hover and focus: a thin underline grows in from the left. */
.nav-links a::before {
  content: "";
  position: absolute;
  right: 0.5rem;
  bottom: 0.25rem;
  left: 0.5rem;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-2) var(--ease-out);
}

/* The section in view: an underline bar as well as the color. */
.nav-links a[aria-current="true"] {
  color: var(--primary);
}

.nav-links a[aria-current="true"]::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  bottom: 0.25rem;
  left: 0.5rem;
  height: 2px;
  background: var(--primary);
}

.menu-btn,
.menu-btn__close {
  display: none;
}

.header-search {
  position: relative;
  flex: 0 1 18rem;
  min-width: 12rem;
}

.header-search > .icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem 0 2.375rem;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--dur-1) var(--ease-out);
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.search-input:hover {
  border-color: var(--text-muted);
}

.search-input:focus-visible {
  outline-offset: 1px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.search-toggle {
  display: none;
}

.header-pdf {
  margin-left: 0.25rem;
}

/* The search summary sits in the sticky header, so it stays with the nav while scrolling. */
.search-status:not([data-active]) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-status[data-active] {
  border-top: 1px solid var(--border);
  background: var(--surface-tint);
}

.search-status__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  min-height: 2.75rem;
  margin-inline: auto;
  padding: 0.25rem var(--gutter);
}

.search-status__text {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Search becomes a toggle below 1180px (the inline field needs that much room). */
@media (max-width: 1179px) {
  .js .search-toggle {
    display: inline-flex;
  }

  .js .header-search {
    display: none;
  }

  .js .site-header.is-search-open .header-search {
    display: block;
    flex: 1 0 100%;
    order: 10;
    padding-bottom: 0.75rem;
  }

  .js .site-header.is-search-open .search-input {
    height: 2.75rem;
  }

  .site-header.is-search-open .search-toggle {
    border-color: var(--border-control);
  }
}

/* The section links fold into a Menu button below 960px. */
@media (max-width: 959px) {
  .js .menu-btn {
    display: inline-flex;
  }

  .js .site-nav {
    order: 3;
  }

  .js .header-tools {
    order: 2;
  }

  .js .nav-links {
    display: none;
  }

  .js .site-header.is-menu-open .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }

  .js .site-header.is-menu-open .nav-links a {
    min-height: 3rem;
    padding: 0 0.25rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1.0625rem;
  }

  .js .site-header.is-menu-open .nav-links li:last-child a {
    border-bottom: 0;
  }

  .js .site-header.is-menu-open .nav-links a::before {
    right: auto;
    bottom: 0.625rem;
    left: 0.25rem;
    width: 3rem;
  }

  .js .site-header.is-menu-open .nav-links a[aria-current="true"]::after {
    top: 0.75rem;
    right: auto;
    bottom: 0.75rem;
    left: -0.75rem;
    width: 3px;
    height: auto;
  }

  .site-header.is-menu-open .menu-btn__open {
    display: none;
  }

  .site-header.is-menu-open .menu-btn__close {
    display: block;
  }

  .site-header.is-menu-open .menu-btn {
    border-color: var(--border-control);
  }

  .js .site-nav {
    margin-left: 0.25rem;
  }

  /* Without JavaScript the links stay visible as a second row. */
  html:not(.js) .site-nav {
    flex: 1 0 100%;
    order: 10;
    overflow-x: auto;
  }

  html:not(.js) .header-tools {
    order: 2;
  }

  .icon-btn {
    min-width: 2.75rem;
    height: 2.75rem;
  }
}

@media (max-width: 599px) {
  .header-pdf {
    display: none;
  }

  .header-bar {
    column-gap: 0.25rem;
  }

  .brand-name {
    font-size: 1.0625rem;
  }
}

@media (max-width: 359px) {
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 379px) {
  .js .menu-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Sections ----------------------------------------------------------------- */

.section {
  padding-block: var(--section-space);
}

.section--tint {
  background: var(--surface-tint);
}

/* No ornament above the heading: the section padding gives the room, and a slightly
   tighter gap below ties the heading to what it introduces. */
.section__title {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.subhead {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.3;
}

.block + .block {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.item-title {
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
}

.item-line {
  margin-top: 0.25rem;
  color: var(--text-muted);
}

.prose {
  max-width: var(--measure);
}

.prose > p + p {
  margin-top: 1.1em;
}

.bullets {
  max-width: var(--measure);
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.bullets > li {
  padding-left: 0.25rem;
}

.bullets > li + li {
  margin-top: 0.5rem;
}

.bullets > li::marker {
  color: var(--accent);
}

/* Dot lists: skills and related links. The separator trails its item and is glued
   to it with a no-break space, so a wrapped line never starts with a dot. Only
   visible items with a visible item after them get one. */
.dot-list {
  padding: 0;
  list-style: none;
}

.dot-list > li {
  display: inline;
}

.dot-list > li:not([hidden]):has(~ li:not([hidden]))::after {
  content: "\00a0\00B7";
  content: "\00a0\00B7" / "";
  color: var(--text-muted);
}

.related {
  max-width: var(--measure);
  margin-top: 0.875rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.related__label {
  font-weight: 600;
}

.related .dot-list {
  display: inline;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

/* Hero --------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2.5rem, 7vw, 6rem) var(--section-space);
}

.hero__grid {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}

/* The status sentence is the portrait's caption: left edge on the portrait's left edge,
   below the gradient block even when the block eases out to 24px on hover. */
.hero__status {
  position: relative;
  max-width: 24rem;
  margin-top: calc(24px + 0.5rem); /* collapses with the portrait's 18px bottom margin */
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.hero__status::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero__name {
  margin-top: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.5rem + 5.5vw, 4.75rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero__title {
  margin-top: 1.125rem;
  color: var(--text-muted);
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.4;
}

.hero__title > span {
  display: block;
  text-wrap: balance;
}

.nowrap {
  white-space: nowrap;
}

.hero__title > span:first-child {
  color: var(--text);
  font-weight: 600;
}

.hero__lead {
  max-width: 58ch;
  margin-top: 1.75rem;
  font-size: 1.125rem;
  line-height: 1.65;
}

.print-contact {
  display: none;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2.25rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.25rem;
  font-weight: 600;
}

.portrait {
  position: relative;
  width: min(220px, 70vw);
  margin: 0 18px 18px 0;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border-radius: var(--radius-portrait);
  background: var(--grad);
  transition: transform var(--dur-3) var(--ease-out);
}

.portrait img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-portrait);
}

/* Below 900px: portrait, then the status sentence, then the name. */
@media (max-width: 899px) {
  .hero__media {
    order: -1;
  }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) clamp(15rem, 32vw, 23.75rem);
    gap: clamp(3rem, 6vw, 5.5rem);
  }

  .portrait {
    width: auto;
    max-width: 380px;
  }
}

/* Empty search state */

.empty {
  padding-block: clamp(3rem, 10vw, 6rem);
}

.empty__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.375rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.15;
}

.empty__text {
  max-width: var(--measure);
  margin: 1rem 0 1.75rem;
  color: var(--text-muted);
}

/* Career at a glance ------------------------------------------------------- */

.figures {
  display: grid;
  gap: 2.25rem 3rem;
}

.figure {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.figure__value {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: clamp(2.125rem, 1.6rem + 1.6vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.figure__label {
  margin-top: 0.625rem;
  font-weight: 700;
  line-height: 1.4;
}

.figure__source {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 600px) {
  .figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* About -------------------------------------------------------------------- */

.about {
  display: grid;
  gap: 3rem;
}

.about__prose {
  font-size: 1.125rem;
  line-height: 1.7;
}

.details__list {
  border-top: 1px solid var(--border);
}

.details__row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.details__row dt {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.details__row dd {
  margin-top: 0.125rem;
}

.details__note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
    gap: clamp(3rem, 6vw, 5.5rem);
  }
}

/* Experience --------------------------------------------------------------- */

.role {
  display: grid;
  gap: 0.375rem 2.5rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--border);
}

.role:first-child {
  padding-top: 1.5rem;
}

.role__dates {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.role__dates .mono {
  color: var(--text);
}

.role__org {
  margin-top: 0.25rem;
  color: var(--text-muted);
}

.role__employer {
  color: var(--text);
  font-weight: 600;
}

.role__context {
  max-width: var(--measure);
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.role__tech {
  max-width: var(--measure);
  margin-top: 1.125rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.role__tech-label {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 700px) {
  .role {
    grid-template-columns: 11rem minmax(0, 1fr);
  }

  .role__dates {
    display: block;
    padding-top: 0.1875rem;
  }

  .role__dates > span {
    display: block;
  }
}

.earlier {
  display: grid;
  gap: 0 3rem;
}

.earlier__item {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

.earlier__item .item-title {
  font-size: 1.0625rem;
}

.earlier__dates {
  margin-top: 0.125rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.earlier__item .bullets {
  margin-top: 0.625rem;
  font-size: 1rem;
}

.earlier__item .bullets > li + li {
  margin-top: 0.25rem;
}

@media (min-width: 800px) {
  .earlier {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Projects ----------------------------------------------------------------- */

.projects {
  display: grid;
  gap: 0 3rem;
}

.project {
  padding-block: 1.75rem;
  border-top: 1px solid var(--border);
}

.project__org {
  margin-top: 0.125rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.project__text {
  max-width: var(--measure);
  margin-top: 0.625rem;
}

.result {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: var(--measure);
  margin-top: 0.75rem;
}

.result > .icon {
  margin-top: 0.1875rem;
  color: var(--accent);
  stroke-width: 2.25;
}

.result strong {
  font-weight: 700;
}

.projects--more .project {
  padding-block: 1.375rem;
}

.projects--more .item-title {
  font-size: 1.0625rem;
}

.projects--more .project__text {
  font-size: 1rem;
}

@media (min-width: 800px) {
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .projects--more {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.5rem;
  }
}

/* Skills ------------------------------------------------------------------- */

.skill-groups {
  display: grid;
  gap: 2.25rem 3.5rem;
}

.skill-group {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.skill-group__title {
  font-size: 1.0625rem;
  font-weight: 700;
}

.skill-list {
  max-width: var(--measure);
  margin-top: 0.5rem;
  line-height: 1.75;
}

@media (min-width: 800px) {
  .skill-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Certifications and education --------------------------------------------- */

.credentials {
  display: grid;
  gap: 3rem;
}

.credentials .block + .block {
  margin-top: 0;
}

.plain-list {
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.plain-list > li {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

#cert-list > li {
  font-weight: 600;
}

.plain-list .item-title {
  font-size: 1.0625rem;
}

@media (min-width: 900px) {
  .credentials {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }
}

/* How I work --------------------------------------------------------------- */

.strengths {
  display: grid;
  gap: 0 3.5rem;
  padding: 0;
  list-style: none;
}

.strength {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

.strength .item-line {
  max-width: 52ch;
  margin-top: 0.375rem;
  color: var(--text);
}

@media (min-width: 700px) {
  .strengths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quote {
  max-width: 46ch;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.3125rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.5;
}

/* Writing ------------------------------------------------------------------ */

.writing {
  display: grid;
  gap: 3.5rem;
}

.blog-panel {
  padding: clamp(1.5rem, 3vw, 2rem);
}

.blog-panel .subhead {
  margin-bottom: 0.25rem;
}

.blog-panel__domain {
  font-size: 0.9375rem;
}

.blog-panel__text {
  margin-top: 0.875rem;
}

.arrow-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.arrow-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  font-weight: 600;
}

.arrow-links .icon {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform var(--dur-2) var(--ease-out);
}

.side-item {
  margin-top: 2.5rem;
}

.side-item .subhead {
  margin-bottom: 0.375rem;
}

.side-item .item-line {
  margin-top: 0;
  color: var(--text);
}

.post-list {
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post__title {
  font-weight: 600;
  line-height: 1.45;
}

.post__date {
  padding-top: 0.125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post__line {
  grid-column: 1 / -1;
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 1rem;
}

@media (min-width: 900px) {
  .writing {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(3rem, 6vw, 5rem);
  }

  .posts {
    order: 2;
  }

  .writing .block + .block {
    margin-top: 0;
  }
}

/* Contact band ------------------------------------------------------------- */

.contact {
  background: var(--grad);
  color: var(--on-grad);
}

.contact .section__title,
.contact .subhead {
  color: var(--on-grad);
}

.contact a {
  color: var(--on-grad);
}

.contact a:hover,
.contact a:focus-visible {
  color: var(--on-grad);
}

.contact :focus-visible {
  outline-color: var(--on-grad);
}

.contact__grid {
  display: grid;
  gap: 3rem;
}

.contact__lead {
  max-width: 52ch;
  font-size: 1.125rem;
  line-height: 1.65;
}

.contact__email {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.75rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.3;
}

.contact__lines {
  display: grid;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.contact__email .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.contact__lines > li {
  position: relative;
  padding-left: 2.25rem;
}

.contact__lines .icon {
  position: absolute;
  top: 0.5rem;
  left: 0.125rem;
}

.contact__key {
  display: inline-block;
  min-width: 5.25rem;
  font-weight: 600;
}

.contact__lines a {
  display: inline-block;
  padding-block: 0.375rem;
}

/* The outline button on the band: hover and focus fade in a faint --on-grad wash behind
   the label (14% over the darkest stop still leaves the white label above 5:1). */
.btn-on-grad {
  position: relative;
  isolation: isolate;
  margin-top: 2rem;
  border-color: var(--on-grad);
  background: transparent;
  color: var(--on-grad);
}

.btn-on-grad::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: var(--radius-control);
  background: var(--on-grad);
  opacity: 0;
  transition: opacity var(--dur-1) var(--ease-out);
}

.btn-on-grad:hover::before,
.btn-on-grad:focus-visible::before {
  opacity: 0.14;
}

.contact a.btn-on-grad {
  text-decoration: none;
}

.roles-list {
  padding: 0;
  border-top: 1px solid var(--on-grad);
  list-style: none;
}

.roles-list > li {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--on-grad);
}

@media (min-width: 600px) {
  .roles-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 5.5rem);
    align-items: start;
  }
}

/* Footer ------------------------------------------------------------------- */

.site-footer {
  padding-block: 2rem 2.5rem;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer p + p {
  margin-top: 0.25rem;
}

/* Motion -------------------------------------------------------------------
   Everything that moves is inside prefers-reduced-motion: no-preference, on screen only.
   Only links and buttons react to hover, and each hover effect has a :focus-visible twin
   (the portrait block is decoration and gets none). */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes slide-out {
  from {
    transform: translate(-18px, -18px);
  }
}

@keyframes ease-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  /* Hover and focus. */
  .btn:hover,
  .btn:focus-visible {
    transform: translateY(-2px);
  }

  .btn:active {
    transform: none;
  }

  .brand:hover .brand-mark,
  .brand:focus-visible .brand-mark {
    transform: rotate(-6deg) scale(1.06);
  }

  .nav-links a:hover::before,
  .nav-links a:focus-visible::before {
    transform: scaleX(1);
  }

  .arrow-links a:hover .icon,
  .arrow-links a:focus-visible .icon {
    transform: translate(2px, -2px);
  }

  a[download]:hover .icon,
  a[download]:focus-visible .icon {
    transform: translateY(2px);
  }

  #theme-toggle:hover .icon,
  #theme-toggle:focus-visible .icon {
    transform: rotate(30deg);
  }

  /* From the 18px offset to 24px. */
  .portrait:hover::before {
    transform: translate(6px, 6px);
  }

  /* Hero entrance, once per load: the text fades up in a short stagger while the block
     slides out from behind the portrait. The portrait itself is never faded. Done by 600ms.
     "backwards" holds only the starting frame, so hover still works afterwards. */
  :root:not(.has-searched) .hero__name {
    animation: rise var(--dur-3) var(--ease-out) backwards;
  }

  :root:not(.has-searched) .hero__title {
    animation: rise var(--dur-3) var(--ease-out) var(--stagger) backwards;
  }

  :root:not(.has-searched) .hero__lead {
    animation: rise var(--dur-3) var(--ease-out) calc(var(--stagger) * 2) backwards;
  }

  :root:not(.has-searched) .hero__actions {
    animation: rise var(--dur-3) var(--ease-out) calc(var(--stagger) * 3) backwards;
  }

  :root:not(.has-searched) .portrait::before {
    animation: slide-out var(--dur-3) var(--ease-out) calc(var(--stagger) * 2) backwards;
  }

  /* The search strip and the mobile menu panel ease in. */
  .search-status[data-active],
  .js .site-header.is-menu-open .nav-links {
    animation: ease-in var(--dur-1) var(--ease-out);
  }

  /* Scroll reveal. The hidden state needs the "motion" class (JavaScript running and no
     reduced-motion request); app.js adds is-revealed as each block enters the viewport. */
  .motion .section > .wrap > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  }

  .motion .section > .wrap > :nth-child(2) {
    transition-delay: var(--stagger);
  }

  .motion .section > .wrap > :nth-child(n+3) {
    transition-delay: calc(var(--stagger) * 2);
  }

  .motion .section > .wrap > .is-revealed,
  .motion.is-searching .section > .wrap > * {
    opacity: 1;
    transform: none;
  }

  /* While a search is active every match is visible at once. */
  .motion.is-searching .section > .wrap > * {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .motion .section > .wrap > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Screen-only behavior while a search is active ------------------------------ */

@media screen {
  .is-searching .hero {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
  }
}

/* Print: a plain resume on Letter paper --------------------------------------- */

@page {
  size: letter;
  margin: 0.45in 0.5in;
}

@media print {
  html {
    scroll-padding-top: 0;
  }

  /* Paper never waits for motion: no entrance, and every revealed block is visible. */
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .motion .section > .wrap > * {
    opacity: 1 !important;
    transform: none !important;
  }

  body {
    background: none;
    color: var(--text);
    font-size: 9pt;
    line-height: 1.3;
  }

  .skip-link,
  .site-header,
  .empty,
  .site-footer,
  .hero__actions,
  .related,
  .btn-on-grad,
  .contact__email,
  .contact__lines,
  .role__tech,
  #projects {
    display: none !important;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .section,
  .section--tint,
  .contact {
    padding: 8pt 0 0;
    background: none;
    color: var(--text);
  }

  .section__title,
  .contact .section__title,
  .contact .subhead {
    margin: 0 0 3pt;
    padding-bottom: 2pt;
    border-bottom: 1pt solid var(--text);
    color: var(--text);
    font-size: 12pt;
    line-height: 1.2;
    break-after: avoid;
  }

  .subhead {
    margin: 6pt 0 2pt;
    font-size: 10pt;
    break-after: avoid;
  }

  .contact .subhead {
    padding: 0;
    border: 0;
    font-size: 10pt;
  }

  .block + .block {
    margin-top: 4pt;
  }

  a,
  .contact a {
    color: inherit;
    text-decoration: none;
  }

  /* Hero: name, title, contact details and a small portrait at the top right. */
  .hero {
    position: relative;
    padding: 0;
  }

  /* One column beside the portrait. The two hero wrappers step aside so the status
     sentence can print once, under the title lines. */
  .hero__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-right: 1.3in;
  }

  .hero__text,
  .hero__media {
    display: contents;
  }

  .hero__name {
    order: 1;
  }

  .hero__title {
    order: 2;
  }

  .hero__status {
    order: 3;
    max-width: none;
    margin-top: 3pt;
    font-size: 9pt;
  }

  .hero__lead {
    order: 4;
  }

  .print-contact {
    order: 5;
  }

  .hero__status::before {
    width: 6pt;
    height: 6pt;
  }

  .hero__name {
    margin-top: 2pt;
    font-size: 22pt;
  }

  .hero__title {
    margin-top: 2pt;
    font-size: 10.5pt;
  }

  .hero__lead {
    max-width: none;
    margin-top: 5pt;
    font-size: 9pt;
    line-height: 1.35;
  }

  .print-contact {
    display: block;
    margin-top: 4pt;
    font-size: 9pt;
    font-weight: 600;
  }

  .portrait {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.1in;
    margin: 0;
  }

  .portrait::before {
    display: none;
  }

  .portrait img {
    border-radius: 0;
  }

  /* Career at a glance: three figures per line. */
  .figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 0.2in;
  }

  .figure {
    display: grid;
    grid-template-columns: 4.2em minmax(0, 1fr);
    column-gap: 4pt;
    padding: 2pt 0;
    break-inside: avoid;
  }

  .figure__value {
    grid-row: span 2;
    color: var(--text);
    font-size: 11pt;
    line-height: 1.2;
  }

  .figure__label {
    margin: 0;
    font-size: 8.5pt;
    line-height: 1.25;
  }

  .figure__source {
    margin: 0;
    font-size: 7.5pt;
    line-height: 1.25;
  }

  .about {
    grid-template-columns: minmax(0, 1fr) 2.3in;
    gap: 0.25in;
  }

  .about__prose {
    max-width: none;
    font-size: 8.5pt;
    line-height: 1.35;
  }

  .prose > p + p {
    margin-top: 3pt;
  }

  .details .subhead {
    display: none;
  }

  .details__row {
    display: grid;
    grid-template-columns: 6.6em minmax(0, 1fr);
    gap: 3pt;
    padding: 1pt 0;
    border: 0;
  }

  .details__list {
    border: 0;
  }

  .details__row dt,
  .details__row dd,
  .details__note {
    margin: 0;
    font-size: 8pt;
    line-height: 1.3;
  }

  .details__note {
    margin-top: 2pt;
  }

  .role {
    grid-template-columns: 1.3in minmax(0, 1fr);
    gap: 0 0.15in;
    padding: 4pt 0;
  }

  /* Roles may break across pages, but never inside a bullet or right after the title. */
  .bullets > li,
  .role__context {
    break-inside: avoid;
  }

  .role__org,
  .role .item-title {
    break-after: avoid;
  }

  .role:first-child {
    padding-top: 2pt;
  }

  .role__dates {
    display: block;
    padding: 1pt 0 0;
    font-size: 8pt;
  }

  .role__dates .mono {
    font-size: 7.5pt;
  }

  .role__dates > span {
    display: block;
  }

  .item-title,
  .earlier__item .item-title,
  .plain-list .item-title {
    font-size: 9.5pt;
  }

  .role__org,
  .earlier__dates {
    margin: 0;
    font-size: 8.5pt;
  }

  .role__context {
    margin-top: 1pt;
    font-size: 8.5pt;
  }

  .bullets,
  .earlier__item .bullets {
    max-width: none;
    margin-top: 2pt;
    padding-left: 11pt;
    font-size: 8.5pt;
    line-height: 1.25;
  }

  .bullets > li + li,
  .earlier__item .bullets > li + li {
    margin-top: 0;
  }

  .bullets > li::marker {
    color: var(--text);
  }

  .earlier {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 0.25in;
  }

  .earlier__item {
    padding: 3pt 0;
    break-inside: avoid;
  }

  .skill-groups {
    display: block;
    columns: 3;
    column-gap: 0.2in;
  }

  .skill-group {
    padding: 0 0 4pt;
    border: 0;
    break-inside: avoid;
  }

  .skill-group__title {
    font-size: 9pt;
  }

  .skill-list {
    margin: 0;
    font-size: 8pt;
    line-height: 1.3;
  }

  .credentials {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.8fr);
    gap: 0.25in;
  }

  .plain-list,
  .plain-list > li {
    border: 0;
  }

  .plain-list > li {
    padding: 1pt 0;
    font-size: 8.5pt;
  }

  .item-line {
    margin: 0;
    font-size: 8pt;
    line-height: 1.25;
  }

  /* Industries print as one run-in line each. */
  #industry-list .item-title,
  #industry-list .item-line {
    display: inline;
    font-size: 8.5pt;
  }

  #industry-list .item-title::after {
    content: ": ";
  }

  .strengths {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 0.2in;
  }

  .strength {
    padding: 2pt 0;
    border: 0;
    break-inside: avoid;
  }

  .strength .item-title {
    font-size: 9pt;
  }

  .strength .item-line {
    margin: 0;
  }

  .quote {
    max-width: none;
    margin-top: 5pt;
    padding: 0 0 0 8pt;
    border-left-width: 2pt;
    border-left-color: var(--text);
    font-size: 9.5pt;
    line-height: 1.35;
  }

  .writing {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: 0.25in;
  }

  .blog-panel {
    padding: 0;
    border: 0;
  }

  .blog-panel__domain,
  .blog-panel__text,
  .side-item .item-line {
    margin: 0;
    font-size: 8.5pt;
  }

  .arrow-links {
    display: block;
    margin: 2pt 0 0;
    font-size: 8pt;
  }

  .arrow-links li + li {
    margin-top: 1pt;
  }

  .arrow-links a {
    display: inline;
    min-height: 0;
    font-weight: 400;
  }

  .arrow-links .icon {
    display: none;
  }

  /* Write the blog URLs out so the paper copy still points somewhere. */
  .arrow-links a::after,
  .post__title::after {
    content: " " attr(href);
    color: var(--text-muted);
    font-weight: 400;
    overflow-wrap: anywhere;
  }

  .side-item {
    margin-top: 4pt;
  }

  .side-item .subhead {
    margin: 0;
  }

  .post-list {
    border: 0;
  }

  .post {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 6pt;
    padding: 2pt 0;
    border: 0;
    break-inside: avoid;
  }

  .post__title {
    font-size: 8.5pt;
  }

  .post__date {
    padding: 0;
    font-size: 7.5pt;
  }

  .post__title::after {
    display: block;
    font-size: 7.5pt;
  }

  .post__line {
    font-size: 8pt;
  }

  .contact__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 0.25in;
  }

  .contact__lead {
    max-width: none;
    font-size: 8.5pt;
  }

  .contact__roles {
    padding: 0;
  }

  .roles-list,
  .roles-list > li {
    border: 0;
  }

  .roles-list {
    display: block;
    padding-left: 11pt;
    columns: 2;
    list-style: disc;
  }

  .roles-list > li {
    padding: 0;
    font-size: 8.5pt;
    font-weight: 400;
  }
}
