:root {
  --bg: #ffffff;
  --fg: #444444;
  --fg-strong: #1a1a1a;
  --muted: #a0a6a4;
  --line: #ececec;
  --placeholder-bg: #f3f3f3;
  --sidebar-w: 380px;
  --pad: 40px;
  --gap: 24px;
  --font-menu: "Oswald", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --font-script: "Caveat", "Playfair Display", cursive;
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  zoom: 0.8;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 95px 40px 40px 110px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: block;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 62px;
  letter-spacing: 0;
  margin-bottom: 61px;
  line-height: 0.95;
  color: #1a1a1a;
}

.side-nav { flex: 1; }

.side-nav > ul { display: flex; flex-direction: column; gap: 22px; }

.side-nav > ul > li > a {
  display: inline-block;
  font-family: var(--font-menu);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

.side-nav > ul > li > a[aria-current="page"] {
  color: var(--fg);
  opacity: 1;
}

/* Open parent (e.g. PHOTOGRAPHS when expanded) becomes muted */
.side-nav > ul > li.has-sub.open > a {
  color: var(--muted);
}

/* "Home" appears in mixed-case mono in the reference */
.side-nav > ul > li:last-child > a {
  font-family: var(--font-mono);
  color: var(--fg);
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.side-nav .caret {
  display: inline-block;
  margin-left: 6px;
  font-size: 9px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.side-nav .submenu {
  margin: 22px 0 0;
  display: none;
  flex-direction: column;
  gap: 22px;
  padding-left: 10px;
}

.side-nav .has-sub.open .submenu { display: flex; }

.side-nav .submenu li a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
  padding-left: 4px;
}

.side-nav .submenu li a::before {
  content: "—";
  color: var(--fg);
  font-weight: 400;
}

.side-nav .submenu li a[aria-current="page"] {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* sidebar footer */
.side-footer { margin-top: 24px; }

.side-footer .social {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.side-footer .social a {
  display: inline-flex;
  align-items: center;
  color: var(--fg);
}

.side-footer .social svg { display: block; width: 18px; height: 18px; }

.side-footer .social .share {
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.02em;
}

.side-footer .copyright {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: normal;
  font-size: 11px;
  color: #666;
  line-height: 1.5;
  max-width: 220px;
}

/* ---------- Content area ---------- */
.content {
  padding: 28px var(--pad) 28px 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.content > * { width: 100%; }

/* home / single hero */
.hero {
  display: block;
  width: 100%;
}

.hero-image {
  aspect-ratio: 3 / 2;
  width: 100%;
}

/* When a page is not just a hero, top-align content */
.content:has(.project),
.content:has(.section-title),
.content:has(.info-block) {
  align-items: flex-start;
  padding-top: 60px;
}

/* ---------- Film project page ---------- */
.content:has(.film-page) {
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
}

.film-page {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.film-header {
  text-align: center;
  margin-bottom: 36px;
}

.film-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-strong);
  margin: 0 0 28px;
}

.film-description {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  max-width: 760px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.film-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  margin: 0;
}

.film-laurels {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.film-laurels img {
  height: 120px;
  width: auto;
  display: block;
}

.film-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.film-stills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.film-still {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #000;
}

.film-still img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 900px) {
  .film-stills { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Media modal (YouTube / Instagram / image lightbox) ---------- */
.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.media-modal.open {
  opacity: 1;
  visibility: visible;
}

.media-modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-modal-close:hover { border-color: #fff; }

.media-modal-prev,
.media-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
}
.media-modal-prev:hover,
.media-modal-next:hover { border-color: #fff; }
.media-modal.has-nav .media-modal-prev,
.media-modal.has-nav .media-modal-next {
  display: flex;
}
.media-modal-prev { left: 20px; }
.media-modal-next { right: 20px; }

@keyframes media-modal-flash {
  0%   { opacity: 0; }
  28%  { opacity: 1; }
  100% { opacity: 0; }
}

.media-modal-stage {
  width: min(92vw, 1080px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal-yt {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.media-modal-stage .instagram-media {
  max-width: 540px !important;
  width: 100% !important;
  min-width: 320px !important;
  margin: 0 !important;
  background: #fff;
}

.media-modal-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 88vh;
}

.media-modal-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.media-modal.open .media-modal-img {
  opacity: 1;
}

.media-modal-img-flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}
.media-modal-img-flash.flashing {
  animation: media-modal-flash 0.55s ease-out;
}

.film-still {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.film-still:hover { opacity: 0.85; }

/* ---------- Content page (scrollable strips) ---------- */
.content:has(.content-page) {
  align-items: stretch;
  padding-top: 168px;
}

.content-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.content-strip {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 16px;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  padding: 24px 0;
}

.content-strip-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #000;
  padding: 8px 4px;
  min-width: 26px;
}

.content-strip-rail {
  flex: 1 1 0;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;          /* IE/Edge */
  cursor: grab;
  user-select: none;
}

.content-strip-rail::-webkit-scrollbar {
  display: none;                     /* Chrome/Safari */
}

.content-strip-rail.dragging {
  cursor: grabbing;
}

.content-strip-rail.dragging a {
  pointer-events: none;              /* don't navigate while dragging */
}

.content-card {
  flex: 0 0 auto;
  width: 280px;
  height: 170px;
  position: relative;
  overflow: hidden;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.2s ease;
}

.content-card:hover { opacity: 1; }
.content-card:hover img { opacity: 0.5; }

.content-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.content-card-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-menu);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 18px;
}

.content-card-placeholder {
  border: 1px dashed #000;
  background: transparent;
  color: var(--muted);
}

.content-card-placeholder .content-card-title {
  color: var(--muted);
}

/* ---------- Per-collection grid (the grid.html page) ---------- */
.content:has(.collection-grid) {
  align-items: flex-start;
  padding-top: 28px;
}

.collection-grid {
  width: 100%;
}

.cgrid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.cgrid-header h1 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  margin: 0;
  color: var(--fg);
  letter-spacing: 0;
  text-transform: none;
}

.cgrid-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  color: var(--fg);
}

.cgrid-close svg {
  width: 60%;
  height: 60%;
  display: block;
}

.cgrid-items {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cgrid-items li {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.cgrid-items a {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
}

.cgrid-items a:hover {
  opacity: 1;
}

.cgrid-items a:hover img {
  opacity: 0.85;
}

.cgrid-items img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .cgrid-items { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .cgrid-items { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ---------- Photographs landing: flat photo wall ---------- */
.content:has(.photo-wall) {
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 28px;
}

.photo-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 44px 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.photo-wall li {
  height: 115px;
  flex: 0 0 auto;
}

.photo-wall a {
  display: block;
  height: 100%;
  transition: opacity 0.2s ease;
}

.photo-wall a:hover { opacity: 1; }
.photo-wall a:hover img { opacity: 0.85; }

.photo-wall img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
}

/* ---------- Slideshow (single-image collection view) ---------- */
.content:has(.slideshow) {
  align-items: stretch;
  padding-top: 108px;
  padding-bottom: 28px;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.slideshow {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.slide-nav {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
}

.slide-nav .slide-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.slide-nav .slide-sep {
  color: var(--fg);
}

.slide-nav .slide-counter {
  color: var(--muted);
  margin-left: 14px;
}

.slide-image {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  overflow: hidden;
}

.slide-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.slide-header {
  position: relative;
}

.slide-grid-btn {
  position: absolute;
  top: 0;
  right: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--fg);
  z-index: 2;
}

.slide-grid-btn svg {
  width: 100%;
  height: 100%;
}

/* index gallery (films/photographs landing) */
.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  max-width: 1200px;
}

.thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  transition: opacity 0.2s ease;
}

.thumb-label {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--fg);
}

.thumb-grid a:hover .thumb { opacity: 0.85; }
.thumb-grid a:hover { opacity: 1; }

/* project / collection page */
.project { max-width: 1200px; }

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.project-meta h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--fg-strong);
}

.project-meta p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-wrap {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-bottom: 32px;
}

.video-wrap iframe,
.video-wrap .placeholder { width: 100%; height: 100%; border: 0; }

.video-wrap .film-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.gallery.two-col { grid-template-columns: 1fr 1fr; }

.gallery .frame {
  aspect-ratio: 3 / 2;
  width: 100%;
}

.project-description {
  max-width: 640px;
  margin: 40px 0;
  font-size: 14px;
  line-height: 1.7;
}

/* info page */
.info-block {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  max-width: 1000px;
}

.portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  display: block;
}

.bio h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--fg-strong);
}

.bio h2 {
  font-family: var(--font-menu);
  font-size: 12px;
  font-weight: 700;
  margin: 28px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-strong);
}

.bio p { margin: 0 0 12px; line-height: 1.7; }

.contact-list { display: flex; gap: 18px; }
.contact-list a { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* placeholder block */
.placeholder {
  background: var(--placeholder-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --pad: 20px; --gap: 16px; }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 20px;
    border-bottom: 1px solid var(--line);
  }

  .brand { margin-bottom: 24px; font-size: 20px; }

  .side-nav > ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 22px;
  }

  .side-nav .submenu {
    width: 100%;
    padding-left: 12px;
  }

  .side-footer { margin-top: 20px; }

  .content { padding: 24px var(--pad); }

  .info-block { grid-template-columns: 1fr; gap: 24px; }
  .gallery.two-col { grid-template-columns: 1fr; }
}
