:root {
  color-scheme: light;
  --bg: #fdf6ee;
  --paper: #ffffff;
  --ink: #2e2530;
  --accent: #b3435c;
  --accent-2: #4a7a6f;
  --muted: #8a7f8a;
  --border: #ecdfd0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Georgia", "Iowan Old Style", serif;
  line-height: 1.6;
}

.password-gate { display: none; }

body.locked .site-content { display: none; }

body.locked .password-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.password-gate form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 16px rgba(46, 37, 48, 0.08);
}

.password-gate label {
  display: block;
  margin-bottom: 1rem;
  font-weight: bold;
  color: var(--accent);
}

.password-gate input {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

.password-gate button {
  width: 100%;
  padding: 0.6rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.password-gate button:hover { background: var(--accent-2); }

.password-gate #password-gate-error {
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border-bottom: 3px solid var(--accent);
}

.site-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}

.site-header nav a {
  margin-left: 1.25rem;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: bold;
}

.site-header nav a:hover { text-decoration: underline; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 { color: var(--accent); margin-bottom: 0.25rem; }
.hero p { color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-item {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.entry-list {
  list-style: none;
  padding: 0;
}

.entry-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.entry-list a {
  color: var(--ink);
  font-weight: bold;
  text-decoration: none;
}

.entry-list a:hover { color: var(--accent); }

.entry-list time {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.entry .back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: bold;
}

.entry h1 { margin-bottom: 0.25rem; color: var(--accent); }

.entry-date {
  display: block;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.entry-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

.empty { color: var(--muted); font-style: italic; }

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
