/* ==========================================================================
   Shared foundation — design tokens, reset, sidebar, lightbox.
   Loaded by index.html and photography.html. Page-specific styles stay
   inline in their own page.
   ========================================================================== */

:root {
  --bg: #f9f8f5;
  --text: #111110;
  --muted: #888880;
  --border: #e0ddd6;
  --accent: #ff3d00;
  --surface: #f2f0eb;
  --font: "Space Grotesk", sans-serif;
  --mono: "Space Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: crosshair;
}
a,
button {
  cursor: crosshair;
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

/* Layout */
#layout {
  min-height: 100vh;
}
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  background: var(--bg);
  z-index: 100;
}
#main {
  margin-left: 220px;
  width: calc(100% - 220px);
  min-height: 100vh;
}

/* Sidebar pieces */
.sidebar-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 3rem;
  display: block;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
}
.nav-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  padding: 0.375rem 0;
  color: var(--muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.active {
  color: var(--accent);
}
.nav-link.active::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.status-text {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
}
.socials {
  display: flex;
  gap: 1rem;
}
.socials a {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  transition: color 0.15s;
}
.socials a:hover {
  color: var(--text);
}

/* Sections */
section {
  border-bottom: 1px solid var(--border);
}
.section-pad {
  padding: 5rem 3.5rem;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Lightbox / zoom modal */
.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
}
.zoom-modal.open {
  display: flex;
}
.zoom-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.zoom-modal img {
  width: min(92vw, 1400px);
  height: min(86vh, 1000px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease;
  cursor: grab;
}
.zoom-modal.has-caption img {
  height: min(72vh, 860px);
}
.zoom-modal img.dragging {
  cursor: grabbing;
}

/* Lightbox caption */
.zoom-caption {
  width: min(92vw, 720px);
  max-width: 92vw;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 0.875rem;
}
.zoom-caption-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.zoom-caption-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.zoom-caption-count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.zoom-caption-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.zoom-caption-desc {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
}

/* Lightbox prev/next */
.zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(17, 17, 16, 0.55);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.zoom-nav:hover {
  border-color: #ffffff;
  background: rgba(17, 17, 16, 0.85);
}
.zoom-nav.prev {
  left: 1.25rem;
}
.zoom-nav.next {
  right: 1.25rem;
}
.zoom-modal-toolbar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}
.zoom-modal-btn {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(17, 17, 16, 0.6);
  color: #ffffff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.zoom-modal-btn:hover {
  border-color: #ffffff;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-d1 {
  transition-delay: 0.06s;
}
.reveal-d2 {
  transition-delay: 0.12s;
}
.reveal-d3 {
  transition-delay: 0.18s;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
}

/* Responsive — sidebar collapses to a horizontal bar */
@media (max-width: 860px) {
  #sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-name {
    margin-bottom: 0;
    margin-right: 1.5rem;
  }
  .nav-list {
    flex-direction: row;
    gap: 1rem;
    flex: 1;
  }
  .nav-link {
    padding: 0;
  }
  .nav-link.active::before {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  #main {
    margin-left: 0;
    width: 100%;
  }
  .section-pad {
    padding: 3rem 1.25rem;
  }

  .zoom-nav {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.2rem;
  }
  .zoom-nav.prev {
    left: 0.4rem;
  }
  .zoom-nav.next {
    right: 0.4rem;
  }
  .zoom-modal.has-caption img {
    height: min(56vh, 520px);
  }
  .zoom-caption {
    width: 92vw;
  }
}
