@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Sorts+Mill+Goudy:ital@0;1&display=swap");

body {
  background: #e2e8f0;
  margin: 0;
  padding: 0;

  display: flex;
  min-height: 100vh;

  font-family: "Sorts Mill Goudy", serif;
  font-size: 18px;
}

@media (max-width: 600px) {
  body {
    flex-direction: column;
  }
}

.container {
  margin: 0 auto;
  width: 100%;
  padding: 10px;
}

nav {
  background-color: #991b1b;
  color: white;
  position: sticky;
  top: 0;

  max-height: 100vh;

  padding: 0 20px;

  min-width: 190px;
}

hr {
  border-color: white;
}

nav ul {
  list-style: none;
  padding-left: 0;
}

main {
  flex-grow: 1;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  color: white;
}

nav a:hover {
  text-decoration: underline;
}

/* People list */
.people-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}
.person-card {
  background: #fff;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: block;
  text-align: center;
}
.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  background: #f0f0f0;
}
.person-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  word-break: break-word;
}
.person-card .count {
  font-size: 14px;
  color: #666;
}

/* Images grid */
.images-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  width: 100%;
}
.image-card,
.card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.image-card img,
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.meta {
  padding: 10px 12px;
  font-size: 13px;
  color: #444;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
}
.modal .inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  width: 900px;
}
.modal img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.close {
  position: fixed;
  top: 18px;
  right: 22px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* Utility */
.hidden {
  display: none !important;
}
