@font-face {
  src: url('/fonts/FernMicro-Regular.woff2') format("woff2"),
  url('/fonts/FernMicro-Regular.woff') format("woff");
  font-family: 'FernMicroWeb';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
}

@font-face {
  src: url('/fonts/FernMicro-Italic.woff2') format("woff2"),
  url('/fonts/FernMicro-Italic.woff') format("woff");
  font-family: 'FernMicroWeb';
  font-style: italic;
  font-weight: normal;
  font-display: swap;
}

@font-face {
  src: url('/fonts/Montserrat-Bold.woff2') format('woff2');
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: bold;
  font-display: swap;
}

:root {
  --body-font: FernMicroWeb;
  --primary-color: #29025a;
}

body {
  font-family: var(--body-font);
  margin: 0;
  padding: 0;
}

svg {
  display: block;
}

nav {
  display: block;
  background: var(--primary-color);
  padding: 1em 1em 0.8em 1em;
  margin-bottom: 2em;
  color: #fff;
}

nav ul {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 1.25rem;
  list-style: none;
  font-size: .9em;
}

nav ul li:last-child {
  margin-left: auto;
}

nav ul li {
  margin-bottom: 0;
}

nav a {
  color: #fff;
  text-decoration: underline;
}

nav ul li:first-child::before {
  content: "$ ";
  margin-right: 0.25rem;
}

nav ul li:first-child {
  display: inline-flex;
  align-items: baseline;
}

@media (max-width: 640px) {
  nav {
    padding: 0.9em 0.9em 0.7em 0.9em;
  }

  nav ul {
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.9rem;
    row-gap: 0.3rem;
    padding: 0;
    margin: 0;
  }

  nav ul li {
    order: 3;
  }

  nav ul li:first-child {
    order: 1;
    margin-right: auto;
  }

  nav ul li:last-child {
    order: 1;
    margin-left: 0;
  }

  nav ul::before {
    content: "";
    order: 2;
    flex-basis: 100%;
    width: 0;
  }
}

section {
  max-width: 40em;
  padding: 0 2em 0 2em;
  margin: auto;
}

#home section {
  margin: 0;
}

h1, h2, h3 {
  text-align: center;
}

h1 {
  font-family: 'Montserrat', sans-serif;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.3em;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h2 {
  font-style: italic;
  font-weight: normal;
  font-size: .8em;
  letter-spacing: .1em;
}

h3 {
  text-transform: uppercase;
  font-weight: normal;
  font-size: .9em;
  letter-spacing: .2em;
}

#content article > h2,
#content article > h3 {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: normal;
  font-style: normal;
  margin-top: 1.8em;
}

#content article > h2 {
  color: var(--primary-color);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1em;
}

#content article > h3 {
  font-weight: bold;
  text-transform: none;
  font-size: 1.2em;
}

html#feeds #content article {
  text-align: center;
  margin-top: -1em;
}

html#projects #content article,
html#uses #content article {
  margin-top: -1em;
}

html#feeds #content article > h2 {
  text-align: center;
  margin-top: 2em;
}

html#feeds #content article > ul {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}

html#feeds #content article > ul > li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

html#feeds #content article > ul > li + li::before {
  content: "|";
  margin: 0 0.85rem;
  color: #e3e3e3;
}

p {
  line-height: 1.6;
  font-size: 1.2em;
}

ul {
  margin: 0;
  padding: 0;
}

li {
  line-height: 1.6;
  font-size: 1.2em;
  font-family: var(--body-font);
  font-style: normal;
  font-weight: normal;
  margin-bottom: 1em;
}

ul ul {
  margin-bottom: 1em;
}

li li {
  font-size: inherit;
  margin-left: 1em;
  margin-bottom: 0;
  list-style-type: disc;
}

ul ol li {
  list-style-type: inherit;
}

li p {
  font-size: inherit;
  margin-top: inherit;
  margin-bottom: 1em;
}

a {
  transition: all ease-out .1s;
  font-weight: normal;
  text-decoration: none;
  color: var(--primary-color);
  border-bottom: solid var(--primary-color) 1px;
}

pre {
  overflow: scroll;
  padding: 1em 0;
  margin-left: 2em;
  font-size: 1rem;
}

/* override syntax highlighting code blocks */
.highlight {
  margin: 1.1em 0;
}

.highlight pre {
  background-color: transparent !important;
  padding: 0;
  margin: 0 0 0 2em;
}

blockquote {
  margin-left: 2em;
}

blockquote p:first-child {
  text-indent: -0.6em;
}

blockquote p:first-child::before {
  content: open-quote;
}

blockquote p:last-child::after {
  content: close-quote;
}

table {
  width: 100%;
  margin-bottom: 1em;
  border-collapse: collapse;
  border-spacing: 0;
}

table td {
  padding: 0.25em 0;
}

table thead tr {
  border-bottom: 2px solid #000;
}

table tbody td {
  border-bottom: 1px solid #eee;
}

/* stolen from GitHub */
kbd {
  display: inline-block;
  padding: 3px 5px;
  font: 11px monospace;
  line-height: 10px;
  color: #24292f;
  vertical-align: middle;
  background-color: #f6f8fa;
  border: solid 1px rgba(175,184,193,0.2);
  border-bottom-color: rgba(175,184,193,0.2);
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 rgba(175,184,193,0.2);
}

::selection {
  background-color: var(--primary-color);
  color: #fff;
}

a:hover {
  color: #fff;
  background: var(--primary-color);
}

header {
  display: flex;
  flex-direction: column;
}

header > h1 {
  margin: 0.75em auto;
  max-width: 80%;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

header h2 {
  order: -1;
  margin: .5em 0 0 0;
}

header h3 {
  margin: 0 0 1em 0;
}

li img {
  width: 100%;
  border-radius: 2px;
}

#content article img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.photos {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.photos p {
  flex: 1 1 16rem;
  margin: 0;
}

.photos a,
.photos a:hover {
  border-bottom: 0;
  background: transparent;
}

.photos a {
  display: block;
}

p:has(img + img) {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
}

p:has(img + img) img {
  width: 100%;
  flex: 1 1 0;
  min-width: 0;
  height: auto;
}

html#home.home #home ul,
html#weeknotes.list section ul,
html#blog.list section ul,
html#projects.list section ul {
  list-style: none;
  text-align: center;
}

#content svg {
  margin-bottom: 1em;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  padding-top: 2em;
  border-top: 1px solid #eee;
}

.prev-post,
.next-post {
  max-width: 45%;
}

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