    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      --gap: 20px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
      background: #fff;
      color: #000;
      line-height: 1.4;
      overflow-x: hidden; /* Prevent horizontal scroll */
      /* Grid Background */
      background-size: var(--gap) var(--gap);
      background-image:
        linear-gradient(to right, #F6F6F8 1px, transparent 1px),
        linear-gradient(to bottom, #F2F2F4 1px, transparent 1px);
      background-attachment: fixed;
    }
    nav {
      position: fixed;
      padding: var(--gap);
      width: 100%;
      z-index: 4;
      height: calc(24px + var(--gap) * 2);
      display: flex;
      gap: calc(var(--gap) * 2);
    }
    nav > * {
      /* border: 1px solid black; Debug */
    }
    .logo {
      flex: 0 0 auto;
      height: 100%;
    }
    nav svg {
      display: block;
      fill: #EF3D30;
      height: 100%;
      width: auto; /* Safari fix: ensures intrinsic aspect ratio is respected */
    }
    .lab {
      flex: 1;
      display: flex;
      min-width: 0;
    }
    .lab svg:nth-child(1),
    .lab svg:nth-child(3),
    .lab svg:nth-child(4) {
      flex: 0 0 auto;
    }
    .lab svg:nth-child(2) {
      flex: 1 1 auto;
      width: 100%;
      /* Close gap between SVG parts */
      margin-left: -1px;
      margin-right: -1px;
    }
    .nav-blur-layers {
      position: absolute;
      pointer-events: none;
      top: 0;
      left: 0;
      right: 0;
      bottom: -80px;
      z-index: -1;
    }
    .blur-layer-1 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(0.140625px);
      -webkit-backdrop-filter: blur(0.140625px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 37.5%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 37.5%);
      pointer-events: none;
    }

    .blur-layer-2 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(0.28125px);
      -webkit-backdrop-filter: blur(0.28125px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 0) 50%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 0) 50%);
      pointer-events: none;
    }

    .blur-layer-3 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(0.5625px);
      -webkit-backdrop-filter: blur(0.5625px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 62.5%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 62.5%);
      pointer-events: none;
    }

    .blur-layer-4 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(1.125px);
      -webkit-backdrop-filter: blur(1.125px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 0) 75%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 0) 75%);
      pointer-events: none;
    }

    .blur-layer-5 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(2.25px);
      -webkit-backdrop-filter: blur(2.25px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 87.5%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 87.5%);
      pointer-events: none;
    }

    .blur-layer-6 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(4.5px);
      -webkit-backdrop-filter: blur(4.5px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 0) 100%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 0) 100%);
      pointer-events: none;
    }

    .blur-layer-7 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(9px);
      -webkit-backdrop-filter: blur(9px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 1) 100%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 1) 100%);
      pointer-events: none;
    }

    .blur-layer-8 {
      position: absolute;
      inset: 0;
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 87.5%, rgba(0, 0, 0, 1) 100%);
      -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 87.5%, rgba(0, 0, 0, 1) 100%);
      pointer-events: none;
    }
    main {
      padding: var(--gap);
    }
    .gallery {
      position: relative;
      width: 100%;
      margin-top: 15vh;
    }
    .gallery-item {
      position: absolute;
      overflow: hidden;
      box-sizing: border-box;
      cursor: pointer; /* Clickable */
      transition: none; /* No default transition on transforms */
    }
    .gallery-item.animating {
      transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: transform;
    }
    .gallery-item.animating.closing {
      transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    }
    .gallery-item img,
    .gallery-item video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .gallery-item-info {
      padding-top: 16px;
      padding-bottom: 70%;
      font-family: 'Courier New', Courier, monospace;
      font-size: 10px;
      letter-spacing: 0.02em;
      line-height: 1.2;
      text-transform: uppercase;
      color: #000;
    }
    .gallery-item-info span {
      display: inline-block;
      transform: scaleY(110%) scaleX(95%);
      transform-origin: top left;
      text-stroke: 0.4px #000;
      -webkit-text-stroke: 0.4px #000;
    }
    .gallery-item-separator {
      color: #999;
      margin: 0 2px;
    }

    .mobile {
      display: none;
    }

    /* Lightbox Styles */
    #lightbox {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 3;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0s linear 0.5s; /* Delay hiding to allow JS animation */
      pointer-events: none;
    }
    #lightbox.active {
      opacity: 1;
      visibility: visible;
      transition: opacity 0.3s ease, visibility 0s linear 0s;
      pointer-events: auto;
    }
    .lightbox-backdrop {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    .lightbox-media-container {
      position: relative;
      z-index: 2;
      /* Dimensions controlled by JS animation */
    }
    .lightbox-footer {
      position: absolute;
      display: flex;
      justify-content: space-between;
      align-items: center;
      bottom: calc(var(--gap) * 1.2);
      left: 0;
      right: 0;
      margin: 0 auto;
      width: calc(100% - var(--gap) * 2);
      max-width: 800px;
      padding: 0 var(--gap);
      background: rgba(0, 0, 0, 0.05);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-radius: 10px;
      z-index: 2;
      opacity: 0;
      transform: translateY(150%);
      transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    }
    @keyframes blink {
      0%, 33%, 66% { opacity: 0; }
      16%, 50%, 100% { opacity: 1; }
    }
    #lightbox.active .lightbox-footer {
      transform: translateY(0);
      opacity: 1;
      transition: transform 0.6s .1s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .lightbox-footer-item {
      padding: calc(var(--gap) * 0.8) 0;
      border: none;
      opacity: 0;
      text-decoration: none;
    }
    #lightbox.active .lightbox-footer-item {
      animation: blink 0.3s steps(1) 0.3s forwards;
    }
    .footer-title[href]::after {
      content: '';
      display: inline-block;
      width: 12px;
      height: 12px;
      transform: translateY(30%);
      background-image: url("data:image/svg+xml, %3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17L17 7' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 7H17V17' stroke='black' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-size: contain;
      background-repeat: no-repeat;
    }


    @media (max-width: 768px) {
      .desktop {
        display: none;
      }
      .mobile {
        display: block;
      }
      nav {
        height: calc(16px + var(--gap) * 2)
      }
      .lab svg:nth-child(2) {
         /* Mobile path might need different stretching or just stick to desktop behavior */
      }
      .gallery-item-info {
        /* padding-bottom: 200%; */
      }
      .gallery-item-info span:not(:first-of-type) {
        display: none;
      }
    }
