:root {
  --standard-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* LAYOUT */

@font-face {
  font-family: 'Monaspace Xenon Var';
  src: url('../fonts/Monaspace%20Xenon/Monaspace%20Xenon%20Var.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 100% 125%;
  font-style: oblique -11deg 0deg;
}

@font-face {
  font-family: 'Monaspace Neon Var';
  src: url('../fonts/Monaspace%20Neon/Monaspace%20Neon%20Var.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 100% 125%;
  font-style: oblique -11deg 0deg;
}

// * {
//   outline: 1px solid red;
// }

html {
  font-size: 19px;
  scroll-behavior: smooth !important;
}

body {
  color: #000;
  font-family: 'Lora', sans-serif;
  line-height: 1.5;
  max-width: 40rem;
  margin: 0px auto;
  padding: 0px 1rem;
  overflow-wrap: break-word;
  scroll-behavior: smooth !important;
}

footer {
  margin-top: 25vh;
  opacity: 0.5;
  color: #2E294E;
}

.logo {
  font-family: "Monaspace Neon Var";
}

p {
  margin: 0 0 1rem 0;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 2em;
  margin-bottom: 1em;
}

strong {
  font-weight: 800;
}

/* Links */

a {
  
  &:link {
    color: #2E294E;
  }
  
  &:visited {
    color: #2E294E;
  }
}

/* Images */

img {
  width: auto;
  max-height: 500px;
  max-width: 100%;
  display: block;
  box-shadow: var(--standard-shadow);
  margin: 2rem auto 2rem;
}



/* Carousels */


.carousel-wrapper {
  
  margin: 2rem auto 2rem;
  
  .carousel {
    display: flex ;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    align-items: center;
    padding: 0 2rem 0.5rem;
    
    figure {
      scroll-snap-align: center;
      flex-shrink: 0;
      max-width: 100%;
      min-width: calc(100%-4rem);
      margin: 0;
      
    }
    
  }
  
  .button-wrapper {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1rem;
    
    button {
      font-family: "Monaspace Xenon Var";
      color: black;
      font-size: medium;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 2rem;
      background-color: #D9D7EA;
      border-color: #2E294E;
      box-shadow: none;
      border-style: solid;
      cursor: pointer;
      border-radius: 0.25rem;
      padding: 0.25rem 0.5rem;
      
      &:hover {
        font-weight: 900;
      }
      
      &:active {
        font-weight: 100;
      }
      
      &.disabled {
        opacity: 0;
        cursor: default;
      }
    }
  }
}


/* Figures + Captions */

figure {
  display: table;
  margin: 2rem auto 2rem;
  
  img {
    margin: 0 0 1rem;
  }
  
  figcaption {
    display: table-caption;
    caption-side: bottom;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
  }
}



/* Mermaid */

.mermaid {
  margin: 2rem 0 2rem ;
  
  svg {
    display: block;
    margin: 0 auto;
  }
}

/* Inline code and fenced blocks (pre) */

pre, code {
  
  font-family: 'Monaspace Xenon Var', monospace;
  font-size: 0.9rem;
  color: #2E294E;
  background: #2e294e32;
  
}

code {
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

pre {
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  tab-size: 4;
  max-width: fit-content;
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquotes */

blockquote {
  position: relative;
  font-style: oblique;
  font-weight: 375;
  padding: 0 3rem;
  width: fit-content;
  margin: 2rem 1rem;
  
  &::before,
  &::after {
    position: absolute;
    font-size: xxx-large;
    font-weight: 900;
    line-height: 1;
    color: #2e294eb6;
    top: 0;
  }
  
  &::before {
    content: '\201C';
    left: 0;
  }
  
  &::after {
    content: '\201D';
    right: 0;
  }
}

/* NAVIGATION */

.site-nav {
  display: flex;
  
  a {
    display: block;
    padding: 1rem;
  }
  
  .logo {
    font-weight: bold;
    padding-left: 0;
  }
  
}

.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (max-width: 48rem) {
  .site-nav,
  .main-menu {
    flex-direction: column;
  }
  
  .site-nav a {
    padding: 0.5rem;
    padding-left: 0;
  }
}

/* LISTS */

.post-snippet {
  margin-bottom: 1rem;
  
  h3 {
    margin-bottom: 0.25rem;
  }
}

a {
  font-family: "Monaspace Xenon Var";
  font-variation-settings: "slnt" 0, "wght" 500;
  transition: font-variation-settings 0.2s ease;
  text-decoration: none;

  &:hover {
    font-variation-settings: "slnt" -11, "wght" 800;
    text-decoration: underline;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  
  .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    box-shadow: var(--standard-shadow);
    padding: 1rem;
    gap: 0.5rem;
    text-decoration: none;
    
    img {
      box-shadow: none;
      height: 10rem;
      width: 100%;
      object-fit: cover;
      object-position: center;
    }
    
    time, p {
      font-variation-settings: initial;
      font-family: "Lora", serif;
    }

    p, h3, img, time {
      margin: 0;
    }
    
    time {
      font-size: 0.8em;
      font-weight: 500;
      font-style: italic;
    }
  }
}