:root {
  --bg: #3d3a37;
  --text: #ece7e0;
  --muted: #c9c2b8;
  --link: #f2ede6;
  --visited: #d6cfae;
  --line: #a8a196;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: #fff; text-decoration: none; }

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}

/* header + nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 22px 0 18px;
}

.site-name,
.site-name:visited {
  font-size: 22px;
  color: var(--muted);
  text-decoration: none;
}
.site-name:hover { color: #fff; }

nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
}
nav a[aria-current="page"] {
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

h1 {
  margin: 20px 0 0;
  font-size: 22px;
}

/* gallery: photos sit at uneven heights on purpose */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: #221d18;
}
.gallery figcaption {
  margin-top: 6px;
  font-size: 15px;
}
.gallery figure:nth-child(5n+1) { margin-top: 0; }
.gallery figure:nth-child(5n+2) { margin-top: 40px; }
.gallery figure:nth-child(5n+3) { margin-top: 12px; }
.gallery figure:nth-child(5n+4) { margin-top: 60px; }
.gallery figure:nth-child(5n+5) { margin-top: 24px; }

@media (max-width: 1000px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* category index */
.categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}
.cat-card {
  display: block;
  color: var(--text);
  text-decoration: none;
}
.cat-card:visited { color: var(--text); }
.cat-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #221d18;
}
.cat-card span {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}
.cat-card:hover span { color: #fff; }

@media (max-width: 1000px) {
  .categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* breadcrumb */
.breadcrumb {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #fff; }

/* about + contact */
.text {
  max-width: 620px;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.6;
}
.text p { margin: 0 0 14px; }

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin-top: 20px;
}
label { display: block; margin-bottom: 3px; font-size: 13px; }
input,
textarea {
  width: 100%;
  padding: 8px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
}
input { height: 36px; }
textarea { height: 140px; resize: vertical; }
button {
  min-height: 44px;
  padding: 0 26px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--text);
  cursor: pointer;
}
button:hover { background: rgba(255, 255, 255, 0.1); }

.status {
  margin: 12px 0 0;
  font-size: 14px;
}

/* spam trap: real visitors never see or fill this */
.hp {
  position: absolute;
  left: -9999px;
}

footer {
  margin-top: 80px;
  padding: 24px 0;
  font-size: 12px;
  color: var(--muted);
}
