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

:root {
  --bg:          #0a0a0a;
  --sidebar-bg:  #000;
  --text:        #e8e8e8;
  --text-muted:  #666;
  --text-active: #fff;
  --hover-bg:    rgba(255,255,255,0.08);
  --font:        'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sidebar-w:   220px;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

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

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

/* =========================================================
   SIDEBAR
   ========================================================= */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 0 24px;
  z-index: 100;
  flex-shrink: 0;
}

#sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 16px;
}

.site-name {
  display: block;
  padding: 0 24px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-active);
}

/* =========================================================
   NAV
   ========================================================= */
#nav {
  display: flex;
  flex-direction: column;
}

.nav-item-wrapper {
  position: relative;
}

.nav-link {
  display: block;
  padding: 9px 24px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 150ms;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text-active);
  border-left: 2px solid var(--text-active);
  padding-left: 22px;
}

/* Submenu */
.submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 250ms ease;
}

.nav-item-wrapper:hover .submenu,
.nav-item-wrapper.submenu-open .submenu {
  max-height: 400px;
}

.submenu-link {
  display: block;
  padding: 7px 24px 7px 36px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 150ms;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.submenu-link:hover {
  color: var(--text);
}

.submenu-link.active {
  color: var(--text-active);
}

/* =========================================================
   FOOTER (inside sidebar)
   ========================================================= */
#site-footer {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.copyright {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-link {
  color: var(--text-muted);
  transition: color 150ms;
  line-height: 0;
}

.social-link:hover {
  color: var(--text-active);
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
#content {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
}

/* =========================================================
   HOME PAGE
   ========================================================= */
.page-home {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-home .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
}

.page-home .hero-name {
  position: absolute;
  bottom: 40px;
  left: 48px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  pointer-events: none;
}

/* Placeholder when no image */
.hero-placeholder {
  width: 100%;
  height: 100%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   GRID PAGES (Projects, People, Commercial)
   ========================================================= */
.page-grid {
  padding: 48px 40px;
}

.grid-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Cover index grid (fixed-ratio tiles, links to subpages) */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

/* Photo grid — left-to-right masonry, natural aspect ratios, lightbox */
.photo-grid {
  display: flex;
  gap: 6px;
}

.photo-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Cover grid item (with overlay) */
.cover-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.cover-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.cover-item:hover img {
  transform: scale(1.03);
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 200ms ease;
  display: flex;
  align-items: flex-end;
}

.cover-item:hover .cover-overlay {
  background: rgba(0,0,0,0.45);
}

.cover-label {
  padding: 0 20px 20px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  opacity: 0;
  transition: opacity 200ms ease;
}

.cover-item:hover .cover-label {
  opacity: 1;
}

/* Placeholder cover tile */
.cover-placeholder {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Photo grid items (lightbox) */
.photo-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-item:hover img {
  opacity: 0.88;
}

/* Placeholder photo tile */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 20px;
  font-weight: 300;
  user-select: none;
}

/* =========================================================
   SUBPAGE HEADER
   ========================================================= */
.subpage-header {
  padding: 48px 40px 28px;
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 150ms;
  margin-bottom: 16px;
}

.subpage-back:hover {
  color: var(--text);
}

.subpage-title {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-active);
}

/* =========================================================
   VIDEO PAGE
   ========================================================= */
.page-video {
  padding: 60px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.video-page-title {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 60px;
  text-align: center;
}

.video-block {
  margin-bottom: 72px;
}

.video-title {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
  text-align: center;
}

/* Single video / iframe */
.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  background: #000;
  border: none;
}

/* Full-width override */
.video-full-width {
  width: 100% !important;
  margin: 0 !important;
}

/* Two videos side by side */
.video-double {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.video-double .video-player {
  height: 60vh;
  flex: none;
}

/* First video is portrait (9:16), second is landscape (16:9) */
.video-double .video-player:first-child {
  height: 62vh;
  width: calc(62vh * 9 / 16);
}

.video-double .video-player:last-child {
  height: 58vh;
  width: calc(58vh * 16 / 9);
}

/* =========================================================
   BIO / CONTACT PAGE
   ========================================================= */
.page-bio {
  padding: 48px 40px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.bio-left {
  flex: 1;
  max-width: 480px;
}

.bio-right {
  flex: 1;
  padding-top: 4px;
}

.bio-portrait {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 36px;
}

.bio-portrait-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a2a2a;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.bio-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
}

.bio-text p + p {
  margin-top: 16px;
}

/* Contact form */
.contact-heading {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #333;
  padding: 8px 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 200ms;
  width: 100%;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--text);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  margin-top: 8px;
  align-self: flex-start;
  padding: 10px 28px;
  background: transparent;
  border: 1px solid #444;
  color: var(--text);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 200ms, color 200ms;
}

