    :root {
      --bg: #0f1113;
      --panel: #f7f5f2;
      --accent: #c8a97e;
      --text-light: #f0f0f0;
      --text-dark: #1a1a1a;
      --muted: #8b8b8b;
      --radius: 14px;
      --max-width: 1280px;
      --mobile-header-height: 70px;
      --sans: "Inter", system-ui, sans-serif;
      --serif: "Playfair Display", serif;
    }

    /* --- Basic Reset and Font --- */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: var(--sans);
      height: 100vh;
      overflow: hidden;
      background: linear-gradient(to bottom, #f2f4f7, #eff4f8, #ecf5f7, #e9f5f5, #e8f5f2);
    }

    body.loading {
      overflow: hidden;
    }

    /* --- Main Layout Container --- */
    .main-container {
      width: 100%;
      height: 100%;
      transition: opacity 0.5s ease-in-out;
    }


    /* --- Main Content Area --- */
    .content-area {
      width: 100%;
      padding: 80px 1rem 2rem;
      height: 100%;
      position: relative;
      z-index: 0;
      isolation: isolate;
      overflow: hidden;
      box-sizing: border-box;
    }

    #masonry-container {
      position: relative;
      cursor: grab;
      touch-action: pan-x pan-y;
      z-index: 1;
      transform-origin: center center;
    }

    .content-area::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url("/images/logo/logo.png");
      background-repeat: no-repeat;
      background-position: center center;
      background-size: 400px;
      opacity: 0.8;
      z-index: 0;
      pointer-events: none;
    }




    /* --- 4. Masonry Grid Styling --- */

    #masonry-container.dragging {
      cursor: grabbing;
      transition: none;
    }

    .project-item {
      position: absolute;
      border-radius: var(--radius);
      overflow: hidden;
      transition: opacity 0.4s ease-in-out, filter 0.4s ease-in-out, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
      opacity: 0;
      transform: scale(0.8);
      user-select: none;
      /* border: 3px solid rgb(80 144 167); */
      perspective: 800px;
    }

    .project-title-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 37px;
      background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
      transform: translateY(100%);
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      padding-left: 1rem;
      opacity: 0;
      transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
      pointer-events: none;
    }

    .project-item:hover .project-title-overlay {
      transform: translateY(0);
      opacity: 1;
    }

    .project-title-text {
      font-family: 'Chillax', sans-serif;
      font-size: 1rem;
      font-weight: 600;
      color: white;
      margin: 0;
      letter-spacing: -0.02em;
      line-height: 1.2;
      text-align: left;
    }

    #masonry-container.dragging .project-item {
      transition: none;
    }

    body.project-opening .project-item:not(.is-opening) {
      opacity: 0.3 !important;
      filter: grayscale(80%);
    }

    body.project-opening .project-item.is-opening {
      opacity: 0 !important;
    }

    .project-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      will-change: transform;
      transform-origin: center;
      transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    /* Fallback if JS is disabled */
    .project-item:hover img {
      transform: scale(1.04);
    }

    .top-glass-panel {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 80px;
      background-color: rgba(255, 255, 255, 0.25);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.18);
      z-index: 5;
    }

    /* --- 5. Project Page View (NEW EDITORIAL LAYOUT) --- */
    .project-page-container {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 100;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.5s ease-in-out;
      overflow-y: auto;
      background-color: var(--panel);
    }

    .project-page-container.active {
      opacity: 1;
      pointer-events: auto;
    }

    .project-page-container.active~.mobile-header,
    .project-page-container.active~.mobile-nav-menu {
      display: none;
    }

    @media (max-width: 992px) {

      body:has(.project-page-container.active) .mobile-header,
      body:has(.project-page-container.active) .mobile-nav-menu {
        display: none !important;
      }
    }

    .main-container.page-view-active {
      opacity: 0;
      pointer-events: none;
    }

    .project-page-close-btn {
      position: fixed;
      top: 2rem;
      right: 2.5rem;
      width: 50px;
      height: 50px;
      background-color: rgba(255, 255, 255, 0.7);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      z-index: 10001;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .project-page-close-btn:hover {
      transform: scale(1.1) rotate(90deg);
      background-color: white;
    }

    .project-share-btn {
      position: fixed;
      top: 2rem;
      right: 6rem;
      width: 50px;
      height: 50px;
      background-color: rgba(200, 169, 126, 0.9);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      z-index: 10001;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
      color: white;
    }

    @media (max-width: 992px) {
      .project-page-close-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
      }

      .project-share-btn {
        top: 1.5rem;
        right: 4.5rem;
        width: 40px;
        height: 40px;
      }
    }

    @media (max-width: 480px) {
      .project-page-close-btn {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
      }

      .project-share-btn {
        top: 1rem;
        right: 3.5rem;
        width: 36px;
        height: 36px;
      }
    }

    .project-share-btn:hover {
      transform: scale(1.1);
      background-color: #b8956e;
    }

    .project-page-close-btn::before,
    .project-page-close-btn::after {
      content: "";
      position: absolute;
      width: 24px;
      height: 2px;
      background-color: #333;
      border-radius: 2px;
    }

    .project-page-close-btn::before {
      transform: rotate(45deg);
    }

    .project-page-close-btn::after {
      transform: rotate(-45deg);
    }

    /* --- NEW: Editorial Project Layout --- */
    .project-hero {
      height: 80vh;
      width: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: var(--bg);
      color: var(--text-light);
    }

    #project-25 .project-hero {
      height: 120vh;
    }

    .project-hero-image {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.3;
    }

    .project-hero-content {
      position: relative;
      z-index: 2;
      text-align: center;
      max-width: 900px;
      padding: 2rem;
    }

    .project-hero-content h1 {
      font-family: var(--serif);
      font-size: clamp(2.5rem, 6vw, 5rem);
      line-height: 1.1;
      margin-bottom: 1rem;
    }

    .project-hero-content p {
      font-size: clamp(1rem, 1.5vw, 1.25rem);
      color: var(--muted);
      max-width: 600px;
      margin: 0 auto;
    }

    .project-body {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 5rem;
      max-width: var(--max-width);
      margin: -5rem auto 5rem;
      padding: 0 2rem;
      position: relative;
      align-items: flex-start;
    }

    .project-main-content {
      background-color: #fff;
      padding: 4rem;
      border-radius: var(--radius);
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    }

    .project-main-content h2 {
      font-family: var(--serif);
      font-size: 2.5rem;
      margin-bottom: 1rem;
      color: var(--text-dark);
    }

    .project-main-content p {
      line-height: 1.8;
      margin-bottom: 2rem;
      color: #555;
    }

    .project-gallery {
      margin: 3rem 0;
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 2rem;
      align-items: start;
    }

    .gallery-hero {
      grid-column: 1;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .gallery-hero .gallery-image-wrapper {
      cursor: zoom-in;
      transition: transform 0.2s ease;
    }

    .gallery-supporting {
      grid-column: 2;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .gallery-supporting .gallery-image-wrapper {
      cursor: zoom-in;
      transition: transform 0.2s ease;
    }

    .gallery-image-wrapper:hover {
      transform: scale(1.02);
    }

    .project-gallery img {
      width: 100%;
      height: auto;
      display: block;
    }

    /* Hover cursor hint */
    .hover-cursor {
      position: fixed;
      z-index: 2000;
      pointer-events: none;
      background: rgba(255, 255, 255, 0.92);
      color: #111;
      padding: 6px 10px;
      border-radius: 16px;
      font-size: 12px;
      font-weight: 600;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      transform: translate(-50%, -50%);
      opacity: 0;
      transition: opacity 120ms ease;
    }

    .hover-cursor.visible {
      opacity: 1;
    }

    /* Category Filter Styles */
    .category-filter {
      display: flex;
      gap: 8px;
      padding: 15px 20px;
      justify-content: center;
      flex-wrap: wrap;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      border-radius: 25px;
      margin: 20px auto;
      max-width: 800px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .filter-btn {
      padding: 8px 16px;
      border: 1px solid #ddd;
      background: white;
      color: #333;
      border-radius: 20px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      transition: all 0.2s ease;
      text-transform: capitalize;
      white-space: nowrap;
    }

    .filter-btn:hover {
      background: #f5f5f5;
      border-color: #999;
      transform: translateY(-1px);
    }

    .filter-btn.active {
      background: #333;
      color: white;
      border-color: #333;
    }

    @media (max-width: 768px) {
      .category-filter {
        padding: 12px 15px;
        gap: 6px;
        margin: 15px 10px;
      }

      .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
      }
    }

    /* Gallery hover-ready image styling */
    .gallery-image-wrapper img {
      will-change: transform;
      transform-origin: center;
      transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
      display: block;
      width: 100%;
      height: auto;
    }

    @media (max-width: 992px) {
      .project-gallery {
        grid-template-columns: 3fr 2fr;
        gap: 1.5rem;
      }

      .gallery-supporting {
        gap: 1rem;
      }
    }

    @media (max-width: 768px) {
      .project-gallery {
        grid-template-columns: 1fr;
        gap: 2rem;
      }

      .gallery-hero {
        grid-column: 1;
      }

      .gallery-supporting {
        grid-column: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
      }
    }

    @media (max-width: 480px) {
      .gallery-supporting {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }
    }

    .gallery-image-wrapper:nth-child(5),
    .gallery-image-wrapper:nth-child(6) {
      grid-column: span 1;
      grid-row: span 1;
    }

    @media (max-width: 480px) {
      .project-gallery {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .gallery-image-wrapper:nth-child(1),
      .gallery-image-wrapper:nth-child(2),
      .gallery-image-wrapper:nth-child(3),
      .gallery-image-wrapper:nth-child(4),
      .gallery-image-wrapper:nth-child(5),
      .gallery-image-wrapper:nth-child(6) {
        grid-column: span 1;
        grid-row: span 1;
      }
    }

    .project-quote {
      margin: 4rem auto 0;
      padding-top: 3rem;
      border-top: 1px solid #eee;
      text-align: center;
      max-width: 700px;
    }

    .project-quote p {
      font-family: var(--serif);
      font-style: italic;
      font-weight: 400;
      font-size: clamp(1.25rem, 2vw, 1.75rem);
      line-height: 1.6;
      color: var(--text-dark);
      margin-bottom: 1rem;
    }

    .project-quote footer {
      font-size: 0.9rem;
      color: var(--muted);
    }

    .project-sidebar {
      position: sticky;
      top: 5rem;
      background-color: #fff;
      padding: 2rem;
      border-radius: var(--radius);
      box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    }

    .project-sidebar h2 {
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-size: 1rem;
      color: #bb0101;
      border-bottom: 1px solid #eee;
      padding-bottom: 0.8rem;
      margin-bottom: 1.5rem;
    }

    .project-sidebar h3 {
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      font-size: 0.8rem;
      color: #bb0101;
      border-bottom: 1px solid #eee;
      padding-bottom: 0.8rem;
      margin-bottom: 1.5rem;
    }

    .project-sidebar p {
      margin-bottom: 2rem;
      line-height: 1.6;
      color: darkslategrey;
    }

    .project-sidebar-meta p {
      margin-bottom: 1.5rem;
      font-size: 0.95rem;
    }

    .project-sidebar-meta span {
      display: block;
      font-weight: 600;
      color: #555;
      margin-bottom: 0.25rem;
    }

    /* --- 6. Transition Animation --- */
    .transition-container {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 999;
      opacity: 0;
    }

    .transition-image {
      position: absolute;
      border-radius: 12px;
      object-fit: cover;
      transition: all 0.8s cubic-bezier(0.8, 0, 0.2, 1);
    }

    /* --- NEW: Lightbox Styling --- */
    .lightbox-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.85);
      backdrop-filter: blur(5px);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .lightbox-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    #lightbox-image {
      max-width: 90vw;
      max-height: 90vh;
      object-fit: contain;
      transform: scale(1.1);
      transition: transform 0.2s ease-out;
      cursor: grab;
      touch-action: pan-x pan-y;
    }

    @media (max-width: 768px) {
      #lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
        transform: scale(1);
      }

      .lightbox-close-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
      }
    }

    .lightbox-close-btn {
      position: absolute;
      top: 2rem;
      right: 2.5rem;
      width: 50px;
      height: 50px;
      background-color: rgba(255, 255, 255, 0.2);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 1001;
      /* Make sure it's on top */
    }

    .lightbox-close-btn:hover {
      transform: scale(1.1) rotate(90deg);
      background-color: rgba(255, 255, 255, 0.3);
    }

    .lightbox-close-btn::before,
    .lightbox-close-btn::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 24px;
      height: 2px;
      background-color: #fff;
      border-radius: 2px;
      transform-origin: center;
    }

    .lightbox-close-btn::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .lightbox-close-btn::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

    .project-title {
      color: #db8a8a;
    }

    /* Loading Screen Enhancements */
    .loading-screen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #f4f4f4;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      opacity: 1;
      transition: opacity 0.3s ease-out;
    }

    .loading-screen.hidden {
      opacity: 0;
      pointer-events: none;
    }

    .loading-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2rem;
    }

    .loading-video {
      width: 100%;
      max-width: 500px;
      height: auto;
      border-radius: 8px;
      object-fit: cover;
    }

    /* Loading Progress Bar */
    .loading-progress-container {
      width: 300px;
      height: 4px;
      background-color: rgba(0, 0, 0, 0.1);
      border-radius: 2px;
      overflow: hidden;
      margin-top: 1rem;
    }

    .loading-progress {
      height: 100%;
      background: linear-gradient(90deg, var(--accent) 0%, #d4a574 100%);
      border-radius: 2px;
      width: 0%;
      transition: width 0.3s ease;
    }

    .loading-status {
      font-size: 0.9rem;
      color: #666;
      margin-top: 0.5rem;
      text-align: center;
    }

    /* Image optimization classes */
    .optimized-image {
      will-change: transform;
      backface-visibility: hidden;
      transform: translateZ(0);
      transition: opacity 0.2s ease;
    }

    .image-loading {
      opacity: 1;
    }

    .image-loaded {
      opacity: 1;
      filter: none;
    }



    /* Ultra-fast loading optimizations */
    .project-item {
      contain: layout style paint;
      transform: translateZ(0);
    }

    /* Instant content display */
    .main-container {
      opacity: 1 !important;
      pointer-events: auto !important;
    }

    .loading-text {
      font-family: "Corinthia", cursive;
      font-weight: 700;
      font-style: normal;
      font-size: clamp(3rem, 8vw, 6rem);
      letter-spacing: -0.05em;
      color: #4a4a4a;
    }

    @media (max-width: 768px) {
      .loading-video {
        max-width: 350px;
      }
    }

    @media (max-width: 480px) {
      .loading-video {
        max-width: 280px;
      }
    }

    .mobile-header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: calc(var(--mobile-header-height, 70px) + env(safe-area-inset-top));
      padding-top: env(safe-area-inset-top);
      background: rgba(255, 255, 255, 0.25);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.18);
      display: none;
      align-items: center;
      justify-content: space-between;
      padding: 0 1.5rem;
      z-index: 1001;
    }

    @media (max-width: 992px) {
      .mobile-header {
        display: flex !important;
      }
    }

    .know-about-author-btn {
      background: var(--accent);
      color: white;
      border: none;
      padding: 0.5rem 1rem;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .know-about-author-btn:hover {
      background: #b8956e;
      transform: translateY(-1px);
    }

    .mobile-menu-toggle {
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.5rem;
      position: relative;
      width: 40px;
      height: 40px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .mobile-menu-toggle span {
      display: block;
      width: 20px;
      height: 2px;
      background-color: #4a4a4a;
      position: absolute;
      transition: all 0.3s ease;
      transform-origin: center;
    }

    .mobile-menu-toggle span:nth-child(1) {
      top: 14px;
    }

    .mobile-menu-toggle span:nth-child(2) {
      top: 19px;
    }

    .mobile-menu-toggle span:nth-child(3) {
      top: 24px;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
      top: 19px;
      transform: rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
      top: 19px;
      transform: rotate(-45deg);
    }

    @media (max-width: 992px) {
      .navbar {
        display: none !important;
      }
    }



    .mobile-header-logo {
      height: 4.1rem;
      cursor: pointer;
      width: 5.7rem;
    }

    @media (max-width: 768px) {
      :root {
        --mobile-header-height: 66px;
      }

      .mobile-header {
        padding: 0 1.1rem;
      }

      .mobile-header-logo {
        height: 3.6rem;
        width: 5rem;
      }

      .mobile-header-right {
        gap: 0.7rem;
      }
    }

    @media (max-width: 480px) {
      :root {
        --mobile-header-height: 62px;
      }

      .mobile-header {
        padding: 0 0.9rem;
      }

      .mobile-header-logo {
        height: 3.1rem;
        width: 4.4rem;
      }

      .mobile-menu-toggle {
        width: 36px;
        height: 36px;
      }

      .mobile-menu-toggle span {
        width: 18px;
      }
    }



    .mobile-nav-menu {
      position: fixed;
      top: calc(var(--mobile-header-height, 70px) + env(safe-area-inset-top));
      left: 0;
      width: 100%;
      max-height: calc(100vh - (var(--mobile-header-height, 70px) + env(safe-area-inset-top)));
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.18);
      transform: translateY(-100%);
      transition: transform 0.3s ease;
      z-index: 1000;
      display: none;
      overflow-y: auto;
    }

    @media (max-width: 992px) {
      .mobile-nav-menu {
        display: block !important;
      }
    }

    .mobile-nav-menu.active {
      transform: translateY(0);
    }

    .mobile-nav-menu ul {
      list-style: none;
      margin: 0;
      padding: 1rem 0;
      display: flex;
      flex-direction: column;
      max-height: 100%;
    }

    .mobile-nav-menu ul li a {
      text-decoration: none;
      color: #4a4a4a;
      font-weight: 500;
      font-size: 1rem;
      padding: 1rem 1.5rem;
      display: block;
      transition: all 0.3s ease;
      border-radius: 40px;
    }

    .mobile-nav-menu ul li a:hover,
    .mobile-nav-menu ul li a.active {
      background-color: var(--accent);
      color: white;
    }





    @media (max-width: 992px) {
      .content-area {
        padding: clamp(100px, 12vh, 140px) 1rem 1rem;
      }

      .project-title-text {
        font-size: 0.85rem;
        padding: 6px 10px;
      }

      .project-body {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: -3rem auto 3rem;
        padding: 0 1rem;
      }

      .project-sidebar {
        position: static;
        margin-bottom: 2rem;
        padding: 1.5rem;
      }

      .project-main-content {
        padding: 2rem 1.5rem;
      }

      .project-share-btn {
        top: 1rem;
        right: 4rem;
        width: 40px;
        height: 40px;
      }

      .mobile-header {
        display: flex !important;
      }

      .mobile-nav-menu {
        display: block !important;
      }
    }

    @media (max-width: 768px) {
      .content-area {
        padding: clamp(90px, 10vh, 120px) 0.75rem 1rem;
      }

      .project-title-text {
        font-size: 0.8rem;
        padding: 5px 8px;
      }

      #masonry-container {
        touch-action: pan-y;
        user-select: none;
        transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
      }

      .project-hero {
        height: 60vh;
      }

      .project-hero-content {
        padding: 1rem;
      }

      .project-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
      }

      .gallery-supporting {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
      }

      .swiss-hero-text {
        font-size: clamp(3rem, 10vw, 8rem) !important;
      }

      .category-filter {
        padding: 10px 12px;
        gap: 4px;
        margin: 12px 8px;
      }

      .filter-btn {
        padding: 5px 10px;
        font-size: 11px;
      }
    }

    @media (max-width: 480px) {
      .content-area {
        padding: clamp(80px, 8vh, 100px) 0.5rem 1rem;
      }

      .gallery-supporting {
        grid-template-columns: 1fr;
        gap: 1rem;
      }

      .project-main-content {
        padding: 1.5rem 1rem;
      }

      .project-page-close-btn {
        width: 36px;
        height: 36px;
      }

      .swiss-hero-text {
        font-size: clamp(2.5rem, 8vw, 6rem) !important;
        line-height: 0.9 !important;
      }

      .category-filter {
        padding: 8px 10px;
        gap: 3px;
        margin: 10px 5px;
        flex-direction: column;
        align-items: stretch;
      }

      .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
      }

      .founders-widget {
        bottom: 1rem;
        left: 1rem;
      }

      .founders-content {
        width: 280px;
        padding: 1rem;
      }
    }

    /* Touch and mobile optimizations */
    @media (max-width: 992px) {
      body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        touch-action: manipulation;
      }

      .project-item {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
      }

      .project-item img {
        pointer-events: none;
      }

      #masonry-container {
        -webkit-overflow-scrolling: touch;
      }
    }

    /* Tablet specific optimizations */
    @media (min-width: 768px) and (max-width: 1024px) {
      .content-area {
        padding: clamp(110px, 14vh, 150px) 2rem 2rem;
      }

      .project-item {
        transition: transform 0.2s ease;
      }

      .project-item:hover {
        transform: scale(1.02);
      }

      .swiss-hero-text {
        font-size: clamp(4rem, 8vw, 10rem);
      }
    }

    .sidebar-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(5px);
      z-index: 1003;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    /* Sidebar Close Button */
    .sidebar-close-btn {
      position: fixed;
      top: 2rem;
      right: 2rem;
      width: 50px;
      height: 50px;
      background: rgba(255, 255, 255, 0.9);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      z-index: 1005;
      opacity: 0;
      pointer-events: none;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sidebar-close-btn.active {
      opacity: 1;
      pointer-events: auto;
    }

    .sidebar-close-btn::before,
    .sidebar-close-btn::after {
      content: '';
      position: absolute;
      width: 20px;
      height: 2px;
      background: #333;
    }

    .sidebar-close-btn::before {
      transform: rotate(45deg);
    }

    .sidebar-close-btn::after {
      transform: rotate(-45deg);
    }

    /* Know About Author Button */
    .know-about-author-btn {
      background: rgba(255, 255, 255, 0.8);
      border: 1px solid #4a4a4a;
      border-radius: 20px;
      padding: 0.5rem 1rem;
      font-size: 0.8rem;
      font-weight: 500;
      color: #4a4a4a;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .know-about-author-btn:hover {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }

    .mobile-header {
      justify-content: space-between;
    }

    .mobile-header-right {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    /* Blur effect when sidebar is open */
    body.sidebar-open .content-area,
    body.sidebar-open .mobile-header,
    body.sidebar-open .mobile-nav-menu,
    body.sidebar-open #all-project-pages,
    body.sidebar-open .top-glass-panel {
      filter: blur(3px);
      pointer-events: none;
    }

    body.sidebar-open .sidebar {
      filter: none !important;
      pointer-events: auto !important;
    }

    /* --- 5. Floating Founders Widget --- */
    .founders-widget {
      position: fixed;
      bottom: 2rem;
      left: 2rem;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
      pointer-events: none;
      /* Container passes clicks */
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Hide on loading and Project Page */
    body.loading .founders-widget,
    body:has(.project-page-container.active) .founders-widget {
      opacity: 0;
      pointer-events: none;
      visibility: hidden;
    }

    .founders-pill {
      background: rgba(255, 255, 255, 0.25);
      backdrop-filter: blur(12px) saturate(180%);
      -webkit-backdrop-filter: blur(12px) saturate(180%);
      border: 1px solid rgba(255, 255, 255, 0.4);
      padding: 0.5rem 1rem 0.5rem 0.5rem;
      border-radius: 50px;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      cursor: pointer;
      pointer-events: auto;
      transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      width: fit-content;
    }

    .founders-connector {
      width: 2px;
      height: 16px;
      margin-left: 24px;
      background: linear-gradient(180deg, rgba(200, 169, 126, 0.7), rgba(200, 169, 126, 0.1));
      border-radius: 999px;
      opacity: 0;
      transform: scaleY(0);
      transform-origin: top;
      transition: all 0.3s ease;
      pointer-events: none;
    }

    .founders-intro-pill {
      background: #fffdf9;
      border: 1px solid rgba(200, 169, 126, 0.35);
      padding: 0.45rem 0.95rem;
      border-radius: 10px;
      display: flex;
      align-items: center;
      gap: 0.55rem;
      cursor: pointer;
      pointer-events: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-6px);
      transition: all 0.3s ease;
      box-shadow: 0 8px 24px rgba(200, 169, 126, 0.18);
      width: fit-content;
      position: relative;
      overflow: hidden;
    }

    .founders-intro-pill::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: linear-gradient(90deg, rgba(200, 169, 126, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(200, 169, 126, 0.08) 1px, transparent 1px);
      background-size: 12px 12px;
      opacity: 0.45;
      pointer-events: none;
    }

    .founders-intro-pill span {
      font-family: 'Inter', sans-serif;
      font-weight: 600;
      font-size: 0.82rem;
      color: #6b4f2a;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      position: relative;
      z-index: 1;
    }

    .founders-intro-pill:hover {
      background: #ffffff;
      transform: translateY(-8px);
      box-shadow: 0 14px 32px rgba(200, 169, 126, 0.24);
    }

    .founders-pill:hover {
      background: rgba(255, 255, 255, 0.4);
      transform: scale(1.02);
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

    .founders-avatars {
      display: flex;
      align-items: center;
    }

    .founders-avatars img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 2px solid white;
      object-fit: cover;
      margin-right: -15px;
      /* Overlap */
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: transform 0.3s ease;
    }

    .founders-avatars img:last-child {
      margin-right: 0;
    }

    .founders-pill:hover .founders-avatars img {
      transform: translateX(-5px);
    }

    .founders-label {
      font-family: 'Inter', sans-serif;
      /* Changed to Inter for cleaner UI */
      font-weight: 600;
      /* Slightly lighter than the serif bold */
      font-size: 0.95rem;
      color: #1a237e;
      padding-left: 0.5rem;
    }

    /* Expanded Content */
    .founders-content {
      position: absolute;
      bottom: 100%;
      left: 0;
      margin-bottom: 1rem;
      width: 320px;
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(20px) saturate(200%);
      -webkit-backdrop-filter: blur(20px) saturate(200%);
      border: 1px solid rgba(255, 255, 255, 0.6);
      border-radius: 20px;
      padding: 1.5rem;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
      opacity: 0;
      visibility: hidden;
      transform: translateY(20px) scale(0.95);
      transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
      pointer-events: auto;
      transform-origin: bottom left;
      max-height: 70vh;
      overflow: auto;
    }

    /* Expand ONLY when Active class is present (Click toggle) */
    .founders-widget.active .founders-content {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }

    .founders-widget.intro-active .founders-content {
      opacity: 0;
      visibility: hidden;
      transform: translateY(20px) scale(0.95);
    }

    .founders-intro-content {
      position: absolute;
      bottom: 100%;
      left: 0;
      margin-bottom: 1rem;
      width: 390px;
      background: #fffdf9;
      border: 1px solid rgba(200, 169, 126, 0.28);
      border-radius: 12px;
      padding: 1.35rem 1.5rem;
      box-shadow: 0 22px 55px rgba(200, 169, 126, 0.2);
      opacity: 0;
      visibility: hidden;
      transform: translateY(20px) scale(0.95);
      transition: all 0.35s ease;
      pointer-events: auto;
      transform-origin: bottom left;
      max-height: 70vh;
      overflow: auto;
      position: absolute;
    }

    .founders-intro-content::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: linear-gradient(90deg, rgba(200, 169, 126, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(200, 169, 126, 0.08) 1px, transparent 1px);
      background-size: 16px 16px;
      opacity: 0.6;
      pointer-events: none;
      border-radius: 12px;
    }

    .founders-widget.intro-active .founders-intro-content {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }

    .founders-intro-content .studio-tag {
      display: inline-block;
      font-family: 'Inter', sans-serif;
      font-size: 0.7rem;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: #6b4f2a;
      border: 1px solid rgba(200, 169, 126, 0.35);
      padding: 0.25rem 0.5rem;
      border-radius: 6px;
      margin-bottom: 0.6rem;
      background: rgba(200, 169, 126, 0.08);
      position: relative;
      z-index: 1;
    }

    .founders-intro-content h3 {
      font-family: 'Playfair Display', serif;
      font-size: 1.22rem;
      color: #3b2a14;
      margin: 0 0 0.75rem 0;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-weight: 700;
      position: relative;
      z-index: 1;
    }

    .founders-intro-content h3::after {
      content: "";
      display: block;
      width: 48px;
      height: 2px;
      background: rgba(200, 169, 126, 0.7);
      margin-top: 0.45rem;
      border-radius: 999px;
    }

    .founders-intro-content p {
      font-family: 'Inter', sans-serif;
      font-size: 0.9rem;
      color: #2b2b2b;
      line-height: 1.75;
      margin: 0 0 0.85rem 0;
      letter-spacing: 0.01em;
      position: relative;
      z-index: 1;
    }

    /* Custom scrollbar for founders panels */
    .founders-content,
    .founders-intro-content {
      scrollbar-width: thin;
      scrollbar-color: rgba(200, 169, 126, 0.7) transparent;
    }

    .founders-content::-webkit-scrollbar,
    .founders-intro-content::-webkit-scrollbar {
      width: 8px;
    }

    .founders-content::-webkit-scrollbar-track,
    .founders-intro-content::-webkit-scrollbar-track {
      background: transparent;
    }

    .founders-content::-webkit-scrollbar-thumb,
    .founders-intro-content::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(200, 169, 126, 0.85), rgba(200, 169, 126, 0.45));
      border-radius: 999px;
      border: 2px solid rgba(255, 255, 255, 0.7);
    }

    .founders-intro-content p:last-child {
      margin-bottom: 0;
    }

    /* Ensure pill styling stays active when content is shown */
    .founders-widget:hover .founders-pill,
    .founders-widget.active .founders-pill {
      background: rgba(255, 255, 255, 0.6);
    }

    .founders-widget.active .founders-connector,
    .founders-widget.active .founders-intro-pill {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      pointer-events: auto;
    }

    .founders-widget.intro-active .founders-intro-pill {
      background: rgba(255, 255, 255, 0.6);
    }

    /* Mobile Overlay to close when clicking outside */
    .widget-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.1);
      z-index: 9998;
      display: none;
    }

    .founders-widget.active+.widget-overlay {
      display: block;
    }

    .founder-detail {
      display: flex;
      gap: 1rem;
      margin-bottom: 1.5rem;
      align-items: start;
    }

    .founder-detail:last-child {
      margin-bottom: 0;
    }

    .founder-detail img {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      object-fit: contain;
      background: #fff;
      /* Ensure white background for contained images */
      border: 2px solid white;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .founder-text h4 {
      font-family: 'Playfair Display', serif;
      font-size: 1.1rem;
      color: #1a237e;
      margin: 0 0 0.25rem 0;
    }

    .founder-text p {
      font-family: 'Inter', sans-serif;
      font-size: 0.85rem;
      color: #555;
      line-height: 1.4;
      font-style: italic;
      margin: 0;
    }

    @media (max-width: 768px) {
      .founders-widget {
        bottom: 1.5rem;
        left: 1.5rem;
      }

      .founders-content {
        width: min(320px, 85vw);
        max-height: 60vh;
        overflow: auto;
      }

      .founders-intro-content {
        width: min(360px, 92vw);
        max-height: 60vh;
        overflow: auto;
        padding: 1.1rem 1.1rem;
      }

      .founders-intro-content h3 {
        font-size: 1.05rem;
      }

      .founders-intro-content p {
        font-size: 0.86rem;
      }

      .founders-connector {
        height: 14px;
        margin-left: 20px;
      }
    }

    @media (max-width: 480px) {
      .founders-widget {
        left: 1rem;
        bottom: 1rem;
      }

      .founders-pill {
        padding: 0.45rem 0.85rem 0.45rem 0.45rem;
      }

      .founders-label {
        font-size: 0.85rem;
      }

      .founders-avatars img {
        width: 34px;
        height: 34px;
        margin-right: -12px;
      }

      .founders-intro-pill {
        padding: 0.4rem 0.8rem;
      }

      .founders-intro-pill span {
        font-size: 0.8rem;
      }

      .founders-content,
      .founders-intro-content {
        width: min(320px, 94vw);
        max-height: 58vh;
        border-radius: 16px;
      }

      .founders-intro-content {
        width: min(330px, 95vw);
      }
    }
