/* ==========================================
   Password Gate
   ========================================== */
#passwordGate {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#passwordGate.is-hidden {
  display: none;
}

#passwordForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gate-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.02em;
}

#passwordInput {
  background: none;
  border: none;
  border-bottom: 1px solid #333;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  width: 140px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

#passwordInput::placeholder {
  color: #444;
}

#passwordInput:focus {
  border-color: #fff;
}

.gate-error {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  color: #888;
  min-height: 1em;
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #000;
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  width: 100%;
}

/* ==========================================
   Typography
   ========================================== */

/* Base paragraph */
p {
  line-height: 1.7;
}

/* H1 — site name, role, location, project title, nav links */
.site-name,
.site-role,
.site-location,
.project-title,
.nav-link {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
  color: #fff;
}

/* Overrides */
.project-title {
  text-transform: capitalize;
}

.site-name {
  display: block;
  letter-spacing: 0;
  margin-bottom: 0;
  cursor: pointer;
}


.nav-link {
  transition: color 0.15s;
  width: fit-content;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

/* Breadcrumb */
.project-crumb {
  font-size: 0.775rem;
  color: #444;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1.5;
}

.project-crumb:not(:empty):hover {
  color: #888;
}

/* Thumbnail caption */
.thumb-title {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
  margin-top: 0.65rem;
  letter-spacing: 0;
  text-transform: capitalize;
}

/* About label */
.about-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #444;
  margin-bottom: 2.5rem;
}

/* About body copy */
.about-content p {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.about-content a {
  color: #fff;
  border-bottom: 1px solid #333;
  transition: border-color 0.15s;
}

.about-content a:hover {
  border-color: #fff;
}


/* ==========================================
   Layout
   ========================================== */
.layout {
  display: flex;
  height: 100vh;
}

/* ==========================================
   Sidebar
   ========================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 25%;
  height: 100vh;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  border-right: none;
  z-index: 10;
}

.sidebar-identity {
  flex: 1;
}

/* ==========================================
   Sidebar Nav
   ========================================== */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ==========================================
   Main Panel
   ========================================== */
.main {
  margin-left: 25%;
  width: 75%;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 2rem 3rem;
}

/* ==========================================
   Views
   ========================================== */
.view.is-hidden {
  display: none;
}

/* ==========================================
   Work Grid (Home Page)
   ========================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.thumb {
  cursor: pointer;
}

.thumb-img-wrap {
  overflow: hidden;
  background: #0d0d0d;
  line-height: 0;
}

.thumb-img-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.thumb:hover .thumb-img-wrap img {
  opacity: 0.65;
  transform: scale(calc(var(--thumb-zoom, 1) * 1.03)) translateY(var(--thumb-y, 0px)) !important;
}

/* ==========================================
   About Page
   ========================================== */
.about-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.about-photo-wrap {
  flex: 0 0 auto;
  width: 280px;
}

.about-photo-wrap img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.about-content {
  flex: 1;
  max-width: 520px;
  padding-top: 0.5rem;
}

.about-meta {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.about-meta-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #444;
  margin: 0 0 0.25rem !important;
}

.about-meta-item p {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.7;
  margin: 0 !important;
}

.about-meta-item p strong {
  color: #fff;
  font-weight: 600;
}

.about-meta-clients {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.8;
  margin: 0 !important;
}

.resume-btn {
  display: inline-block;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid #fff;
  background: #fff;
  color: #000 !important;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.resume-btn:hover {
  background: #ddd;
  border-color: #ddd;
  color: #000;
}

.about-territory {
  font-size: 0.8rem;
  color: #444;
  line-height: 1.7;
  margin-top: 2.5rem !important;
}

/* ==========================================
   Project Pages
   ========================================== */

/* Spacer between project title and first image — edit height to adjust gap */
.title-spacer {
  height: 1.75rem;
}
#viewProject:not(.is-hidden) {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

#projectHero img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-images {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin-top: 0.5rem;
}

.image-row {
  display: flex;
  gap: 3.5rem;
}

.image-row img {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-images > img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-images > img.img-full-length {
  aspect-ratio: auto;
  object-fit: fill;
  height: auto;
}

.img-zoom-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
}

.img-zoom-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
}

.project-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0 80px;
  padding: 28px 0 40px 0;
  background: #000;
  color: #fff;
}

.info-description {
  font-size: 15px;
  line-height: 1.8;
  color: #fff;
}

.info-description p {
  margin: 0;
}

.info-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-right p {
  font-size: 15px;
  line-height: 1.7;
  color: #fff;
  margin: 0;
}

/* ==========================================
   Lightbox
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.is-hidden {
  display: none;
}

.lightbox-frame {
  width: 75vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-frame img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.5rem;
  opacity: 0.5;
  transition: opacity 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev::before,
.lightbox-next::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.lightbox-prev::before {
  transform: rotate(-135deg);
}

.lightbox-next::before {
  transform: rotate(45deg);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

/* ==========================================
   Scrollbar styling (webkit)
   ========================================== */
.main::-webkit-scrollbar {
  width: 4px;
}

.main::-webkit-scrollbar-track {
  background: #000;
}

.main::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 2px;
}

.main::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* ==========================================
   Nav close button (hidden on desktop)
   ========================================== */
.nav-close {
  display: none;
}

/* ==========================================
   Hamburger (hidden on desktop)
   ========================================== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: absolute;
  top: 1.5rem;
  right: 1.25rem;
}

.hamburger span {
  display: block;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}

/* ==========================================
   Horizontal pan sticky element
   ========================================== */
.hpan-sticky {
  top: 0;
  height: 100vh;
}

@media (max-width: 900px) {
  .hpan-sticky {
    top: 60px;
    height: calc(100vh - 60px);
  }
}

/* ==========================================
   Project Navigation (prev / next)
   ========================================== */
.project-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 80px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.project-nav:hover { opacity: 0.6; }

.project-nav-thumb {
  width: 100px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
}

.project-nav-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.project-nav-arrow {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: #fff;
  margin-left: auto;
}

/* ==========================================
   Responsive — 900px and below
   ========================================== */
@media (max-width: 900px) {
  html, body {
    overflow: auto;
  }

  .layout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 1.25rem 1.25rem 1.25rem;
    border-right: none;
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    background: #000;
    z-index: 50;
  }

  .sidebar-identity {
    flex: none;
  }

  .site-name,
  .site-role,
  .site-location {
    display: block;
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  /* Nav hidden by default, full-screen overlay when open */
  .sidebar-nav {
    display: none;
  }

  .sidebar-nav.is-open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20vh 1.25rem 1.5rem;
    z-index: 40;
    gap: 0;
  }

  .nav-close {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .nav-link {
    padding: 0.15rem 0;
  }

  /* Keep identity text above the overlay */
  .sidebar-identity {
    position: relative;
    z-index: 51;
  }

  .main {
    margin-left: 0;
    width: 100%;
    height: auto;
    overflow-y: visible;
    padding: 1.25rem 1.25rem 4rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .project-info {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
    padding: 1rem 0 2rem;
  }

  .project-images,
  .image-row {
    gap: 1.75rem;
  }

  .image-row {
    flex-direction: column;
  }

  .image-row img {
    width: 100%;
    flex: none;
  }

  .about-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .about-photo-wrap {
    width: 100%;
    max-width: 320px;
  }
}
