@import url("https://cdn.jsdelivr.net/npm/modern-normalize@3.0.1/modern-normalize.min.css");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  --font-size-body: 1.0625rem;
  --font-size-small: 0.875rem;
  --font-size-code: 0.9375rem;
  --line-height-body: 1.5rem;
  --line-height-small: var(--line-height-body);
  --line-height-code: 1.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-12: 3rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --link-color: #0077cc;
    --link-hover-color: #005fa3;
    --title-color: #000000;
    --border-color: #dddddd;
    --code-bg-color: #fefefe;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0a0a0a;
    --text-color: #dddddd;
    --link-color: #ffb600;
    --link-hover-color: #ff8c00;
    --title-color: #ffffff;
    --border-color: #333333;
    --code-bg-color: #24292e;
  }
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Open Sans", Verdana, sans-serif;
  font-size: 16px;
  padding: 0 4px;
}

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

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

time {
  white-space: nowrap;
}

pre {
  padding: var(--space-3) var(--space-2);
  font-size: var(--font-size-code);
  line-height: var(--line-height-code);
  font-family: "JetBrains Mono", monospace;
  position: relative;
  border-radius: 5px;
}

pre code {
  width: 100%;
  display: block;
  overflow-x: auto;
  scrollbar-width: none;
}

pre .copy-code {
  position: absolute;
  top: var(--space-1);
  right: var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--line-height-body);
  width: var(--line-height-body);
  padding: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: none;
  color: var(--text-color);
}

pre .copy-code svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

pre .copy-code * {
  cursor: inherit;
  pointer-events: none;
}

pre .copy-code:hover {
  color: var(--link-color);
}

pre .copy-code.copied {
  color: green !important;
}

p > code,
li > code {
  background-color: var(--code-bg-color);
  font-size: var(--font-size-code);
  padding: 0 var(--space-1);
  border-radius: var(--space-1);
  line-height: 1;
  vertical-align: -0.04em;
  white-space: nowrap;
}

td > code,
th > code {
  display: inline-block;
  height: var(--line-height-body);
  line-height: var(--line-height-body);
  vertical-align: top;
}

h1,
h2,
h3,
h4,
h5,
h6,
.zola-anchor {
  color: var(--title-color);
  margin: 0;
  padding: 0;
}

h1 {
  margin-bottom: var(--space-6);
  line-height: var(--space-12);
}

article h1 {
  font-size: 1.75rem;
  line-height: var(--space-12);
}

.zola-anchor {
  font-size: 1.25rem !important;
  vertical-align: middle;
  position: relative;
  text-decoration: none;
}

.zola-anchor:hover::before {
  content: "🔗";
  position: absolute;
  font-size: 1rem;
  margin-left: -1.375rem;
  transform: translate(0, -50%);
  top: 50%;
}

/*  */

body {
  margin: 0 auto;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: round(up, 100vh, var(--line-height-body));
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgb(0 119 204 / 0.28) 0,
    rgb(0 119 204 / 0.28) 1px,
    transparent 1px,
    transparent var(--line-height-body)
  );
}

body:not(.rhythm-grid-enabled)::before,
body.rhythm-grid-hidden::before {
  display: none;
}

.debug-menu {
  position: fixed;
  right: var(--space-4);
  bottom: calc(var(--line-height-body) * 3);
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: calc(var(--line-height-body) + var(--space-1));
  padding: var(--space-1);
  border-radius: var(--space-1);
  background-color: var(--bg-color);
  color: var(--text-color);
  box-shadow: 0 var(--space-1) var(--space-2) rgb(0 0 0 / 0.22);
  font: inherit;
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  cursor: pointer;
}

.debug-menu-toggle,
.debug-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--line-height-body);
  height: var(--line-height-body);
  border: 0;
  border-radius: var(--space-1);
  background-color: transparent;
  color: var(--text-color);
  font: inherit;
  outline: none;
  cursor: pointer;
}

.debug-menu-toggle *,
.debug-menu-close * {
  pointer-events: none;
}

.debug-menu-toggle:focus,
.debug-menu-toggle:focus-visible,
.debug-menu-close:focus,
.debug-menu-close:focus-visible {
  outline: none;
}

.debug-menu-close {
  padding: 0;
  font-size: 1rem;
  opacity: 0.72;
}

.debug-menu-toggle:hover,
.debug-menu-close:hover {
  background-color: var(--code-bg-color);
  color: var(--link-hover-color);
}

.debug-menu-toggle[aria-pressed="true"] {
  color: var(--link-color);
}

.debug-menu-toggle[aria-pressed="false"] {
  color: var(--text-color);
  opacity: 0.72;
}

.debug-menu-close:hover {
  opacity: 1;
}

body > header {
  display: flex;
  justify-content: space-between;
  padding: var(--space-6) 0;
  margin-bottom: var(--line-height-body);
}

