@font-face {
  font-family: 'DM Mono';
  src: url('DMMono-Regular.woff2');
  font-weight: normal;
}

@font-face {
  font-family: 'DM Mono';
  src: url('DMMono-Medium.woff2');
  font-weight: bold;
}

@font-face {
  font-family: 'DM Mono';
  src: url('DMMono-Italic.woff2');
  font-style: italic;
}

:root {
  --txt: #c0ccdb;
  --body-bg: #17191c;
  --accent: #e4d294;
  --border: #76818e;
  --border-light: #a0a8b1;
  --green: #5da892;
  --font-body: 'DM Mono', 'Lucida Console', 'Monaco', 'Courier New', 'Courier', monospace;
}

body {
  font-family: var(--font-body);
  color: var(--txt);
  text-align: center;
  background-color: var(--body-bg);
  margin: 0;
  max-width: 800px;
  margin: 0 auto;
}

header {
  margin: 1.5rem 0 2.5rem 0;
  font-weight: bold;
  font-size: 2rem;
}

/* Add typewriter animation when text fits without line break */
@media screen and (min-width: 570px) {
  header {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: .05em solid var(--accent);
    padding-right: 10px;
    animation: typing 1s steps(80), blink-cursor 2s infinite;
  }
}

header a {
  color: var(--accent);
  text-decoration: none;
  font-style: italic;
}

nav,
footer {
    margin-bottom: 1rem;
}

nav a {
  border: 1px solid var(--border);
  border-radius: .3rem;
  margin: .7rem;
  padding: .4rem 1.2rem;
  text-decoration: none;
  box-shadow: 0px 2px 3px -2px rgba(0,0,0,.3);
  user-select: none;
  cursor: pointer;
  display: inline-block;
}

nav a:hover {
  color: var(--txt);
  border: 1px solid var(--border-light);
}

main {
  padding-bottom: 2.5rem;
  overflow: hidden;
}

main p {
  margin: 0 auto;
}

main ul {
  margin: 0 auto;
  margin-bottom: 2rem;
  max-width: fit-content;
  text-align: left;
}

.blog-entries a {
  padding-top: 1rem;
  display: block;
}

@media screen and (min-width: 900px) {
  .quick-fixes {
    max-width: 75% !important;
  }
}

@media screen and (max-width: 899px) {
  .quick-fixes {
    max-width: 90% !important;
  }
}

.quick-fixes-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.quick-fixes-table th,
.quick-fixes-table td {
  border: thin solid var(--border);
  padding: .5rem;
}

.author {
  float: left;
  max-width: 400px;
}

.date {
  overflow: hidden;
  text-align: right;
  margin-bottom: 2rem;
}

.code {
  font-family: monospace;
  padding: .2rem .3rem;
  border-radius: .3rem;
  border: 1px solid var(--border);
  margin: .3rem;
}

.code::before {
  content: '$ ';
  user-select: none;
}

.no-dollar::before {
  content: '' !important;
}

.cowsay {
  font-family: var(--font-body);
  text-align: left;
  white-space: pre;
  max-width: fit-content;
  display: inline-block;
  border: none;
}

p {
  margin: 1rem;
  font-size: 1.1em;
  line-height: 1.5rem;
}

a {
  color: var(--txt);
  text-decoration: underline;
  transition: 300ms;
}

a:hover,
a:active {
  color: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--green);
}

code {
  padding: .2rem .3rem;
  border-radius: .3rem;
  border: 1px solid var(--border);
  margin: .3rem;
}

@keyframes typing {
  from {
    max-width: 0;
  }
  to {
    max-width: 80%;
  }
}

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