/* ---------- Reset & base ---------- */
:root {
  --color-bg: #fdfdfd;
  --color-bg-rgb: 253, 253, 253;
  --color-text: #111111;
}

* {
  box-sizing: border-box;
  touch-action: manipulation; /* disables double-tap-to-zoom site-wide, keeps pinch-zoom and scrolling */
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Inclusive Sans", sans-serif;
  font-style: italic;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-style: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* The hidden attribute must always win over other display rules below,
   otherwise overlays (contact, lightbox) can get stuck visible on load. */
[hidden] {
  display: none !important;
}

/* ---------- Top nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
  font-size: 15px;
  background: transparent;
  pointer-events: none; /* let clicks pass except on links */
}

.site-nav > * {
  pointer-events: auto;
}

.logo {
  font-size: 15px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 15px;
}

.nav-link--button {
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
  position: fixed;
  bottom: 20px;
  right: 40px;
  z-index: 90;
  font-size: 12px;
  color: var(--color-text);
  background: transparent;
}

/* ---------- Views ---------- */
.view {
  min-height: 100vh;
  width: 100%;
}

/* ---------- Home: single-image slideshow ---------- */
.view-home {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 60px 70px;
}

.slide-figure {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-figure img {
  max-height: 100%;
  max-width: 60vw;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: ew-resize;
  user-select: none;
}

.slide-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: ew-resize;
  z-index: 5;
  touch-action: manipulation;
}

.slide-zone--prev {
  left: 0;
}

.slide-zone--next {
  right: 0;
}

/* ---------- Index: masonry-style grid ---------- */
.view-index {
  padding: 110px 20px 80px;
}

.index-grid {
  display: flex;
  gap: 6px;
}

.index-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}

.index-grid img {
  width: 100%;
  height: auto;
  cursor: pointer;
}

@media (max-width: 860px) {
  .index-grid {
    gap: 4px;
  }
  .index-column {
    gap: 4px;
  }
  .view-index {
    padding: 90px 8px 70px;
  }
}

/* ---------- Lightbox overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox img {
  max-width: 82vw;
  max-height: 86vh;
  object-fit: contain;
}

.overlay-close {
  position: absolute;
  top: 28px;
  right: 40px;
  z-index: 210;
}

/* Reuses .slide-zone from the homepage so the enlarged view has the exact
   same click-to-navigate behavior: click left/right half, ew-resize cursor. */
#lightbox .slide-zone {
  z-index: 5;
}

@media (max-width: 640px) {
  .overlay-close {
    top: 20px;
    right: 20px;
  }
}

/* ---------- Contact overlay ---------- */
.overlay--contact {
  background: transparent;
  align-items: flex-start;
  justify-content: flex-start;
  display: block;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(var(--color-bg-rgb), 0.8);
}

.contact-panel {
  position: relative;
  z-index: 210;
  padding: 28px 40px;
}

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.logo--static {
  font-size: 15px;
}

.contact-text {
  font-size: 15px;
  margin: 6px 0;
}

/* ---------- Small screens: nav & general spacing ---------- */
@media (max-width: 640px) {
  .site-nav {
    padding: 20px 20px;
  }
  .site-footer {
    position: static;
    text-align: right;
    padding: 24px 20px 32px;
    bottom: auto;
  }
  .slide-stage {
    padding: 90px 24px 60px;
  }
  .slide-figure img {
    max-width: 88vw;
  }
  /* Enlarged image view uses the same padding/framing as the homepage
     slideshow, so a photo looks the same size and position in both. */
  #lightbox {
    padding: 90px 24px 60px;
  }
  #lightbox img {
    max-width: 88vw;
    max-height: 100%;
  }
  .contact-panel {
    padding: 20px 20px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
