:root {
  --fg: #111;
  --muted: #8a8a8a;
  --bg: #fff;
  --tile: #f1efec;
  --gap: 8px;
  --pad: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header: tiny, sticky, uppercase — the whole site is quiet so the images talk */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: var(--pad);
  background: var(--bg);
  text-transform: uppercase;
}
.logo { font-weight: 500; letter-spacing: 0.04em; }
.top nav { display: flex; gap: 18px; }

main { flex: 1; padding: 0 var(--pad) 48px; }

/* Filter row */
.filters { display: flex; gap: 14px; margin: 4px 0 14px; text-transform: uppercase; }
.filters button {
  font: inherit; text-transform: inherit; background: none; border: 0; padding: 0;
  color: var(--muted); cursor: pointer;
}
.filters button[aria-pressed="true"] { color: var(--fg); }

/* Image grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px var(--gap);
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

.card { display: block; }
.card:hover { text-decoration: none; }
.frame {
  position: relative; aspect-ratio: 3 / 4; background: var(--tile); overflow: hidden;
}
.frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .25s;
}
.frame img.alt { opacity: 0; }
.card:hover .frame img.alt { opacity: 1; }
.caption { display: flex; justify-content: space-between; padding-top: 6px; }
.caption .meta { color: var(--muted); }

/* Detail page */
.detail { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.detail .images { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.detail .info { position: sticky; top: 48px; align-self: start; max-width: 340px; }
.detail h1, .page h1 { font-size: inherit; font-weight: 500; text-transform: uppercase; margin: 0 0 10px; }
.detail p, .page p { margin: 0 0 10px; }
@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .detail .info { position: static; }
}

.page { max-width: 460px; }

/* About: phones keep the simple stacked column; larger screens get
   slightly larger text running across a wide column from the left */
.about .about-text p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .about { max-width: 820px; }
  .about h1 { margin-bottom: 14px; }
  .about .about-text { font-size: 14px; line-height: 1.45; }
  .about .about-text p { margin-bottom: 1em; }
}

/* Photo viewer (post pages) */
.detail .images img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 44px var(--pad) var(--pad);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out;
  user-select: none; -webkit-user-drag: none;
}
.lb-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--pad); text-transform: uppercase;
}
.lightbox button {
  font: inherit; color: inherit; text-transform: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.lb-nav {
  position: absolute; top: 44px; bottom: 0; width: 25%;
  display: flex; align-items: center; padding: 0 var(--pad) !important;
  font-size: 18px !important;
}
.lb-prev { left: 0; justify-content: flex-start; }
.lb-next { right: 0; justify-content: flex-end; }
.lb-nav[hidden] { display: none; }
body.lb-open { overflow: hidden; }

/* Forms */
form.stack { display: grid; gap: 10px; margin-top: 18px; }
input, textarea, button {
  font: inherit; color: inherit;
}
input, textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--fg); background: none;
  padding: 6px 0; border-radius: 0; outline: none;
}
textarea { min-height: 120px; resize: vertical; border: 1px solid var(--fg); padding: 6px; }
button[type="submit"] {
  justify-self: start; border: 1px solid var(--fg); background: var(--fg); color: var(--bg);
  padding: 6px 14px; text-transform: uppercase; cursor: pointer;
}
button[type="submit"]:disabled { opacity: .5; cursor: default; }
.msg { color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: var(--pad); border-top: 1px solid #e6e6e6; text-transform: uppercase;
}
.foot-links { display: flex; gap: 18px; }
.admin-link { color: var(--muted); }
