@font-face {
  font-family: "PICO-8 Mono";
  src: url("../assets/fonts/pico-8-mono/pico-8-mono.otf.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

body,
p,
h2,
figure {
  margin: 0;
}

:root {
  --text-font-family: "PICO-8 Mono", monospace;
  --text-font-size: 16px;
  --text-line-height: 2;
  --text-transform: lowercase;
  --layer-bg-color: #433f3eff;
  --text-color: #ccc;
  --link-color: #ccc;
  --link-hover-color: #f69;
  --fastfetch-title-color: #f54e56;
  --fastfetch-key-color: #f54e56;
  --markdown-header-bg-color: #f69;
  --markdown-header-text-color: white;
  --ls-permissions-color: #ccc;
  --ls-user-color: #fc3;
  --ls-datetime-color: #7cf;
  --ls-filename-color: #fab;
  --terminal-path-text-color: #f7a;
  --terminal-input-text-color: white;
  --terminal-cursor-color: white;
}

body {
  background-color: var(--layer-bg-color);
  font-family: var(--text-font-family);
}

main {
  margin: 10px;
}

p,
h2,
li {
  font-style: normal;
  font-size: var(--text-font-size);
  font-weight: 400;
  line-height: var(--text-line-height);
  color: var(--text-color);
  text-transform: var(--text-transform);
}

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

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

.terminal-line {
  width: fit-content;
}

.terminal-path {
  color: var(--terminal-path-text-color);
}

.terminal-input {
  color: var(--terminal-input-text-color);
}

.terminal-command {
  color: var(--text-color);
}

.terminal-command-output {
  margin: 12px 0;
}

.fastfetch-output {
  display: flex;
  flex-direction: column;
  padding: 0 28px;
  gap: 12px;
}

.fastfetch-output .fastfetch-logo {
  object-fit: cover;
  height: 200px;
  width: 200px;
}

.fastfetch-title {
  color: var(--fastfetch-title-color);
}

.fastfetch-key {
  color: var(--fastfetch-key-color);
}

.markdown-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.markdown-output h2 {
  background: var(--markdown-header-bg-color);
  color: var(--markdown-header-text-color);
  width: fit-content;
  padding: 0 4px;
}

.ls-output ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.ls-permissions {
  color: var(--ls-permissions-color);
}

.ls-user {
  color: var(--ls-user-color);
}

.ls-datetime {
  color: var(--ls-datetime-color);
}

a.ls-filename {
  color: var(--ls-filename-color);
}

a.ls-filename:hover {
  color: var(--link-hover-color);
}

/* Animated Class Names */
.terminal-cursor {
  border-right: 10px solid var(--terminal-cursor-color);
  width: fit-content;
  animation: blink-cursor 0.75s step-end infinite;
  animation-delay: 2.5s;
}

.typewriter {
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: typing 3.5s steps(100, end) forwards;
}

.fade-before,
.fade-after {
  opacity: 0;
  animation: fade-in 1s ease forwards;
}

article:nth-child(1) {
  .fade-after {
    animation-delay: 0.5s;
  }
}

article:nth-child(2) {
  .fade-before {
    animation-delay: 0.5s;
  }
  .typewriter {
    animation-delay: 1s;
  }
  .fade-after {
    animation-delay: 1.5s;
  }
}

article:nth-child(3) {
  .fade-before {
    animation-delay: 1.5s;
  }
  .typewriter {
    animation-delay: 2s;
  }
  .fade-after {
    animation-delay: 2.5s;
  }
}

article:last-child.fade-before {
  animation-delay: 2.5s;
}

/* Animations */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-cursor {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--terminal-cursor-color);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@media (min-width: 600px) {
  .fastfetch-output {
    flex-direction: row;
    padding: 0 28px;
    gap: 28px;
  }
}
