/* ── Colors & fonts: change these to restyle the whole site ── */
:root {
  --bg: #faf8f5;
  --text: #1f1d1a;
  --muted: #6f6a63;
  --line: #e4dfd8;
  --accent: #1f1d1a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --text: #ece8e2;
    --muted: #9a948b;
    --line: #2c2a27;
    --accent: #ece8e2;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}
.site-header nav a:hover { color: var(--text); }

main > section {
  padding: 0 var(--gutter);
  max-width: 1400px;
  margin: 0 auto;
  scroll-margin-top: 80px;
}

/* ── Intro ── */
.intro { padding-top: clamp(48px, 10vw, 120px); padding-bottom: 40px; }
.intro h1 { max-width: 820px; }
.intro p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0; }

/* ── Filters ── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filters button:hover { color: var(--text); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ── Gallery: masonry-style columns, 1 → 2 → 4 by screen width ── */
.gallery { columns: 1; column-gap: 24px; }
@media (min-width: 600px) { .gallery { columns: 2; } }
@media (min-width: 1000px) { .gallery { columns: 4; } }

.art {
  display: block;
  width: 100%;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  break-inside: avoid;
}
.art img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s;
}
.art.small img { width: 75%; margin: 0 auto; }
.art:hover img { opacity: 0.88; }
.art-info { display: block; padding-top: 10px; }
.art-title { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.art-meta { display: block; font-size: 0.82rem; color: var(--muted); }

/* ── About ── */
.about {
  display: grid;
  gap: 32px;
  padding-top: 96px;
  align-items: center;
}
@media (min-width: 800px) { .about { grid-template-columns: 2fr 3fr; gap: 64px; } }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about p { color: var(--muted); max-width: 560px; }
.about-quote {
  margin: 32px 0 16px;
  padding-left: 20px;
  border-left: 2px solid var(--line);
  max-width: 560px;
}
.about-quote p { margin: 0; font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--text); }
.about-quote cite { display: block; margin-top: 6px; font-size: 0.85rem; font-style: normal; color: var(--muted); }

/* ── Contact ── */
.contact { padding-top: 96px; padding-bottom: 96px; text-align: center; }
.contact p { color: var(--muted); }
.button {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 12px 28px;
  border: 1px solid var(--text);
  text-decoration: none;
  transition: all 0.2s;
}
.button:hover { background: var(--text); color: var(--bg); }
.social a { margin: 0 8px; font-size: 0.9rem; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px var(--gutter);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Lightbox ── */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 11, 10, 0.96);
  color: #ece8e2;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 140px);
}
.lightbox img {
  max-height: calc(100dvh - 140px);
  width: auto;
  object-fit: contain;
}
.lightbox img.small { max-height: calc(50dvh - 70px); max-width: 60vw; }
/* Double-tap zoom is handled in gallery.js; "manipulation" stops the browser's own
   double-tap zoom but keeps pinch-zoom */
.lightbox img { touch-action: manipulation; transition: transform 0.25s ease; }
.lightbox img.zoomed { touch-action: none; }
.lightbox img.panning { transition: none; }
.lightbox figcaption { padding-top: 14px; text-align: center; }
.lightbox figcaption strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.lightbox figcaption span { font-size: 0.85rem; color: #9a948b; }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: inherit;
  font-size: 2.6rem;
  line-height: 1;
  padding: 12px 16px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 2; /* stay above a zoomed-in image */
}
.lightbox button:hover { opacity: 1; }
/* No focus ring/tap highlight from taps; keyboard users still get one via :focus-visible */
.lightbox:focus { outline: none; }
.lightbox button { -webkit-tap-highlight-color: transparent; }
.lightbox button:focus:not(:focus-visible) { outline: none; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Phones: let the image use the full width; swipe to navigate */
@media (max-width: 600px) {
  .lightbox figure { max-width: 100vw; padding: 0 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}
