
@media (prefers-color-scheme: light) {
  :root {
    --primary-text: #000;
    --secondary-text: #333;
    --primary-bkg: #FFF;
    --aside-bkg: #F5F5F5;
    --aside-highlight: #8c7430;
    --link-text: #8c7430;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-text: #EEE;
    --secondary-text: #BBB;
    --primary-bkg: #141414;
    --aside-bkg: #222;
    --aside-highlight: #E7CD78;
    --link-text: #E7CD78;
  }
}

:root {
  --max-width: 800px;
}

/* Colors */

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

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

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

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'PT Sans', 'Open Sans', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--primary-text);
  background-color: var(--primary-bkg);
  line-height: 1.5;
  font-size: 21px;
}

body {
  margin: 1.2em;
}

/* Align body elements */

p, h1, h2, h3, h4, h5, h6, ol, ul, header, footer, aside, blockquote, pre, nav, section, table, .title-row {
  margin-left: auto;
  margin-right: auto;
  margin-top: 0px;
  margin-bottom: 1em;
  max-width: var(--max-width);

  pre {
    max-width: initial;
  }
}

p img {
  max-width: var(--max-width);
}

/* Don't leave a big gap between one line and another, just because it's a list element */
p + ul, p + ol {
  /* margin-top: -1em; */
}

th, td {
  padding: 0px 16px;
}

blockquote {
  margin-bottom: 0px;
}

pre {
  max-width: 960px;
  padding: 4px 0px;
}

/* Typography */

h1, h2, h3, h4, h5, h6 {
  font-family: "Iowan Old Style", "Sitka Text", Palatino, "Book Antiqua", serif;
  line-height: 1.3;
  margin-bottom: 0px;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 29px;
  padding-top: 4px;
}

h3 {
  font-size: 26px;
  padding-top: 4px;
}


aside p {
  border-left: 3px solid var(--aside-highlight);
  padding: 16px;
  background-color: var(--aside-bkg);
}

blockquote {
  padding: 4px 0px;
  font-style: italic;
  margin-bottom: 1em;
  border-left: 2px solid var(--secondary-text);

  p {
    padding: 0px 16px;
  }
}

blockquote > *:last-child {
  margin-bottom: 0px;
}



.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

h1 {
  font-size: 36px;
  color: var(--link-text);
  margin: 0px 0px;
}

.title-row img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

/* Feed */
.feed-seperator {
  max-width: calc(var(--max-width) + 16px);
}

.post-feed {
  padding: 0px;
}

.post-feed-entry {
  list-style: none;
  margin-bottom: 4px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-feed-entry a {
  font-weight: bold;
}

.post-feed-entry time {
  line-height: 1;
  font-size: 15px;
  color: var(--secondary-text);
}

@media only screen and (max-width: 768px) {
  .post-feed-entry {
    display: block;
  }

  .post-feed-entry a {
    margin-top: 2px;
    margin-bottom: 0px;
  }
}
