:root {
  --ink: #000;
  --paper: #fff;
  --muted: #666;
  --rule: #e5e5e5;
  --max: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}
a:visited { color: inherit; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

img { max-width: 100%; height: auto; display: block; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

/* --- Header --- */

.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 0.5rem 0 2.5rem;
}

.wordmark {
  display: block;
  flex-shrink: 0;
  width: 56px;
}
.wordmark img { width: 100%; height: auto; display: block; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
}
.site-nav a {
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  letter-spacing: 0.005em;
  padding: 0.25rem 0;
}
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 600px) {
  .site-header { gap: 1rem; padding-bottom: 2rem; }
  .site-nav { gap: 1.1rem; }
  .site-nav a { font-size: 1.25rem; }
  .wordmark { width: 44px; }
}

/* --- Footer divider (decorative end-of-page mark, per original Muse layout) --- */

.site-footer {
  margin-top: 3.5rem;
  padding-bottom: 1rem;
}
.divider {
  display: block;
  width: 100%;
}
.divider img { width: 100%; height: auto; display: block; }

/* --- Page heading --- */

.page-title {
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.1;
  margin: 0 0 2rem;
  letter-spacing: 0.005em;
}

/* --- Home --- */

.hero {
  margin: 0 0 1.5rem;
}
.hero img {
  width: 100%;
  height: auto;
}

.intro {
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 50ch;
  margin: 0 0 2rem;
}

/* --- Galleries --- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

.gallery button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  display: block;
  width: 100%;
  overflow: hidden;
}
.gallery button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .gallery img { transition: none; }
}
.gallery button:hover img { opacity: 0.85; }

/* --- Contact --- */

.contact {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}
.contact-portrait {
  width: 100%;
  max-width: 320px;
  flex-shrink: 0;
}
.contact-portrait img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.contact-body {
  font-family: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.55;
  max-width: 50ch;
}
.contact-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .contact {
    flex-direction: row;
    gap: 3rem;
    align-items: center;
  }
}

/* --- Lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }

.lightbox-figure {
  margin: 0;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-figure img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}

.lightbox-btn {
  position: absolute;
  appearance: none;
  background: rgba(0, 0, 0, 0.4);
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: rgba(0, 0, 0, 0.8);
  outline: none;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

body.lightbox-open { overflow: hidden; }

@media (max-width: 600px) {
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.5rem; right: 0.5rem; }
}

/* --- Print --- */

@media print {
  .site-nav, .lightbox, .divider, .gallery button { all: revert; }
  .gallery { display: block; }
  .gallery img { page-break-inside: avoid; margin-bottom: 1rem; }
}
