body {
  font-family: Courier, monospace;
  background-image: url('desktop.jpg');
  /*background-color: #3d3d3d;*/
  background-attachment: fixed;  /* keeps image fixed on scroll */
  background-position: center;   /* centers the image */
  background-repeat: no-repeat;  /* prevents tiling */
  background-size: cover;        /* scales image to cover entire viewport */
  /*background-size: auto 100%; */
}

/* styles.css */
:root {
  --gap: 1rem;
  --radius: 12px;
  --caption: 0.85rem;
  --caption-color: #555;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  /*font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";*/
  line-height: 1.5;
  color: #111;
  /*background: #fafafa;*/
}

.masonry {
  /* Two columns on larger screens */
  columns: 2;
  column-gap: var(--gap);
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 var(--gap);
}

.masonry-item {
  /* Keep each figure intact within a column */
  position: relative;
  break-inside: avoid;
  margin: 0 0 var(--gap);
  display: inline-block; /* needed so the column layout measures the element */
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 18px rgba(0,0,0,.04);
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

/*.masonry-item figcaption {*/
/*  padding: .6rem .8rem;*/
/*  font-size: var(--caption);*/
/*  color: var(--caption-color);*/
/*  opacity: 1;*/
/*}*/

.masonry-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--caption);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.masonry-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.masonry-item:hover img {
  transform: scale(1.02);
}

/* Responsive: single column on narrow screens */
@media (max-width: 680px) {
  .masonry {
    columns: 1;
  }
}
