
    :root{
      --bg:#fcfcfc;
      --ink:#0b0c0c;
      --grid-line:rgba(0, 0, 0, 0.15);

      --page-gutter: 30px;
      --label-h: 40px;   /* will be synced to grid row height via JS */
      --banner-h: 40px;  /* fallback, JS will overwrite */
      --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
              "Helvetica Neue", Arial, sans-serif;

      --pin-top: calc(var(--page-gutter) + var(--banner-h));
    }

html {
  -webkit-text-size-adjust: 100%;
}


    *{ box-sizing:border-box; }
    body{
      margin:0;
      background:var(--bg);
      color:var(--ink);
      font:14px/1.3 var(--font);
    }

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

    a:hover{
      text-decoration:underline;
    }

    .matrix-wrap{
      padding: var(--page-gutter);
    }

    .matrix{
      display:grid;

      grid-template-columns: repeat(34, 1fr);
      border-left:1px solid var(--grid-line);
      
      grid-auto-flow: row dense;
      position:relative;
      
    }

.matrix::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grid-line);
  top: calc(var(--label-h) - 1px);  
  z-index: 2;
  pointer-events: none;
}

/* Base ratio: every non-header/footer cell is one "grid unit" high */
.matrix > .cell:not(.header-cell):not(.footer-cell):not(.tile-label):not(.mobile-gap-cell)::before{
  content:"";
  display:block;
  padding-top:133.333%;
}



    .cell{
      position: relative;
      border-right:1px solid var(--grid-line);
      border-bottom:1px solid var(--grid-line);
      background: var(--bg);
      min-height: 0;
    }

    /* HEADER + FOOTER: full width */
   header.cell,
footer.cell{
  grid-column: 1 / -1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;

  /* match one cell / label row height */
  height: var(--label-h);
  padding: 0 20px;          /* remove vertical padding, keep horizontal */

  background:var(--bg);
  border: none;
  font-family: var(--font);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.08em;
  z-index:10;
}



    header.cell.header-cell.banner{
      position:sticky;
      top:var(--page-gutter);
      border-top:1px solid var(--grid-line);
      border-bottom:1px solid var(--grid-line);
      border-right:1px solid var(--grid-line);
      background:var(--bg);
       z-index: 20; 
    }


    footer.cell.footer-cell{
      border-top:none;
      border-bottom:1px solid var(--grid-line);
      border-right:1px solid var(--grid-line);
    }
    
    /* Smooth transition for header layout */
header.cell.header-cell.banner{
  transition: all 0.25s ease;
}

/* When a filter is active (architecture/objects/stories), go into joined mode */
header.cell.header-cell.banner.header-joined{
  justify-content: flex-end;     /* nav sits on the right */
  position: sticky;              /* keep your sticky behavior */
}

