* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } html, body { font-size: 16px; margin: 0; padding: 0; scroll-behavior: smooth; scrollbar-color: var(--primary-color) transparent; accent-color: var(--primary-color); } // smaller font size on mobile // @media only screen and (max-device-width: 480px) { // html, // body { // font-size: 14px; // } // } body { font-family: "Inter", sans-serif; font-weight: 400; line-height: 1.6; color: var(--fg-color); background-color: var(--bg-color); // put footer at the bottom for short pages, such as the 404 display: grid; min-height: 100vh; grid-template-rows: auto minmax(auto, 1fr) auto; // header, stuff, footer } @media (prefers-color-scheme: dark) { html { background-color: var(--dark5); } } // style text selection to use primary color ::selection { color: var(--bg-color); background-color: var(--primary-color); } // make focused anchor not get covered by nav, // and flash it with primary color when jumping to it :target { scroll-margin-top: 25vh; animation: highlight-in-out var(--transition-long); animation-delay: 1s; } @keyframes highlight-in-out { 50% { color: var(--primary-color); } } // LAYOUT .container { width: 80%; margin-left: auto; margin-right: auto; max-width: var(--content-width); } @media only screen and (max-device-width: 480px) { .container { width: 90%; } } h1, h2, h3, h4, h5, h6 { margin: 3rem 0 1rem; font-weight: 600; line-height: 1.25; } h1 { letter-spacing: -0.08rem; font-weight: 900; font-size: 3rem; } h1::after { content: "."; color: var(--primary-color); } h2 { font-size: 1.4rem; } a { font-weight: 600; text-decoration: none; color: var(--primary-color); cursor: pointer; &:hover { text-decoration: underline; } } b, strong { font-weight: 600; } small { color: var(--fg50); } dl { padding: 0; } dl dt { padding: 0; margin-top: 1rem; font-size: 1rem; font-weight: bold; } dl dd { padding: 0; margin-bottom: 1rem; } hr { background-color: var(--primary-color); height: 0.3rem; margin: 3rem auto 4rem; width: 40%; border: 0; } // background-image: repeating-linear-gradient(-45deg, transparent, transparent 8px, var(--primary-color) 8px, var(--primary-color) 10px); blockquote { padding: 0 1rem; margin-left: 0; color: var(--fg50); border-left: 0.3rem solid var(--primary-color); } blockquote > :first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; } // make border slightly transparent for nested blockquote blockquote > blockquote { border-left: 0.3rem solid var(--primary-color-alpha); } abbr { cursor: help; } kbd { display: inline-block; line-height: normal; font-family: "JetBrains Mono", monospace; padding: 2px 6px; border-radius: var(--rounded-corner-small); background-color: var(--fg05); box-shadow: inset 0 -2px 0 var(--fg09), 0 -1px 0 var(--fg09); cursor: pointer; } // small nice thingy, keys can be pressed! kbd:active { background-color: var(--fg09); box-shadow: inset 0 1px 0 var(--fg09); transform: translateY(2px); } // CODE code { font-family: "JetBrains Mono", monospace; padding: 2px 6px; border-radius: var(--rounded-corner-small); background-color: var(--fg05); color: var(--red-fg); } pre code { background-color: unset; border-radius: unset; color: unset; padding: unset; } // apply monospace font to everything inside
pre * {
  font-family: "JetBrains Mono", monospace;
}

pre {
  line-height: normal; // unset line height
  padding: 1rem;
  margin: 1rem 0 1rem;
  border-radius: var(--rounded-corner);
  max-width: 100vw;
  box-shadow: var(--shadow);
  overflow: auto;
}

// the line numbers already provide some kind of left/right padding
pre[data-linenos] {
  padding: 1rem 0;
}

pre table td {
  padding: 0;
  border: none;
}

// the line number cells
pre table td:nth-of-type(1) {
  text-align: center;
  user-select: none;
}

pre mark {
  display: block;
  background-color: var(--fg05);
  color: var(--fg-color); // unset mark color from primary color to text color
  border-radius: 0; // unset code block border radius
  padding: 0; // unset mark padding
}

pre table {
  width: 100%;
  border-collapse: collapse;
}

mark {
  padding: 2px 6px;
  border-radius: var(--rounded-corner-small);
  background-color: var(--primary-color-alpha);
  color: var(--primary-color);
}

figcaption {
  margin-top: -1rem;
  margin-bottom: 2rem;
  display: block;
  text-align: center;
  color: var(--fg50);
  font-size: 0.9rem;
}

