* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #fafafa;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: #000;
  color: #fff;
  padding: 1.25rem 2rem 1.75rem;
  text-align: center;
}
.site-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: #fff; }
.site-title {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
}
.site-subtitle {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
  font-weight: 400;
}

.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 1rem 2rem;
  margin-top: auto;
  font-size: 0.9rem;
}

main { padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.prose { max-width: 720px; line-height: 1.6; }
.prose h1, .prose h2, .prose h3 { line-height: 1.2; }
.prose h1:first-child { margin-top: 0; }

.category { margin-bottom: 3rem; }
.category h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  text-transform: capitalize;
}
.grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #eee;
  cursor: pointer;
  border: none;
  padding: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.thumb:hover img { transform: scale(1.03); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 10;
}
.modal[hidden] { display: none; }
.modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.5rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}
.modal-image {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 4px;
  background: #f4f4f4;
}
.modal-title { margin: 1rem 0 0.5rem; }
.modal-description { line-height: 1.5; }
.modal-description p:first-child { margin-top: 0; }
