:root {
  --bg: #0e0f11;
  --fg: #d6d6d9;
  --muted: #71717a;
  --faint: #26262b;
  --accent: #ffffff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", monospace;
}

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

html {
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
  transition: color 0.12s ease, text-decoration-color 0.12s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--fg);
}

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

.muted {
  color: var(--muted);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* layout */

.page {
  min-height: 100vh;
  padding: 5rem 1.5rem 4rem;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
}

/* header */

.site-header {
  margin-bottom: 3.25rem;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 1rem;
  margin-bottom: 0.4rem;
}

.site-header h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg);
}

.tagline {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  align-items: baseline;
}

/* sections */

section {
  margin-bottom: 2.75rem;
}

.lede {
  margin-bottom: 2rem;
}

section > h2 {
  margin: 0 0 1rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
}

section > h2::before {
  content: "# ";
  color: var(--muted);
}

p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* entries */

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-list > li {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--faint);
}

.entry-list > li:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 1rem;
}

.entry-title {
  color: var(--fg);
}

.entry-venue {
  margin: 0 0 0.5rem;
}

.entry-list p {
  margin: 0 0 0.5rem;
}

.entry-list p:last-child {
  margin-bottom: 0;
}

.stack {
  margin: 0.5rem 0 0;
}

/* skill / link lists */

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-list li {
  margin-bottom: 0.4rem;
  text-indent: -1.25rem;
  padding-left: 1.25rem;
}

.skill-list li:last-child {
  margin-bottom: 0;
}

.link-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1.75rem;
  row-gap: 0.9rem;
  align-items: baseline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list > li {
  display: contents;
}

.link-list .key {
  color: var(--muted);
  white-space: nowrap;
}

/* blog post */

.site-header h1 a {
  text-decoration: none;
  color: var(--muted);
}

.site-header h1 a:hover {
  color: var(--fg);
}

.post-title {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.post-title::before {
  content: "# ";
  color: var(--muted);
}

.post-meta {
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  text-align: left;
}

.post-description {
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--faint);
}

.post h3 {
  margin: 2.5rem 0 1rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.post h3::before {
  content: "## ";
  color: var(--muted);
}

.post p {
  margin: 0 0 1rem;
}

.post ul,
.post ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.post li {
  margin-bottom: 0.4rem;
  text-align: justify;
  hyphens: auto;
}

.post ::marker {
  color: var(--muted);
}

.post strong {
  font-weight: 500;
  color: var(--accent);
}

.post figure {
  margin: 1.75rem 0;
}

.post img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--faint);
  border-radius: 2px;
}

.post pre {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: #17181b;
  border: 1px solid var(--faint);
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.6;
  tab-size: 4;
}

.post pre code {
  background: none;
  padding: 0;
  border: none;
  white-space: pre;
}

.post code {
  padding: 0.1em 0.35em;
  background: #17181b;
  border: 1px solid var(--faint);
  border-radius: 2px;
  font-size: 0.92em;
  word-break: break-word;
}

.post hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid var(--faint);
}

/* footer */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
}

.footnote {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

@media (max-width: 540px) {
  .page {
    padding: 3rem 1.25rem 3rem;
  }

  .entry-head {
    display: block;
  }

  .link-list {
    display: block;
  }

  .link-list > li {
    display: block;
    margin-bottom: 0.9rem;
  }

  .link-list > li:last-child {
    margin-bottom: 0;
  }

  .link-list .key {
    display: block;
    white-space: normal;
  }
}
