@import url("code.css");

/* Horizontal rule styling */
hr {
  margin: 1.2rem 0;
  height: 2px;
  opacity: 0.05;
  border: none;
  background-color: black;
}

.content :is(h2, h3, h4, h5, h6) {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.article h1 {
  font-size: 3rem;
  line-height: 3.5rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.article h1 + p {
  font-style: italic;
}

.article p {
  margin-bottom: 0.5rem;
}

.content h1::before {
  content: '>';
  padding-right: 0.5rem;
  color: slateblue;
  opacity: 0.6;
}

.article h2::before {
  content: '#';
  padding-right: 0.5rem;
  color: salmon;
}

.article h3::before {
  content: '#';
  padding-right: 0.5rem;
  color: sandybrown;
}

.article h4::before {
  content: '#';
  padding-right: 0.5rem;
  color: orange;
}

.article h5::before {
  content: '#';
  padding-right: 0.5rem;
  color: gold;
}

.article h6::before {
  content: '#';
  padding-right: 0.5rem;
  color: peachpuff;
}

.content h1 a {
  color: black;
  text-decoration: none;
}

.articles h1 {
  line-height: 2.3rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.published-date {
  font-size: 0.8em;
  opacity: 0.6;
  transform: translateY(10px);
}

.anchor-link:hover {
  text-decoration: none;
}

.content a {
  color: slateblue;
  font-weight: bold;
  text-decoration: none;
}

.content img:not([src$=".svg"]) {
  border-radius: 0.5rem;
}

.content ol li,
.content ul li {
  margin-left: 1rem;
}

.content ol {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.content ol li::marker {
  font-weight: bold;
  font-size: 0.9rem;
}

.content blockquote {
  padding: 1rem 1rem 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 4px;
  position: relative;
  background-color: rgba(0, 0, 0, 0.1);
}

.content blockquote.success {
  border-left: 4px solid seagreen;
  background-color: color-mix(in srgb, seagreen 20%, transparent);
}

.content blockquote.note {
  border-left: 4px solid royalblue;
  background-color: color-mix(in srgb, royalblue 20%, transparent);
}

.content blockquote.example {
  border-left: 4px solid slateblue;
  background-color: color-mix(in srgb, slateblue 20%, transparent);
}

.content blockquote.warn {
  border-left: 4px solid orange;
  background-color: color-mix(in srgb, orange 20%, transparent);
}

.content blockquote.error {
  border-left: 4px solid crimson;
  background-color: color-mix(in srgb, crimson 20%, transparent);
}

@media (max-width: 490px) {
  .content h1 a {
    font-size: 1.5rem;
    line-height: 0rem;
  }

  .article h1 {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  .snippets h1 a {
    font-size: 1.5rem;
    line-height: 0rem;
  }
}