.back-to-root {
  font-size: 0.9em;
  text-align: left;
}

.back-to-root a {
  color: #fff;
  opacity: 0.75;
}

.main-content {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
}

.main-content img {
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.pagination {
  text-align: center;
  margin-top: 40px;
}

.site-footer {
  text-align: center;
}

.site-footer-owner {
  font-size: 0.9em;
  font-weight: normal;
}

/* Grid things */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.projects-grid a {
  text-decoration: none;
  display: block;
}

.projects-grid a:hover .project h2 {
  text-decoration: underline;
}

.project {
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: #f9f9f9;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  height: 100%; /* Ensure all projects have the same height */
}

.project img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.project h2 {
  margin: 10px 0 5px;
  font-size: 1.2em;
  text-decoration: none;
  color: #007acc;
}

.project p {
  font-size: 0.9em;
  color: #555;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Blog posts grid */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 1200px;
  gap: 20px;
  margin-top: 20px;
}

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

.posts-grid a {
  text-decoration: none;
  display: block;
}

.posts-grid a:hover .post h2 {
  text-decoration: underline;
}

.post {
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: #f9f9f9;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  height: 100%; /* Ensure all posts have the same height */
}

.post img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.post h2 {
  margin: 10px 0 5px;
  font-size: 1.2em;
  text-decoration: none;
  color: #007acc;
}

.post p {
  font-size: 0.9em;
  color: #555;
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Blog post styling */
.post time {
  font-size: 0.8em;
  color: #666;
  font-style: italic;
}

/* Blog post header with OG image background */
.page-header[data-bg-image] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.page-header[data-bg-image]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg, rgba(17, 70, 122, 0.95), rgba(17, 122, 70, 0.95));
  z-index: 1;
}

.page-header[data-bg-image] .back-to-root,
.page-header[data-bg-image] .project-name,
.page-header[data-bg-image] .project-tagline {
  position: relative;
  z-index: 2;
}
