:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --bg-color: #ffffff;
  --text-color: #333333;
  --link-color: #007bff;
  --link-hover-color: #0056b3;
  --tag-bg: #f4f4f4;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

header {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header h1.home {
  margin: 0;
  font-size: 1.5rem;
}

header h1.home a {
  text-decoration: none;
  color: inherit;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
}

main {
  padding: 2rem 0;
}

footer {
  border-top: 1px solid #eee;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #777;
}

.postlist {
  list-style: none;
  padding: 0;
}

.postlist-item {
  margin-bottom: 2rem;
}

.postlist-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.postlist-title-tags {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.postlist-title-tags .post-tag {
  margin-right: 0;
}

.postlist-link {
  font-size: 1.25rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--link-color);
}

.postlist-link:hover {
  text-decoration: underline;
}

.postlist-date {
  font-size: 0.9rem;
  color: #777;
}

.postlist-excerpt {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.post-tag {
  display: inline-block;
  background: var(--tag-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  color: #555;
  margin-right: 0.5rem;
}

.post-tag:hover {
  background: #e9e9e9;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-title-tags {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.post-title-tags .post-tag {
  margin-right: 0;
}

.post-title {
  margin: 0;
}

.post-date {
  font-size: 0.9rem;
  color: #777;
}

.rss-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  fill: #f26522;
  margin-left: 10px;
}

.post-navigation {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.post-navigation-prev {
  text-align: left;
}

.post-navigation-next {
  text-align: right;
  margin-left: auto;
}

img {
  max-width: 100%;
  height: auto;
}

.img-align-left {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.img-align-right {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.img-align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

main::after {
  content: "";
  display: table;
  clear: both;
}

/* Mobile support */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    margin-top: 1rem;
  }

  .img-align-left,
  .img-align-right {
    float: none;
    margin-left: 0;
    margin-right: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
}
