

@font-face {
  font-family: "Cardo";
  src: url("/assets/font/Cardo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/assets/font/Cardo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/assets/font/Cardo-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/font/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/font/JetBrainsMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/font/JetBrainsMono-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
/*         Actual CSS Below! Yay!          */
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

:root {
  --ground: #000;
  --body: #bbb;
  --active: #f77;
  --hover: #ee7;
  --label: #777;
  --page: #333;

  --serif: "Cardo", Georgia, serif;
  --mono: "JetBrains Mono", monospace;

  --sidebar: 14rem;
  --gutter: 2rem;
}

[data-cycle="gross-gloss"] {
  --ground: #00a;
  --body: #bbb;
  --active: #ee7;
  --hover: #08f;
  --label: #afe;
}

[data-cycle="technomystic"] {
  --ground: #800;
  --body: #FFF;
  --active: #EE7;
  --hover: #c4c;
  --label: #F77;
}

[data-cycle="neomedieval"] {
  --ground: #640;
  --body: #fff;
  --active: #ee7;
  --hover: #c4c;
  --label: #d85;
}

body {
  background: var(--page);
  color: var(--body);    
  font-family: var(--serif); 

  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: var(--gutter);
  padding: var(--gutter);
  margin: 0;
  min-height: 100vh;
}

footer {
  grid-column: 1 / -1;
}

header {
  position: sticky;
  top: var(--gutter);
  align-self: start;
  max-height: calc(100vh - var(--gutter) * 2);
  overflow-y: auto;
  background: var(--ground);
  padding: var(--gutter);
  border-radius: 0.25rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  
}

nav a[aria-current="page"] {
  color: var(--active);
  background: var(--ground);    
}

a:hover {
  color: var(--hover);
}

a {
  color: var(--label);
  text-decoration: none;
}

main {
  max-width: 120ch;
}

section {
  margin-block-end: 6rem;
}

figure, nav {
  font-family: var(--mono); 
}

figure {
  padding: 1rem;
  border-radius: 0.15rem;
  background-color: var(--ground);
  color: var(--label);
  font-size: 0.75rem;
}

@media (max-width: 40rem) {
  body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  header {
    position: static;
    max-height: none;
    overflow: visible;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
}

img {
  max-width: 100%;
  height: auto;
}