/* MVP.css v1.17.2 - https://github.com/andybrewer/mvp */

/* @import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400;1,700&display=swap'); */
/* @import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400;1,700&family=Cinzel+Decorative:wght@400;700;900&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400;1,700&family=New+Rocker&display=swap');

:root {
  --active-brightness: 0.85;
  --border-radius: 5px;
  --box-shadow: 2px 2px 10px;

  /* #db529c pink */
  /* #9894ac velvet */
/* #008da9 cyan */
  /* #a196d0 lavender */
/* #c09fd1 */
  --color-bg: #3D1F51;
  --color-bg-secondary: #e9e9e9;
  --color-text: #DFDDDC;
  --color-text-secondary: #B6B2B0;
  --color-link: #a196d0;
  --color-accent: #9894ac;
  --color-secondary: #c09fd1;
  --color-secondary-accent: #920de90b;
  --color-shadow: #f4f4f4;
  --color-table: #9894ac;

  --color-scrollbar: #cacae8;
  --font-family: "Almendra", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-size: 16pt;
  --hover-brightness: 1.05;
  --justify-important: center;
  --justify-normal: left;
  --line-height: 1.5;
  --width-card: 285px;
  --width-card-medium: 460px;
  --width-card-wide: 800px;
  --width-content: 1080px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Layout */
article aside {
  background: var(--color-secondary-accent);
  border-left: 4px solid var(--color-secondary);
  padding: 0.01rem 0.8rem;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  margin: 0;
  overflow-x: hidden;
  padding: 0;
}

footer,
header,
main {
  margin: 0 auto;
  max-width: var(--width-content);
  padding: 1rem 0rem;
}

hr {
  background-color: var(--color-bg-secondary);
  border: none;
  height: 1px;
  margin: 4rem 0;
  width: 100%;
}

section {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--justify-important);
}

section img,
article img {
  max-width: 100%;
}

section pre {
  overflow: auto;
}

section aside {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  margin: 1rem;
  padding: 1.25rem;
  width: var(--width-card);
}

section aside:hover {
  box-shadow: var(--box-shadow) var(--color-bg-secondary);
}

[hidden] {
  display: none;
}

/* Headers */
article header,
div header,
main header {
  padding-top: 0;
}

header {
  text-align: var(--justify-important);
}

header a b,
header a em,
header a i,
header a strong {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

header nav img {
  margin: 1rem 0;
}

section header {
  padding-top: 0;
  width: 100%;
}

/* Nav */
nav {
  font-weight: bold;
  /* margin-bottom: 7rem; */
}

nav ul {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  list-style: none;
  padding: 0;
}

nav ul li {
  display: inline-block;
  margin: 0 0.5rem;
  position: relative;
  text-align: left;
}

/* Nav Dropdown */
nav ul li:hover ul {
  display: block;
}

nav ul li ul {
  background: var(--color-bg);
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  display: none;
  height: auto;
  left: -2px;
  /* padding: 0.5rem 1rem; */
  position: absolute;
  top: 1.7rem;
  white-space: nowrap;
  width: auto;
  z-index: 1;
}

nav ul li ul::before {
  /* fill gap above to make mousing over them easier */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.5rem;
  height: 0.5rem;
}

nav ul li ul li,
nav ul li ul li a {
  display: block;
}

/* Nav for Mobile */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  nav ul li {
    width: calc(100% - 1em);
  }

  nav ul li ul {
    border: none;
    box-shadow: none;
    display: block;
    position: static;
  }
}

/* Footer */
footer {
    text-align: center;
    color: var(--color-text-secondary);
}

/* Typography */
code,
samp {
  background-color: var(--color-accent);
  border-radius: var(--border-radius);
  color: var(--color-text);
  display: inline-block;
  margin: 0 0.1rem;
  padding: 0 0.5rem;
}

details {
  margin: 1.3rem 0;
}

details summary {
  font-weight: bold;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--line-height);
  text-wrap: balance;
}

h1 {
  font-size: 3em;
  text-align: center;
}

h2 {
  font-size: 2em;
}

h1,
h2 {
  font-family: "New Rocker", serif;
}

h3 {
  margin: 0.1em 0;
}

/* Add a decorative element before h3 headings. */
h3:before {
    font-family: "Noto Sans Symbols 2", sans-serif;
    content: "🙛 ";
}

