* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #000;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  padding: 40px 53px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar.inverted {
  background: #000;
  border-right: 1px solid #1f1f1f;
}

.sidebar h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 60px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.sidebar.inverted h1 {
  color: #fff;
}

.sidebar.bloom-disabled .bloom-orb {
  opacity: 0 !important;
  pointer-events: none;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar nav a {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  transition: opacity 0.2s, color 0.3s ease;
  cursor: pointer;
}

.sidebar.inverted nav a {
  color: #fff;
}

.sidebar nav a:hover {
  opacity: 0.6;
}

.sidebar nav a.active {
  font-weight: 700;
}

.sidebar .social {
  margin-top: 20px;
  display: flex;
  gap: 16px;
}

.sidebar .social a {
  color: #000;
  transition: opacity 0.2s, filter 0.3s ease;
}

.sidebar.inverted .social a {
  filter: invert(1);
}

.sidebar .social a:hover {
  opacity: 0.6;
}

.sidebar .social svg {
  width: 22px;
  height: 22px;
}

.sidebar .signature {
  margin-top: 40px;
  max-width: 140px;
  height: auto;
  opacity: 0.9;
  transition: filter 0.3s ease;
}

.sidebar.inverted .signature {
  filter: invert(1);
}

.sidebar .copyright {
  font-size: 12px;
  color: #000;
  margin-top: auto;
  margin-left: 5px;
  transition: color 0.3s ease;
}

.sidebar.inverted .copyright {
  color: #fff;
}

/* Main content */
.main {
  margin-left: 280px;
  flex: 1;
  padding: 60px 60px;
}

.mobile-close {
  display: none;
}

/* Photo grid */
#grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grid-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.grid-item {
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.grid-item:hover img {
  transform: scale(1.02);
}

.footer {
  margin-top: 80px;
  padding: 40px 0;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  z-index: 1000;
  overflow: hidden;
}

.lightbox.active {
  display: block;
}

.lb-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

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

.lb-slide img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.lb-btn {
  position: fixed;
  background: none;
  border: none;
  color: #000;
  font-size: 32px;
  cursor: pointer;
  padding: 20px;
  z-index: 10;
  pointer-events: auto;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.lb-btn:hover {
  opacity: 0.7;
}

.lb-close {
  top: 20px;
  right: 30px;
  color: #000;
}

.lb-close::before {
  content: "✕";
}

.lb-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev::before {
  content: '';
  display: block;
  width: 16px;
  height: 32px;
  background-image: url('chevron-left.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.lb-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next::before {
  content: '';
  display: block;
  width: 16px;
  height: 32px;
  background-image: url('chevron-right.svg');
  background-size: contain;
  background-repeat: no-repeat;
}

.lb-dots {
  display: none;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    padding: 30px 40px;
  }

  .main {
    margin-left: 220px;
    padding: 30px 40px;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: 100vh;
    border-right: none;
    padding: 30px 30px 30px 30px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar .copyright {
    margin-top: auto;
    margin-bottom: 20px;
    flex-shrink: 0;
    margin-left: 5px;
  }

  .sidebar h1 {
    margin-bottom: 40px;
  }

  .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .sidebar nav a {
    font-size: 18px;
  }

  .sidebar .signature {
    margin-top: 40px;
    max-width: 140px;
  }

  .main {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .main.active {
    display: block;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1001;
  }

  .mobile-header-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 300;
    color: #000;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }

  .mobile-close::before {
    content: "✕";
  }

  #grid {
    padding: 20px;
    gap: 6px;
    width: 100%;
    overflow: hidden;
  }

  .grid-row {
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
  }

  .grid-item {
    flex-shrink: 1;
  }

  .lb-prev,
  .lb-next,
  .lb-close {
    display: none;
  }

  .lb-dots {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
  }

  .lb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s;
  }

  .lb-dot.active {
    background: #000;
  }
}
