.project-page {
  font-family: "Montserrat", sans-serif;
  color: #555555;
  background: #fff;
}

.project-gallery--legacy {
  padding-top: 0;
  padding-bottom: 0;
  overflow: visible !important; /* override section { overflow: hidden } which breaks sticky */
}

.project-gallery--legacy .project-migration-grid {
  --gallery-cols: 6;
  grid-template-columns: minmax(260px, 1.2fr) repeat(5, 1fr);
  grid-auto-rows: clamp(220px, 22vw, 300px);
  grid-auto-flow: dense;
  gap: 8px;
  margin: 0;
  padding: 8px;
  background: transparent !important;
}

.project-gallery--legacy .proj-intro {
  width: auto;
  margin: 0;
  background: var(--project-accent, #262626);
  grid-column: span 1;
  grid-row: span 2;
  overflow: auto;
}

.project-gallery--legacy .proj-intro,
.project-gallery--legacy .proj-intro .proj,
.project-gallery--legacy .proj-intro.box--intro .proj {
  background: var(--project-accent, #262626) !important;
}

.project-gallery--legacy .proj {
  display: flex;
  flex-direction: column;
  min-height: auto;
  height: 100%;
  padding: clamp(0.9rem, 1.8vw, 1.25rem);
}

.project-gallery--legacy .proj h1,
.project-gallery--legacy .proj h5 {
  margin: 0 0 0.6rem;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-gallery--legacy .proj .back_but,
.btn-back {
  display: inline-flex !important;
  align-items: center !important;
  align-self: flex-start !important;  /* always left — never stretch in the flex column */
  gap: 0.4rem !important;
  margin-bottom: clamp(0.5rem, 1vw, 0.75rem) !important;
  min-height: 2.75rem !important;
  padding: 0.1rem 0.35rem 0.1rem 0 !important;
  padding-bottom: 0.1rem !important;       /* reset legacy 18px bottom padding */
  border: none !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-align: left !important;        /* reset legacy text-align: center */
  text-transform: uppercase !important;
  text-decoration: none !important;
  font-family: "Montserrat", sans-serif !important;
  transition: opacity 0.3s ease !important;
}

.project-gallery--legacy .proj .back_but i,
.project-gallery--legacy .proj .back_but svg {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  width: 1rem !important;             /* SVG needs explicit width/height */
  height: 1rem !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  transform: none !important;         /* reset legacy translateX(-50%) */
  transition: none !important;        /* reset legacy transition on transform */
}

.project-gallery--legacy .proj .back_but:hover,
.btn-back:hover {
  opacity: 0.7;
  color: #fff;
  text-decoration: none;
}

.project-gallery--legacy .project-description {
  max-width: 48ch;
  margin: 0 0 0.85rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
}

.project-gallery--legacy .proj p {
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}

.project-gallery--legacy .project-strategy {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 0.6rem;
  margin-bottom: 0.85rem;
}

.project-gallery--legacy .project-strategy strong {
  color: #fff;
  font-weight: 700;
}

.project-gallery--legacy .project-service-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0.25rem 0 0.85rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.88);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-gallery--legacy .project-service-cue i,
.project-gallery--legacy .project-service-cue svg {
  width: 0.95rem;
  height: 0.95rem;
  font-size: 0.95rem;
  line-height: 1;
}

.project-gallery--legacy .proj hr {
  width: 100%;
  height: 1px;
  margin-top: 0.95rem;
  margin-bottom: 0.75rem;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
}

/* Hide duplicate divider line in sidebar when pagination is present */
.project-gallery--legacy .proj hr:has(~ .project-pagination--sidebar) {
  display: none;
}


.project-gallery--legacy .project-hero__eyebrow {
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-gallery--legacy .project-brief--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin-top: 1rem;
}

.project-gallery--legacy .project-brief--compact div {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.project-gallery--legacy .project-brief--compact dt {
  color: rgba(255, 255, 255, 0.48);
}

.project-gallery--legacy .project-brief--compact dd {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  line-height: 1.45;
}

.project-gallery--legacy .project-panel-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.15rem;
  margin-bottom: 0.35rem;
}

.project-gallery--legacy .project-panel-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 0 !important;
  background: transparent;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.project-gallery--legacy .project-panel-nav::before {
  content: "";
  position: absolute;
  left: 2.95rem;
  right: 2.95rem;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(-50%);
  pointer-events: none;
  /* Line auto-stretches between the two circles since nav is now full width */
}

.project-gallery--legacy .project-panel-nav__link span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.project-gallery--legacy .project-panel-nav__link i,
.project-gallery--legacy .project-panel-nav__link svg {
  font-size: 1.25rem;
  width: 1.25rem;   /* SVG needs explicit width/height — font-size alone won't work */
  height: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
  display: block;
}

.project-gallery--legacy .project-panel-nav__link:hover,
.project-gallery--legacy .project-panel-nav__link:focus {
  background: #fff;
  border-color: #fff;
  color: var(--project-accent, #262626);
  transform: translateY(-1px);
  text-decoration: none;
}

.project-gallery--legacy .project-panel-nav__link:hover span,
.project-gallery--legacy .project-panel-nav__link:focus span {
  animation: none !important;
}

/* ─── Mobile: panel nav becomes full-width text buttons matching bottom pagination ─── */
@media (max-width: 991.98px) {
  .project-gallery--legacy .project-panel-nav {
    flex-direction: column;
    gap: 6px;
    margin-top: 1rem;
  }

  /* Hide the decorative centre-line — not needed in stacked layout */
  .project-gallery--legacy .project-panel-nav::before {
    display: none;
  }

  .project-gallery--legacy .project-panel-nav__link {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.6rem 0.85rem;
    justify-content: flex-start;
    gap: 0.5rem;
    /* Solid white bg + accent text — same as bottom pagination */
    background: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--project-accent, #262626);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  /* Show the sr-only label text visibly on mobile */
  .project-gallery--legacy .project-panel-nav__link span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }

  .project-gallery--legacy .project-panel-nav__link i,
  .project-gallery--legacy .project-panel-nav__link svg {
    font-size: 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
  }

  /* Next: icon on right side */
  .project-gallery--legacy .project-panel-nav__link.next {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }

  .project-gallery--legacy .project-panel-nav__link:hover,
  .project-gallery--legacy .project-panel-nav__link:focus {
    background: var(--project-accent, #262626);
    border-color: var(--project-accent, #262626);
    color: #fff;
    transform: translateY(-1px);
  }
}

.project-gallery--legacy .project-filters {
  grid-column: 1 / -1;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding: 0.25rem 0 0.35rem;
}

.project-gallery--legacy .project-filter__button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.95rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0 !important;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.project-gallery--legacy .project-filter__count {
  min-width: 1.35rem;
  padding: 0.08rem 0.25rem;
  background: rgba(255, 255, 255, 0.14);
  color: currentColor;
  font-size: 0.6rem;
  line-height: 1.2;
  text-align: center;
}

.project-gallery--legacy .project-filter__button:hover,
.project-gallery--legacy .project-filter__button:focus,
.project-gallery--legacy .project-filter__button.is-active {
  background: #fff;
  border-color: #fff;
  color: var(--project-accent, #262626);
}

.project-gallery--legacy .project-filter__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.project-gallery--legacy .project-filter__button.is-active .project-filter__count {
  background: color-mix(in srgb, var(--project-accent, #262626) 14%, #fff);
}

.project-gallery--legacy .project-filters--sidebar {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.project-gallery--legacy .project-filters:empty {
  display: none;
}

/* ─── Shared pagination container ──────────────────────────────────────── */
.project-gallery--legacy .project-pagination {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

/* ─── TOP panel nav: lightweight text links only ────────────────────────
 * These sit inside the dark sidebar/intro panel and act as a quiet
 * convenience shortcut. No card border, no background, no min-height.
 * The bottom pagination is the primary CTA — this stays subordinate.
 * ─────────────────────────────────────────────────────────────────────── */
.project-gallery--legacy .project-pagination--sidebar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  gap: 8px;
}

/* Strip card treatment from sidebar links — plain text only */
.project-pagination--sidebar .project-pagination__link {
  flex: 0 0 auto;
  max-width: none;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0 !important;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

/* Prev link: arrow left of text */
.project-pagination--sidebar .project-pagination__link--previous {
  flex-direction: row;
}

/* Next link: arrow right of text — align to right edge */
.project-pagination--sidebar .project-pagination__link--next {
  flex-direction: row-reverse;
  align-items: center;
  text-align: right;
  margin-left: auto;
}

/* Show direction labels (e.g. Previous Project / Next Project) in the sidebar — hide the project name */
.project-pagination--sidebar .project-pagination__direction {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 1;
}

.project-pagination--sidebar .project-pagination__title {
  display: none;
}

/* Sidebar hover: brighten to full white */
.project-pagination--sidebar .project-pagination__link:hover,
.project-pagination--sidebar .project-pagination__link:focus {
  background: transparent;
  border: none;
  color: #fff;
  transform: none;
  opacity: 1;
  text-decoration: none;
}

/* ─── BOTTOM pagination: quiet service navigation control ───────────────── */
.project-pagination--bottom {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 14px 0;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #333;
  overflow: visible;
}

.project-pagination--bottom .project-pagination__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  overflow: visible;
}

/* Card base — shared defaults (applies to bottom only via specificity) */
.project-pagination__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 4.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 !important;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

/* Bottom: themed bookend band */
.project-pagination--bottom .project-pagination__link {
  min-height: 0;
  flex: 1 1 0;
  padding: 0.45rem 0;
  background: transparent;
  border: 0;
  color: #3f3f3f;
  overflow: visible;
  white-space: normal;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.project-pagination__link--next {
  align-items: flex-end;
  text-align: right;
}

.project-pagination--bottom .project-pagination__link--previous {
  align-items: center;
  padding-right: 1rem;
  margin-bottom: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 0;
  text-align: left;
}

.project-pagination--bottom .project-pagination__link--next {
  border-left: 0;
  align-items: center;
  justify-content: flex-end;
  padding-left: 1rem;
}

.project-pagination__direction {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.8;
}

.project-pagination__title {
  display: block;
  max-width: 100%;
  margin-top: 0.25rem;
  overflow: visible;
  overflow-wrap: break-word;
  color: inherit;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.project-pagination--bottom .project-pagination__direction {
  display: none;
}

.project-pagination--bottom .project-pagination__title {
  margin-top: 0;
  color: inherit;
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 600;
  line-height: 1.35;
}

.project-pagination--bottom .project-pagination__link--previous::before,
.project-pagination--bottom .project-pagination__link--next::after {
  flex: 0 0 auto;
  color: var(--project-accent, #8a1538);
  font-size: 1rem;
  line-height: 1;
}

.project-pagination--bottom .project-pagination__link--previous::before {
  content: "\2190";
}

.project-pagination--bottom .project-pagination__link--next::after {
  content: "\2192";
}

/* Bottom hover: subtle link affordance only */
.project-pagination--bottom .project-pagination__link:hover,
.project-pagination--bottom .project-pagination__link:focus {
  background: transparent;
  color: var(--project-accent, #8a1538);
  opacity: 1;
  transform: none;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (min-width: 768px) {
  .project-pagination--bottom .project-pagination__inner {
    align-items: center;
    flex-direction: row;
  }

  .project-pagination--bottom .project-pagination__link {
    flex: 1 1 50%;
    max-width: 50%;
  }

  .project-pagination--bottom .project-pagination__link--previous {
    padding-right: 1rem;
    padding-bottom: 0;
    margin-bottom: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 0;
  }

  .project-pagination--bottom .project-pagination__link--next {
    padding-left: 1rem;
  }
}

.project-gallery--legacy .project-gallery-items {
  display: contents;
}

.project-gallery--legacy .gallery-tile {
  background: #262626 !important;
  grid-column: span var(--tile-cols);
  grid-row: span 1;
  overflow: hidden;
}

/* Filters set tile.hidden = true — ensure [hidden] wins over any display:!important layout rules */
.project-gallery--legacy .gallery-tile[hidden] {
  display: none !important;
  visibility: hidden !important;
}

.project-gallery--legacy .gallery-tile__link,
.project-gallery--legacy .gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* All images fill tiles completely — no grey gaps */
.project-gallery--legacy .gallery-tile img {
  object-fit: cover;
  object-position: center top;
  background: #262626 !important;
}

.project-gallery--legacy .gallery-tile figcaption {
  display: none;
}

/* ─── Website-screen layout ─────────────────────────────────────────────────
 * Website mockups are full-page portrait scroll captures (ratio 0.27–0.72).
 * We show a fixed 480px 'above the fold' preview — cover + top-center.
 * The full image is always accessible via lightbox click.
 * ───────────────────────────────────────────────────────────────────────── */
.project-gallery--legacy.layout--website-screen .project-migration-grid {
  grid-auto-rows: 480px;
  background: #111;
  gap: 8px;
  padding: 8px;
}

.project-gallery--legacy.layout--website-screen .gallery-tile {
  --tile-cols: 4;
  background: #111;
}

.project-gallery--legacy.layout--website-screen .gallery-tile img {
  object-fit: cover;
  object-position: top center;
  background: #111;
}

/* ─── Tablet ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .project-gallery--legacy .project-migration-grid {
    grid-auto-rows: clamp(180px, 22vw, 260px);
  }

  .project-gallery--legacy.layout--website-screen .project-migration-grid {
    grid-auto-rows: 380px;
  }
}

/* ─── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .project-gallery--legacy .project-migration-grid {
    --gallery-cols: 2;
    grid-auto-rows: clamp(150px, 36vw, 220px);
    gap: 6px;
    padding: 6px;
  }

  .project-gallery--legacy .proj-intro {
    grid-column: span 2;
    grid-row: span 1;
  }

  .project-gallery--legacy .gallery-tile,
  .project-gallery--legacy .gallery-tile[data-cols] {
    --tile-cols: 2;
  }

  .project-gallery--legacy.layout--website-screen .project-migration-grid {
    grid-auto-rows: 300px;
  }

  .project-gallery--legacy.layout--website-screen .gallery-tile {
    --tile-cols: 2;
  }

  .project-pagination--bottom {
    padding: 12px 0;
  }

  .project-pagination--bottom .project-pagination__inner {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  /* Mobile: compact tap targets, allow long service names to wrap */
  .project-pagination--bottom .project-pagination__link {
    flex: 1 1 auto;
    max-width: none;
    min-height: 2.75rem;
    overflow: visible;
    white-space: normal;
  }

  .project-pagination--bottom .project-pagination__link--previous {
    align-items: center;
    padding-right: 0.65rem;
    padding-bottom: 0;
    margin-bottom: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 0;
    text-align: left;
  }

  .project-pagination--bottom .project-pagination__link--next {
    align-items: center;
    padding-left: 0.65rem;
    border-left: 0;
    text-align: right;
  }

  .project-pagination__title {
    white-space: normal;
  }

  /* On mobile the panel is full-width above the gallery.
     The bottom nav handles all browsing — hide the top text links. */
  .project-pagination--sidebar {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(7rem, 11vw, 10rem) clamp(1.5rem, 5.8vw, 7rem) clamp(3rem, 7vw, 6rem);
  min-height: min(82vh, 760px);
}

.project-hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.project-hero__title {
  margin: 0 0 2rem;
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  color: rgba(21, 21, 21, 0.3);
}

.project-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
  max-width: 42rem;
}

.project-brief div {
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  padding-top: 0.75rem;
}

.project-brief dt {
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

.project-brief dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #151515;
}

.project-hero__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: #111;
}

.project-hero__media img,
.project-hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transform: scale(1);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.project-hero__media:hover img,
.project-hero__media:hover video {
  filter: grayscale(0%);
  transform: scale(1.04);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 clamp(1.5rem, 5.8vw, 7rem) 1.25rem;
}

.project-filter__button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: rgba(0, 0, 0, 0.56);
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  padding: 0.35rem 0;
  text-transform: uppercase;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.project-filter__button:hover,
.project-filter__button:focus,
.project-filter__button.is-active {
  border-color: #151515;
  color: #151515;
}

.project-gallery .gallery-mosaic {
  grid-template-columns: repeat(var(--gallery-cols, 6), minmax(0, 1fr));
}

.project-gallery .gallery-tile figcaption {
  margin-top: 0.65rem;
  color: rgba(21, 21, 21, 0.62);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.project-page[data-project-view="campaign"] .project-hero__title {
  color: #151515;
}

.vbox-title .vbox-project-caption {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: "Montserrat", sans-serif;
}

.vbox-title .vbox-project-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vbox-title .vbox-brand-link {
  border-bottom: 1px solid currentColor;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 5.8vw, 7rem);
  background: #fff;
}

.project-nav__link {
  min-height: 8rem;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: #151515;
  text-decoration: none;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.project-nav__link span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.52);
}

.project-nav__link strong {
  display: block;
  font-size: clamp(1.1rem, 2.5vw, 1.7rem);
  line-height: 1.1;
}

.project-nav__link:hover,
.project-nav__link:focus {
  background: #151515;
  color: #fff;
  text-decoration: none;
}

.project-nav__link:hover span,
.project-nav__link:focus span {
  color: rgba(255, 255, 255, 0.62);
}

[data-reveal] .oh span,
.gallery-tile,
.project-nav__link {
  opacity: 0;
  transform: translate3d(0, 1.4rem, 0);
}

[data-reveal].is-inview .oh span,
.gallery-tile.is-inview,
.project-nav__link.is-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.6s ease;
}

@media (max-width: 991px) {
  .project-hero,
  .project-nav {
    grid-template-columns: 1fr;
  }

  .project-brief {
    grid-template-columns: 1fr;
  }

  .project-gallery--legacy {
    padding-top: 0;
  }

  .project-gallery--legacy .project-migration-grid {
    --gallery-cols: 2;
    grid-template-columns: repeat(var(--gallery-cols), minmax(0, 1fr));
    grid-template-rows: auto;
    grid-auto-rows: 220px;
    margin: 0;
    padding: 8px;
  }

  .project-gallery--legacy .proj-intro,
  .project-gallery--legacy .gallery-tile,
  .project-gallery--legacy .gallery-tile:nth-child(n) {
    grid-column: span 2;
    grid-row: span 1;
  }


  .project-gallery--legacy .project-filters {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .project-gallery--legacy .project-migration-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-auto-rows: 240px;
    gap: 8px;
  }

  .project-gallery--legacy .proj-intro,
  .project-gallery--legacy .gallery-tile,
  .project-gallery--legacy .gallery-tile:nth-child(n) {
    grid-column: span 1;
  }

}

/* Navigation Preview Links (UX Fix 3) */
.project-navigation-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.project-navigation-links a {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: opacity 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  max-width: 50%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-navigation-links a:hover {
  opacity: 0.7;
}

@media (max-width: 575.98px) {
  .project-navigation-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .project-navigation-links a {
    max-width: 100%;
  }
}

/* Lightbox transparency, sizing and proportion overrides */
.vbox-content {
  background: transparent !important;
  background-color: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

img.vbox-figlio {
  background: transparent !important;
  background-color: transparent !important;
  max-width: 85vw !important;
  max-height: 80vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* ─── Desktop 2-Column Layout & Masonry Grid overrides ────────────────────── */
@media (min-width: 992px) {
  /* 1. Reset the grid to a flexbox container on desktop with 20px gap */
  .project-gallery--legacy .project-migration-grid {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 20px !important;
    background: transparent !important;
  }

  /* 2. Style the intro panel as a sticky sidebar */
  .project-gallery--legacy .proj-intro {
    position: -webkit-sticky !important; /* Safari compatibility */
    position: sticky !important;
    top: 88px !important;
    align-self: flex-start !important;
    z-index: 100 !important;
    width: 320px !important;
    flex-shrink: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 108px) !important;
    overflow-y: auto !important;
    margin: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
    border-radius: 0 !important;
    background: #262626 !important;
  }

  .project-gallery--legacy .proj-intro .proj {
    background: #262626 !important;
  }

  /* 3. Style the gallery items container as a dedicated CSS Masonry Column Layout */
  .project-gallery--legacy .project-gallery-items {
    display: block !important;
    flex-grow: 1 !important;
    column-gap: 20px !important;
  }

  @media (min-width: 1200px) {
    .project-gallery--legacy .project-gallery-items {
      column-count: 3 !important;
    }
  }
  @media (max-width: 1199.98px) {
    .project-gallery--legacy .project-gallery-items {
      column-count: 2 !important;
    }
  }

  /* 4. Style tiles and images inside masonry */
  .project-gallery--legacy .gallery-tile {
    display: inline-block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    break-inside: avoid !important;
    background: #262626 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }

  .project-gallery--legacy .gallery-tile img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 0 !important;
  }
}

/* ─── Mobile/Tablet Vertical Scroll Layout (< 992px) ────────────────────────── */
@media (max-width: 991.98px) {
  .project-gallery--legacy .project-migration-grid {
    display: block !important;
    padding: 16px !important;
    background: transparent !important;
  }

  .project-gallery--legacy .proj-intro {
    width: 100% !important;
    margin: 0 0 24px 0 !important;
    background: #262626 !important;
    border-radius: 0 !important;
  }

  .project-gallery--legacy .proj-intro .proj {
    background: #262626 !important;
  }

  /* Gallery becomes a vertical masonry column layout scrolling downwards */
  .project-gallery--legacy .project-gallery-items {
    display: block !important;
    column-gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: visible !important;
  }

  /* Sized to fit naturally in vertical flow, contained image with no margins/borders */
  .project-gallery--legacy .gallery-tile {
    display: inline-block !important;
    width: 100% !important;
    height: auto !important;
    background: #262626 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    margin: 0 0 20px 0 !important;
    break-inside: avoid !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  .project-gallery--legacy.layout--website-screen .gallery-tile {
    background: #111 !important;
  }

  .project-gallery--legacy .gallery-tile__link {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .project-gallery--legacy .gallery-tile img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    display: block !important;
    background: transparent !important;
  }
}

/* Responsive Column Counts for Mobile/Tablet Viewports */
@media (min-width: 600px) and (max-width: 991.98px) {
  .project-gallery--legacy .project-gallery-items {
    column-count: 2 !important;
  }
}

@media (max-width: 599.98px) {
  .project-gallery--legacy .project-gallery-items {
    column-count: 1 !important;
  }
}

/* ─── Website Screen Layout Previews (Constrain very long mockups) ────────── */
.project-gallery--legacy.layout--website-screen .gallery-tile {
  overflow: hidden !important;
}

.project-gallery--legacy.layout--website-screen .gallery-tile img {
  object-fit: cover !important;
  object-position: top center !important;
  width: 100% !important;
}

@media (min-width: 992px) {
  .project-gallery--legacy.layout--website-screen .gallery-tile {
    height: 480px !important;
  }
  .project-gallery--legacy.layout--website-screen .gallery-tile img {
    height: 480px !important;
  }
}

@media (max-width: 991.98px) {
  .project-gallery--legacy.layout--website-screen .gallery-tile {
    height: 300px !important;
    margin-bottom: 20px !important;
  }
  .project-gallery--legacy.layout--website-screen .gallery-tile img {
    height: 300px !important;
  }
}



/* --------------------------------------------------------------------------
   Antigravity Visual Aesthetics & Global Card Hover Updates
   -------------------------------------------------------------------------- */

/* Ensure all portfolio, gallery, and case study cards/images have sharp corners globally */
.gallery-tile,
.gallery-tile__link,
.gallery-tile img,
.gallery-tile__link img,
.card-container,
.card-image {
  border-radius: 0 !important;
}

/* Global Card Hover Image Zoom Interaction */
.gallery-tile,
.card-container {
  overflow: hidden !important;
}

.gallery-tile img,
.gallery-tile__link img,
.card-image {
  transition: transform 0.4s ease !important;
}

/* Hover Zoom */
.gallery-tile:hover img,
.gallery-tile__link:hover img,
.card-container:hover .card-image {
  transform: scale(1.04) !important;
}

/* Invert primary button style on hover (transparent/white border -> solid white/dark text) */
.btn {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, padding 0.4s ease, transform 0.4s ease !important;
  border-radius: 0 !important; /* Sharp corners */
  background-color: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 24px !important;
  min-height: 44px !important;
}

.btn span {
  color: #fff !important;
  font-size: 14px !important;
  padding: 0 !important;
  margin-left: 10px !important;
  transition: color 0.4s ease !important;
}

.btn .fa {
  position: static !important;
  margin: 0 !important;
  color: #fff !important;
  transition: color 0.4s ease, transform 0.4s ease !important;
}

.btn:hover {
  background-color: #fff !important;
  color: #151515 !important;
  border-color: #fff !important;
  padding: 8px 24px !important;
}

.btn:hover span {
  color: #151515 !important;
}

.btn:hover .fa {
  color: #151515 !important;
}

/* Footer hub/contact link */
.btn-hub-link {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  border: 2px solid #fff !important;
  color: #fff !important;
}

.btn-hub-link:hover {
  background-color: #fff !important;
  color: #151515 !important;
  border-color: #fff !important;
}

/* Invert individual project navigation/back buttons if applicable */
.btn-back {
  border-radius: 0 !important;
}

/* --------------------------------------------------------------------------
   Case Studies Hero & Cross-Fading Background Carousel
   -------------------------------------------------------------------------- */
.hero-carousel-parent {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(75vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-carousel-parent::before {
  display: none !important; /* Disable style.css default dark overlay to use custom track */
}

@media (max-width: 992px) {
  .hero-carousel-parent {
    height: calc(100vh - 60px);
  }
}

.hero-carousel-track {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-carousel-slide.active {
  opacity: 1;
}

.hero-carousel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
  pointer-events: none;
}

.hero-carousel-parent .container {
  position: relative;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   Alignment & Container Tweaks for Case Studies Grid
   -------------------------------------------------------------------------- */
.container .project-migration-grid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Dark button variant for light backgrounds */
.btn-dark {
  border: 1px solid #151515 !important;
  color: #151515 !important;
}

.btn-dark span {
  color: #151515 !important;
}

.btn-dark .fa {
  color: #151515 !important;
}

/* --------------------------------------------------------------------------
   Final Portfolio Intro Panel Alignment
   --------------------------------------------------------------------------
   Generated section pages and generated case-study pages share the same intro
   panel markup. Keep that panel in normal flow, top-flush with the gallery
   column, and center its contents without using sticky positioning.
*/
.project-gallery--legacy .project-migration-grid {
  align-items: flex-start !important;
}

.project-gallery--legacy .proj-intro {
  position: static !important;
  top: auto !important;
  align-self: flex-start !important;
  display: flex !important;
  align-items: flex-start !important;  /* keep back button & content left-aligned */
  justify-content: flex-start !important;
  overflow: visible !important;
  margin-top: 0 !important;
}

.project-gallery--legacy .proj-intro .proj {
  width: 100% !important;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* prevent children from stretching or centering */
  justify-content: flex-start !important;
}

.project-gallery--legacy .project-gallery-items {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (min-width: 992px) {
  .project-gallery--legacy .proj-intro {
    width: 320px !important;
    flex: 0 0 320px !important;
    max-height: none !important;
  }
}

@media (max-width: 991.98px) {
  .project-gallery--legacy .proj-intro {
    display: block !important;
    margin-bottom: 20px !important;
  }

  .project-gallery--legacy .proj-intro .proj {
    min-height: auto;
    justify-content: flex-start !important;
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
  }
}

.btn-dark:hover {
  background-color: #151515 !important;
  color: #fff !important;
  border-color: #151515 !important;
}

.btn-dark:hover span {
  color: #fff !important;
}

.btn-dark:hover .fa {
  color: #fff !important;
}

.container .service-page-cards {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* --------------------------------------------------------------------------
   About Section - Premium Split-Screen & Creative Timeline Styling
   -------------------------------------------------------------------------- */

.about-section {
  padding: 0 !important;
  background: #ffffff;
  overflow: visible !important;
}

/* Split content block container */
.about-split-block {
  display: flex;
  flex-direction: row;
  min-height: 90vh;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid #f5f5f5;
}

.about-split-block:nth-child(even) {
  flex-direction: row-reverse;
}

/* Split Content on the left/right */
.about-split-content {
  width: 50%;
  padding: 8% 8% 8% 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 2;
  background: #ffffff;
  box-sizing: border-box;
}

.about-split-block:nth-child(even) .about-split-content {
  padding: 8% 10% 8% 8%;
}

/* Split Image on the right/left */
.about-split-image {
  width: 50%;
  height: 90vh;
  overflow: hidden;
  position: relative;
}

/* Actual image zooming on hover */
.about-image-zoom {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.about-split-block:hover .about-image-zoom {
  transform: scale(1.05);
}

.about-watermark {
  position: absolute;
  top: 15px;
  left: 6%;
  font-family: 'Montserrat', sans-serif;
  font-size: 110px !important;
  font-weight: bold !important; /* Aligned with homepage h2 headings */
  letter-spacing: normal !important; /* Aligned with homepage h2 headings */
  color: #151515 !important; /* Matches team watermark color */
  opacity: 0.3 !important; /* Matches team watermark opacity */
  line-height: 1.1 !important; /* Aligned with homepage h2 headings */
  pointer-events: none;
  z-index: 1;
  text-transform: lowercase;
  user-select: none;
}

@media (max-width: 1455px) {
  .about-watermark {
    font-size: 80px !important;
  }
}

.about-split-block:nth-child(even) .about-watermark {
  left: auto;
  right: 6%;
}

/* Content typography */
.about-split-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem) !important;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #111111 !important;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.about-split-meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999999 !important;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.about-split-text {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px !important;
  line-height: 1.85;
  color: #555555 !important;
  margin-bottom: 30px;
  max-width: 52ch;
  position: relative;
  z-index: 2;
}

/* Values Grid inside block 2 */
.values-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.value-item h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111111 !important;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.value-item h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 2px;
  background: #111111;
}

.value-item p {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px !important;
  line-height: 1.65;
  color: #555555 !important;
  margin: 0;
  max-width: 52ch;
}

/* Core Values custom list styling (no plain list numbers) */
.values-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  padding: 0;
  margin: 14px 0 0 0;
  list-style: none;
  width: 100%;
  counter-reset: li-counter;
}

.values-list li {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px !important;
  font-weight: 600;
  color: #444444 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom numbers indicator */
.values-list li::before {
  content: counter(li-counter);
  counter-increment: li-counter;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #111111;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Timeline Section Styling */
.about-timeline-section {
  padding: 100px 5% 120px;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}

.about-timeline-section .about-watermark {
  top: 40px;
  left: 5%;
}

.about-timeline-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: #111111;
  text-align: center;
  position: relative;
  z-index: 2;
}

.about-timeline-sub {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: #777777;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 80px;
  position: relative;
  z-index: 2;
}

/* Timeline Layout */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e5e5;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

/* Badges (years) */
.timeline-badge {
  position: absolute;
  top: 22px;
  width: 76px;
  height: 32px;
  line-height: 32px;
  background: #111111;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  z-index: 5;
}

.timeline-item.left .timeline-badge {
  right: -38px;
}

.timeline-item.right .timeline-badge {
  left: -38px;
}

/* Panels */
.timeline-panel {
  background: #ffffff;
  padding: 22px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid #eeeeee;
  position: relative;
  display: inline-block;
  text-align: left;
  max-width: 100%;
}

.timeline-panel p {
  font-family: 'Open Sans', sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: #444444;
  margin: 0;
}

/* Responsive Override: Mobile Stack */
@media (max-width: 865px) {
  .about-split-block, 
  .about-split-block:nth-child(even) {
    flex-direction: column !important;
    min-height: auto;
  }

  .about-split-content,
  .about-split-block:nth-child(even) .about-split-content {
    width: 100% !important;
    padding: 60px 20px 40px !important;
  }

  .about-split-image {
    width: 100% !important;
    height: 320px !important;
  }

  .about-watermark {
    font-size: 4.5rem !important;
    top: 15px !important;
    left: 20px !important;
  }

  .about-split-title {
    font-size: 1.85rem !important;
  }
}

/* --------------------------------------------------------------------------
   About Velo Slideshow Overrides (Desktop & Mobile)
   -------------------------------------------------------------------------- */

.velo-slider__hint {
  display: none !important;
}

.milestones-bullet-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.milestones-bullet-list li {
  font-family: 'Open Sans', sans-serif;
  font-size: 14.5px !important;
  line-height: 1.75;
  color: #555555 !important;
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
}

.milestones-bullet-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #555555;
  font-weight: normal;
}

/* Custom scrollbar for scrollable text */
.velo-slide__text::-webkit-scrollbar {
  width: 4px;
}
.velo-slide__text::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}
.velo-slide__text::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

@media (min-width: 866px) {
  .about-section {
    background: #ffffff !important;
    overflow: visible !important;
  }
  
  .velo-slides {
    height: 90vh !important;
    background-color: #ffffff !important;
  }

  .velo-slide {
    height: 90vh !important;
    background: #ffffff !important;
  }

  .velo-slide__bg {
    width: 100% !important;
    height: 100% !important;
    padding-right: 0 !important;
    background: transparent !important;
  }

  .velo-slide__figure {
    width: 50% !important;
    height: 100% !important;
    top: 0 !important;
    float: right !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  #about {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }

  #about .velo-slides {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .velo-slide__header {
    width: 50% !important;
    height: 100% !important;
    padding: 6% 8% 6% 18% !important; /* Expanded left padding to completely clear chevrons without overlapping */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    z-index: 9 !important;
  }

  .velo-slide__title {
    margin-bottom: 24px !important; /* Added clean spacing below the title */
  }

  .velo-slide__text {
    text-align: left !important;
    color: #555555 !important;
    max-width: 52ch !important;
    margin-bottom: 20px !important;
  }
  
  .velo-slide--long .velo-slide__text {
    overflow-y: auto !important;
    max-height: 52vh !important;
    padding-right: 15px !important;
  }

  .velo-slide--skills .skills-bar-container {
    width: 100% !important;
    max-width: 52ch !important;
    margin-top: 15px !important;
  }

  .values-grid {
    margin-top: 18px !important;
    gap: 20px !important;
  }
}

@media (max-width: 865px) {
  #about.about-section,
  #about {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 0 !important;
  }

  #about .velo-slides {
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  [data-velo-slider=on] .velo-slide {
    position: relative !important;
    inset: auto !important;
    display: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    overflow: visible !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  [data-velo-slider=on] .velo-slide.is-active {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  .velo-slide__bg {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    position: relative !important;
    overflow: visible !important;
  }
  
  .velo-slide__figure {
    height: 280px !important;
    min-height: 280px !important;
    width: 100% !important;
    float: none !important;
    top: 0 !important;
  }

  .velo-slide__header {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    padding: 40px 20px 72px !important;
    width: 100% !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .velo-slide__text {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-y: visible !important;
    text-align: left !important;
  }

  .velo-slide--long .velo-slide__text {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .velo-slide .skills-bar-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Make navigation chevrons sticky so they float as user scrolls the slide text */
  .velo-slides-nav {
    position: sticky !important;
    bottom: 1rem !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: fit-content !important;
    transform: none !important;
    margin-top: -56px !important;
    margin-bottom: 16px !important;
    z-index: 100 !important;
  }
}

/* Drop values list to 1 column on smaller mobile viewports to prevent squished text */
@media (max-width: 480px) {
  .values-list {
    grid-template-columns: 1fr !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile-Only Structural Fixes & Typography Scale (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* 1. Watermark Flow (Render watermark as a relative block on top of heading, rather than hidden) */
  .about-watermark {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    font-size: clamp(3rem, 12vw, 4.5rem) !important;
    font-weight: bold !important; /* Aligned with homepage h2 headings */
    letter-spacing: normal !important; /* Aligned with homepage h2 headings */
    color: #151515 !important;
    opacity: 0.3 !important;
    line-height: 1.1 !important; /* Aligned with homepage h2 headings */
    margin-bottom: 0.75rem !important;
    text-transform: lowercase !important;
  }

  /* 2. CTA Button Formatting (Convert inline link to a clear 48px tap target button) */
  .velo-slide__btn {
    margin-top: 24px !important;
    display: block !important;
  }

  .velo-slide__btn .btn-draw {
    background-color: #111111 !important;
    border: 1px solid #111111 !important;
    border-radius: 0 !important;
    width: auto !important;
    display: inline-block !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
  }

  .velo-slide__btn .btn-draw .btn-draw__text {
    color: #ffffff !important;
    padding: 12px 24px !important;
    min-height: 48px !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.1em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    border-bottom: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 5. Navigation Controls Styling & Stacking Fixes */
  .velo-slides-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    position: absolute !important;
    left: 5.5% !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    width: auto !important;
    z-index: 100 !important;
  }

  .velo-slides-nav__list,
  .velo-slides-nav__list li {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .velo-slides-nav li:first-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  .velo-slides-nav a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    z-index: 101 !important;
    pointer-events: auto !important;
    transition: all 0.2s ease !important;
  }

  .velo-slides-nav a:hover {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
  }

  .velo-slides-nav a i {
    color: inherit !important;
    font-size: 1.1rem !important;
  }

  /* Vertical label in the middle of the chevrons */
  .velo-slides-nav__label {
    display: block !important;
    writing-mode: vertical-rl !important;
    transform: rotate(180deg) !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    color: #888888 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    margin: 15px 0 !important;
    user-select: none !important;
  }

  /* Page count */
  .velo-slides-nav__count {
    display: block !important;
    color: #666666 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  /* Keep inactive buttons hidden */
  .velo-slides-nav a.inactive {
    display: none !important;
    opacity: 0 !important;
  }

  /* Velo Slide Content Animations (Transition on Active State) */
  .velo-slide__meta,
  .velo-slide__text,
  .velo-slide__btn,
  .skills-bar-container,
  .values-grid {
    opacity: 0 !important;
    transform: translate3d(0, 20px, 0) !important;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease !important;
  }

  .is-active .velo-slide__text,
  .is-active .velo-slide__meta,
  .is-active .velo-slide__btn,
  .is-active .skills-bar-container,
  .is-active .values-grid {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
  }

  /* Stagger transitions slightly for a premium feel */
  .is-active .velo-slide__meta {
    transition-delay: 0.1s !important;
  }
  .is-active .velo-slide__text {
    transition-delay: 0.2s !important;
  }
  .is-active .velo-slide__btn {
    transition-delay: 0.3s !important;
  }
}

/* Mobile fallback for Velo slide content (disable slide/fade animations) */
@media (max-width: 865px) {
  .velo-slide__meta,
  .velo-slide__text,
  .velo-slide__btn,
  .skills-bar-container,
  .values-grid {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Generated gallery-v2 pages: keep audiovisual/video grids in real document flow.
   The older legacy template uses CSS columns on mobile, which can leave large
   blank areas in full-page captures and on some narrow browsers. */
@media (max-width: 991.98px) {
  .project-gallery--legacy.gallery-v2 .project-gallery-items {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-count: auto !important;
    column-gap: 0 !important;
    gap: 18px !important;
    width: 100% !important;
  }

  .project-gallery--legacy.gallery-v2 .gallery-tile {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    break-inside: auto !important;
    opacity: 1 !important;
    transform: none !important;
    content-visibility: visible !important;
    contain-intrinsic-size: none !important;
  }
}

@media (max-width: 599.98px) {
  .project-gallery--legacy.gallery-v2 .project-gallery-items {
    grid-template-columns: 1fr !important;
  }
}

.project-gallery--legacy.gallery-v2 .gallery-tile {
  opacity: 1 !important;
  transform: none !important;
  content-visibility: visible !important;
  contain-intrinsic-size: none !important;
}

.project-gallery--legacy.gallery-v2 .gallery-tile--audio .gallery-tile__link {
  min-height: 260px !important;
  height: 260px !important;
}

.project-gallery--legacy.gallery-v2 .gallery-tile--audio img {
  height: 100% !important;
  min-height: 260px !important;
  object-fit: cover !important;
}

.project-gallery--legacy.gallery-v2 .gallery-audio-card__panel h2 {
  font-size: clamp(1.05rem, 1.5vw, 1.45rem) !important;
  line-height: 1.08 !important;
}

.project-gallery--legacy.gallery-v2 .gallery-tile--website-logo {
  background: transparent !important;
  height: 360px !important;
}

.project-gallery--legacy.gallery-v2.layout--website-card-grid .project-migration-grid {
  grid-auto-rows: 360px;
}

.project-gallery--legacy.gallery-v2.layout--website-card-grid .project-gallery-items {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-count: auto !important;
  gap: 20px !important;
  width: 100%;
}

.project-gallery--legacy.gallery-v2.layout--website-card-grid .gallery-tile--website-logo {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  break-inside: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
}


.project-gallery--legacy.gallery-v2 .gallery-tile {
  contain-intrinsic-size: auto clamp(220px, 30vw, 360px) !important;
}

@media (max-width: 599.98px) {
  .project-gallery--legacy.gallery-v2.layout--website-card-grid .project-gallery-items {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .project-gallery--legacy.gallery-v2 .gallery-tile--website-logo {
    height: 280px !important;
  }

  .project-gallery--legacy.gallery-v2.layout--website-card-grid .project-migration-grid {
    grid-auto-rows: 280px;
  }

  .project-gallery--legacy.gallery-v2 .website-work-card {
    min-height: 280px;
  }

  .project-gallery--legacy.gallery-v2 .gallery-tile--audio .gallery-tile__link {
    min-height: 235px !important;
    height: 235px !important;
  }

  .project-gallery--legacy.gallery-v2 .gallery-tile--audio img {
    min-height: 235px !important;
  }
}

@media (min-width: 600px) and (max-width: 1199.98px) {
  .project-gallery--legacy.gallery-v2.layout--website-card-grid .project-gallery-items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
