:root {
  --background: #eff0e9;
  --foreground: #333333;
  --accent: #9ea195;
  --link: #AA6C74;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #333333;
    --foreground: #eff0e9;
    --accent: #9ea195;
    --link: #AA6C74;
  }
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: normal;
  font-style: normal;
  src: url(./MapleMono-Regular.woff2) format('woff2');
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: bold;
  font-style: normal;
  src: url(./MapleMono-Bold.woff2) format('woff2');
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: normal;
  font-style: italic;
  src: url(./MapleMono-Italic.woff2) format('woff2');
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: bold;
  font-style: italic;
  src: url(./MapleMono-BoldItalic.woff2) format('woff2');
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: 300;
  font-style: normal;
  src: url(./MapleMono-Light.woff2) format('woff2');
}

@font-face {
  font-family: 'Maple Mono';
  font-weight: 300;
  font-style: italic;
  src: url(./MapleMono-LightItalic.woff2) format('woff2');
}

html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Maple Mono', monospace;
  max-width: 72ch;
  line-height: 1.5rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--foreground);
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-weight: 300;
  line-height: 1.1;
}

h1 {
  margin-top: 4rem;
  font-size: 2rem;
  text-transform: uppercase;
}

h2 {
  margin-top: 3rem;
  font-size: 1.2rem;
  text-transform: uppercase;
}

h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

/* Layout wrappers used by the Hugo templates */
.container {
  margin: 0;
  padding: 0;
}

.site-header {
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px dotted var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: inherit;
}

.site-nav a.is-active {
  text-decoration: underline;
}

.intro {
  margin: 1.5rem 0 2rem;
}

.post-list ul,
.page-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li,
.page-list li {
  padding: 0.75rem 0;
  border-bottom: 1px dotted var(--accent);
}

.post-list li:last-child,
.page-list li:last-child {
  border-bottom: 0;
}

.post-title {
  font-weight: 600;
  margin-right: 0.5rem;
}

.post-list time,
.page-list time,
.page header time {
  color: var(--accent);
  font-size: 0.9rem;
}

.page header {
  margin-bottom: 1rem;
}

/* Content typography */
ol,
blockquote {
  padding-left: 1rem;
  margin-left: 1rem;
  margin-right: 0;
  padding-right: 0;
}

blockquote {
  border-left: 1px solid gray;
}

pre {
  white-space: pre-wrap;
  padding: 1rem;
  line-height: 1.2;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-family: monospace;
}

code {
  font-family: monospace;
}

ol li {
  margin: 0.4rem 0;
}

ol li::marker {
  color: var(--accent);
}

p {
  margin: 0.75rem 0;
}

main img,
main video,
main audio {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
}

main video,
main audio {
  width: 100%;
}

main video {
  border: 1px solid var(--accent);
  aspect-ratio: 16 / 9;
}

header .back-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  gap: 0.5rem;
  line-height: 1;
}

.site-footer {
  padding-top: 1rem;
  margin-top: 4rem;
  border-top: 1px dotted var(--accent);
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

table {
  border: 1px solid var(--accent);
  border-collapse: collapse;
  border-spacing: 0;
}

thead th {
  background: var(--background);
  border: 1px solid var(--accent);
  color: black;
  padding: 0.5rem;
  text-align: left;
}

tbody td {
  border: 1px solid var(--accent);
  padding: 0.5rem;
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav ul {
    flex-wrap: wrap;
  }
}
