body {
  font-family: system-ui;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.use-preferred-font {
  font-family: var(--preferred-font), system-ui;
}

#toolbar {
  position: sticky;
  width: 100%;
  top: 0;
  z-index: 100;
  overflow-y: auto;
}

#preferred-font::after {
  content: "(" var(--preferred-font) ")";
  display: inline;
}

main {
  max-width: 1024px;
  margin: 0 auto;
}

main > .window-body {
  overflow: auto;
}

.markdown-content {
  line-height: 1.4;
  font-size: 1rem;
}

.markdown-content h2 {
  margin: 16px 0 12px 0;
}

.markdown-content h3 {
  margin: 14px 0 10px 0;
}

.markdown-content ul li {
  margin-left: 1.5rem;
}

.markdown-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 4px;
  color: #2f2f2f;
}

.markdown-content img {
  display: block;
  max-width: 90%;
  height: auto;
  margin: 1rem auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
}

.blog-preview ul li {
  margin-left: 1.5rem;
}

.blog-preview .date {
  font-size: 0.8rem;
}

.date {
  font-size: 0.9rem;
  color: #2f2f2f;
}

.example {
  margin: var(--margin) 0;
  padding-left: 16px;
}

.window {
  max-width: 1024px;
}

details {
  margin-top: 8px;
}

details > summary {
  display: inline-block;
  cursor: normal;
  user-select: none;
  margin-bottom: 4px;
}

.footer {
  margin-top: 3rem;
}

.footer-links {
  margin-top: 1.25rem;
  font-size: 0.8rem;
}

.col-to-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-image-container {
  display: flex;
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically */
  margin: 1.5rem 0; /* Adds spacing around the container */
}

.post-image {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
}

.posts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr); /* Default to 1 column for mobile */
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  height: 100%; /* Ensures all cards are the same */
}

.card-image {
  width: 100%;
  height: auto; /* Maintains aspect ratio */
  object-fit: cover; /* Ensures the image fills its container */
  border: 1px solid black; /* Adds a thick black border to the image */
}

.card-title {
  margin-top: 0.5rem;
  text-align: center;
}

.card-subtitle {
  font-size: 0.7rem;
}

.card-link {
  text-decoration: none; /* Remove underline from links */
  color: inherit; /* Inherit text color */
  display: block; /* Make the entire card clickable */
}

.card-link:hover .card {
  border: 1px solid black; /* Thicker border on hover */
}

.no-link-style {
  text-decoration: none; /* Remove underline from links */
  color: inherit; /* Inherit text color */
}

.retro-techie-image {
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.4); /* Add shadow */
  margin: 0 auto 0.5rem auto;
  width: 150px;
  height: 150px;
}

.retro-techie-avatar {
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.4); /* Add shadow */
  margin: 0 auto 0.5rem auto;
  width: 100px;
  height: 100px;
}

@media screen and (min-width: 750px) {
  /* Tablet: 2 columns */
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .retro-techie-image {
    margin: 0.25rem 1rem 1rem 1rem;
  }

  .retro-techie-avatar {
    margin: 0.75rem 1rem 1rem 1rem;
  }

  section {
    display: flex;
    flex-direction: row;
  }

  section > *:first-child {
    flex: 0 0 200px;
  }

  section > div {
    flex-grow: 1;
  }

  .col-to-row {
    flex-direction: row;
    gap: 1rem;
  }
}

a {
  color: #00c;
  text-decoration: underline;
}

@media (min-width: 1024px) {
  /* Desktop: 3 columns */
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
