:root {
  --width: 800px;
  --font-titles: -apple-system, "system-ui", "Segoe UI", sans-serif;
  --font-text: "Noto Sans", sans-serif;
  --font-scale: 1.2em;
  --background-color: #fef5e9;
  --background-image: radial-gradient(circle, #ede4d8 1px, transparent 1px);
  --heading-color: #37171b;
  --text-color: #222222;
  --link-color: #3273dc;
  --visited-color: #8b6fcb;
  --code-background-color: #eee5d9;
  --code-color: #972500;
  --dim-color: #333333;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #1c1c26;
    --background-image: radial-gradient(circle, #1f2229 1px, transparent 1px);
    --heading-color: #eeeeee;
    --text-color: #dddddd;
    --link-color: #8cc2dd;
    --visited-color: #8b6fcb;
    --code-background-color: #2c2c46;
    --code-color: #ff6b54;
    --dim-color: #cccccc;
  }
}

body {
  font-family: var(--font-text);
  font-size: var(--font-scale);
  font-variant: no-common-ligatures tabular-nums;
  margin: auto;
  padding: 20px;
  max-width: var(--width);
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: var(--background-image);
  animation: gridPulse 60s infinite alternate;
}

@keyframes gridPulse {
  from {
    background-size: 7px 7px;
  }

  to {
    background-size: 12px 12px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-titles);
  font-stretch: condensed;
  color: var(--heading-color);
}

h1.htitle {
  margin-bottom: 0px;
}

time {
  font-family: var(--font-titles);
  font-size: 0.8em;
  color: var(--dim-color);
}

time.ptime {
  margin-top: 0px;
  color: var(--dim-color);
  font-style: italic;
}

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

a:hover {
  text-decoration: underline;
}

nav a {
  margin-right: 8px;
}

nav span.active {
  font-weight: bold;
  margin-right: 10px;
}

strong,
b {
  color: var(--heading-color);
}

button {
  margin: 0;
  cursor: pointer;
}

main {
  line-height: 1.6;
}

table {
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px dashed;
}

img {
  max-width: 100%;
}

pre:has(code) {
  border-radius: 3px;
}

pre.giallo code {
  display: block;
  padding: 12px;
  white-space: pre-wrap;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* START: https://www.getzola.org/documentation/content/syntax-highlighting/ */

.giallo-l {
  display: inline-block;
  min-height: 1lh;
  width: 100%;
}

.giallo-ln {
  display: inline-block;
  user-select: none;
  margin-right: 0.4em;
  padding: 0.4em;
  min-width: 3ch;
  text-align: right;
  opacity: 0.8;
}

/* END */

p code {
  font-family: monospace;
  font-size: 0.92rem;
  background-color: var(--code-background-color);
  color: var(--code-color);
  padding: 3px;
}

blockquote {
  border-left: 1px solid #999;
  padding-left: 20px;
  font-style: italic;
}

footer {
  padding: 25px 0;
  text-align: center;
}

.title:hover {
  text-decoration: none;
}

.title h1 {
  font-size: 1.5em;
}

.inline {
  width: auto !important;
}

/* blog post list */
ul.blog-posts {
  list-style-type: none;
  padding: unset;
}

ul.blog-posts li {
  display: flex;
}

ul.blog-posts li span {
  flex: 0 0 110px;
}

ul.blog-posts li a:visited {
  color: var(--visited-color);
}

.tags {
  font-size: smaller;
}

.footnote-definition {
  display: flex;
  margin-top: 1em;
}

.footnote-definition-label {
  margin-left: 1rem;
  margin-right: 0.5rem;
  vertical-align: baseline;
}

.footnote-definition-label::after {
  content: ".";
}

.footnote-definition>p {
  margin: 0;
}

details {
  cursor: pointer;
  padding-top: 0.3em;
  margin-bottom: 0em;
  margin-left: 1em;
}

details summary {
  font-style: italic;
  padding: 0px;
  margin: 0px;
}

details ul {
  padding-top: 0px;
  margin-top: 0px;
}

details nav ul li {
  margin-bottom: 0.2em;
}

details nav ul li a {
  text-decoration: none;
}

video {
  max-width: 100%;
}

abbr {
  cursor: help;
}
