body {
  --layout-pad: clamp(12px, 1.8vw, 28px);
  --layout-gap: clamp(10px, 1.1vw, 20px);
  background:
    radial-gradient(1200px 760px at 16% 83%, rgba(85, 137, 224, 0.86) 0%, rgba(122, 164, 232, 0.54) 42%, rgba(205, 218, 237, 0.2) 72%, rgba(226, 226, 228, 0) 100%),
    linear-gradient(180deg, #e4e4e6 0%, #dcdcdf 100%);
  background-attachment: fixed, fixed;
}

.projects-main {
  padding: 22px 0 60px;
}

.projects-wrap {
  --content-start: clamp(92px, 13vh, 170px);
  --project-name-size: clamp(12px, 1.05vw, 18px);
  --project-info-size: clamp(10px, 0.9vw, 16px);
  width: 100%;
  margin: 0;
  padding: 0 var(--layout-pad);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--layout-gap);
  align-items: start;
}

.index-header {
  padding: 22px var(--layout-pad);
}

.index-header-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--layout-gap);
  align-items: center;
}

.index-header .brand {
  grid-column: 1 / span 2;
  justify-self: end;
  font-size: 31px;
  width: auto;
  text-align: right;
  display: inline-block;
}

.top-menu {
  grid-column: 4 / span 8;
  margin: 0;
  justify-content: flex-start;
  transform: none;
}

.project-menu-toggle {
  display: none;
}

.projects-left {
  grid-column: 1 / span 2;
  position: sticky;
  top: 96px;
  height: calc(100vh - 116px);
  display: flex;
  flex-direction: column;
  padding-top: var(--content-start);
  padding-left: 40px;
}

.project-name-list {
  display: block;
}

.project-name-options {
  display: grid;
  gap: 8px;
  justify-items: end;
}


.project-sidebar-top {
  display: none;
}

.project-name {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: right;
  color: rgba(16, 20, 29, 0.8);
  font-size: var(--project-name-size);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  cursor: pointer;
  width: max-content;
}

.project-name.is-active {
  color: #10141d;
}

.project-name:hover,
.project-name:focus-visible {
  color: rgba(16, 20, 29, 0.92);
}

.project-info {
  margin: 0 0 18px auto;
  color: rgba(16, 20, 29, 0.8);
  padding-bottom: 0;
  text-align: right;
  transform: none;
}

.project-info p {
  margin: 0 0 4px 0;
  font-size: var(--project-info-size);
  font-weight: 400;
  line-height: 1.22;
}

@media (min-width: 1381px) {
  .project-info {
    position: fixed;
    left: calc(var(--layout-pad) + 40px);
    bottom: 224px;
    width: calc(((100vw - (var(--layout-pad) * 2) - (var(--layout-gap) * 11)) / 12 * 2) - 40px);
    margin: 0;
    text-align: right;
    z-index: 14;
  }
}

@media (min-width: 1221px) and (max-width: 1380px) {
  .project-info {
    position: fixed;
    left: calc(var(--layout-pad) + 28px);
    bottom: 224px;
    width: calc(((100vw - (var(--layout-pad) * 2) - (var(--layout-gap) * 11)) / 12 * 3) - 28px);
    margin: 0;
    text-align: right;
    z-index: 14;
  }
}

.projects-right {
  grid-column: 4 / span 8;
  width: 100%;
  min-height: 160vh;
  padding-top: var(--content-start);
  display: flex;
  flex-direction: column;
}

.project-gallery {
  margin-top: 0;
  column-count: 3;
  column-gap: 24px;
  min-width: 0;
}

.project-shot {
  margin: 0 0 24px;
  width: 100%;
  padding: 0 4px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.project-shot.is-animating {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(3px);
}

.project-shot.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity 720ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 720ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 720ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: zoom-in;
}

.project-shot.shape-wide img {
  aspect-ratio: 16 / 10;
}

.project-shot.shape-standard img {
  aspect-ratio: 4 / 3;
}

.project-shot.shape-square img {
  aspect-ratio: 1 / 1;
}

.project-shot.shape-tall img {
  aspect-ratio: 3 / 4;
}

.project-shot.shape-extra-wide img {
  aspect-ratio: 16 / 9;
}

@media (max-width: 1600px) {
  .project-gallery {
    column-count: 3;
  }
}

@media (max-width: 1380px) {
  .projects-wrap {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .projects-left {
    grid-column: 1 / span 3;
    padding-left: 28px;
  }

  .projects-right {
    grid-column: 5 / span 8;
  }

}

@media (max-width: 1220px) {
  .index-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 45;
    padding: 16px;
  }

  .index-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .index-header .brand {
    position: fixed;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 46;
    text-align: left;
  }

  .top-menu {
    position: fixed;
    top: 58px;
    left: 16px;
    right: 16px;
    z-index: 46;
    display: flex;
    gap: 14px;
    justify-content: flex-start;
  }

  .top-menu a {
    font-size: 10px;
  }

  .projects-wrap {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 16px;
    --content-start: 10px;
  }

  .projects-main {
    padding-top: 106px;
  }

  .projects-left {
    grid-column: auto;
    position: static;
    height: auto;
    padding-top: var(--content-start);
    padding-left: 0;
  }

  .project-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 46;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #10141d;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .project-menu-toggle.is-open {
    font-size: 24px;
  }

  .project-name-list {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    padding: 16px 16px 32px;
    background: rgba(228, 228, 230, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: none;
    transform: translateX(102%);
    transition: transform 260ms ease;
  }

  .project-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 81;
    margin-bottom: 0;
  }

  .project-sidebar-brand {
    color: #111318;
    text-decoration: none;
    font-size: 31px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
  }

  .project-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: 11px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #10141d;
    font-size: 28px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
  }

  .project-name-options {
    justify-items: start;
    padding-left: 5px;
    margin-top: 200px; 
    gap: 22px;
  }

  .is-project-menu-open .project-name-list {
    transform: translateX(0);
  }

  .project-name {
    font-size: 15px;
    text-align: left;
  }

  .project-info {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    margin-top: 0;
    margin-left: 0;
    margin-bottom: 16px;
    text-align: left;
    transform: none;
    max-width: none;
  }

  .project-info p {
    font-size: 13px;
  }

  .projects-right {
    grid-column: auto;
    padding-top: 0;
    min-height: auto;
  }

  .project-gallery {
    column-count: 2;
  }
}

@media (max-width: 780px) {
  .projects-main {
    padding: 106px 14px 44px;
  }

  .index-header-inner {
    display: flex;
  }

  .top-menu {
    display: flex;
    top: 54px;
  }

  .project-menu-toggle {
    width: 32px;
    height: 32px;
    font-size: 26px;
  }

  .project-gallery {
    column-count: 2;
    column-gap: 12px;
  }

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

  .project-shot {
    margin: 0 0 14px;
    padding: 0;
  }

  .project-info {
    top: auto;
    left: auto;
    margin-left: 0;
    margin-bottom: 14px;
    text-align: left;
  }

  .project-info p {
    font-size: 13px;
  }

  .project-sidebar-close {
    width: 32px;
    height: 32px;
    font-size: 26px;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 17, 0.9);
  padding: 56px 48px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  width: min(1200px, 90vw);
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ececed;
  padding: 0;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close {
  top: 14px;
  right: 14px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .project-shot.is-animating,
  .project-shot.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
