body {
  background-color: #FCFCFC;
  color: #111;
  display: grid;
  font: 20px/1.6 Arial, sans-serif;
  grid-template-columns: minmax(auto, 60ch);
  grid-template-rows: auto 1fr;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 4px;
}

h1 {
  font: 600 30px/1.2 Arial, sans-serif;
  margin-top: 25px;
}

h2 {
  font: 600 24px/1.2 Arial, sans-serif;
}

h3 {
  font: italic 400 18px Arial, sans-serif;
  margin-bottom: 25px;
}

h4 {
  font: 400 20px Arial, sans-serif;
}

h5 {
  font: 400 18px Arial, sans-serif;
  margin: 0 0 50px 0;
  text-align: center;
}

ul {
  margin: 10px 0;
}

li {
  margin: 5px 0;
}

a {
  color: #4A90E2;
  text-decoration: none;
}

a:hover {
  color: #3A7BD5;
  text-decoration: underline;
}

img {
  display: block;  
  margin: 50px auto 0 auto;
  max-width: 100%; 
  height: auto;
  padding: 0;
}

hr {
  background-color: #CCC;
  border: none; 
  height: 1px;
  margin: 35px 0 25px;
}

code {
  background-color: #DDD;
  border-radius: 5px;
  font-size: 18px;
  padding: 4px 8px;
}

.embeddable-buttondown-form {
  max-width: 275px;
}

.embeddable-buttondown-form label {
  font-size: 20px;
  font-weight: bold;
}

.embeddable-buttondown-form input[type=text],
.embeddable-buttondown-form input[type=email]
 {
  background-color: #FFF;
  border: 1px solid #DDD;
  border-radius: 6px;
  font-size: 16px;
  margin-bottom: 15px;
  margin-top: 4px;
  padding: 8px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 23ch;
}

.embeddable-buttondown-form input:focus {
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
  outline: none;
}

.embeddable-buttondown-form input::placeholder {
  color: #AAA;
}

.embeddable-buttondown-form input[type=submit] {
  background-color: #4A90E2;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  padding: 10px 15px;
  transition: background-color 0.2s, transform 0.2s;
}

.embeddable-buttondown-form input[type=submit]:hover {
  background-color: #3A7BD5;
  cursor: pointer;
  transform: translateY(-2px);
}

.footnotes ol {
  padding-left: 25px; 
}

header {
  align-items: center;
  display: flex;
  flex-direction: row;
  font-size: 20px;
  justify-content: space-between;
}

.home-link {
  color: #121212;
  font-size: 30px;
  margin: 0;
  text-decoration: none;
}

.home-link:hover {
  color: #121212;
  text-decoration: underline;
}

nav ul {
  display: flex;
  margin: 0;
  padding: 0;
}

nav ul li {
  list-style: none;
  margin: 0;
}

nav ul li a {
  padding: 8px;
  text-decoration: none;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 36px 0;
}

.post > p, .post > h2 {
  margin: 0;
}

.post-date {
  color: #444;
  font: 400 16px Arial, sans-serif;
}

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
}

.projects > li {
  margin: 15px 0;
}

footer {
  align-items: center;
  color: #444;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  gap: 10px;
  margin-top: 40px;
}

footer p {
  margin: 0;
}

.footer-icons {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #1F2229;
  }

  body, .home-link, .home-link:hover {
      color: #EBECF0;
  }

  hr {
    background-color: #333;
  }

  code {
    background-color: #333;
  }

  .embeddable-buttondown-form input[type=text],
  .embeddable-buttondown-form input[type=email] {
    background-color: #292A2B;
    border: 1px solid #222;
    color: #EBECF0;
  }

  footer, .post-date {
    color: #BCBCBC
  }
}

@media (max-width: 650px) {
  body { 
    font: 18px/1.6 Arial, sans-serif;
    margin-left: 16px;
    margin-right: 16px
  }

  header {
    flex-direction: column;
    justify-content: center;
    padding-bottom: 10px;
  }

  h1 {
    font-size: 28px;
    margin-top: 20px;
  }

  h2 {
    font-size: 22px;
  }

  .post {
    margin: 20px 0;
  }
}