:root {
  --mc-header-height: 28px;
  --mc-strip-height: 120px;
  --mc-gap: 5px;
  --mc-bg: #fff;
  --mc-fg: #000;
  --mc-header-bg: #000;
  --mc-header-fg: #fff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-width: 0;
  background: var(--mc-bg);
  color: var(--mc-fg);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  font-size: 14px;
  line-height: 1.4;
}

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

.site-header {
  min-height: var(--mc-header-height);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  background: var(--mc-header-bg);
  color: var(--mc-header-fg);
  overflow: hidden;
}

.site-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.site-brand img {
  display: block;
  width: auto;
  max-height: 16px;
}

.site-nav {
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.site-nav a:link,
.site-nav a:visited,
.site-nav a:hover,
.site-nav a:active {
  display: block;
  padding: 2px 4px 0;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  font-size: 12px;
  line-height: 22px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Home / intro slideshow */
.home-page {
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.home-shell {
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.intro-slideshow {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.intro-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

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

.intro-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.intro-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #fff;
  transform: scale(1.2);
  transform-origin: center center;
}

@media (max-width: 900px) {
  .intro-slide img {
    object-fit: contain;
    transform: scale(1);
  }
}

/* Editorial / portfolio */
.portfolio-page {
  height: 100svh;
  overflow: hidden;
  background: #fff;
}

.portfolio-shell {
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) var(--mc-strip-height);
  background: #fff;
}

.portfolio-main {
  min-height: 0;
  overflow: auto;
  padding: var(--mc-gap);
  background: #fff;
  overscroll-behavior: contain;
}

.gallery-status {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: #666;
  font-size: 13px;
}

.gallery-grid {
  --gallery-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), minmax(0, auto));
  justify-content: center;
  align-content: start;
  gap: var(--mc-gap);
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.gallery-item {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(31vw, 720px);
}

/* Equal-tile mode for 6-image sets: cleaner spacing, same tile size, slightly more dramatic crop */
.gallery-grid[data-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1080px, 100%);
}

.gallery-grid[data-count="6"] .gallery-item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #fff;
}

.gallery-grid[data-count="6"] .gallery-item img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.series-strip {
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 0;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.series-list {
  display: flex;
  align-items: flex-start;
  gap: var(--mc-gap);
  width: max-content;
  min-width: 100%;
  height: 100%;
  padding: var(--mc-gap);
}

.series-thumb {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 90px;
  opacity: 0.68;
  border: 0;
  outline: 0;
  text-decoration: none;
  transition: opacity 120ms ease;
}

.series-thumb:hover,
.series-thumb:focus-visible,
.series-thumb.is-active {
  opacity: 1;
}

.series-thumb img {
  display: block;
  width: auto;
  height: 90px;
  max-width: none;
}

/* Native lightbox */
.mc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(248, 246, 243, 0.98);
}

.mc-lightbox.is-open { display: block; }

.mc-lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px 48px 34px;
  touch-action: pan-y;
}

