:root {
  --gh-bg: #0d1117;
  --gh-fg: #e6edf3;
  --gh-border: #30363d;
  --gh-gray: #8b949e; /* comments */
  --gh-red: #ff7b72; /* keywords, operators */
  --gh-blue: #79c0ff; /* constants, numbers, builtins, escapes */
  --gh-lblue: #a5d6ff; /* strings */
  --gh-purple: #d2a8ff; /* functions */
  --gh-orange: #ffa657; /* types */
  --gh-green: #7ee787; /* tags, regexps */
  --gh-error: #f85149;
  color-scheme: dark;
} /* Inlined from highlight.css to fix FOUC like issues. */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--gh-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--gh-border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gh-gray);
}

/* Firefox */
html {
  scrollbar-color: var(--gh-border) var(--gh-bg);
  scrollbar-width: thin;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Italic.woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-MediumItalic.woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-SemiBold.woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-SemiBoldItalic.woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Bold.woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-BoldItalic.woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-ExtraBold.woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-ExtraBoldItalic.woff2");
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Black.woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-BlackItalic.woff2");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--gh-fg);
}

b,
strong {
  color: var(--gh-fg);
}

a {
  color: var(--gh-blue);
  text-decoration-color: var(--gh-border);
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--gh-lblue);
  text-decoration-color: var(--gh-lblue);
}

html {
  color: var(--gh-gray);
  font-size: clamp(14px, 0.4vw + 12px, 17px);
  font-family: "JetBrains Mono", monospace;
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: var(--gh-bg);
  margin: 0;
  min-height: 100vh;
}

body {
  font-size: 1rem;
  overflow-x: auto;
  padding: 0 calc(8px + 1.5625vw);
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex: 1;
  line-height: 1.4;
}

main {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
}

main > * + * {
  margin-top: 0.8rem;
}

.site-title {
  font-size: 1.5em;
  margin-bottom: 8px;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 12px 0;
  margin-top: 10px;
  border-bottom: 1px solid var(--gh-border);
  margin-bottom: 24px;
}

nav a {
  color: var(--gh-fg);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

nav a:hover {
  color: var(--gh-blue);
  border-bottom-color: var(--gh-blue);
}

nav a.active {
  color: var(--gh-orange);
  border-bottom-color: var(--gh-orange);
}

pre {
  overflow-x: scroll;
}

img {
  max-width: 100vw;
}

.block {
  border: 1px dotted var(--gh-border);
  padding: 5px 15px;
  margin: 0 10px;
}

.block.todo {
  border-style: dashed;
  border-color: var(--gh-orange);
}

.block.todo > :first-child {
  font-weight: 600;
  text-align: center;
  color: var(--gh-orange);
}

.block {
  border: 1px dotted var(--gh-border);
  padding: 5px 15px;
  /* margin: 0 10px; */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.block h1 {
  font-size: 1em;
  text-align: center;
  margin-bottom: 0;
}

.small {
  font-size: 0.8em;
}

.wave {
  background: var(--gh-bg);
  color: var(--gh-fg);
  text-shadow:
    1px 1px 10px var(--gh-fg),
    1px 1px 10px var(--gh-gray);
}

footer {
  border-top: 1px solid var(--gh-border);
  margin-top: 40px;
  padding: 20px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gh-gray);
  font-size: 0.9em;
}

footer a {
  color: var(--gh-gray);
}

footer a:hover {
  color: var(--gh-blue);
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* 
footer hr {
  width: 100%;
  border: none;
  height: 1px;
  background: var(--gh-border);
  margin: 0 0 20px;
} */

.project-headline {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

/* TODO: Select a colour based on the status of the project. */
/* .project-headline span {
  background-color: #880e05;
  padding: 1px 10px;
  border-radius: 8%;
  font-weight: 600;
  color: #dbd5d5;
} */

.project-headline span {
  background-color: var(--gh-error);
  padding: 1px 10px;
  border-radius: 8%;
  font-weight: 600;
  color: var(--gh-fg);
}

li {
  margin: 8px 0;
}

/* .project-headline a {

} */

.block.contact {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  margin: 32px 0 0;
  padding: 16px 24px;
  display: inline-block;
  text-align: left;
}

.block.contact > :first-child {
  font-weight: 600;
  color: var(--gh-fg);
  margin-bottom: 8px;
  text-align: center;
}

.block.contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.block.contact li {
  margin: 6px 0;
}

.block.contact code {
  background: var(--gh-border);
  color: var(--gh-fg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.block.contact a {
  color: var(--gh-blue);
}

.block.contact li .label {
  min-width: 70px;
  text-align: right;
  color: var(--gh-gray);
}

.post-list h2 {
  margin-bottom: 20px;
}

.post-list > div {
  margin-bottom: 16px;
}

.post-list .date {
  display: block;
  color: var(--gh-gray);
  margin-bottom: 2px;
}

.post-list .title h3 {
  margin: 0;
}

.feed {
  margin-top: 2em;
}

.feed > div {
  margin: 0 -20px;
  padding: 5px 20px;
  margin-bottom: 1em;
}

.feed > div > h2 {
  margin-top: 0.4em;
}

.feed > div[id]:target {
  animation: pulse-div 2s ease-in-out 1 forwards;
}

@keyframes pulse-div {
  0%,
  100% {
    background-color: #222;
  }

  50% {
    background-color: #111;
  }
}

#prev-next {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 40px;
}

figure {
  align-self: center;
  text-align: center;
  font-style: italic;
}

.post {
  display: flex;
  flex-direction: column;
}
