
/* =========================================================
   WORK PAGE — EDITORIAL PORTFOLIO
   =========================================================

   Restored original editorial introduction:
   - Selected projects & studies
   - Large Multidisciplinary work. heading

   Also includes:
   - Compact interactive featured ribbon
   - Modern continuous discipline navigation
   - Five-column project gallery
   - Light and dark mode support

   Load AFTER appearance.css.
   ========================================================= */


/* =========================================================
   01 — MAIN LAYOUT
   ========================================================= */

.work-page .work-main {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 var(--pad) 70px;
  min-width: 0;
}


/* =========================================================
   02 — RESTORED EDITORIAL INTRODUCTION
   ========================================================= */

.work-page .work-intro-new {
  display: block;

  padding: 42px 0 25px;
  margin: 0;

  text-align: left;
}

/* Original lilac introductory label */

.work-page .work-intro-eyebrow {
  display: block;

  margin: 0 0 18px;
  padding: 0;

  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;

  letter-spacing: 0.13em;
  text-transform: uppercase;

  color: var(--accent);
}

/* Large main title */

.work-page .work-intro-new h1 {
  display: block;

  margin: 0;
  padding: 0;

  font-family: var(--display);
  font-size: clamp(52px, 5.5vw, 88px);
  font-weight: 400;

  line-height: 1.03;
  letter-spacing: -0.065em;

  color: var(--ink);
  max-width: 100%;
}


/* =========================================================
   03 — SECTION HEADINGS
   ========================================================= */

.work-page .work-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
  margin: 0 0 13px;
}

.work-page .work-section-title {
  margin: 0;

  font-family: var(--display);
  font-size: clamp(19px, 1.55vw, 23px);
  font-weight: 400;

  line-height: 1.2;
  letter-spacing: -0.04em;

  color: var(--ink);
}

.work-page .work-section-meta {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;

  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: var(--accent);
  white-space: nowrap;
}


/* =========================================================
   04 — FEATURED WORK
   ========================================================= */

.work-page .work-featured {
  margin: 0;
}

.work-page .work-feature-ribbon {
  display: flex;
  align-items: stretch;

  width: 100%;
  height: clamp(115px, 9.5vw, 135px);

  gap: 8px;
}

