@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap");

:root {
  --bg: #F7F7F7;
  --text: #111111;
  --muted: #545454;
  --line: #e9e9e9;
  --link: #0a66d1;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
}

.site-header,
.content,
.site-footer {
  width: min(760px, 92vw);
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

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

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.content {
  padding: 2rem 0 3rem;
}

h1,
h2 {
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

a {
  color: var(--link);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

pre[class*="language-"] {
  font-size: 0.9rem;
  line-height: 1.45;
}

pre[class*="language-"] > code[class*="language-"] {
  font-size: inherit;
}

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

.post-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.post-list a:hover,
.post-list a:focus-visible {
  text-decoration: underline;
}

.post-list time {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-header {
  margin-bottom: 1.25rem;
}

.post-meta {
  margin: 0;
  font-size: 0.9rem;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.topic-pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.topic-pill:hover,
.topic-pill:focus-visible {
  color: var(--text);
  border-color: var(--text);
}

.post-tags {
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.post ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.post li {
  margin: 0.25rem 0;
  color: var(--muted);
}

.post-body .sidenote-ref {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
}

.post-body .sidenote-ref a {
  color: var(--link);
  text-decoration: none;
}

.post-body .sidenote-ref a:hover,
.post-body .sidenote-ref a:focus-visible {
  text-decoration: underline;
}

.post-body .sidenote {
  display: block;
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--line);
  background: #f7f7f7;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-body .sidenote-content {
  display: inline;
}

.post-body .sidenote-backref {
  color: var(--link);
  margin-left: 0.4rem;
  font-size: 0.9em;
}

.post-body .sidenote-backref:hover,
.post-body .sidenote-backref:focus-visible {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1rem 0 1.5rem;
}

@media (min-width: 1280px) {
  .post-body .sidenote {
    float: right;
    clear: right;
    width: 15rem;
    margin: 0.2rem -16rem 0.9rem 1rem;
    padding: 0;
    border: 0;
    background: transparent;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}
