:root {
  color-scheme: light;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #222;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 56px 0 80px;
}

.home {
  width: min(100% - 48px, 1060px);
  display: grid;
  grid-template-columns: 170px minmax(0, 720px);
  column-gap: clamp(48px, 8vw, 100px);
  justify-content: center;
  align-items: start;
}

site-navigation {
  display: contents;
}

.page-header {
  margin-bottom: 2.5rem;
}

.home-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  gap: 32px;
  align-items: center;
  margin-bottom: 1.5rem;
}

.home-profile-photo {
  --pointer-x: 0px;
  --pointer-y: 0px;
  display: block;
  width: 144px;
  height: 144px;
  border-radius: 6px;
  object-fit: cover;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 180ms ease;
}

.home-profile-photo:hover {
  transform: translate(var(--pointer-x), var(--pointer-y));
}

.home #about > h2 {
  margin-top: 1.5rem;
}

.sidebar {
  position: sticky;
  top: 56px;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.sidebar-heading {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-brand {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.sidebar-brand a {
  color: #222;
  text-decoration: none;
}

.sidebar-brand a:hover {
  text-decoration: underline;
}

.sidebar-heading:not(:first-child) {
  margin-top: 2.5rem;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
}

.sidebar a {
  color: #68758a;
  font-size: 1rem;
  text-decoration: none;
}

.sidebar a:hover {
  color: #222;
  text-decoration: underline;
}

.sidebar a[aria-current="page"] {
  color: #222;
}

.home main,
.home footer {
  grid-column: 2;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 4vw, 2.25rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.25rem;
}

h3 {
  margin-top: 2rem;
  font-size: 1.05rem;
}

p,
ul,
ol,
blockquote {
  margin-top: 0;
  margin-bottom: 1.25rem;
  text-wrap: pretty;
}

.bio-story-shell {
  margin: -0.65rem 0 1.25rem;
}

.bio-story-shell-prose {
  margin-top: 0;
}

.bio-story-paragraph {
  position: relative;
}

.bio-story-inline-prose {
  display: contents;
}

.bio-story {
  position: relative;
}

.bio-story-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: max-content;
  padding: 0;
  border: 0;
  background: none;
  color: #0645ad;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bio-story-trigger::after {
  content: "+";
  font-size: 0.9em;
  font-weight: 600;
  text-decoration: none;
}

.bio-story.is-open .bio-story-trigger::after {
  content: "−";
}

.bio-story-trigger:hover {
  color: #002f7a;
}

.bio-story-prose-trigger {
  display: block;
  width: 100%;
  color: #222;
  line-height: inherit;
  text-align: left;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: #9aa9bc;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bio-story-inline-trigger {
  display: inline;
  width: auto;
  text-align: inherit;
}

.bio-story .bio-story-prose-trigger::after {
  content: " ↗";
  display: inline;
  color: #0645ad;
  font-size: 0.78em;
  font-weight: 600;
}

.bio-story.is-open .bio-story-prose-trigger::after {
  content: " −";
}

.bio-story .bio-story-inline-trigger::after,
.bio-story.is-open .bio-story-inline-trigger::after {
  content: none;
}

.bio-story-inline-ending {
  white-space: nowrap;
}

.bio-story-inline-indicator::after {
  content: " ↗";
  color: #0645ad;
  font-size: 0.78em;
  font-weight: 600;
}

.bio-story.is-open .bio-story-inline-indicator::after {
  content: " −";
}

.bio-story-prose-trigger:hover {
  color: #0645ad;
  text-decoration-color: currentColor;
}

.bio-story.is-open .bio-story-prose-trigger {
  cursor: zoom-out;
}

.bio-story-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.bio-story-card {
  display: none;
  width: min(100%, 32rem);
  margin: 0.8rem 0 0;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
}

.bio-story.is-open > .bio-story-card {
  display: block;
}

.bio-story-image {
  display: block;
  background: #18191c;
  cursor: zoom-in;
}

.bio-story-image img {
  display: block;
  width: 100%;
  height: auto;
}

.bio-story-card figcaption,
.bio-story-card-caption {
  display: block;
  padding: 0.45rem 0.65rem;
  color: #666;
  font-size: 0.76rem;
  line-height: 1.4;
}

.inline-preview {
  display: contents;
}

.inline-preview-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.inline-preview-card {
  display: none;
  width: min(100%, 32rem);
  margin: 0.75rem 0 0.35rem;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #f4f4f4;
}

.inline-preview.is-open > .inline-preview-card {
  display: block;
}

.inline-preview-image {
  display: block;
  color: inherit;
}

.inline-preview-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

.inline-preview-card-portrait {
  width: min(100%, 20rem);
}

@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  .bio-story {
    display: inline-block;
  }

  .bio-story.bio-story-prose {
    display: block;
    width: 100%;
  }

  .bio-story.bio-story-inline-prose {
    display: contents;
  }

  .bio-story-card {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    width: min(22.5rem, calc(100vw - 40px));
    max-height: calc(100vh - 32px);
    margin: 0;
    overflow-y: auto;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  }

  .bio-story-card-wide {
    width: min(32rem, calc(100vw - 40px));
  }

  .bio-story:hover > .bio-story-card {
    display: block;
  }

  .inline-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
  }

  .inline-preview-card {
    position: absolute;
    z-index: 12;
    top: 100%;
    left: 0;
    width: min(26rem, calc(100vw - 40px));
    max-height: calc(100vh - 32px);
    margin: 0;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  }

  .inline-preview-card-portrait {
    width: min(18rem, calc(100vw - 40px));
  }

  .inline-preview-card-wide {
    width: min(32rem, calc(100vw - 40px));
  }

  .inline-preview-align-right > .inline-preview-card {
    right: 0;
    left: auto;
  }

  .inline-preview:hover > .inline-preview-card,
  .inline-preview:focus-within > .inline-preview-card {
    display: block;
  }
}

