:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #2b2a28;
  --muted: #76716a;
  --line: #e7e2d9;
  --danger: #a5402f;
  --ok-bg: #edf3ee;
  --err-bg: #f8ebe7;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --surface: #24231f;
    --text: #ece7df;
    --muted: #a59f95;
    --line: #38352f;
    --danger: #e08a78;
    --ok-bg: #22302a;
    --err-bg: #3a2621;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
}
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
h2 { font-size: 1.7rem; text-align: center; margin: 0 0 1.5rem; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .92em; }

/* hero */
.hero {
  text-align: center;
  padding: 4.5rem 1rem 3rem;
  border-bottom: 1px solid var(--line);
}
.portrait {
  width: 190px; height: 190px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 8px 30px rgb(0 0 0 / .12);
  margin-bottom: 1.5rem;
}
.eyebrow { margin: 0; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); margin: .3rem 0 .2rem; }
.dates { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 1.15rem; }
.tagline { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin: 1rem auto 0; max-width: 32rem; }
.hero nav { margin-top: 2rem; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.hero nav a {
  text-decoration: none; color: var(--text);
  padding: .45rem 1.1rem; border: 1px solid var(--line); border-radius: 999px;
}
.hero nav a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main > section { padding: 3.5rem 0 1rem; }

.about { max-width: 40rem; margin: 0 auto; font-family: var(--serif); font-size: 1.15rem; }

/* gallery */
.section-action { text-align: center; margin: -.6rem 0 1.6rem; }
.pill {
  display: inline-block; text-decoration: none; font-size: .92rem;
  padding: .4rem 1.1rem; border: 1px solid var(--accent); border-radius: 999px;
}
.pill:hover { background: var(--accent); color: #fff; }
.gallery { columns: 3 260px; column-gap: 12px; }
.tile {
  display: block; width: 100%; margin: 0 0 12px; padding: 0;
  border: 0; background: var(--line); border-radius: 8px; overflow: hidden;
  cursor: zoom-in; break-inside: avoid;
}
.tile img { display: block; width: 100%; height: auto; transition: transform .3s; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }

/* stories */
.stories { columns: 2 340px; column-gap: 20px; }
.story {
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.4rem 1.5rem 1.1rem;
  margin: 0 0 20px;
}
.story .text { white-space: pre-line; margin: 0 0 1rem; font-family: var(--serif); font-size: 1.08rem; }
.story footer { color: var(--accent); font-weight: 600; font-size: .95rem; }
.story footer span { color: var(--muted); font-weight: 400; }

/* share form */
.share { max-width: 38rem; margin: 0 auto; }
.share > .muted { text-align: center; margin-top: -.8rem; }
form label { display: block; margin-bottom: 1.1rem; font-weight: 600; font-size: .95rem; }
form label .muted { font-weight: 400; }
input, textarea {
  display: block; width: 100%; margin-top: .35rem;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: .65rem .8rem;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=file] { padding: .5rem; }
.hp { position: absolute; left: -9999px; }
button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: .65rem 1.6rem;
}
button:disabled { opacity: .6; cursor: progress; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.notice { padding: .75rem 1rem; border-radius: 8px; background: var(--ok-bg); }
.notice.error { background: var(--err-bg); }

.site-footer { text-align: center; color: var(--muted); padding: 4rem 16px 3rem; font-size: .9rem; }

/* lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgb(10 10 10 / .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; text-align: center; color: #eee; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 4px; }
.lightbox figcaption { margin-top: .7rem; font-size: .95rem; }
.lightbox button {
  position: absolute; background: rgb(255 255 255 / .1); color: #fff;
  width: 48px; height: 48px; padding: 0; border-radius: 50%; font-size: 1.8rem; line-height: 1;
}
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 16px; top: 50%; translate: 0 -50%; }

/* admin */
.narrow { max-width: 34rem; padding-top: 3rem; }
.narrow.wide { max-width: 50rem; }
h1.small { font-size: 2rem; margin: 0; }
.narrow h2 { text-align: left; font-size: 1.3rem; margin-top: 2.5rem; }
.admin-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-head h1 { flex: 1; }
.admin-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .6rem; }
.admin-thumbs img { height: 110px; border-radius: 6px; display: block; }
.actions { display: flex; gap: .6rem; margin-top: 1rem; }
.actions form, .admin-head form { margin: 0; }
.actions button { padding: .4rem 1rem; font-size: .9rem; }
