:root {
  --bg: #fafaf7;
  --ink: #111;
  --muted: #888;
  --rule: #e8e6e0;
  --sidebar-w: 280px;
  --serif: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.6; }

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

/* ---------- Layout ---------- */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 40px 32px;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.brand .brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.nav-section {
  display: flex;
  flex-direction: column;
}

.nav-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  padding: 2px 0;
  transition: opacity 0.15s ease;
}

.nav-list a .meta {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.nav-list a.active {
  font-style: italic;
}

.contact {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.contact a:hover { color: var(--ink); opacity: 1; }

/* ---------- Main ---------- */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Hero carousel (index) ---------- */

.carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide picture, .slide img {
  width: 100%;
  height: 100%;
  display: block;
}

.slide img {
  object-fit: contain;
  background: var(--bg);
  padding: 5vh 5vw;
}

.slide .caption {
  position: absolute;
  left: 5vw;
  bottom: 4vh;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.slide .caption .title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}

.slide .caption .meta {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.carousel-dots {
  position: absolute;
  right: 5vw;
  bottom: 4vh;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dots button {
  appearance: none;
  border: 0;
  background: var(--muted);
  opacity: 0.35;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.carousel-dots button.active {
  opacity: 1;
  background: var(--ink);
}

/* ---------- Series page ---------- */

.series-page {
  padding: 60px 8vw 80px;
  max-width: 1400px;
  width: 100%;
}

.series-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 48px;
  max-width: 720px;
}

.series-header h1,
.series-header h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

.series-header .meta-line {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.series-header .lede {
  font-size: 17px;
  line-height: 1.6;
  margin-top: 20px;
  color: #222;
  max-width: 680px;
}

.series-header .lede + .lede { margin-top: 14px; }

.series-process {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px 32px;
  font-size: 14px;
  max-width: 680px;
}

.series-process dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 3px;
}

.series-process dd { margin: 0; }

.series-process a { border-bottom: 1px solid currentColor; }
.series-process a:hover { opacity: 1; color: var(--muted); }

.gallery {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.gallery .full { grid-column: 1 / -1; }

.gallery img {
  width: 100%;
  height: auto;
  background: #f0eee8;
}

.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery figure.full { grid-column: 1 / -1; }

.gallery figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  font-size: 14px;
}

.gallery figcaption .title {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}

.gallery figcaption .dim {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

/* ---------- About page ---------- */

.about-page {
  padding: 80px 8vw 120px;
  max-width: 760px;
}

.about-page h1,
.about-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 42px;
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}

.about-page p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.about-page p em { font-style: italic; }

.about-page h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 48px 0 16px;
}

.about-page ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.about-page ul li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 15px;
}

.about-page ul li .year {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  min-width: 48px;
}

.about-page ul li .where {
  color: var(--muted);
  font-size: 13px;
}

.about-page .contact-block {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
}

.about-page .contact-block a {
  border-bottom: 1px solid currentColor;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox .close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.lightbox .close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

body.lightbox-open {
  overflow: hidden;
}

/* ---------- Mobile ---------- */

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
}

.mobile-bar p {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0;
  font-weight: 500;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-bar button {
  appearance: none;
  background: none;
  border: 1px solid var(--rule);
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .mobile-bar { display: flex; }
  .sidebar {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 20;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .close {
    position: absolute;
    top: 14px;
    right: 20px;
    background: none;
    border: 1px solid var(--rule);
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
  }
  .carousel { height: calc(100vh - 60px); }
  .slide img { padding: 4vh 4vw; }
  .gallery { grid-template-columns: 1fr; gap: 20px; }
  .series-process { grid-template-columns: 1fr; gap: 4px 0; }
  .series-process dt { padding-top: 16px; }
  .series-header h2, .about-page h2 { font-size: 32px; }
  .series-page, .about-page { padding: 32px 6vw 60px; }
}

@media (min-width: 861px) {
  .sidebar .close { display: none; }
}