.post-embed {
  margin: 2rem 0;
}

.post-embed .twitter-tweet {
  margin-left: 0 !important;
}

.post-embed figcaption {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tweet-collage {
  column-count: 2;
  column-gap: 20px;
  margin-top: 2.5rem;
}

.tweet-collage section {
  display: contents;
}

.tweet-collage section > h2,
.tweet-collage section > p {
  display: none;
}

.tweet-collage .post-embed {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin: 0 0 20px;
  break-inside: avoid;
  vertical-align: top;
}

.tweet-collage .twitter-tweet,
.tweet-collage iframe {
  width: 100% !important;
  margin: 0 !important;
}

.link-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid #ddd;
  color: inherit;
  text-decoration: none;
}

.link-preview:hover {
  border-color: #999;
  color: inherit;
}

.link-preview img {
  width: 100%;
  height: 100%;
  min-height: 145px;
  object-fit: cover;
}

.link-preview-copy {
  align-self: center;
  padding: 18px;
}

.link-preview-copy small,
.link-preview-copy strong,
.link-preview-copy > span {
  display: block;
}

.link-preview-copy small {
  margin-bottom: 0.4rem;
}

.link-preview-copy strong {
  line-height: 1.3;
}

.link-preview-copy > span {
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.88rem;
  line-height: 1.45;
}

.essay-list {
  padding: 0;
  list-style: none;
}

.essay-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ddd;
}

.essay-list li:first-child {
  border-top: 1px solid #ddd;
}

.essay-list small,
.essay-list time {
  flex: 0 0 auto;
  color: #666;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

li > ul,
li > ol {
  margin-top: 0.45rem;
}

a {
  color: #0645ad;
  text-underline-offset: 2px;
}

a:hover {
  color: #002f7a;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
}

.page-header p,
small {
  color: #666;
}

.page-header p {
  margin-bottom: 0;
  line-height: 1.5;
}

small {
  font-size: 0.82rem;
  line-height: 1.45;
}

.work-list {
  padding: 0;
  list-style: none;
}

.work-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.18rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ddd;
}

.work-list li:first-child {
  border-top: 1px solid #ddd;
}