.mc-lightbox-image {
  display: block;
  max-width: 97vw;
  max-height: 94svh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.mc-lightbox-close,
.mc-lightbox-prev,
.mc-lightbox-next {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(248, 246, 243, 0.98);
  color: #111;
  border: 0;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
}

.mc-lightbox-close {
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  font-size: 26px;
  line-height: 40px;
}

.mc-lightbox-prev,
.mc-lightbox-next {
  top: 50%;
  width: 54px;
  height: 78px;
  margin-top: -39px;
  font-size: 40px;
}

.mc-lightbox-prev { left: 10px; }
.mc-lightbox-next { right: 10px; }

.mc-lightbox-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  color: #555;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .gallery-grid { --gallery-columns: 2 !important; width: 100%; }
  .gallery-item img { max-width: calc(50vw - 12px); }

  .gallery-grid[data-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .gallery-grid[data-count="6"] .gallery-item img {
    max-width: none;
  }
}

@media (max-width: 620px) {
  :root { --mc-strip-height: 108px; }

  .site-header {
    gap: 6px;
    padding-right: 0;
  }

  .site-brand img { max-height: 15px; }
  .site-nav a { padding-left: 5px; padding-right: 5px; }

  .gallery-grid {
    --gallery-columns: 1 !important;
    width: 100%;
  }

  .gallery-item img {
    max-width: calc(100vw - 10px);
    margin-inline: auto;
  }

  .gallery-grid[data-count="6"] {
    grid-template-columns: 1fr;
  }

  .gallery-grid[data-count="6"] .gallery-item img {
    max-width: none;
    margin-inline: 0;
  }

  .series-thumb,
  .series-thumb img { height: 78px; }

  .mc-lightbox-stage { padding: 38px 12px 34px; }
  .mc-lightbox-prev,
  .mc-lightbox-next {
    top: auto;
    bottom: 6px;
    width: 42px;
    height: 42px;
    margin: 0;
  }
  .mc-lightbox-prev { left: 8px; }
  .mc-lightbox-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-slide,
  .series-thumb { transition: none; }
}


/* Editorial desktop fine-tuning v0.7:
   a little more breathing room below the black header,
   without changing tile size, crop or spacing between tiles. */
@media (min-width: 901px) {
  .portfolio-main {
    padding-top: 12px;
  }
}


/* Lightbox fine-tuning v0.8: larger image, lighter background, clearer controls */


/* Lightbox controls v0.9:
   controls blend into the lightbox background so only the symbols remain visible. */
.mc-lightbox-close:hover,
.mc-lightbox-prev:hover,
.mc-lightbox-next:hover,
.mc-lightbox-close:focus-visible,
.mc-lightbox-prev:focus-visible,
.mc-lightbox-next:focus-visible {
  background: rgba(248, 246, 243, 0.98);
}


/* Editorial series navigation v1.0
   Large, quiet left/right controls for effortless series browsing on desktop. */
.mc-series-nav {
  position: fixed;
  z-index: 120;
  top: calc(var(--mc-header-height) + ((100svh - var(--mc-header-height) - var(--mc-strip-height)) / 2));
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 50px;
  height: 78px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(0, 0, 0, 0.74);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 42px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.64;
  transition: opacity 140ms ease, background-color 140ms ease, color 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.mc-series-prev { left: 24px; }
.mc-series-next { right: 30px; }

.mc-series-nav:hover,
.mc-series-nav:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.94);
  color: #000;
  outline: none;
}

.mc-series-nav:disabled {
  opacity: 0.14;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 900px) {
  .mc-series-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-series-nav { transition: none; }
}

/* Mobile / tablet usability patch v1.0
   Scope: <= 900px only. Desktop remains unchanged.
   Goals: complete visible navigation, reliable touch scrolling,
   compact portfolio overview, cleaner lightbox on small screens. */