.form-submit:hover {
  border-color: var(--text-active);
  color: var(--text-active);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  user-select: none;
  transform-origin: center center;
  image-rendering: auto;
  will-change: unset;
  backface-visibility: visible;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: color 150ms;
  z-index: 1001;
  padding: 8px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-close {
  top: 20px;
  right: 24px;
  font-size: 28px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
}

/* Zoom controls */
.lightbox-zoom-controls {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 12px;
  z-index: 1002;
  background: rgba(0,0,0,0.55);
  padding: 8px 18px;
  border-radius: 20px;
}

.lightbox-zoom-controls.visible {
  display: flex;
}

.zoom-label {
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

#zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  outline: none;
  border-radius: 1px;
  cursor: pointer;
}

#zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

#zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */
#content::-webkit-scrollbar {
  width: 4px;
}
#content::-webkit-scrollbar-track {
  background: transparent;
}
#content::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 2px;
}
#content::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

/* Hidden on desktop */
#mobile-header,
#mobile-overlay,
#mobile-footer {
  display: none;
}

@media (max-width: 768px) {

  /* --- Sidebar: hidden off-screen, slides in when open --- */
  #sidebar {
    transform: translateX(-100%);
    transition: transform 280ms ease;
    z-index: 200;
    width: 260px;
  }

  #sidebar.mobile-open {
    transform: translateX(0);
  }

  /* --- Content: full width, offset for top bar --- */
  #content {
    margin-left: 0;
    padding-top: 52px;
    padding-bottom: 56px; /* room for mobile footer */
    height: calc(100vh - 52px);
  }

  /* --- Mobile header bar --- */
  #mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 20px;
    background: var(--bg);
    z-index: 160;
    border-bottom: 1px solid #181818;
  }

  .mobile-site-name {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-active);
  }

  /* Hamburger button */
  #hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #hamburger-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-active);
    border-radius: 1px;
    transition: transform 220ms ease, opacity 220ms ease;
    transform-origin: center;
  }

  /* Hamburger → X when open */
  #hamburger-btn.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  #hamburger-btn.is-open span:nth-child(2) { opacity: 0; }
  #hamburger-btn.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* --- Backdrop overlay --- */
  #mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
  }

  #mobile-overlay.visible {
    opacity: 1;
    pointer-events: all;
  }

  /* --- Hide desktop footer inside sidebar --- */
  #site-footer {
    display: none;
  }

  /* --- Mobile footer: fixed at bottom --- */
  #mobile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 20px;
    background: var(--bg);
    border-top: 1px solid #181818;
    z-index: 90;
  }

  /* --- 1. Hero: full-width on mobile, anchor to top --- */
  .page-home {
    height: auto;
  }

  .page-home .hero-img {
    height: auto;
    object-fit: initial;
  }

  /* --- 2. Post Malone videos: stack vertically --- */
  .video-double {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .video-double .video-player:first-child {
    height: auto;
    width: 100%;
    aspect-ratio: 9 / 16;
  }

  .video-double .video-player:last-child {
    height: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  /* Video page padding */
  .page-video {
    padding: 32px 16px;
  }

  /* --- 3. Bio/Contact: single column stack --- */
  .page-bio {
    flex-direction: column;
    gap: 28px;
    padding: 24px 16px;
  }

  .bio-left {
    max-width: 100%;
  }

  .bio-right {
    padding-top: 0;
  }

  /* --- 4. No submenus in mobile nav --- */
  .submenu {
    display: none !important;
  }

  /* --- 5. Gallery pages: 2-column, edge to edge --- */
  .page-grid {
    padding: 0;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }

  .subpage-header {
    padding: 16px 16px 12px;
  }
}