.work-list li > small {
  color: #666;
}

.work-role {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
  min-width: 0;
}

.work-role span::before {
  content: "—";
  margin-right: 0.35rem;
}

.work-list li > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.45;
}

.muted-note {
  color: #666;
  font-size: 0.9rem;
}

.project-entry + .project-entry {
  margin-top: 3.5rem;
}

.project-entry h2 {
  margin-top: 0;
}

.project-figure {
  margin: 2rem 0 0;
}

.project-image-link {
  display: block;
}

.project-image-frame {
  --pointer-x: 0px;
  --pointer-y: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  transform: translate(var(--pointer-x), var(--pointer-y));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-image-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 180ms ease;
}

.project-image-link:hover .project-image-frame {
  transform: translate(var(--pointer-x), calc(var(--pointer-y) - 2px));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.project-image-link:hover img {
  transform: scale(1.02);
}

.project-figure figcaption {
  margin-top: 0.65rem;
  color: #666;
  font-size: 0.82rem;
  line-height: 1.45;
}

.essay-coming-soon {
  color: #666;
  font-size: 1.05rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  color: #666;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0;
}

.article-kicker::before {
  content: "✦";
  color: #0645ad;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  font-style: normal;
}

.article-date {
  display: block;
  margin: -0.15rem 0 1rem;
  color: #666;
  font-size: 0.82rem;
}

.article-header h1 {
  max-width: 20ch;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.7rem);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.link-arrow {
  display: inline-block;
  margin-left: 0.3em;
  opacity: 0;
  transform: translateX(-0.35em) rotate(-45deg) scale(0.25);
  filter: blur(4px);
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.2, 0, 0, 1), transform 180ms cubic-bezier(0.2, 0, 0, 1), filter 180ms cubic-bezier(0.2, 0, 0, 1);
}

a:is(:hover, :focus-visible) > .link-arrow {
  opacity: 1;
  transform: translateX(0.15em) rotate(-45deg) scale(1);
  filter: blur(0);
}

.article-lede {
  font-size: 1.1rem;
  line-height: 1.6;
}

.article section + section {
  margin-top: 3.25rem;
}

.article section h2 {
  margin-top: 0;
}

.article table {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.article th,
.article td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.article th {
  color: #555;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.article pre {
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  overflow-x: auto;
  background: #f4f4f4;
  color: #333;
  font-size: 0.84rem;
  line-height: 1.55;
}

.article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.article pre code {
  font-size: inherit;
}

.media-figure {
  margin: 2rem 0;
}

.technical-figure {
  margin: 2.75rem 0;
}

.technical-figure img {
  background: #f7f6f0;
}

.media-figure img,
.media-figure video {
  display: block;
  width: 100%;
  height: auto;
  background: #18191c;
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.media-figure figcaption {
  margin-top: 0.65rem;
  color: #666;
  font-size: 0.82rem;
  line-height: 1.45;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.media-grid .media-figure {
  margin: 0;
}

.intro {
  font-size: 1.08rem;
  line-height: 1.6;
}

blockquote {
  margin-left: 0;
  padding-left: 18px;
  border-left: 3px solid #ddd;
  color: #555;
}

iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .tweet-collage {
    column-count: 1;
  }
}

@media (max-width: 520px) {
  body {
    width: min(100% - 28px, 720px);
    padding-top: 32px;
  }

  .home-header {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 16px;
  }

  .home-profile-photo {
    width: 96px;
    height: 96px;
    border-radius: 4px;
  }
}

@media (max-width: 560px) {
  .home {
    width: min(100% - 28px, 720px);
    display: block;
    padding-top: 32px;
  }

  .sidebar {
    position: static;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ddd;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .sidebar-heading:not(:first-child) {
    margin-top: 1.5rem;
  }

  .sidebar a {
    font-size: 1rem;
    text-decoration: underline;
  }

  .link-preview {
    grid-template-columns: 1fr;
  }

  .link-preview img {
    height: 180px;
    min-height: 0;
  }

  .tweet-collage {
    column-count: 1;
  }

  .article table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }
}
