@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #fff;
  --text: #383838;
  --muted: #666;
  --accent: #7c3aed;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1d1f21;
  --text: #c9cacc;
  --muted: #999;
  --accent: #b794f6;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1f21;
    --text: #c9cacc;
    --muted: #999;
    --accent: #b794f6;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 736px;
  padding: 64px 16px 20px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.725 "JetBrains Mono", monospace;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

header img {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 5px;
  filter: grayscale(1);
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
}

h1 a {
  text-decoration: none;
}

nav {
  color: var(--accent);
  font-size: 12.8px;
  line-height: 15px;
}

nav a,
.theme button {
  padding: 0 15px 0 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

nav a:hover,
.theme button:hover,
.theme button[aria-pressed="true"] {
  text-decoration: underline;
}

nav a + a,
.theme button + button {
  padding-left: 15px;
  border-left: 1px dotted var(--accent);
}

p {
  margin: 14px 0;
}

.icon {
  display: inline-block;
  padding: 0 3px;
  text-decoration: none;
}

.icon svg {
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

h2 {
  margin: 48px 0 16px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.725;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  margin-bottom: 20px;
}

li p {
  margin: 0;
}

.with-image {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: start;
}

.with-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 540px) {
  .with-image {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

footer {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  color: var(--muted);
  font-size: 11px;
}

.theme {
  color: var(--accent);
}

.theme button:last-child {
  padding-right: 0;
}
