/* One shared grid aligns the masthead, profile and reading column. */
:root {
  --site-width: 1060px;
  --site-profile-width: 196px;
  --site-column-gap: 76px;
  --site-ink: #292d32;
  --site-muted: #6a7078;
}

body.home, body.page, body.post, body.post-index {
  color: var(--site-ink);
  font-size: 17px;
  line-height: 1.8;
}

.navigation-wrapper, #main {
  box-sizing: border-box;
  width: calc(100% - 64px);
  max-width: var(--site-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--site-profile-width) minmax(0, 1fr);
  column-gap: var(--site-column-gap);
  border: 0;
}

.navigation-wrapper::before, .navigation-wrapper::after,
#main::before, #main::after {
  content: none;
  display: none;
}

.navigation-wrapper {
  padding: 34px 0 0;
  align-items: center;
  text-transform: none;
  font-family: var(--site-font);
  font-weight: 400;
}

.navigation-wrapper .site-name,
.navigation-wrapper .top-navigation {
  width: auto;
  float: none;
  margin: 0;
  padding: 0;
}

.navigation-wrapper .site-name {
  font-family: var(--site-heading-font);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.navigation-wrapper #site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.navigation-wrapper #site-nav li {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 15px;
  line-height: 1.5;
}

.navigation-wrapper #site-nav a {
  display: inline-block;
  padding: 8px 0;
  color: var(--site-muted);
  text-decoration: none;
  text-underline-offset: 6px;
}

.navigation-wrapper #site-nav a[aria-current],
.navigation-wrapper #site-nav a:hover {
  color: var(--site-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.navigation-wrapper .nav .navtoggle { display: none; }

#main {
  margin-top: 66px;
  padding: 0 0 64px;
  align-items: start;
}

#main > .article-author-side,
#main > article.page, #main > article.post, #main > #index {
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  float: none;
  margin: 0;
  padding: 0;
}

#main .article-author-side .itemscope {
  display: block;
  margin: 0;
}

#main > .article-author-side { font-family: var(--site-font); }

#main .article-author-side .itemscope > img.bio-photo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
  margin: 0 0 20px;
  border-radius: 10px;
}

#main .article-author-side .itemscope > .user-info {
  min-width: 0;
  max-width: none;
  margin: 0;
}

#main .article-author-side h3 {
  margin: 0 0 6px;
  font-family: var(--site-heading-font);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

#main .article-author-side p {
  margin: 0 0 22px;
  color: var(--site-muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
}

#main .article-author-side .author-social {
  max-width: none;
  margin: 0 0 11px;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.5;
  transform: none;
}

#main .article-author-side .author-social:hover {
  color: var(--site-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#main > article > h1:first-child,
#main > article > .headline-wrap > h1,
#main > #index > h1:first-child {
  margin: 0 0 24px;
  font-family: var(--site-heading-font);
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

#main > article > h1:not(:first-child),
#main .article-wrap h1 {
  margin: 42px 0 16px;
  font-family: var(--site-heading-font);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
}

#main > article p { margin: 0 0 22px; }
#main > article { overflow-wrap: anywhere; }
#main > article a { text-underline-offset: 3px; overflow-wrap: anywhere; }
#main > article li { margin-bottom: 8px; }
#main > article img { max-width: 100%; height: auto; }
#main pre { box-sizing: border-box; max-width: 100%; overflow-x: auto; }

/* Keep the introduction and updates dark without heavy letterforms. */
body.home #main > article > p,
body.home #main .news-list > li > div {
  color: #1f2328;
  font-weight: 400;
}
body.home #main > article > p a,
body.home #main .news-list a { color: inherit; }
body.home #main .news-list time { color: #515862; }

#main > #index article { padding: 20px 0; }
#main > #index article h2 {
  margin: 0 0 10px;
  font-family: var(--site-heading-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}
#main > #index article p { color: var(--site-muted); font-size: 16px; line-height: 1.7; }

body.blog-index #main > #index > article { padding-block: 12px; }
body.blog-index #main > #index > article h2 { margin-bottom: 4px; }
body.blog-index #main > #index > article p { margin: 0; line-height: 1.55; }

.footer-wrap { padding-bottom: 32px; }

/* Four recent updates, with a keyboard-accessible archive disclosure. */
.site-news { margin-top: 42px; }
.site-news h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -.02em;
}
#main .news-list { margin: 0; padding: 0; list-style: none; }
#main .news-list > li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding-block: 4px;
  font-size: 16px;
  line-height: 1.5;
}
.news-list time {
  padding-top: 2px;
  color: var(--site-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#main .news-list p { margin: 0; }
.news-list a { text-decoration: underline; text-decoration-color: #c8ccd0; }
.news-list a:hover { text-decoration-color: currentColor; }
.news-archive { margin-top: 10px; border-top: 1px solid #e7e9eb; }
.news-archive > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 12px;
  color: var(--site-muted);
  font-size: 13px;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.news-archive > summary::-webkit-details-marker { display: none; }
.news-archive > summary::marker { content: ""; }
.news-archive > summary:hover { color: var(--site-ink); }
.news-archive > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.news-archive-count { font-variant-numeric: tabular-nums; }
.news-toggle-icon {
  position: relative;
  width: 12px;
  height: 12px;
  margin-left: auto;
  transition: transform 180ms ease;
}
.news-toggle-icon::before, .news-toggle-icon::after {
  position: absolute;
  content: "";
  background: currentColor;
}
.news-toggle-icon::before { width: 12px; height: 1px; left: 0; top: 5.5px; }
.news-toggle-icon::after { width: 1px; height: 12px; left: 5.5px; top: 0; }
.news-archive[open] .news-toggle-icon { transform: rotate(45deg); }
.news-when-open, .news-archive[open] .news-when-closed { display: none; }
.news-archive[open] .news-when-open { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .news-toggle-icon { transition: none; }
}

@media (max-width: 760px) {
  .navigation-wrapper, #main {
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  .navigation-wrapper { padding-top: 22px; row-gap: 14px; }
  .navigation-wrapper #site-nav ul { gap: 4px 24px; }
  .navigation-wrapper #site-nav a { padding-block: 7px; }
  #main { margin-top: 36px; row-gap: 34px; }
  #main .article-author-side .itemscope {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 20px;
  }
  #main .article-author-side .itemscope > img.bio-photo { width: 100px; margin: 0; }
  #main .article-author-side p { margin-bottom: 12px; }
  #main .article-author-side .author-social { display: inline-block; margin: 0 14px 8px 0; font-size: 13px; }
  #main .article-author-side .author-social:first-of-type { display: block; }
  #main > article > h1:first-child { margin-bottom: 22px; }
  #main .news-list > li { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
}

@media print {
  .navigation-wrapper, #main > .article-author-side { display: none; }
  #main { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
}
