:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --field: #ece7dc;
  --ink: #17201d;
  --muted: #66736e;
  --line: #ded8ca;
  --green: #2f7a67;
  --blue: #355f93;
  --gold: #b88a2c;
  --rust: #b0612f;
  --accent: var(--green);
  --content-width: 760px;
  --side-width: 210px;
  --gap: 42px;
  --load-duration: 320ms;
  --load-stagger: 58ms;
}

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

html {
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  text-size-adjust: none;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #1e5f50;
  text-decoration: underline;
}

.page-grid {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--side-width) + 2 * var(--gap));
  margin: 0 auto;
  padding: 46px 22px 72px;
  display: grid;
  grid-template-columns: minmax(140px, var(--side-width)) minmax(0, var(--content-width)) minmax(180px, var(--side-width));
  grid-template-areas:
    "header-mark header-title header-status"
    "main-nav main-content main-side";
  column-gap: var(--gap);
  row-gap: 34px;
  align-items: start;
}

.grid-region {
  min-width: 0;
}

.header-mark {
  grid-area: header-mark;
  position: relative;
  height: 148px;
  align-self: start;
}

.header-title {
  grid-area: header-title;
  padding-top: 26px;
}

.header-status {
  grid-area: header-status;
  justify-self: start;
  padding-top: 26px;
}

.main-nav {
  grid-area: main-nav;
  padding-left: 72px;
}

.main-content {
  grid-area: main-content;
}

.main-side {
  grid-area: main-side;
}

.project-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent), #111 18%);
  border-radius: 9px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent), white 24%), var(--accent));
  color: white;
  box-shadow: 0 7px 16px rgba(23, 32, 29, 0.14);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: lowercase;
}

.site-mark {
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: -18px;
  left: 18px;
  width: 148px;
  height: 148px;
  vertical-align: top;
  color: inherit;
  text-decoration: none;
}

.site-mark:hover,
.site-mark:focus {
  text-decoration: none;
}

.site-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.project-mark.large {
  width: 76px;
  height: 76px;
  border-radius: 13px;
  font-size: 1.42rem;
}

.header-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
}

.header-title a {
  color: var(--ink);
}

.title-brace {
  color: var(--muted);
  font-weight: 500;
}

.title-subtitle {
  color: var(--blue);
  font-weight: 600;
}

.status-line,
.side-label,
.section-kicker,
.cell-kicker {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.main-nav ul,
.side-index,
.mini-feed,
.update-list,
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--muted);
  display: inline-flex;
  font-size: 15px;
  line-height: 1.45;
}

.main-nav a:hover {
  color: var(--green);
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.lead {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.58;
}

.intro-block p {
  margin: 0 0 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 30px 0 44px;
}

.feature-cell {
  display: grid;
  gap: 0.5rem;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--zone), var(--line) 62%);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.feature-cell:hover {
  background: color-mix(in srgb, var(--zone), white 90%);
  text-decoration: none;
}

.feature-keychain {
  --zone: var(--green);
  background: color-mix(in srgb, var(--green), white 93%);
}

.feature-projects {
  --zone: var(--blue);
  background: color-mix(in srgb, var(--blue), white 94%);
}

.feature-news {
  --zone: var(--gold);
  background: color-mix(in srgb, var(--gold), white 91%);
}

.feature-heritage {
  --zone: var(--rust);
  background: color-mix(in srgb, var(--rust), white 93%);
}

.feature-cell strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.feature-cell span:last-child {
  color: var(--muted);
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.8rem;
  line-height: 1.08;
}

.article-page > header h2 {
  font-size: 1.45rem;
}