body > main {
  flex: 1;
}

body > footer {
  box-shadow: inset 0 1px 0 var(--text-color);
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
  margin-top: var(--space-6);
  padding: var(--space-6) 0;
  text-align: center;
}

body > header > div {
  display: flex;
  gap: 1.5rem;
}

body > header a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  box-shadow: inset 0 -2px 0 transparent;
}

body > header a:hover,
body > header a.current {
  color: var(--title-color);
  box-shadow: inset 0 -2px 0 var(--link-color);
  text-decoration: none;
}

main > h2 {
  line-height: var(--space-12);
  margin: var(--line-height-body) 0 0;
}

main > h2:first-child {
  margin-top: 0;
}

.error-page {
  margin: calc(var(--line-height-body) * 5) auto 0;
  text-align: center;
}

main p,
main ul,
main ol,
main pre,
main blockquote,
main table {
  margin-top: 0;
  margin-bottom: var(--line-height-body);
}

article h2,
article h3,
article h4,
article h5,
article h6 {
  line-height: var(--space-12);
  margin: var(--line-height-body) 0 0;
}

article h2 > .zola-anchor,
article h3 > .zola-anchor,
article h4 > .zola-anchor,
article h5 > .zola-anchor,
article h6 > .zola-anchor {
  display: block;
  font-size: inherit !important;
  line-height: inherit;
  vertical-align: baseline;
}

/*  */

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

.posts-list > li {
  display: flex;
  justify-content: space-between;
  padding: 0;
  line-height: var(--line-height-body);
}

article > header {
  margin-bottom: var(--space-6);
}

article img,
article svg {
  width: 100%;
  max-width: 720px;
  display: block;
  margin: 0 auto;
}

article > img {
  margin-bottom: var(--line-height-body);
}

article > img,
article > svg,
article > p:has(> img:only-child),
article > p:has(> svg:only-child) {
  padding-bottom: var(--media-rhythm-pad, 0px);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
}

hr {
  height: var(--line-height-body);
  border: 0;
  margin: var(--line-height-body) 0 0;
  background: linear-gradient(var(--text-color), var(--text-color)) top / 100% 1px no-repeat;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  line-height: var(--line-height-body);
}

th,
td {
  padding: 0 var(--space-2);
  vertical-align: top;
  box-shadow: inset 0 -1px 0 var(--border-color);
}

th {
  color: var(--title-color);
  font-weight: 700;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

th[align="right"],
td[align="right"] {
  text-align: right;
}

.post {
  padding-bottom: var(--line-height-body);
  box-shadow: inset 0 -1px 0 var(--text-color);
}

.post > :last-child {
  margin-bottom: 0;
}

.post > header > h1 {
  margin-bottom: 0;
}

.post-meta {
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
}

.post-meta > div {
  vertical-align: middle;
}

.post-meta i {
  margin: 0 0.15rem;
}

a.post-edit {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.75;
}

a.post-edit:hover {
  text-decoration: underline;
}

.post blockquote {
  border-left: 2px solid var(--link-color);
  padding-left: var(--space-4);
  margin: 0 0 var(--line-height-body);
  font-style: italic;
}

.post hr:last-of-type + ol {
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
}

.post hr:last-of-type + ol a {
  color: var(--text-color);
}

.post hr:last-of-type + ol a:hover {
  color: var(--link-hover-color);
}

.social-share {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-items: center;
  justify-content: center;
  height: var(--line-height-body);
  line-height: var(--line-height-body);
  margin: var(--line-height-body) 0;
}

.social-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--line-height-body);
  height: var(--line-height-body);
  text-decoration: none;
  color: var(--text-color);
  padding: 0;
}

.social-share a:hover {
  color: var(--link-hover-color);
}

/*  */

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

.projects-list li {
  display: flex;
  justify-content: space-between;
  margin: 0;
  line-height: var(--line-height-body);
}

.project-langs {
  display: inline-flex;
  gap: 0.5rem;
  line-height: 1rem;
}

.project-langs > div {
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  border-radius: 0.25rem;
  padding: 0rem 0.25rem;
  background-color: var(--bg-color);
}

.wallets-list {
  font-size: 1.25rem;
  line-height: var(--space-12);
  font-family: monospace;
}

.wallets-list code {
  cursor: pointer;
  font-size: 1.15rem;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  transition:
    border-color 3s ease,
    color 0.15s ease;
}

.wallets-list code:hover {
  color: var(--link-color);
}

.wallets-list code.copied {
  border-color: green;
  transition:
    border-color 0s,
    color 0.15s ease;
}

.wallets-list li:last-child code {
  font-size: 13px;
}

.ext-link-icon {
  font-size: 11px;
  vertical-align: middle;
}
