:root {
  --padding: 1rem;

  --brand: oklch(82.3% 0.12 346.018);

  --bg: oklch(21% 0.006 285.885);
  --bg-code: oklch(27.4% 0.006 286.033);
  --bg-selection: oklch(82.331% 0.11936 347.061 / 0.25);

  --text: oklch(87.1% 0.006 286.286);
  --text-strong: oklch(96.7% 0.001 286.375);
  --text-marker: oklch(70.5% 0.015 286.067);

  --border: oklch(14.1% 0.005 285.823);
  --border-table: oklch(37% 0.013 285.805);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans Variable", sans-serif;
  max-width: 680px;
  margin: 0 auto;
  padding: var(--padding);
}

/* LINKS */
a {
  color: var(--brand);
  font-weight: 450;
  text-decoration: none;
}
a:hover {
  border-bottom: var(--brand) solid 1.5px;
  padding-bottom: 0.02rem;
}

/* HEADINGS */
h1,
h2,
h3,
h4 {
  color: var(--text-strong);
  font-family: "Libre Baskerville Variable", serif;
  margin-top: 3rem;
  margin-bottom: 1rem;
}
h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 1.125rem;
}
h2 + h2,
h2 + h3,
h2 + h4,
h3 + h2,
h3 + h3,
h3 + h4,
h4 + h2,
h4 + h3,
h4 + h4 {
  margin-top: 1.5rem;
}
.metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-table);
  padding-bottom: 1rem;
  margin-top: -0.5rem;
}

/* PARAGRAPHS */
p {
  margin: 1rem 0;
}

strong {
  font-weight: 600;
}
:not(a) > strong {
  color: var(--text-strong);
}

/* HORIZONTAL RULE */
hr {
  border-color: var(--border);
}

/* INLINE CODE */
code {
  font-family: "Ubuntu Sans Mono Variable", monospace;
  font-size: 14px;
}
:not(pre) > code {
  user-select: all;
  background-color: var(--bg-code);
  padding: 0.05rem 0.25rem;
  border-radius: 0.2rem;
}
:not(a) > code {
  color: var(--text-strong);
}

/* CODE BLOCKS */
pre {
  padding: 0.75rem;
  overflow: auto;
  max-width: calc(100vw - 2rem);
  line-height: 1.3rem;
}

/* LISTS */
ul {
  padding-left: 0;
  list-style-type: square;
  list-style-position: outside;
}
ol {
  padding-left: 0;
  list-style-type: decimal;
  list-style-position: outside;
}
li {
  margin-left: 1.5rem;
  padding-left: 0.25rem;
  margin-top: 0.5rem;
}
li::marker {
  color: var(--text-marker);
}
ul li::marker {
  font-size: 0.8rem;
}

/* CHECKBOX */
.task-list-item {
  list-style-type: none;
}
.task-list-item input {
  float: left;
  margin-left: -1.3em;
  margin-top: 0.4em;
}

/* BLOCKQUOTE */
blockquote {
  border-left: 4px solid var(--brand);
  padding: 0.5rem 0.75rem;
  margin: 1rem 0;
  font-style: italic;
}
blockquote :first-child {
  margin-top: 0;
}
blockquote :last-child {
  margin-bottom: 0;
}

/* GFM ALERTS */
.markdown-alert {
  border-left: 4px solid;
  padding: 0.5rem 0.75rem;
  margin: 1rem 0;
}
.markdown-alert :first-child {
  margin-top: 0;
}
.markdown-alert :last-child {
  margin-bottom: 0;
}
.markdown-alert .markdown-alert-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}
.markdown-alert .markdown-alert-title .octicon {
  fill: currentColor;
}
.markdown-alert-note {
  border-color: oklch(63% 0.14 250);
}
.markdown-alert-note .markdown-alert-title {
  color: oklch(63% 0.14 250);
}
.markdown-alert-tip {
  border-color: oklch(65% 0.15 160);
}
.markdown-alert-tip .markdown-alert-title {
  color: oklch(65% 0.15 160);
}
.markdown-alert-important {
  border-color: oklch(60% 0.16 290);
}
.markdown-alert-important .markdown-alert-title {
  color: oklch(60% 0.16 290);
}
.markdown-alert-warning {
  border-color: oklch(75% 0.15 75);
}
.markdown-alert-warning .markdown-alert-title {
  color: oklch(75% 0.15 75);
}
.markdown-alert-caution {
  border-color: oklch(65% 0.2 25);
}
.markdown-alert-caution .markdown-alert-title {
  color: oklch(65% 0.2 25);
}

/* TABLES */
.table-container {
  max-width: calc(100vw - (var(--padding) * 2));
  overflow-x: auto;
}
table {
  border-collapse: collapse;
}
th,
td {
  border: 1px solid var(--border-table);
  padding: 0.5rem 0.75rem;
}
thead {
  color: var(--text-strong);
  font-weight: 600;
}

/* SHIKI */
.shiki,
.shiki span {
  background-color: var(--bg-code) !important;
}