/* Center the brand + active filter phrase */
header.cell.header-cell.banner.header-joined .brand{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Add the active filter word after NOT NOT via data attribute */
header.cell.header-cell.banner.header-joined .brand::after{
  content: attr(data-filter-label);
  margin-left: 0.35em;
}

/* Right-side nav in joined mode */
header.cell.header-cell.banner.header-joined .main-nav{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* All nav links visible but quiet by default in joined mode */
header.cell.header-cell.banner.header-joined .main-nav a{
  opacity: 0.35;
}

/* Hide the active link from the right side list */
header.cell.header-cell.banner.header-joined .main-nav a.is-active{
  display: none;
}

/* Hide the dot separators in joined mode so you don't get orphan dots */
header.cell.header-cell.banner.header-joined .dot{
  display: none;
}

/* Default: NOT NOT has no underline */
header .brand {
  cursor: default;
  border-bottom: 1px solid transparent;
}

/* Only show underline when header is centered (joined state) */
header.header-joined .brand {
  cursor: pointer; /* becomes clickable */
   line-height: 1.2;
}

header.header-joined .brand:hover {
  border-bottom: 1px solid var(--ink); /* match nav underline */
}



    .brand{
      white-space:nowrap;
    }

    .main-nav,
    .footer-right{
      display:flex;
      align-items:center;
      gap:10px;
      white-space:nowrap;
    }

    .footer-left{
      white-space:nowrap;
    }

    .dot{
      pointer-events:none;
    }

    /* ===== TILE SIZES ON THE 34-COL GRID ===== */

    .cell-6x6{
      grid-column: span 6;
      grid-row: span 6;
    }

    .cell-6x1{
      grid-column: span 6;
      grid-row: span 1;
    }

    .cell.empty{
      background:var(--bg);
    }

    /* ===== IMAGE TILES (6×6) ===== */

    .tile-img{
      position:relative;
         border-bottom: 1px solid var(--grid-line);  
    }

    .tile-img .media{
      position:absolute;
      inset:0;
    }

    .tile-img .media img{
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }

/* Hover description attached to bottom edge of image */
.tile-img .hover-desc{
  position:absolute;
  left:0;
  right:0;
  bottom:0;                 /* hugs the bottom of the image */
  padding:4px 6px;
  font-size:clamp(8px, .9vw, 12px);
  line-height:1.5;
  background:var(--bg);
  border-top:1px solid var(--grid-line);
  transform:translateY(100%);   /* start hidden just below the bottom edge */
  opacity:0;
  pointer-events:none;
  transition:
    transform 0.18s ease-out,
    opacity 0.18s ease-out;
}

/* Show on hover/focus */
.tile-img:hover .hover-desc,
.tile-img .media:focus-visible .hover-desc{
  transform:translateY(0);
  opacity:1;
}



    /* ===== LABEL CELLS (1×6, BELOW IMAGES) ===== */

  .label{
        display: grid;
  width:100%;
  height:100%;  /* or auto; either is fine since the cell height is fixed */
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 2fr);
  align-items:center;
  font-size:12px;
  line-height:1.2;
  background:var(--bg);
  border-bottom:1px solid var(--grid-line);  /* from earlier fix */
}

.tile-label{
  position:relative;
  border-top: none;     /* prevent extra line from the label cell */
  border-bottom: none;  /* bottom line is drawn by .label */
}

.tile-label .label {
  width:100%;
  height:100%;
}
.tile-label-inner{
  position:relative;   /* stays in normal flow */
    align-items: center;
  width:100%;
  height:100%;         /* matches cell height */
  display:flex;
}



.label-num,
.label-title{
    display:flex;
  align-items:center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;  
  height: 100%;
}

.label-title{
  padding:0 6px;
}



    .label-num{
      justify-content:center;
      border-right:1px solid var(--grid-line);
        min-width:0; 
    }

    .label-title{
      border-right:0px solid var(--grid-line);
       box-shadow: 0px 0 0 0 var(--grid-line);
         min-width:0; 
    }

    .label-type{
        display:block;
      justify-content:center;
      text-align:center;
      border-left:px solid var(--grid-line);
      padding:0 10px;
       overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  
    }

    /* ===== STACKING LAYER ===== */

    .label-stack{
      position:fixed;
      top:var(--pin-top);
      left: 0;
      right:auto;
      z-index:9;
      pointer-events:none;
      overflow-anchor:none;
      background:var(--bg);
      border-left:1px solid var(--grid-line);
    }

    .label-stack-row{
      position:absolute;
      left:0;
      right:0;
      height:var(--label-h);
      display:grid;
      align-items:stretch;
      overflow:hidden;
    }

    .label-stack-row .label{
      pointer-events:none;
      background:var(--bg);
      border-top:1px solid var(--grid-line);
      border-bottom:1px solid var(--grid-line);
      border-right:1px solid var(--grid-line);
      transform:none !important;
    }

    .label-stack-row .label:last-child{
      border-right:1px solid var(--grid-line);
    }

    .label-stack-row.is-last .label{
      border-bottom:1px solid var(--grid-line);
    }

    /* Hide originals when a row is stacked */
    .row-stacked .label{
      visibility:hidden;
    }

    .stack-active .banner{
      border-bottom:none;
    }

    .stack-active .label-stack{
      margin-top:-2px; /* hairline merge */
    }
.label > * { min-width: 0; }

/* Default: gap row doesn’t participate on desktop */
.row-gap-row {
  display: none;
}

/* These will be the “gap” cells created by JS */
.mobile-gap-cell {
  /* nothing special for desktop; they’ll be inside a display:none row */
}


/* ===== IMAGE TILES (6×6) ===== */

.tile-img{
  position:relative;
  border-bottom: 1px solid var(--grid-line);  
}

.tile-img .media{
  position:absolute;ti
  inset:0;
}

.tile-img .media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Full-tile description block used by filters */
.tile-img .tile-desc{
  position:absolute;
  inset:0;
  padding:8px 10px;
  font-size:12px;
  line-height:1.4;
  display:none;              /* hidden by default */
  background:var(--bg);
}

/* When filtering: show description instead of image */
.tile-img.show-desc .media{
  display:none;
}

.tile-img.show-desc .tile-desc{
  display:block;
}
/* ===============================
   PROJECT BADGES (flower + pill)
   sit on tile-img corners
   =============================== */

:root{
  /* tweak this to resize all badges at once */
  --flower-size: 120px;
}

/* Base tile relationship */
.tile-img {
  position: relative; /* already set above, just keep it */
}

/* Base badge: shared for flower + pill */
.project-badge,
.project-flower {
  position: absolute;
  width: clamp(120px, 10vw, 150px);
  height: clamp(120px, 10vw, 150px);
  pointer-events: none;   /* don't block clicks on the project link */
  z-index: 5;             /* above image + hover desc */
}

/* Flower keeps its SVG specifics */
.project-flower svg {
  width: 100%;
  height: 100%;
  display: block;
}

.project-flower-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  animation: flower-spin 5s linear infinite;
}