mark {
  padding: 0.1rem;
}

ol, ul {
  margin: 0.4em 0;
}

ol li,
ul li {
  padding: 0.2rem 0;
}

main ul {
  list-style-type: "✦ ";
}
main ul ul {
  list-style-type: "✧ ";
}

p {
  margin: 0.75rem 0;
  padding: 0;
  width: 100%;
}

pre {
  margin: 1rem 0;
  max-width: var(--width-card-wide);
  padding: 1rem 0;
}

pre code,
pre samp {
  display: block;
  max-width: var(--width-card-wide);
  padding: 0.5rem 2rem;
  white-space: pre-wrap;
}

small {
  color: var(--color-text-secondary);
}

sup {
  /* vertical-align: super; */
  /* font-size: smaller; */
  background-color: var(--color-link);
  border-radius: var(--border-radius);
  color: var(--color-bg);
  font-size: small;
  font-weight: bold;
  margin: 0.3rem;
  padding: 0.2rem 0.3rem;
  position: relative;
  top: -2px;
}

/* Links */
a {
  color: var(--color-link);
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  text-shadow:
    0 0 12px rgba(80, 51, 100),
    0 0 24px rgba(106, 76, 126);
  filter: brightness(var(--hover-brightness));
}

a:active {
  filter: brightness(var(--active-brightness));
}

a b,
a em,
a i,
a strong,
button,
input[type="submit"] {
  border-radius: var(--border-radius);
  display: inline-block;
  font-size: medium;
  font-weight: bold;
  line-height: var(--line-height);
  margin: 0.5rem 0;
  padding: 1rem 2rem;
}

button,
input[type="submit"] {
  font-family: var(--font-family);
}

button:hover,
input[type="submit"]:hover {
  cursor: pointer;
  filter: brightness(var(--hover-brightness));
}

button:active,
input[type="submit"]:active {
  filter: brightness(var(--active-brightness));
}

a b,
a strong,
button,
input[type="submit"] {
  background-color: var(--color-link);
  border: 2px solid var(--color-link);
  color: var(--color-bg);
}

a em,
a i {
  border: 2px solid var(--color-link);
  border-radius: var(--border-radius);
  color: var(--color-link);
  display: inline-block;
  padding: 1rem 2rem;
}

article aside a {
  color: var(--color-secondary);
}

code {
  padding: 0.1em 0.3em;
  border: 2px solid transparent;
  border-radius: 6px;
  box-shadow: 0 0 10px 2px rgba(157, 78, 221, 0.25);
  background-color: #9d4edd40;
  position: relative;
}

code::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(157, 78, 221, 0.25); /* Subtle purple glow */
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

code:hover::after {
  opacity: 1;
}

/* Images */
figure {
  margin: 0;
  padding: 0;
}

figure img {
  max-width: 100%;
}

figure figcaption {
  color: var(--color-text-secondary);
}

