@import url("https://fonts.googleapis.com/css2?family=Exo:wght@500..600&family=JetBrains+Mono&display=swap");

:root {
  --mobile-width: min(500px, 100vw);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Exo", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  & > svg {
    display: none;
  }

  h1 {
    font-size: 74px;
    margin: 0;
    font-weight: 600;
  }

  h2 {
    color: white;

    background: #0000001c;
    padding: 2px 0.25em;
    transform: skewX(-10deg);
  }

  pre {
    margin: 0;
    font-size: 15px;
    color: #000000;
    font-family: "JetBrains Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    line-height: 1.5em;
    span {
      color: #980f71;
      text-shadow: 0 0 6px white;
    }
    &.wrap {
      white-space: pre-line;
      margin-left: 40px !important;
    }
  }

  ins {
    text-decoration: none;
  }

  aside p {
    color: black;
    a {
      display: inline-block;
      padding-right: 16px;
      padding-left: 5px;
      color: #365137;
      line-height: 1.5em;
      white-space: nowrap;
      text-underline-offset: 2px;
      &:hover {
        text-decoration-style: wavy;
      }
    }
  }
}

.twoColLayout {
  padding: 4vh;
  padding-bottom: 4vh;
  display: flex;
  justify-content: center;
  gap: 5vw;
  flex-wrap: wrap;
  .mainSection {
    width: 880px;
    flex-shrink: 0;
  }
  aside {
    flex-shrink: 0;
    width: 545px;
    #codeMasonry,
    #codeGrid,
    .hidden {
      display: none;
    }
    .codeMasonry {
      display: block !important;
    }
    .codeGrid {
      display: block !important;
    }
  }
}

main {
  width: 100%;
  margin: auto;
  padding: 18px;
  line-height: 1.33em;
  box-sizing: border-box;
  max-width: var(--mobile-width);

  a {
    text-decoration: none;
  }

  & * {
    margin: 0;
    color: #ffffffe0;
  }

  &.shrink {
    animation-name: shrink;
    animation-fill-mode: forwards;
    animation-duration: 2s;
  }
  &.expand {
    animation-duration: 2s;
    animation-fill-mode: forwards;
    animation-name: expand;
  }

  &.delay {
    animation-delay: 1.3s;
  }

  p.info span::first-letter {
    font-size: 180%;
  }
}

.butts {
  display: flex;
  justify-content: left;
  align-items: center;
  flex-wrap: wrap;
  height: 122px;
  position: relative;

  button {
    font-family: "Exo", sans-serif;
    font-weight: 500;
    background-color: white;
    border: 3px dotted #d1d4d9;
    line-height: 20px;
    height: min-content;
    height: 35px;
    padding-inline: 8px;
    box-sizing: content-box;
    cursor: pointer;
    color: #365137;
    font-size: 15px;

    letter-spacing: -0.025em;
    span {
      font-size: 115%;
    }
    &::first-letter {
      color: #980f71;
      font-weight: 600;
    }

    &:hover {
      border: 6px dashed #d4ddd1;
      margin: -3px;
      transition: 0.3s all;
    }

    &.dark {
      filter: invert(1);
      color: black;
      border: 3px dotted #29222d;
      &:hover {
        border: 6px dashed #29222d;
      }
    }

    &.efx {
      transform: skewX(-8deg);
    }
    &.efx.zoomFx {
      transform: scaleY(1.13);
    }
  }
}

@media (max-width: 1600px) {
  .butts {
    height: 66px;
    margin-right: -55px;
  }
  .twoColLayout {
    gap: 30px;
    aside {
      width: 100%;
      max-width: 880px;
      padding-inline: 2vw;
      box-sizing: border-box;
      h2::first-letter {
        font-size: 0;
      }
    }
  }
}

@media (max-width: 880px) {
  .butts {
    height: 111px;
    margin-right: 0;
  }
  .twoColLayout {
    width: 100%;
    overflow: hidden;
    gap: 30px;
    padding-inline: 5vw;
    box-sizing: border-box;

    main {
      padding: 10px;
    }

    aside {
      width: 100%;
      padding-inline: 0;
      box-sizing: border-box;
      h1 {
        font-size: 50px;
      }
    }
  }
}

@media (max-width: 505px) {
  .butts {
    height: 155px;
    margin-right: -3vw;
  }
  .twoColLayout {
    main {
      padding: 2px;
    }
    aside {
      pre {
        margin-left: -30px;
        &.wrap {
          margin-left: 10px !important;
        }
      }
    }
  }
}

.gridOverflow.go-masonry {
  .go_gridItem .go_caption {
    display: none;
  }
  .go_gridItem:nth-child(4) .go_caption {
    display: block;
    &:first-line {
      float: left;
      color: transparent;
      line-height: 2px;
    }
  }
}

@keyframes shrink {
  from {
    max-width: 880px;
  }
  to {
    max-width: var(--mobile-width);
  }
}

@keyframes expand {
  from {
    max-width: var(--mobile-width);
  }
  to {
    max-width: 880px;
  }
}
