/* pmjc — minimal responsive styles. No framework. */

:root {
  --fg: #1a1a1a;
  --fg-muted: #5e5e68;
  --bg: #ebedfa;           /* soft lavender — hat-tip to the 2006 #ccccff */
  --surface: #ffffff;      /* cards, header, input fields */
  --img-placeholder: #dcdfee;
  --accent: #2563eb;
  --border: #d5d7e8;
  --max-width: 1100px;
  --gap: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e7e8ef;
    --fg-muted: #9092a4;
    --bg: #151722;
    --surface: #1c1f2b;
    --img-placeholder: #262a38;
    --accent: #8ab4f8;
    --border: #2b2f3c;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-title { font-weight: 600; color: var(--fg); }
.site-nav a { margin-left: 1rem; }

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

h1 { font-size: 1.75rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.5rem; color: var(--fg-muted); }

.breadcrumb { font-size: 0.9rem; color: var(--fg-muted); margin-bottom: 0.5rem; }

/* Photo grid */
.photo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap);
}
.photo-grid li { margin: 0; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  background: var(--img-placeholder);
}
.photo-grid .caption {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin: 0.25rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Photo detail */
.photo-detail { max-width: 900px; }
.photo-main img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--img-placeholder);
}
.photo-descr { font-size: 1.1rem; margin: 1rem 0; }
.photo-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; }
.photo-meta dt { font-weight: 600; color: var(--fg-muted); }
.photo-meta dd { margin: 0; }

.photo-comments { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.photo-comments ul { list-style: none; padding: 0; }
.comment { margin-bottom: 1rem; }
.comment-body { margin: 0 0 0.25rem; }
.comment-meta { font-size: 0.85rem; color: var(--fg-muted); margin: 0; }

/* Browse lists */
.browse-list, .year-list, .location-tree, .child-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.year-list a, .location-tree a, .child-list a, .browse-list a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

/* Home */
.home-hero { margin-bottom: 2rem; }
.lede { color: var(--fg-muted); }

/* Album */
.album-count { color: var(--fg-muted); font-size: 0.9rem; }
.album-desc { color: var(--fg-muted); }

/* Search */
.search form {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  max-width: 500px;
}
.search label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
.search input, .search select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
  background: var(--surface);
  color: var(--fg);
}
.search button {
  justify-self: start;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