.project-flower path {
  fill: var(--bg);            /* interior = page background */
  stroke: var(--grid-line);   /* outline = grid line color */
  stroke-width: 6px;
  stroke-linejoin: round;
}

.project-flower-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(8px, 1.8vw, 10px);
  color: var(--ink);
  pointer-events: none;
  white-space: nowrap;
    letter-spacing: .1em;
}

/* Corner positions:
   - existing flower classes still work
   - new .project-badge--* can be used by pills
*/
.project-badge--top-left,
.project-flower--top-left {
  top: 0;
  left: 0;
  transform: translate(-50%, 20%);
}

.project-badge--top-right,
.project-flower--top-right {
  top: 0;
  right: 0;
  transform: translate(50%, -40%);
}

.project-badge--bottom-left,
.project-flower--bottom-left {
  bottom: 0;
  left: 0;
  transform: translate(-40%, 40%);
}

.project-badge--bottom-right,
.project-flower--bottom-right {
  bottom: 0;
  right: 0;
  transform: translate(40%, 40%);
}

/* spin keyframes in case they aren't defined yet */
@keyframes flower-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===============================
   PILL BADGE: "IN PROGRESS" marquee
   =============================== */

.project-pill {
  /* reuse base badge sizing but make the pill shorter */
    width: clamp(54px, 7vw, 80px);
  height: clamp(43px, 5.5vw, 47px);
  border-radius: 9999px;
  border: 1px solid var(--grid-line);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Track that actually moves the text */
.project-pill-track {
  display: inline-flex;
  white-space: nowrap;
  animation: pill-marquee 4s linear infinite;
}

/* Individual repeated chunks of the text */
.project-pill-track span {
  padding: 0 12px;
  font-size: clamp(8px, 2vw, 10px);
  letter-spacing: .1em;
}

/* Marquee animation */
@keyframes pill-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* TEXT-ONLY PROJECT TILE (no image, full-tile text) */
.tile-img.tile-text .media {
  display: none;           /* in case it exists, ignore it */
}

.tile-img.tile-text .tile-desc {
  position: absolute;
  inset: 0;
  display: block;          /* always visible */
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  background: var(--bg);
}

/* Optional: make links inside the text look like the rest of the site */
.tile-img.tile-text .tile-desc a {
  text-decoration: underline;
}


.tile-img.tile-text .tile-desc {
  font-size: clamp(8px, 1vw, 12px);
  line-height: 1.35;
}

.tile-text .text-full {
  display: block;
}
.tile-text .text-short {
  display: none;
}






@media (max-width: 800px){

  /* 15-column mobile grid */
  .matrix{
    grid-template-columns: repeat(15, 1fr) !important;
  }


  /* On mobile, let the actual image control the height of project tiles,
     instead of the tall 133% ::before pseudo-element */
  .matrix > .cell.tile-img::before {
    content: none;
    padding-top: 0;
  }


  :root{
    --page-gutter: 16px;
    --label-h: 32px;   /* smaller stacked label height */
  }

  body{
    font-size: 12px;
  }

  .matrix-wrap{
    padding: var(--page-gutter);
      position: relative;  /* NEW: for absolute overlays */

  }

  /* Keep stacked overlay on mobile */
  .label-stack{
    display: block;
  }

  /* ===============================
     PROJECT IMAGES (6×6) MOBILE
     =============================== */

  .tile-img{
    grid-row: span 6 !important; /* Preserve 6 cells tall */
    height: auto;
    border-bottom: 1px solid var(--grid-line);
  }

  .tile-img .media{
    position: relative;
  }

  .tile-img .media img{
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* LEFT image in the pair: columns 2–7 */
  .tile-img{
    grid-column: 2 / span 6 !important;
  }

  /* RIGHT image in the pair: columns 9–14 */
  .tile-img:nth-of-type(2n){
    grid-column: 9 / span 6 !important;
  }

  /* ===============================
     LABELS (under each image)
     =============================== */

  /* ===== LABELS: stick to the image right before them ===== */

  .tile-label{
    grid-row: span 1 !important;
  }

  /* Default: label under left image (the image right before it) */
  .tile-img + .tile-label{
    grid-column: 2 / span 6 !important;
  }

  /* If the image is an even-numbered .tile-img, its label goes to the right slot */
  .tile-img:nth-of-type(2n) + .tile-label{
    grid-column: 9 / span 6 !important;
  }

  .tile-label .label{
    padding: 0 6px;
    font-size: 12px;
  }



  /* Make the gap row participate in the grid on mobile */
  .row-gap-row {
    display: contents !important;   /* its children become real grid items */
  }

  /* Each auto-generated gap cell */
  .row-gap-row .mobile-gap-cell {
    height: var(--label-h);      /* one label/cell height */
    background: var(--bg);
    border-bottom: 1px solid var(--grid-line);
    /* border-right is already on .cell, so vertical lines will appear naturally */
  }

  /* Prevent the tall aspect ratio pseudo-element on these cells */
  .matrix > .row-gap-row .mobile-gap-cell::before {
    content: none;
    padding-top: 0;
  }
 
}

@media (max-width: 800px){
  .cell.empty.mobile-trimmed {
    display: none;
  }
}

@media (max-width: 800px){
  body{
    font-size: 10px !important;
  }

  header.cell,
  footer.cell,
  .tile-label .label,
  .hover-desc,
  .tile-desc,
  .main-nav a,
  .label-num,
  .label-title,
  .label-type {
    font-size: 10px;
  }
    .label-type {
        display:none;
    }
    
      .tile-label-inner {
    padding: 0;          /* so the internal grid hugs the cell edges */
  }

  .label-num {
    padding-left: 0px;
    padding-right: 0px;
  }
  
  /* ===============================
     PROJECT IMAGES (6×6) MOBILE
     =============================== */

  .tile-img{
    grid-row: span 6 !important; /* Preserve 6 cells tall */
    border-bottom: 1px solid var(--grid-line);
    /* no explicit height here; let the ::before define it */
  }

  /* Keep mobile behavior the same as desktop so the ::before
     pseudo-element controls the tile height and the image
     doesn't add extra vertical space */
  .tile-img .media{
    position: absolute;
    inset: 0;
  }

  .tile-img .media img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
 
}

@media (max-width: 800px){
  /* In joined mode, don't center the brand on mobile */
  header.cell.header-cell.banner.header-joined{
    justify-content: space-between;      /* brand left, nav right */
  }

  header.cell.header-cell.banner.header-joined .brand{
    position: static;                    /* remove absolute centering */
    left: auto;
    transform: none;
    white-space: nowrap;                 /* keep it on one line */
  }
  
  .tile-img.tile-text .tile-desc {
    font-size: 12px;
  }
 
  
}
@media (max-width: 1500px){

    .tile-text .text-full {
    display: none;
  }
  .tile-text .text-short {
    display: block;
    font-size: clamp(8px, 1.4vw, 11px);
    line-height: 1.35;
  }
}

