  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { width: 100%; height: 100%; }

  /* ── Global interaction states ─────────────────────────────────────────
     • No tap-highlight rectangle on mobile
     • Hide the default focus outline for mouse/touch (it sticks after click).
       The :focus-visible rule below keeps a clean outline for keyboard nav.
     • 25% press dim on any clickable element (opacity 0.75 on :active) —
       composes with existing transform scale-on-press where present. */
  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }
  button:focus,
  a:focus,
  [tabindex]:focus {
    outline: none;
  }
  button:focus-visible,
  a:focus-visible,
  [tabindex]:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
  }
  button:active,
  a:active {
    opacity: 0.75;
  }

  body {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
  }

  /* ── Full-screen grid lines ── */
  .grid-h {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 40px;
    pointer-events: none;
    z-index: 10;
    will-change: top;
  }
  .grid-h::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    border-top: 1px solid #C6C6C6;
  }
  .grid-v {
    position: fixed;
    top: 0;
    height: 100vh;
    width: 40px;
    pointer-events: none;
    z-index: 0;
    will-change: left;
  }
  #gridVLeft::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; right: 0;
    border-right: 1px solid #C6C6C6;
  }
  #gridVRight::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    border-left: 1px solid #C6C6C6;
  }

  /* ── Stage ── */
  .stage {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100vw; /* cap at viewport so widget never overflows on mobile */
    /* Animated vertical slide (centre → top and back) */
    transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* ── Widget wrapper ── */
  .widget-wrapper {
    display: inline-flex;
    flex-direction: column;
    width: 232px;
    min-width: 0;
    max-width: 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    flex-shrink: 0;
  }
  .widget-wrapper.menu-open { width: 360px; }
  .widget-wrapper.route-sub { width: 400px; }
  /* Desktop close FLIP — hide interior content but keep the wrapper as a
     visible solid box (black background) so the user can SEE the full
     rectangle shrink + move to centre. Without the background, only the red
     header strip would be visible and the shrink would be invisible. */
  .widget-wrapper.desktop-collapsing {
    background: #000;
  }
  .widget-wrapper.desktop-collapsing .widget-header-title,
  .widget-wrapper.desktop-collapsing .views > * {
    opacity: 0 !important;
    transition: opacity 0.18s ease !important;
  }
  /* route-work collapses the header title — width same as route-sub */
  .widget-wrapper.route-work { width: 400px; }
  .widget-wrapper.route-work .widget-header-title {
    max-height: 0 !important;
    margin-top: 0 !important;
    opacity: 0 !important;
    transform: translateY(-12px); /* slide up on exit, down on re-enter */
    pointer-events: none;
  }

  /* ── First-load intro: logo-sized square only, then expand to full widget ── */
  .widget-wrapper.intro {
    width: 128px;
    pointer-events: none;
  }
  .widget-wrapper.intro .clock-ticker {
    height: 0;
    min-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  .widget-wrapper.intro .clock-track {
    animation: none;
  }
  .widget-wrapper.intro .widget-header-top {
    justify-content: center;
    gap: 0;
  }
  .widget-wrapper.intro #chromeBtn {
    display: none;
  }
  .widget-wrapper.intro .toggle-btn {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: rotate(210deg);
  }

  /* ── Clock ticker ── */
  .clock-ticker {
    width: 100%;
    overflow: hidden;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: #ffffff;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s, opacity 0.7s ease 0.4s;
  }
  .clock-track {
    display: flex;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
  }
  @keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  .clock-segment {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    font-family: 'Kode Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #000;
    height: 50px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Views container: stacked instead of side-by-side ── */
  .views {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #000; /* prevents white flash during sequential transitions */
  }

  /* ── VIEW 1: Home (always in flow) ── */
  .view-home {
    position: relative;
    width: 100%;
    /* Fade/collapse animation for disappearing */
    transition: opacity 0.5s ease, max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 600px;
    overflow: hidden;
  }
  .view-home.disappearing {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
  }
  .view-home.hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    overflow: hidden;
  }

  /* ── Sub-page views (Profile, Works, Contact): layered on top ── */
  .view-sub {
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease,
                max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .view-sub.revealing {
    opacity: 1;
    max-height: 800px;
    pointer-events: auto;
  }
  .view-sub.active {
    opacity: 1;
    max-height: 800px;
    pointer-events: auto;
  }
  /* Leaving view fades out (height kept by the frozen container during sub→sub transitions) */
  .view-sub.disappearing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  /* Slide the inner content independently — no overflow clip on this element */
  .view-sub .sub-page {
    transform: translateY(16px);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .view-sub.revealing .sub-page,
  .view-sub.active .sub-page {
    transform: translateY(0);
  }
  .view-sub.disappearing .sub-page {
    transform: translateY(0);
    transition: none;
  }

  /* ── Shared red header (home + all sub-pages) ── */
  .widget-header {
    background: #D70000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;          /* gap removed — title margin-top drives spacing */
    padding: 24px;
    transition: padding 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .widget-header-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
  }
  .widget-header-title {
    margin: 0;          /* margin-top animates to create the gap */
    font-family: 'Geist', sans-serif;
    font-weight: 900;
    /* Fluid: shrinks on narrow widgets so longer titles like PORTFOLIO fit on
       one line, caps at 60px on desktop. */
    font-size: clamp(36px, 11vw, 60px);
    /* line-height: 1 (instead of 75%) prevents the font's em-box from
       extending above/below the line box, which was clipping the top + bottom
       of round letters like O when combined with overflow: hidden. */
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    /* Collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px);
    /* All properties share the same duration + easing → one unified motion */
    transition:
      max-height  0.38s cubic-bezier(0.4, 0, 0.2, 1),
      margin-top  0.38s cubic-bezier(0.4, 0, 0.2, 1),
      font-size   0.38s cubic-bezier(0.4, 0, 0.2, 1),
      opacity     0.15s ease,
      transform   0.38s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  .widget-wrapper.route-sub .widget-header-title {
    max-height: 1.1em;  /* scales with font-size, leaves room so caps + round
                           letters aren't clipped at top or bottom */
    margin-top: 40px;   /* replaces the old gap: 40px */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .logo {
    width: 80px; height: 80px; flex-shrink: 0;
    overflow: hidden;
    transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.28s ease;
  }
  .logo svg { width: 100%; height: 100%; display: block; }
  .toggle-btn {
    width: 80px; height: 80px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, 
              opacity 0.35s ease 0.6s, 
              width 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.6s, 
              height 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
              transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s;  }
  .toggle-btn:hover  { background: #ebebeb; }
  .toggle-btn:active { transform: scale(0.95); }
  .arrow-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 25px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
  }
  .widget-wrapper.menu-open:not(.route-sub) .arrow-wrap { transform: rotate(180deg); }

  /* ── Black menu drawer ── */
  .widget-menu {
    background: #000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .widget-wrapper.menu-open .widget-menu { max-height: 500px; }

  .menu-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
  .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .widget-wrapper.menu-open .menu-item:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.12s; }
  .widget-wrapper.menu-open .menu-item:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.18s; }
  .widget-wrapper.menu-open .menu-item:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }

  .menu-label {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 125%;
    color: #fff;
    text-transform: uppercase;
  }
  .menu-arrow {
    line-height: 0;
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }
  .menu-item:hover .menu-arrow { transform: translateX(5px); }

  /* ── Sub-page body (header is shared above .views) ── */
  .sub-page {
    background: #000;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  .sub-placeholder {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 150%;
    color: #aaa;
  }

  .sub-body {
    background: #000;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .sub-body::-webkit-scrollbar { display: none; }

  /* ── Staggered reveal for sub-page body (shared header stays put) ── */
  .sub-page .sub-body > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .view-sub.revealing .sub-page .sub-body > *:nth-child(1),
  .view-sub.active .sub-page .sub-body > *:nth-child(1) {
    opacity: 1; transform: none; transition-delay: 0.15s;
  }
  .view-sub.revealing .sub-page .sub-body > *:nth-child(2),
  .view-sub.active .sub-page .sub-body > *:nth-child(2) {
    opacity: 1; transform: none; transition-delay: 0.28s;
  }
  .view-sub.revealing .sub-page .sub-body > *:nth-child(3),
  .view-sub.active .sub-page .sub-body > *:nth-child(3) {
    opacity: 1; transform: none; transition-delay: 0.42s;
  }
  .view-sub.revealing .sub-page .sub-body > *:nth-child(4),
  .view-sub.active .sub-page .sub-body > *:nth-child(4) {
    opacity: 1; transform: none; transition-delay: 0.55s;
  }
  .view-sub.revealing .sub-page .sub-body > *:nth-child(5),
  .view-sub.active .sub-page .sub-body > *:nth-child(5) {
    opacity: 1; transform: none; transition-delay: 0.65s;
  }

  /* Reset child animations when disappearing */
  .view-sub.disappearing .sub-page .sub-body > * {
    opacity: 0;
    transform: translateY(-8px);
    transition-delay: 0s;
    transition-duration: 0.1s;
  }

  /* ── Contact: stacked list (label + outlined circle icon) ── */
  .sub-body--contact {
    gap: 0;             /* rows are separated by borders, not gap */
    padding-top: 0;
  }
  .contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    text-decoration: none;
    border-bottom: 1px solid #3D3D3D;
  }
  .contact-item:first-child {
    border-top: 1px solid #3D3D3D;
  }
  .contact-label {
    font-family: 'Geist', sans-serif;
    font-weight: 800;
    font-size: 32px;
    letter-spacing: -0.02em;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
  }
  .contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid #3D3D3D;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.25s ease, transform 0.15s ease;
  }
  .contact-item:hover .contact-icon { border-color: #fff; }
  .contact-item:active .contact-icon { transform: scale(0.93); }
  .contact-icon svg { width: 24px; height: 24px; display: block; }

  /* ── Profile page ── */
  .profile-headline {
    font-family: 'Geist', sans-serif;
    font-weight: 800;
    font-size: 28px;
    line-height: 115%;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
  }
  .profile-body {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 155%;
    color: #c6c6c6;
  }
  .profile-body strong {
    color: #fff;
    font-weight: 600;
  }
  .profile-card {
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    align-self: flex-start;
  }
  .profile-card svg {
    width: 352px;
    height: 208px;
    display: block;
    max-width: 100%;
  }
  .profile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #D70000;
    border-radius: 100px;
    padding: 18px 20px 18px 24px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    width: 100%;
    transition: background 0.15s ease, transform 0.15s ease;
  }
  .profile-cta-btn:hover  { background: #b50000; }
  .profile-cta-btn:active { transform: scale(0.98); }
  .profile-cta-btn-label {
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #fff;
    text-transform: uppercase;
  }
  .profile-cta-btn-arrow {
    width: 32px; height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .profile-cta-btn-arrow svg {
    width: 16px; height: 16px;
  }

  /* ── Category tags (coloured pill) ── */
  .tag {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    line-height: 1;
  }
  .tag-l { background: #D70000; color: #fff; }                               /* Lifestyle */
  .tag-t { background: transparent; border: 1px solid #D70000; color: #fff; } /* Tech */
  .tag-e { background: #3D3D3D; color: #fff; }                               /* Events */
  .tag-f { background: #C6C6C6; color: #000; }                               /* FnB */
  .tag-s { background: transparent; border: 1px solid #fff; color: #fff; }   /* Spatial */
  .tag-c { background: #fff; color: #000; }                                  /* Corporate */
  .tag-p { background: #C6C6C6; color: #000; }                               /* Packaging */

  /* ── Profile: OUR SERVICE accordion ── */
  .services-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
  }
  .services-title {
    font-family: 'Geist', sans-serif;
    font-weight: 800;
    font-size: 32px;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    padding-bottom: 20px;
    border-bottom: 1px solid #3D3D3D;
  }
  .service-list {
    display: flex;
    flex-direction: column;
  }
  .service-item {
    border-bottom: 1px solid #3D3D3D;
  }
  .service-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    text-align: left;
    font: inherit;
  }
  .service-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #D70000;
    color: #fff;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
  }
  .service-name {
    flex: 1;
    font-family: 'Geist', sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
  }
  .service-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #3D3D3D;
    position: relative;
    flex-shrink: 0;
    /* Springy 180° rotation on the whole button — mirrors the back-arrow
       chrome button's easing for a consistent "page chrome" feel. */
    transition:
      border-color 0.25s ease,
      background   0.25s ease,
      transform    0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .service-item.open .service-toggle {
    transform: rotate(180deg);
  }
  .service-header:hover .service-toggle {
    border-color: #fff;
  }
  .service-toggle .bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transform-origin: center;
    /* Inner bar rotation matches the outer rotation duration so the + → −
       morph finishes in sync with the springy flip. */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .service-toggle .bar-h { transform: translate(-50%, -50%); }
  /* Vertical bar = horizontal bar rotated 90deg (forms the + together) */
  .service-toggle .bar-v { transform: translate(-50%, -50%) rotate(90deg); }
  /* When open, vertical bar rotates back to 0 → overlaps horizontal → looks like a minus */
  .service-item.open .service-toggle .bar-v {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  .service-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .service-item.open .service-body {
    max-height: 320px;
  }
  .service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 20px 0;
  }
  /* Reuse the work-detail tag look (.work-text-tag) for visual consistency */
  .service-tag {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 4px 8px;
    height: 20px;
    border: 1px solid #3D3D3D;
    border-radius: 4px;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #C6C6C6;
    white-space: nowrap;
    flex-shrink: 0;
    /* Subtle stagger-in when accordion opens */
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .service-item.open .service-tag {
    opacity: 1;
    transform: translateY(0);
  }
  .service-item.open .service-tag:nth-child(1) { transition-delay: 0.10s; }
  .service-item.open .service-tag:nth-child(2) { transition-delay: 0.14s; }
  .service-item.open .service-tag:nth-child(3) { transition-delay: 0.18s; }
  .service-item.open .service-tag:nth-child(4) { transition-delay: 0.22s; }
  .service-item.open .service-tag:nth-child(5) { transition-delay: 0.26s; }
  .service-item.open .service-tag:nth-child(6) { transition-delay: 0.30s; }
  .service-item.open .service-tag:nth-child(7) { transition-delay: 0.34s; }

  /* ── Works: legend ── */
  .works-legend { display: flex; flex-direction: column; gap: 8px; }
  .legend-row   { display: flex; flex-direction: row; gap: 12px; }
  .legend-item  { display: flex; align-items: center; gap: 10px; flex: 1; }
  .legend-label {
    font-family: 'Geist', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: rgb(255, 255, 255);
  }

  /* ── Works: separator ── */
  .works-separator { height: 1px; background: rgb(255, 255, 255); flex-shrink: 0; }

  /* ── Works: list ── */
  .works-list { display: flex; flex-direction: column; gap: 12px; }
  .work-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    min-height: 32px;
  }
  .work-name {
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 24px;
    color: #fff;
    flex: 1;
    line-height: 1;
  }
  .work-tags { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
  .work-arrow {
    line-height: 0;
    flex-shrink: 0;
    margin-left: 4px;
    transition: transform 0.2s ease;
  }
  .work-item:hover .work-arrow { transform: translateX(4px); }

  /* ── Header tag row (work detail pages only) ── */
  .widget-header-tags {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition:
      max-height  0.35s cubic-bezier(0.4, 0, 0.2, 1),
      margin-top  0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity     0.25s ease,
      transform   0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  .widget-wrapper.route-work .widget-header-tags {
    max-height: 0 !important;
    margin-top: 0 !important;
    opacity: 0 !important;
    pointer-events: none;
  }

  /* ── Compact header (triggered while scrolling work detail / profile) ── */
  .widget-wrapper.header-compact .widget-header {
    padding: 16px 24px;
  }
  .widget-wrapper.header-compact .logo {
    width: 40px;
    height: 40px;
  }
  /* Hide the sub-page title (e.g. "PROFILE") while scrolling — same collapse
     mechanic used by route-work so it reads as one consistent compact state. */
  .widget-wrapper.header-compact .widget-header-title {
    max-height: 0 !important;
    margin-top: 0 !important;
    opacity: 0 !important;
    transform: translateY(-12px);
    pointer-events: none;
  }
  /* No intro-delay once in a routed state — compact toggling must be snappy both ways */
  .widget-wrapper.route-sub .toggle-btn,
  .widget-wrapper.route-work .toggle-btn {
    transition: background 0.15s ease,
                width  0.38s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
  }
  .widget-wrapper.header-compact .toggle-btn {
    width: 40px;
    height: 40px;
    transition: background 0.15s ease,
                width  0.38s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
  }

  /* ── Work detail content ── */
  .work-detail-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #D9D9D9;
    flex-shrink: 0;
    border-radius: 2px;
    display: block;
    object-fit: cover;
  }
  .work-detail-desc {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .work-detail-desc p {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 162.5%;
    color: #fff;
  }

  /* Profile + Work detail: view-level scroll (sub-body flows freely inside) */
  #viewProfile .sub-body,
  #viewWorkDetail .sub-body {
    max-height: none;
    overflow-y: visible;
  }
  #viewProfile.revealing,
  #viewWorkDetail.revealing {
    max-height: 800px;
  }
  #viewProfile.active,
  #viewWorkDetail.active {
    max-height: max(300px, calc(100vh - 320px));
    overflow-y: auto;
    scrollbar-width: none;
  }
  #viewProfile.active::-webkit-scrollbar,
  #viewWorkDetail.active::-webkit-scrollbar { display: none; }

  /* ── Static preview image (top of detail) ── */
  .work-detail-img {
    cursor: zoom-in;
  }
  .work-detail-img:hover { opacity: 0.9; }

  /* ── Work title block (content area, above hero) ── */
  .work-title-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .work-title-badges {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-wrap: wrap;
  }
  .work-title-name {
    font-family: 'Geist', sans-serif;
    font-weight: 900;
    /* Fluid: 40px floor on tiny phones, 13vw fluid range, 64px ceiling on desktop.
       Lets long single-word titles (e.g. MYCELIUM) fit on one line at any width. */
    font-size: clamp(40px, 13vw, 64px);
    line-height: 105%;
    color: #fff;
    text-transform: uppercase;
    /* Only break inside a word as a last resort — prefer word boundaries first */
    word-break: normal;
    overflow-wrap: break-word;
  }
  .work-title-tags {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }
  .work-text-tag {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 4px 8px;
    height: 20px;
    border: 1px solid #3D3D3D;
    border-radius: 4px;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: -0.02em;
    color: #C6C6C6;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── Masonry image gallery ── */
  .work-img-masonry {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
  }
  .masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .masonry-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    cursor: zoom-in;
    transition: opacity 0.15s ease;
  }
  .masonry-img:hover { opacity: 0.9; }

  /* ── Image lightbox (carousel) ── */
  .img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    overflow: hidden;            /* track handles movement; no page scroll */
    opacity: 0;
    pointer-events: none;
    cursor: zoom-out;
    transition: opacity 0.25s ease;
  }
  .img-lightbox.open {
    opacity: 1;
    pointer-events: auto;
  }
  /* Sliding track: one slide per image, laid out in a row. translateX moves
     between slides; finger drag is applied as an inline transform. */
  .img-lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    touch-action: pan-y;         /* allow vertical, we manage horizontal */
  }
  .img-lightbox-track.dragging {
    transition: none;            /* follow the finger 1:1 while dragging */
  }
  .img-lightbox-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-sizing: border-box;
  }
  .img-lightbox-slide img {
    max-width: min(92vw, 860px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;        /* taps fall through to backdrop for close */
  }

  /* Lightbox prev/next navigation */
  .img-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  }
  .img-lightbox-nav:hover {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.7);
  }
  .img-lightbox-nav:active { transform: translateY(-50%) scale(0.92); }
  .img-lightbox-prev { left: 24px; }
  .img-lightbox-next { right: 24px; }
  .img-lightbox-nav svg { width: 24px; height: 24px; display: block; }
  /* Hide nav arrows when there's only one image */
  .img-lightbox.single .img-lightbox-nav { display: none; }

  @media (max-width: 767px) {
    .img-lightbox-nav { width: 44px; height: 44px; }
    .img-lightbox-prev { left: 12px; }
    .img-lightbox-next { right: 12px; }
    .img-lightbox-nav svg { width: 20px; height: 20px; }
  }

  /* ── Desktop ≥768px: viewport-capped height, internal scroll ── */
  @media (min-width: 768px) {
    .widget-wrapper.route-sub {
      max-height: min(800px, calc(100vh - 48px));
    }
    .widget-wrapper.route-sub .views {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      scrollbar-width: none;
    }
    .widget-wrapper.route-sub .views::-webkit-scrollbar { display: none; }
    .widget-wrapper.route-sub .view-sub.active,
    .widget-wrapper.route-sub #viewProfile.active,
    .widget-wrapper.route-sub #viewWorkDetail.active {
      max-height: none;
      overflow-y: visible;
    }
  }

  /* ── Mobile <768px: full-screen overlay on sub-pages ── */
  @media (max-width: 767px) {
    /* ── Mobile scale-down (~30% smaller than desktop) ─────────────────────
       The widget felt too big on phones. All sizes below are roughly 70% of
       their desktop counterparts. */

    /* Compact widget widths */
    .widget-wrapper { width: 162px; }
    .widget-wrapper.menu-open { width: 252px; }
    .widget-wrapper.intro { width: 90px; }

    /* Red header chrome */
    .widget-header { padding: 17px; }
    .widget-header-top { gap: 11px; }
    .logo { width: 56px; height: 56px; }
    .toggle-btn { width: 56px; height: 56px; }
    .arrow-wrap { width: 17px; height: 18px; }

    /* Sub-page title (PROFILE / PORTFOLIO / CONTACT) */
    .widget-header-title {
      font-size: clamp(30px, 9vw, 48px);
    }
    /* Tighter gap above the title on mobile (desktop uses 40px) */
    .widget-wrapper.route-sub .widget-header-title {
      margin-top: 24px;
    }

    /* Menu drawer (links list) */
    .menu-list { padding: 17px; gap: 11px; }
    .menu-label { font-size: 28px; }

    /* Clock ticker */
    .clock-ticker { height: 35px; }
    .clock-segment {
      height: 35px;
      font-size: 10px;
      padding: 0 10px;
    }

    /* Work-detail title — keep fluid but with smaller floor + ceiling */
    .work-title-name {
      font-size: clamp(28px, 9.1vw, 45px);
    }

    /* Contact list — scaled down to match */
    .contact-item { padding: 11px 0; }
    .contact-label { font-size: 22px; }
    .contact-icon { width: 40px; height: 40px; }
    .contact-icon svg { width: 17px; height: 17px; }

    /* Compact-on-scroll header — proportionally smaller too */
    .widget-wrapper.header-compact .widget-header { padding: 11px 17px; }
    .widget-wrapper.header-compact .logo { width: 28px; height: 28px; }
    .widget-wrapper.header-compact .toggle-btn { width: 28px; height: 28px; }

    .widget-wrapper.route-sub {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      width: auto;        /* override base .widget-wrapper { width: 232px } */
      height: auto;
      max-height: none;
      display: flex;
      flex-direction: column;
      z-index: 100;
      background: #000;
      /* Dimensions animate via inline styles set in JS (FLIP grow-from-center) */
      transition:
        top    0.6s cubic-bezier(0.4, 0, 0.2, 1),
        left   0.6s cubic-bezier(0.4, 0, 0.2, 1),
        width  0.6s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    /* While the widget is growing/shrinking, fade out the interior so the user
       sees a clean black container changing size. A short opacity fade (instead
       of an instant snap) prevents a 1-frame pop at the start of the shrink. */
    .widget-wrapper.mobile-expanding .widget-header-title,
    .widget-wrapper.mobile-expanding .widget-menu,
    .widget-wrapper.mobile-expanding .views {
      opacity: 0 !important;
      transition: opacity 0.18s ease !important;
    }
    .widget-wrapper.route-sub .widget-header {
      flex-shrink: 0;
    }
    .widget-wrapper.route-sub .views {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      scrollbar-width: none;
      background: #000;
    }
    .widget-wrapper.route-sub .views::-webkit-scrollbar { display: none; }
    .widget-wrapper.route-sub .view-sub.active,
    .widget-wrapper.route-sub #viewWorkDetail.active {
      max-height: none !important;
      overflow-y: visible;
    }
  }
