:root {
  --ink: #1a1a1a;
  --paper: #fafaf8;
  --line: #e2e0da;
  --accent: #8a6d3b;
  --muted: #6b6b66;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Georgia", "Iowan Old Style", serif;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}
.site-header h1 {
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.subtitle {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.category-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 1.5rem 2rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-wrap: wrap;
}
.category-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
}
.category-nav a.active,
.category-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem 1.75rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
.art-card {
  margin: 0;
}
.art-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
}
.art-card figcaption {
  margin-top: 0.75rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.art-title {
  font-family: "Georgia", serif;
  font-size: 1rem;
  font-style: italic;
  margin-bottom: 0.2rem;
}
.art-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.art-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.6rem;
  color: var(--line);
}

.site-footer {
  text-align: center;
  padding: 2rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.contact-page {
  max-width: 560px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.contact-page h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
}
.contact-form .checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.contact-form .checkbox-label input {
  width: 16px;
  height: 16px;
}
.contact-form button {
  align-self: flex-start;
  padding: 0.65rem 1.6rem;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* --- /post pages --- */
.flash {
  max-width: 600px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}
.flash-msg {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.post-page {
  max-width: 640px;
  margin: 3rem auto;
  padding: 0 1.5rem 3rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.post-page h1 { font-family: Georgia, serif; font-weight: 400; }
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.logout-link { font-size: 0.8rem; color: var(--muted); }

.login-page { text-align: center; }
.login-form { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.login-form input {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1rem;
  width: 220px;
}
.login-form button {
  padding: 0.6rem 1.2rem;
  border: none;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}
.upload-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.upload-form .optional { font-weight: normal; opacity: 0.75; }
.upload-form input[type="text"],
.upload-form input[type="number"],
.upload-form input[type="file"] {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--ink);
  font-family: inherit;
}
.upload-form button {
  align-self: flex-start;
  padding: 0.65rem 1.6rem;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 0.5rem;
}

.recent-list {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.recent-list h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: normal;
}
.recent-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.recent-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.recent-list img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  background: #eee;
  flex-shrink: 0;
}
.recent-title { flex: 1; font-style: italic; }
.recent-meta { color: var(--muted); font-size: 0.78rem; }
.recent-order {
  font-family: Georgia, serif;
  color: var(--accent);
  font-weight: bold;
}

@media (max-width: 640px) {
  .site-header h1 { font-size: 1.8rem; }
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem 0.5rem;
    padding: 0 0.75rem 3rem;
  }
  .art-title { font-size: 0.75rem; }
  .art-meta { font-size: 0.62rem; }
  .portraits-gallery { grid-template-columns: repeat(2, 1fr); }
}

.portraits-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.portraits-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.portraits-header h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin: 0;
}
.portraits-cta {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.65rem 1.6rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.portraits-cta:hover {
  opacity: 0.9;
}
.portraits-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.portraits-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  display: block;
  background: #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.portraits-copy {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}
.portraits-copy p {
  margin: 0 0 1.2rem;
}
.portraits-copy h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
}
.portraits-copy ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}
.portraits-copy li {
  margin-bottom: 0.4rem;
}
.portraits-pricing {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
.portraits-pricing td {
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.portraits-pricing td:last-child {
  text-align: right;
  font-weight: bold;
  color: var(--accent);
  white-space: nowrap;
}
.portraits-page .contact-page {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.contact-form input[type="file"] {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink);
}

.about-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}
.about-intro {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
.about-photo {
  display: block;
  width: 150px;
  flex-shrink: 0;
  margin: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.about-copy {
  flex: 1;
  min-width: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}
.about-copy p {
  margin: 0 0 1.2rem;
}
.about-shows {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.about-shows h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 1.25rem;
  text-align: center;
}
.shows-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}
.shows-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  break-inside: avoid;
}
.show-venue {
  flex: 1;
  color: var(--ink);
}
.show-location {
  color: var(--muted);
}
.show-year {
  color: var(--accent);
  font-weight: bold;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .shows-list { columns: 1; }
  .about-intro {
    flex-direction: column;
    align-items: center;
  }
  .about-photo {
    width: 180px;
    max-width: 60%;
    margin: 0 auto 1.5rem;
  }
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
}
body.lightbox-locked {
  overflow: hidden;
}
