:root {
  --max-width: 544px;
  --bg: white;
  --link-after: #7b31c1;
  --link-hover: #eeddff;
  --text: black;
  --code-bg: #363636;
  --code-text: #E3E3E3;
  --text-spacing: 0.6em;
  /* --bg: white; */
  /* --text: black; */
}

@media (prefers-color-scheme: dark) {
  :root {
    /* --bg: #20384B; */
    --bg: #361a4f;
    --link-after: #8d5abe;
    --link-hover: #563570;
    --text: #eadbf8;
    --code-bg: #eadbf8;
    --code-text: #361a4f;
  }
}

body {
  font-family: "EB Garamond", serif;
  color: var(--text);
  background-color: var(--bg);
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 1.2em;
  line-height: 1.5;
  display: flex;
  justify-content: center;
}

h2, h3, h4, h5, h6 {
  scroll-margin-top: 0.5em;
  position: relative;
}

h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  text-decoration: none !important;
}

h2:hover::before,
h3:hover::before,
h4:hover::before,
h5:hover::before,
h6:hover::before {
  content: "#";
  position: absolute;
  left: -0.8em;
  color: var(--text);
  opacity: 0.5;
}

p {
    margin: var(--text-spacing) 0;
}

p, ol, ul {
    hyphens: auto;
    text-align: justify;
}

.date {
    font-size: 85%;
    /* font-variant-numeric: proportional-nums oldstyle-nums;
    font-feature-settings: "onum"; */
}

#site-container {
  width: var(--max-width);
  margin: 0px;
  padding: 0 1em 1em 1em;
}

/* dinkify */
hr {
 border: none;
 text-align: center;
}
hr::before {
 content: "* * *";
}
@media (prefers-color-scheme: dark) {
  hr {
    color: #8e5eba;
  }
}

.smallcaps {
    font-variant: small-caps;
    font-feature-settings: "smcp";
}

.oldstyle {
    font-variant-numeric: proportional-nums oldstyle-nums;
    font-feature-settings: "onum";
}

.spoiler {
  background-color: var(--text);
}

.spoiler:hover {
  background-color: var(--bg);
}

/* a {
  color: var(--text);
  cursor: pointer;
}
a:not(:hover) {
  text-decoration: underline;
}
a:hover {
  text-decoration: none;
} */

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  transition-property: background;
  transition-duration: 0.2s;
  background-color: var(--link-hover);
  border-radius: 8px;
}

a::after {
  position: relative;
  content: "\FEFF°";
  margin-left: 0.10em;
  font-size: 90%;
  top: -0.10em;
  color: var(--link-after);
  font-feature-settings: "caps";
  font-variant-numeric: normal;
}

li {
  margin-bottom: var(--text-spacing);
}

ul.tight li,
ol.tight li {
  margin-bottom: 0;
}

ul { list-style-type: "•  "; }
/* ul { list-style-type: "◈  "; } */
ul,
ol {
  margin: var(--text-spacing) 0;
}

img {
  image-rendering: pixelated;
}

nav {
  overflow: visible;
  max-width: inherit;
}
nav a {
  line-height: 1.2;
  display: inline-block;
  padding: 8px;
  margin-left: -8px;
  margin-right: 8px;
}
nav .settings-btn {
  float: right;
  margin-right: 10px;
}
nav img {
  image-rendering: pixelated;
  width: 544px;
  height: 94px;
}

pre code {
  overflow: auto;
  background-color: var(--code-bg);
  color: var(--code-text);
  /* border: 1px solid #999; */
  display: block;
  white-space: pre-wrap;
  padding: 1em;
}

.links .platform {
  display: inline-block;
  width: 5em;
  position: relative;
  display: inline-block;
}

.links [aria-describedby] {
    display: inline-block;
}

[role="tooltip"] {
  visibility: hidden;
  position: absolute;
  width: 10em;
  /* top: 2rem;
  left: 2rem; */
  background: rgb(85, 85, 85);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  z-index: 1000;
  /* Give some time before hiding so mouse can exit the input
  and enter the tooltip. Not necessary since it's right below it.*/
  /* transition: visibility 0.5s; */
}

[aria-describedby]:hover + [role="tooltip"],
[aria-describedby]:focus + [role="tooltip"],
[role="tooltip"]:hover,
[role="tooltip"]:focus {
  visibility: visible;
}