.article-page > header {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.article-page > header > *,
.article-page > header > p {
  margin: 0;
}

.article-page > header > p.lead {
  margin-top: 0.85rem;
}

.article-page > header .lead {
  max-width: 680px;
  color: color-mix(in srgb, var(--ink), var(--muted) 28%);
  font-size: 1.34rem;
  font-weight: 600;
  line-height: 1.42;
}

.byline {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
}

.updates h2 {
  color: var(--ink);
  font-size: 0.92rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
}

.section-header a {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.update-entry,
.project-row {
  animation: listLoad var(--load-duration) ease forwards;
  animation-delay: calc(var(--load-stagger) * var(--delay-index));
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes listLoad {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .update-entry,
  .project-row {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.update-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 106px;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
}

.update-link {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.update-entry time {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.angled-pill {
  --pill-bg: color-mix(in srgb, var(--green), white 84%);
  --pill-fg: color-mix(in srgb, var(--green), #111 38%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 84px;
  padding: 0.18rem 0.65rem 0.22rem;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  background: var(--pill-bg);
  color: var(--pill-fg);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

.angled-pill:hover,
.angled-pill:focus {
  color: var(--pill-fg);
  text-decoration: none;
}

.pill-release {
  --pill-bg: color-mix(in srgb, var(--blue), white 86%);
  --pill-fg: color-mix(in srgb, var(--blue), #111 38%);
}

.pill-license {
  --pill-bg: color-mix(in srgb, var(--gold), white 82%);
  --pill-fg: color-mix(in srgb, var(--gold), #111 42%);
}

.pill-note {
  --pill-bg: color-mix(in srgb, var(--rust), white 86%);
  --pill-fg: color-mix(in srgb, var(--rust), #111 38%);
}

.pill-link {
  --pill-bg: transparent;
  --pill-fg: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}

.pill-link:hover,
.pill-link:focus {
  background: var(--ink);
  color: var(--paper);
}

.side-block {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.sticky {
  position: sticky;
  top: 36px;
}

.project-badge {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
}

.project-badge em,
.project-row-main em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.project-row a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.project-row-meta {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.project-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.wiki-body,
.article-page {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.72;
}

.wiki-body h2,
.wiki-body h3 {
  margin-top: 2.2rem;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
  max-width: 100%;
}

.main-content h1,
.main-content h2 {
  font-size: 1.45rem;
  line-height: 1.12;
}

.main-content .updates h2 {
  font-size: 0.92rem;
  line-height: 1.2;
}

.main-content h3 {
  font-size: 1.22rem;
  line-height: 1.18;
}

.main-content h4,
.main-content h5,
.main-content h6 {
  font-size: 1rem;
  line-height: 1.25;
}

.wiki-body p,
.article-page p {
  margin: 0 0 1rem;
}

.wiki-body code {
  padding: 0.12rem 0.32rem;
  border-radius: 3px;
  background: var(--field);
  font-family: "IBM Plex Mono", monospace;
}

.wiki-body pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.side-index {
  display: grid;
  gap: 0.3rem;
}

.side-index a,
.mini-feed a {
  display: block;
  padding: 0.48rem 0.62rem;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.side-index a:hover,
.side-index a.active {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green), white 92%);
  color: var(--ink);
}

.title-page {
  margin-bottom: 2rem;
}

.title-page .lead {
  margin: 0;
}

.page-list {
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 116px minmax(0, 1fr);
    grid-template-areas:
      "header-mark header-title"
      "header-mark header-status"
      "main-nav main-nav"
      "main-content main-content"
      "main-side main-side";
    column-gap: 18px;
    row-gap: 16px;
    padding-top: 28px;
  }

  .header-mark {
    display: block;
    position: static;
    height: auto;
  }

  .site-mark {
    position: static;
    top: auto;
    left: auto;
    width: 116px;
    height: 116px;
  }

  .header-title {
    align-self: end;
    padding-top: 18px;
  }

  .header-status {
    align-self: start;
    justify-self: start;
    padding-top: 0;
  }

  .main-nav {
    margin-top: 4px;
    padding-top: 0;
    padding-left: 0;
  }

  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .main-nav a {
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .main-nav a.active,
  .main-nav a[aria-current="page"] {
    border-color: color-mix(in srgb, var(--green), var(--line) 35%);
    background: color-mix(in srgb, var(--green), white 92%);
  }

  .sticky {
    position: static;
  }
}

@media (max-width: 680px) {
  .page-grid {
    grid-template-columns: 86px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 14px;
  }

  .site-mark {
    width: 86px;
    height: 86px;
  }

  .header-title {
    padding-top: 10px;
  }

  .feature-grid,
  .project-row a,
  .project-header,
  .update-entry {
    grid-template-columns: 1fr;
  }

  .update-entry {
    gap: 3px;
  }

  .angled-pill {
    justify-self: start;
  }
}