/* Forms */
button:disabled,
input:disabled {
  background: var(--color-bg-secondary);
  border-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

button[disabled]:hover,
input[type="submit"][disabled]:hover {
  filter: none;
}

form {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  display: block;
  max-width: var(--width-card-wide);
  min-width: var(--width-card);
  padding: 1.5rem;
  text-align: var(--justify-normal);
}

form header {
  margin: 1.5rem 0;
  padding: 1.5rem 0;
}

input,
label,
select,
textarea {
  display: block;
  font-size: inherit;
  max-width: var(--width-card-wide);
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
  font-weight: normal;
  position: relative;
  top: 1px;
}

input[type="range"] {
  padding: 0.4rem 0;
}

input,
select,
textarea {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 0.4rem 0.8rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: calc(100% - 1.6rem);
}

input[readonly],
textarea[readonly] {
  background-color: var(--color-bg-secondary);
}

label {
  font-weight: bold;
  margin-bottom: 0.2rem;
}

/* Popups */
dialog {
  max-width: 90%;
  max-height: 85dvh;
  margin: auto;
  padding-block: 0;
  padding-inline: 20px;
  border: 1px solid var(--color-bg-secondary);
  border-radius: 0.5rem;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
  scrollbar-color: transparent transparent;
  animation: bottom-to-top 0.25s ease-in-out forwards;
}

dialog::-webkit-scrollbar {
  width: 0;
  display: none;
}

dialog::-webkit-scrollbar-track {
  background: transparent;
}

dialog::-webkit-scrollbar-thumb {
  background-color: transparent;
}

@media (min-width: 650px) {
  dialog {
    max-width: 39rem;
  }
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

@keyframes bottom-to-top {
  0% {
    opacity: 0;
    transform: translateY(10%);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

dialog hr {
  margin-block: 1rem;
}

/* Tables */
table {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  border-spacing: 0;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  white-space: nowrap;
}

table td,
table th,
table tr {
  padding: 0.4rem 0.8rem;
  text-align: var(--justify-important);
}

table thead {
  background-color: var(--color-table);
  border-collapse: collapse;
  border-radius: var(--border-radius);
  color: var(--color-bg);
  margin: 0;
  padding: 0;
}

table thead tr:first-child th:first-child {
  border-top-left-radius: var(--border-radius);
}

table thead tr:first-child th:last-child {
  border-top-right-radius: var(--border-radius);
}

table thead th:first-child,
table tr td:first-child {
  text-align: var(--justify-normal);
}

table tr:nth-child(even) {
  background-color: var(--color-accent);
}

/* Quotes */
blockquote {
  display: block;
  font-size: x-large;
  line-height: var(--line-height);
  margin: 1rem auto;
  max-width: var(--width-card-wide);
  padding: 1rem auto;
  text-align: var(--justify-important);
}

blockquote footer {
  color: var(--color-text-secondary);
  display: block;
  font-size: large;
  margin-right: 8rem;
  text-align: right;
  line-height: var(--line-height);
  padding: 1rem 0;
}

/*
 * Sidenotes & Asides
 */

/* On mobile devices, sidenotes behave the same as asides. */
.sidenote,
aside {
    float: right;
    /* Make sure the sidenotes don't clash. */
    clear: right;
    width: 40%;
    margin: 1rem 1rem 1rem 3rem;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border-left: 3px solid var(--fg);
    /* Adjust typography to be more compact. */
    font-size: 1.4rem;
    line-height: 1.3;
}

/* Prevent double top margins */
aside h1, aside h2, aside h3, aside h4 {
    margin-top: 0;
}

/* Sadly, CSS does not support var() and rem in media queries, so we have to hardcode pixels. */
/* This will break if the main column width is changed without adjusting this media query.    */
@media (min-width: calc(760px + 400px)) {
    .sidenote {
        --distance-from-main: 3rem;
        /* Set the width of the element to a little less than the remaining space on one side, limited to 40% of the main column. */
        --self-width: min(calc((100vw - 760px)/2 - (var(--distance-from-main))), 40%);
        /* Remove any values set for the mobile version of the sidenotes. */
        margin: 0;
        padding: 0;
        border: none;
        width: var(--self-width);
        /* Set a negative right margin to (self-width + distance-from-main) to pull the sidenote to the right. */
        margin-right: calc(calc(var(--self-width) + var(--distance-from-main)) * -1);
    }
}

/* Each time a sidenote anchor is encountered, increment the counter */
.sidenote-anchor {
    counter-increment: sidenote-counter;
}

/* Use a custom font for the sidenote numbers */
.sidenote-anchor:after,
.sidenote:before {
    font-size: 1.3rem;
    position: relative;
    font-family: "Spectral", serif;
}

/* Fine-adjust the number position for the sidenote anchor */
.sidenote-anchor:after {
    content: counter(sidenote-counter);
    top: -0.5rem;
    left: 0.1rem;
}

/* Fine-adjust the number position for the sidenote */
.sidenote:before {
    content: counter(sidenote-counter) " ";
    top: -0.5rem;
}

/*
 * Warning box
 */

.warning {
  position: relative;
  padding: 1.2rem;
  margin: 1.5rem 0;
  background-color: #9d4edd40;

  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow:
    0 0 10px 2px #6A4C7E99, /* Outer glow */
    inset 0 0 10px 2px #50336499; /* Inner glow */
  transition: box-shadow 0.3s ease;
}

.warning .title {
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.warning .title::before {
  content: '⛧';
  margin-right: 8px;
  font-weight: bold;
  font-size: 1.6em;
  display: inline-flex;
}

/*
 * Custom
 */

center {
  display: flex;
  justify-content: space-evenly;
  text-align: center;
}
