@media (min-width: 40em) { main { font-size: 1.2rem; max-width: 55em; justify-self: center; } main #photos { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; width: 100%; } #photos > a.member { display: block; height: 100%; text-decoration: none; } #photos img.portrait { /* Center portraits horizontally within a.member. Alternative: set * a.member to display: flex, flex-direction: column. */ display: block; margin-left: auto; margin-right: auto; max-height: 60vh; filter: grayscale(0.5); transition: filter 1s, transform 1s; } #photos img.portrait:hover { filter: none; transform: scale(1.05); } #photos p { margin: 0; font-weight: bold; } #photos p.instrument { color: #B4860A; /* Darkened --gold. */ } } @media (max-width: 40em) { #photos { display: grid; grid-template-columns: repeat(4, 20%); justify-content: space-evenly; width: 100%; } #photos > * { width: 100%; height: 50vh; } #photos img.portrait { width: 100%; height: 100%; object-fit: cover; object-position: center; } }