.work-page .work-feature {
  position: relative;

  display: block;
  flex: 1 1 0;

  min-width: 0;
  overflow: hidden;
  isolation: isolate;

  background: var(--surface);
  color: #fff;

  border-radius: 3px;

  transition:
    flex 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================================
   05 — FEATURED IMAGES
   ========================================================= */

.work-page .work-feature > img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Individual image positioning */

.work-page .work-feature:nth-child(1) > img {
  object-position: center 47%;
}

.work-page .work-feature:nth-child(2) > img {
  object-position: center 43%;
}

.work-page .work-feature:nth-child(3) > img {
  object-position: center 42%;
}

.work-page .work-feature:nth-child(4) > img {
  object-position: center 50%;
}


/* =========================================================
   06 — SUBTLE IMAGE GRADIENT
   ========================================================= */

.work-page .work-feature::after {
  display: none;
}


/* =========================================================
   07 — MINIMAL FEATURED CAPTIONS
   ========================================================= */

.work-page .work-feature-caption {
  position: absolute;
  z-index: 2;

  bottom: 14px;
  left: 15px;
  right: 25px;
}

.work-page .work-feature-caption strong {
  display: block;

  font-family: var(--display);
  font-size: clamp(14px, 1.35vw, 20px);
  font-weight: 600;

  letter-spacing: -0.04em;
  line-height: 1.15;

  color: #fff;
  overflow-wrap: break-word;
}

/* Hide old extra labels */

.work-page .work-feature-number,
.work-page .work-feature-caption small {
  display: none !important;
}


/* =========================================================
   08 — FEATURED HOVER ARROWS
   ========================================================= */

.work-page .work-feature-arrow {
  position: absolute;
  z-index: 2;

  top: 11px;
  right: 13px;

  font-size: 18px;
  font-weight: 400;
  color: #FFFFFF;

  opacity: 0;
  transform: translate(-5px, 5px);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* White featured arrows in dark mode */
html[data-theme="dark"] .work-page .work-feature-arrow {
  color: #FFFFFF;
}

.work-page .work-feature:hover .work-feature-arrow,
.work-page .work-feature:focus-visible .work-feature-arrow {
  opacity: 1;
  transform: translate(0, 0);
}


/* =========================================================
   09 — INTERACTIVE RIBBON EXPANSION
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

  .work-page .work-feature-ribbon:has(
    .work-feature:hover
  ) .work-feature {
    flex: 0.84 1 0;
  }

  .work-page .work-feature-ribbon:has(
    .work-feature:hover
  ) .work-feature:hover {
    flex: 1.48 1 0;
  }

  .work-page .work-feature:hover > img {
    transform: scale(1.055);
  }

}

.work-page .work-feature:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.work-page .work-feature:focus-visible > img {
  transform: scale(1.04);
}


/* =========================================================
   10 — REMOVE OLD FEATURE STATUS STRIP
   ========================================================= */

.work-page .work-feature-status {
  display: none !important;
}


/* =========================================================
   11 — EXPLORE ALL WORK SECTION
   ========================================================= */

.work-page .work-index {
  margin-top: 30px;
}

.work-page .work-index .work-section-heading {
  margin-bottom: 14px;
}


/* =========================================================
   12 — MODERN SEGMENTED NAVIGATION
   ========================================================= */

/*
   One continuous navigation surface.

   The All option is deliberately shorter.
   Longer categories receive extra space.

   Labels remain on one line.
   The navigation scrolls horizontally when
   there isn't enough room for all categories.
*/

.work-page .work-filter-scroll {
  width: 100%;
  max-width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;

  -webkit-overflow-scrolling: touch;
}

.work-page .work-filter-list {
  display: grid;

  grid-template-columns:
    0.55fr
    0.92fr
    1fr
    1.02fr
    1.56fr
    1.18fr
    1.68fr
    1.38fr;

  align-items: stretch;
  gap: 3px;

  width: 100%;
  min-width: 1000px;

  padding: 4px 4px 5px;

  background: #EFEDF0;

  border: 1px solid #DCD8DF;
  border-radius: 10px;
}


/* =========================================================
   13 — NAVIGATION BUTTONS
   ========================================================= */

.work-page .work-filter {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;
  min-height: 36px;

  padding: 7px 5px;

  background: transparent;
  color: #332E32;

  border: 1px solid transparent;
  border-radius: 7px;

  font-family: var(--body);
  font-size: 18px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0;

  text-align: center;
  white-space: nowrap;

  box-shadow: none;
  transform: none;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.work-page .work-filter:first-child,
.work-page .work-filter:last-child {
  text-align: center;
}


/* Hover */

.work-page .work-filter:hover:not([aria-pressed="true"]) {
  background: #E3E0E6;
  color: #282327;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}


/* Selected category */

/* Selected button — light mode */
.work-page .work-filter[aria-pressed="true"],
.work-page .work-filter[aria-pressed="true"]:hover {
  background: #000000;
  border-color: #000000;
  color: #FFFFFF;
  font-weight: 400;
  box-shadow: none;
}

/* Keyboard accessibility */

.work-page .work-filter:focus-visible {
  outline: 2px solid #777777;
  outline-offset: -2px;

  position: relative;
  z-index: 1;
}


/* =========================================================
   14 — PROJECT COUNT
   ========================================================= */

.work-page .work-gallery-status {
  display: none !important;
}

.work-page .work-project-count {
  font-family: var(--body);

  font-size: 11px;
  font-weight: 500;

  letter-spacing: 0.07em;
  text-transform: uppercase;

  color: var(--accent);
  white-space: nowrap;
}


/* =========================================================
   15 — FIVE-COLUMN PROJECT GALLERY
   ========================================================= */

.work-page .work-project-grid {
  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));

  column-gap: 13px;
  row-gap: 22px;

  margin-top: 14px;
}

.work-page .work-project {
  display: block;
  min-width: 0;
}

.work-page .work-project[hidden] {
  display: none !important;
}


/* =========================================================
   16 — PROJECT IMAGES
   ========================================================= */

.work-page .work-project-image {
  width: 100%;
  aspect-ratio: 1.55;

  overflow: hidden;
  background: var(--surface);
}

.work-page .work-project-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-page .work-project:hover img,
.work-page .work-project:focus-visible img {
  transform: scale(1.045);
}



/* =========================================================
   PROJECT TAGS — CATEGORY FILTERS ONLY
   ========================================================= */

/* ALL WORK: hide descriptions and pills */
.work-page:not(.work-show-tags) .work-project-meta p {
  display: none !important;
}

/* CATEGORY FILTERS: show descriptions as pills */
.work-page.work-show-tags .work-project-meta p {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;

  margin-top: 8px;

  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

/* Individual rounded pills */
.work-page.work-show-tags .work-project-meta .project-tag {
  display: inline-flex;
  align-items: center;

  padding: 3px 9px;
  border-radius: 999px;

  background: #f7f6f4;
  border: 1px solid #DDDBD8;

  color: #292529;
  white-space: nowrap;
}

/* Dark-mode pills */
html[data-theme="dark"]
.work-page.work-show-tags .work-project-meta .project-tag {
  background: #29292D;
  border-color: #45454A;
  color: #D6D2D2;
}


.work-page.work-show-tags .work-project-meta .project-tag {
  display: inline-flex;
  align-items: center;

  padding: 3px 9px;
  border-radius: 999px;

  background: #eeebea;
  border: 1px solid #d4cfcd;

  color: #292529;
  white-space: nowrap;
}

/* =========================================================
   17 — PROJECT CAPTIONS
   ========================================================= */

.work-page .work-project-meta {
  padding-top: 10px;
}

.work-page .work-project-meta h3 {
  margin: 0;

  font-family: var(--display);
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 400;

  line-height: 1.2;
  letter-spacing: -0.015em;

  color: var(--ink);
}

.work-page .work-project-meta p {
  margin: 6px 0 0;

  font-family: var(--body);
  font-size: 11px;
  font-weight: 400;

  line-height: 1.4;
  letter-spacing: 0;

  color: var(--muted);
}


/* =========================================================
   18 — SMALLER DESKTOP
   ========================================================= */

@media (max-width: 1250px) {

  .work-page .work-intro-new h1 {
    font-size: clamp(56px, 7vw, 95px);
  }

  .work-page .work-filter-list {
    min-width: 1000px;
  }

  .work-page .work-filter {
    font-size: 11px;
  }

  .work-page .work-project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}


/* =========================================================
   19 — TABLET
   ========================================================= */

@media (max-width: 900px) {

  .work-page .work-intro-new {
    padding: 34px 0 28px;
  }

  .work-page .work-intro-new h1 {
    font-size: clamp(48px, 7.5vw, 74px);
  }

  .work-page .work-feature-ribbon {
    height: 155px;
    gap: 6px;
  }

  .work-page .work-feature-caption {
    left: 10px;
    right: 10px;
    bottom: 11px;
  }

  .work-page .work-feature-caption strong {
    font-size: 13px;
  }

  .work-page .work-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


/* =========================================================
   20 — MOBILE
   ========================================================= */

@media (max-width: 650px) {

  .work-page .work-main {
    padding-bottom: 40px;
  }

  /* Introduction */

  .work-page .work-intro-new {
    padding: 28px 0 25px;
  }

  .work-page .work-intro-eyebrow {
    font-size: 11px;
    letter-spacing: 0.11em;
    margin-bottom: 15px;
  }

  .work-page .work-intro-new h1 {
    font-size: clamp(42px, 9vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    overflow-wrap: normal;
  }

  /* Section headings */

  .work-page .work-section-title {
    font-size: 18px;
  }

  .work-page .work-section-meta,
  .work-page .work-project-count {
    font-size: 9px;
  }

  /* Featured ribbon */

  .work-page .work-feature-ribbon {
    height: 140px;
    gap: 4px;
  }

  .work-page .work-feature-caption {
    bottom: 8px;
    left: 7px;
    right: 7px;
  }

  .work-page .work-feature-caption strong {
    font-size: clamp(9px, 2.6vw, 13px);
  }

  .work-page .work-feature-arrow {
    top: 6px;
    right: 6px;
    font-size: 12px;
  }

  /* Explore section */

  .work-page .work-index {
    margin-top: 21px;
  }

  /* Segmented navigation */

  .work-page .work-filter-list {
    min-width: 970px;
    gap: 3px;
  }

  .work-page .work-filter {
    min-height: 42px;
    font-size: 11px;
    padding: 8px 5px;
  }

  /* Project gallery */

  .work-page .work-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 21px 10px;
    margin-top: 15px;
  }

  .work-page .work-project-meta h3 {
    font-size: 15px;
  }

  .work-page .work-project-meta p {
    font-size: 10px;
  }

}


/* =========================================================
   21 — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .work-page .work-feature,
  .work-page .work-feature > img,
  .work-page .work-feature-arrow,
  .work-page .work-filter,
  .work-page .work-project-image img {
    transition: none !important;
  }

}



/* =========================================================
   WORK PAGE — LIQUID NAVIGATION
   ========================================================= */

/* Navigation and SVG layering */
.work-page .work-filter-list {
  position: relative;
  isolation: isolate;
}

.work-page .work-filter-list .work-filter {
  position: relative;
  z-index: 2;
}

.work-page .work-filter-list .work-liquid-blob {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  pointer-events: none;
}

.work-page .work-liquid-blob svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* =========================================================
   SELECTED BUTTON BACKGROUND
   ========================================================= */

/* Once SVG animation is active, the SVG supplies the
   entire selected-button background. */

.work-page .work-filter-list.liquid-ready
.work-filter[aria-pressed="true"],
.work-page .work-filter-list.liquid-ready
.work-filter[aria-pressed="true"]:hover,
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter[aria-pressed="true"],
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter[aria-pressed="true"]:hover {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* No hover background while liquid is moving */
.work-page .work-filter-list.liquid-moving
.work-filter:hover {
  background: transparent !important;
  border-color: transparent !important;
}

/* =========================================================
   TEXT COLOURS — LIGHT MODE
   ========================================================= */

/* Default text, including buttons already marked
   aria-pressed="true" before liquid arrives. */
.work-page .work-filter-list.liquid-ready
.work-filter,
.work-page .work-filter-list.liquid-ready
.work-filter[aria-pressed="true"] {
  color: #332E32 !important;

  /* Prevent white/black flashes or colour fading */
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* As soon as filling begins, JS adds liquid-current */
.work-page .work-filter-list.liquid-ready
.work-filter.liquid-current,
.work-page .work-filter-list.liquid-ready
.work-filter.liquid-current[aria-pressed="true"] {
  color: #FFFFFF !important;
}

/* =========================================================
   TEXT COLOURS — DARK MODE
   ========================================================= */

html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready .work-filter,
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter[aria-pressed="true"] {
  color: #E9E5E4 !important;
}

html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter.liquid-current,
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter.liquid-current[aria-pressed="true"] {
  color: #000000 !important;
}


/* =========================================================
   WORK PAGE — DARK MODE LIQUID NAVIGATION
   ========================================================= */

/* Dark navigation background */
html[data-theme="dark"] .work-page .work-filter-list {
  background: #191D25 !important;
  border: 1px solid #30313B !important;
}

/* All inactive button labels */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready .work-filter {
  color: #E9E5E4 !important;
  background: transparent !important;
  border-color: transparent !important;
  opacity: 1 !important;
}

/* Subtle hover */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready:not(.liquid-moving)
.work-filter:hover:not(.liquid-current) {
  background: #252832 !important;
  color: #FFFFFF !important;
}

/* Keep buttons transparent while liquid moves */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-moving .work-filter:hover {
  background: transparent !important;
}

/* Selected text becomes dark against white liquid */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter.liquid-current,
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter.liquid-current[aria-pressed="true"] {
  color: #000000 !important;
}

/* Liquid fill is white in dark mode */
html[data-theme="dark"] .work-page
.work-filter-list .work-liquid-blob svg path {
  fill: #FFFFFF !important;
}

/* =========================================================
   DARK MODE — ORIGINAL LIQUID NAVIGATION
   Colour corrections only. Preserve layout and pills.
   ========================================================= */

/* Restore the dark background of the navigation bar */
html[data-theme="dark"] .work-page .work-filter-list {
  background: #191D25 !important;
  border-color: #30313B !important;
}

/* Inactive category text */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready .work-filter {
  color: #E9E5E4 !important;
  opacity: 1 !important;
}

/* Inactive button hover */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready:not(.liquid-moving)
.work-filter:hover:not(.liquid-current) {
  background: #252832 !important;
  color: #FFFFFF !important;
}

/* Selected pill text */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter.liquid-current {
  color: #000000 !important;
}

/* The liquid forms the white selected pill */
html[data-theme="dark"] .work-page
.work-filter-list .work-liquid-blob svg path {
  fill: #FFFFFF !important;
}

/* Keep the selected button background transparent,
   allowing the liquid to create the rounded pill */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-ready
.work-filter[aria-pressed="true"] {
  background: transparent !important;
  border-color: transparent !important;
}

/* No unwanted hover background during movement */
html[data-theme="dark"] .work-page
.work-filter-list.liquid-moving .work-filter:hover {
  background: transparent !important;
}