@media (max-width: 900px) {
  .site-header {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    gap: 0;
    padding: 3px 8px 4px;
    overflow: visible;
  }

  .site-brand {
    width: 100%;
    min-height: 21px;
  }

  .site-brand img {
    max-height: 15px;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    overflow: visible;
    white-space: normal;
  }

  .site-nav ul {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 10px;
    row-gap: 0;
  }

  .site-nav a,
  .site-nav a:link,
  .site-nav a:visited,
  .site-nav a:hover,
  .site-nav a:active {
    padding: 0;
    font-size: 13px;
    line-height: 22px;
  }

  .portfolio-main {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: auto;
  }

  .series-strip {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .mc-lightbox {
    background: rgb(248, 246, 243);
  }

  .mc-lightbox-close,
  .mc-lightbox-prev,
  .mc-lightbox-next {
    background: rgb(248, 246, 243);
  }
}

/* Phones: keep the portfolio as an overview instead of one huge image per row. */
@media (max-width: 620px) {
  :root { --mc-strip-height: 104px; }

  .gallery-grid,
  .gallery-grid[data-count="6"] {
    --gallery-columns: 2 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .gallery-grid[data-count="1"] {
    --gallery-columns: 1 !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .gallery-grid[data-count="2"] {
    --gallery-columns: 2 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .gallery-grid:not([data-count="6"]) .gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0;
  }

  .series-thumb,
  .series-thumb img {
    height: 82px;
  }

  .mc-lightbox-stage {
    padding: 48px 10px 64px;
  }

  .mc-lightbox-image {
    max-width: calc(100vw - 20px);
    max-height: calc(100svh - 118px);
  }
}

/* Short landscape phone screens: preserve vertical room and keep controls usable. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  :root { --mc-strip-height: 90px; }

  .site-header {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .site-brand {
    width: auto;
    min-height: 20px;
    margin-right: 14px;
  }

  .site-nav {
    width: auto;
    flex: 1 1 auto;
  }

  .site-nav ul {
    justify-content: flex-end;
    flex-wrap: nowrap;
    column-gap: 7px;
  }

  .site-nav a,
  .site-nav a:link,
  .site-nav a:visited,
  .site-nav a:hover,
  .site-nav a:active {
    font-size: 12px;
    line-height: 22px;
  }

  .series-thumb,
  .series-thumb img {
    height: 68px;
  }

  .mc-lightbox-stage {
    padding: 8px 62px 8px;
  }

  .mc-lightbox-image {
    max-width: calc(100vw - 132px);
    max-height: calc(100svh - 16px);
  }

  .mc-lightbox-prev,
  .mc-lightbox-next {
    top: 50%;
    bottom: auto;
    width: 48px;
    height: 64px;
    margin-top: -32px;
  }

  .mc-lightbox-prev { left: 6px; }
  .mc-lightbox-next { right: 6px; }
}

/* Mobile / tablet usability patch v1.1
   Tablet portrait keeps the same obvious previous/next series controls as desktop.
   Phones stay uncluttered and continue to use the bottom series strip. */
@media (min-width: 621px) and (max-width: 900px) {
  .mc-series-nav {
    display: grid;
    top: calc(var(--mc-header-height) + ((100svh - var(--mc-header-height) - var(--mc-strip-height)) / 2));
    width: 44px;
    height: 68px;
    font-size: 36px;
    background: rgba(255, 255, 255, 0.78);
    opacity: 0.72;
  }

  .mc-series-prev { left: 8px; }
  .mc-series-next { right: 8px; }
}


/* Mobile / tablet lightbox exit fix v1.2
   Larger touch target and explicit touch behavior for iPad/iPhone browsers. */
@media (max-width: 900px) {
  .mc-lightbox-close {
    top: 8px;
    right: 8px;
    z-index: 30;
    width: 58px;
    height: 58px;
    font-size: 34px;
    line-height: 58px;
    touch-action: manipulation;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
  }

  .mc-lightbox-prev,
  .mc-lightbox-next {
    z-index: 20;
    touch-action: manipulation;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
}
\n\n/* Mobile / tablet lightbox exit fix v1.3\n   Keep the close control inside Safari's *visible* viewport even after zoom,\n   browser-bar changes or orientation changes. JS supplies the live top/left. */\n@media (max-width: 900px) {\n  .mc-lightbox-close {\n    position: fixed !important;\n    z-index: 2147483647 !important;\n    width: 62px;\n    height: 62px;\n    line-height: 62px;\n    font-size: 36px;\n    background: rgba(248, 246, 243, 0.96);\n    color: #111;\n    box-shadow: 0 1px 8px rgba(0,0,0,0.08);\n  }\n}\n
/* Mobile / tablet lightbox sizing v1.4
   iPad/tablet portrait: keep enlarged images large but not edge-to-edge.
   This leaves a clear frame around the image and keeps controls obvious. */
@media (min-width: 621px) and (max-width: 900px) and (orientation: portrait) {
  .mc-lightbox-stage {
    padding: 72px 56px 64px;
  }

  .mc-lightbox-image {
    max-width: 82vw !important;
    max-height: 78svh !important;
    width: auto;
    height: auto;
  }
}

/* Mobile / tablet lightbox close visual cleanup v1.6
   Keep a comfortable 48px touch target, but remove the visible white box so
   the close control no longer appears to intrude into the photograph. */
@media (max-width: 900px) {
  .mc-lightbox-close {
    width: 48px !important;
    height: 48px !important;
    line-height: 48px !important;
    font-size: 32px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111 !important;
  }
}
