/* Site-wide styling, centralised so pages do not carry their own <style> blocks. */

/* --- Page and post tweaks --- */

.post-header {
  margin-bottom: 20px;
}

.post-content p {
  margin-bottom: 10px;
}

/* Portrait floated to the right of the intro text on the home and about pages. */
.side-photo {
  float: right;
  width: 200px;
  height: auto;
  margin: 0 0 1rem 1.5rem;
  border-radius: 4px;
}

/* --- Project cards --- */

/* The Minima wrapper is 800px wide, so three cards fit side by side. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 1.25rem 0;
}

.project-card {
  background: #fafafa;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: #bdbdbd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.project-card img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.project-card .project-body {
  padding: 0.65rem 0.8rem;
}

.project-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  line-height: 1.3;
}

.project-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.project-card .credit {
  margin-top: 0.45rem;
  color: #6b6b6b;
  font-size: 0.75rem;
}

/* --- Compact rows for the less prominent past projects --- */

/* One full-width strip per project keeps the section compact and readable. */
.project-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0;
}

.project-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  background: #fafafa;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  transition: border-color 0.15s ease;
}

.project-row:hover {
  border-color: #bdbdbd;
}

.project-row img {
  display: block;
  width: 200px;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

.project-row h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.project-row p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.project-row .credit {
  margin-top: 0.35rem;
  color: #6b6b6b;
  font-size: 0.72rem;
}

/* Rows without an image should not reserve the thumbnail column. */
.project-row--text {
  grid-template-columns: 1fr;
}

/* --- Narrow screens --- */

@media (max-width: 600px) {
  .side-photo {
    float: none;
    display: block;
    margin: 0 auto 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-row {
    grid-template-columns: 1fr;
  }

  .project-row img {
    width: 100%;
    height: auto;
  }
}
