/* CSS template originally adopted from https://ribo.zone/free/layouts/ */

/* Quick Customization */
:root {
  --width: 900px; /* sets the maximum width of the middle section */
  --headingfont: "Georgia", serif;
  --bodyfont: "Verdana", sans-serif;
  --borderwidth: 7px;
  --borderstyle: dotted;
}

  :root {
    --text: #FFFDED;
    --section: #0f1813; 
    --border: #575fc5;
    --link: #e5bcf7;
    --bgimage: linear-gradient(#7257c7, #000);
  }


/* Page Layout */
* {
  box-sizing: border-box;
  max-width: 100%;
  scrollbar-color: var(--link) var(--border);
}

html {
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--border) var(--bgimage);
  background-attachment: fixed;
  font-family: var(--bodyfont);
}

.container {
  max-width: var(--width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem calc(2.25rem + 1vw);
  background: var(--section);
  display: flex;
  flex-direction: column;
  --mask:
    radial-gradient(25.81px at 36px 50%, #000 99%, #0000 101%) 0 calc(50% - 30px) / 51% 60px repeat-y,
    radial-gradient(25.81px at -21px 50%, #0000 99%, #000 101%) 15px 50% / calc(51% - 15px) 60px repeat-y,
    radial-gradient(25.81px at calc(100% - 36px) 50%, #000 99%, #0000 101%) 100% calc(50% - 30px) / 51% 60px repeat-y,
    radial-gradient(25.81px at calc(100% + 21px) 50%, #0000 99%, #000 101%) calc(100% - 15px) 50% / calc(51% - 15px) 60px repeat-y;
  -webkit-mask: var(--mask);
  mask: var(--mask);

}

main {
  margin: 1rem 0;
  flex-grow: 1;
}

footer {
  padding: 1rem 0 1.5rem 0;
}

footer p {
  margin: 0;
  padding: 0;
  text-align: right;
}

hr {
  border: 0;
  border-top: var(--borderwidth) var(--borderstyle) var(--border);
}

nav,
.container > ul {
  margin: 0;
  padding: 0;
  text-align: right;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav li,
.container > ul li {
  list-style-type: none;
  display: inline-block;
  padding: 0 0 0 0.75rem;; /* Moves the spacing to the left side of each link, so the final link hugs the right margin */
}

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--headingfont);
  line-height: 1;
  font-weight: bold;
  margin: 1rem 0;
}

h1 {
  font-size: calc(2.25rem + 2.5vw);
  margin: 3rem 0 1.5rem 0;
  border-bottom: var(--borderwidth) var(--borderstyle) var(--border);
  padding-bottom: 1rem;
}

h2 {
  font-size: calc(1.75rem + 1.25vw);
}

h3 {
  font-size: calc(1.25rem + 1.125vw);
}

h4 {
  font-size: calc(1rem + 1vw);
}

/* Link Styles */
a:link {
  color: var(--link);
  text-underline-offset: 2px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--border);
}

a:visited {
  color: var(--text);
  text-decoration-color: var(--border);
}

a:hover,
a:focus {
  color: var(--link);
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
}

/* Other Page Elements */
p, ul, ol, details, table {
  margin: 1rem 0;
}

p, li, dd, dt, cite, code {
  line-height: 1.4;
}

sup, sub {
  line-height: 0.5;
}

s, del {
  text-decoration-color: var(--link);
  text-decoration-thickness: 2px;
}

ul ul,
ol ul {
  margin: 0;
}

ul li::marker {
  color: var(--border);
  font-size: 125%;
  line-height: 1;
}

ul ul li::marker,
ol ul li::marker {
  color: var(--text);
}

table {
  max-width: 100%;
  margin: 1rem auto;
}

th, td {
  border-radius: 8px;
  padding: 3px 5px;
}

th {
  color: var(--section);
  background: var(--link);
  border: 2px solid var(--link);
}

td {
  border: 2px solid var(--border);
}

code {
  display: inline-block;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 2px 5px;
}

pre code {
  display: block;
  overflow-x: auto;
}

blockquote {
  border-left: var(--borderwidth) var(--borderstyle) var(--border);
  margin: 1rem 0 1rem 1rem;
  padding-left: 1rem;
}

details {
  background: var(--border);
  border-radius: 8px;
  padding: 1rem 2rem 1rem 1rem;
}

details summary {
  cursor: pointer;
}

details > *:not(summary) {
  margin-left: 1.5rem;
}

details ul li::marker {
  color: var(--text);
}

details a:link,
details a:visited {
  text-decoration-color: var(--section);
}

details code {
  border: 2px solid var(--section);
}

details table {
  max-width: 100%;
  margin: 1rem auto;
}

details td {
  border: 2px solid var(--section);
}

::selection {
  color: var(--section);
  background-color: var(--link);
}