details {
  background-color: var(--fg05);
  border-radius: var(--rounded-corner);
  box-shadow: var(--shadow);
  padding: 1rem;

  & > summary {
    cursor: pointer;
  }
}

// TABLES
table {
  display: block;
  border-collapse: collapse;
  border-spacing: 0;
  max-width: 100vw;
  overflow: auto;
  word-break: normal;
  word-break: keep-all; // For Firefox to horizontally scroll wider tables.
  -webkit-overflow-scrolling: touch;
}

table th {
  font-weight: bold;
}

table th,
table td {
  padding: 0.5rem 1rem;
  border: 1px solid var(--fg05);
}

td,
th {
  padding: 0;
}

// MEDIA
img,
video {
  display: block;
  margin: 2rem auto;
  max-width: 100%;
  border-radius: var(--rounded-corner);
  box-shadow: var(--shadow);
}

img {
  transition: var(--transition-longer);
}

img:not(.no-hover):hover {
  transform: scale(125%);
  border-radius: 0;
  box-shadow: var(--shadow-raised);
}

@media only screen and (max-device-width: 480px) {
  img:not(.no-hover):hover {
    transform: scale(110%);
  }
}

.full {
  width: 100%;
}

.pixels {
  image-rendering: crisp-edges; // older firefox browsers
  image-rendering: pixelated;
}

.transparent {
  border-radius: 0;
  box-shadow: none;
}

// NAVBAR
.nav {
  overflow: auto;
  width: 80%;
  max-width: var(--content-width);
  margin: 1rem auto;
  box-shadow: var(--shadow);
  border-radius: var(--rounded-corner-big);
  background-color: var(--fg05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 1rem;
  z-index: 1;

  &-container {
    margin: 0.5rem 0.5rem;
    position: relative;
    text-align: center;
  }

  ul {
    list-style-type: none;
    margin: 1rem 0 0;
    padding: 0;
    text-align: center;
  }

  li {
    transition: var(--transition);
    color: var(--default-color);
    display: inline-block;
  }

  a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--rounded-corner);
    background-color: transparent;
    color: var(--fg50);
    transition: var(--transition);
    text-decoration: none;

    &:hover,
    &:focus {
      background-color: var(--fg05);
      color: var(--primary-color);
    }
  }
}

@media (min-width: 600px) {
  .nav {
    &-container {
      text-align: left;
    }

    ul {
      bottom: 0;
      position: absolute;
      right: 0;
    }
  }
}

@media only screen and (max-device-width: 480px) {
  .nav {
    width: 90%;
  }
}

// FOOTER
.footer {
  text-align: center;
  padding: 3rem 0 3rem;
  font-size: 1rem;
  margin-top: 4rem;
}

.footer {
  details {
    all: unset;
  }
}

// LINK ARROWS
.link-page::after {
  content: " →";
}

.link-site::after {
  content: " ↗";
}

// center link icons vertically
.link-icon {
  height: 1rem;
  width: 1rem;
  vertical-align: middle;
}

// BUTTONS
.dialog-buttons {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 6rem;
}

.inline-button {
  display: inline-block;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: var(--rounded-corner);
  background-color: var(--fg05);
  color: var(--fg-color);
}

// CRT
.crt {
  margin: 1rem 0 1rem;
  border-radius: var(--rounded-corner);
  box-shadow: var(--glow);
  background: var(--crt-bg);

  pre {
    text-shadow: var(--primary-color) 0 0 12px;
    color: var(--primary-color);
    padding: 1rem 1rem;
    // unset some 
 stuff
    margin: unset;
    background-color: unset;
    box-shadow: unset;
  }

  a {
    text-decoration: underline;
  }
}

.cursor {
  animation: blicking 1s infinite;
}

@keyframes blicking {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
}

// STATEMENTS
.statement-container {
  margin: 1rem 0 1rem;
  padding: 1rem 1rem;
  border-radius: var(--rounded-corner);
  box-shadow: var(--shadow);

  h2 {
    margin: 0 0 1rem;
  }

  p {
    margin: 0;
  }

  ul {
    margin: 0;
  }
}

.archive {
  background-color: var(--purple-bg);
  color: var(--purple-fg);
}

.disclaimer {
  background-color: var(--red-bg);
  color: var(--red-fg);
}

.trigger {
  background-color: var(--yellow-bg);
  color: var(--yellow-fg);
}

.johnvertisement {
  margin: 0 auto;
  display: block;
  width: min(728px, 100vw);
  height: min(90px, 12.367vw);
  border: none;
}