/*
Theme Name: Torelh Chaos Portfolio
Theme URI: https://torelh.dk
Author: OpenAI
Description: A colorful, experimental portfolio theme with editable projects and muted hover video previews.
Version: 2.33.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: torelh-chaos
*/
:root {
  --paper: #f3f0e8;
  --ink: #171717;
  --blue: #2547ff;
  --orange: #ff5b25;
  --pink: #ff68b8;
  --lime: #d7ff37;
  --purple: #8052ff;
  --line: rgba(23,23,23,.22);
  --gutter: clamp(18px, 3vw, 46px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Arial, Helvetica, sans-serif; font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img, video { display: block; max-width: 100%; }
.site-header {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding: 22px var(--gutter); border-bottom:1px solid var(--line);
  position:relative; z-index:5;
}
.site-brand { font-weight:900; letter-spacing:-.08em; font-size:clamp(24px,3vw,40px); text-transform:uppercase; }
.site-brand .brand-dot { color:var(--orange); }
.primary-nav { display:flex; gap:clamp(18px,3vw,48px); align-items:center; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }
.primary-nav a { border-bottom:2px solid transparent; padding:5px 0; }
.primary-nav a:hover { border-color:var(--orange); }
.menu-toggle { display:none; border:1px solid var(--ink); background:transparent; padding:9px 12px; font-weight:800; text-transform:uppercase; }
.site-main { overflow:hidden; }
.hero {
  min-height: min(720px, 78vh); padding: clamp(45px,8vw,120px) var(--gutter) 55px;
  position:relative; display:flex; flex-direction:column; justify-content:space-between;
}
.hero-kicker { font-size:11px; text-transform:uppercase; letter-spacing:.16em; font-weight:800; }
.hero-title {
  font-size:clamp(76px, 16vw, 230px); line-height:.76; letter-spacing:-.105em;
  text-transform:uppercase; font-weight:900; max-width:1100px; margin:50px 0;
  position:relative; z-index:2;
}
.hero-title .outline { color:transparent; -webkit-text-stroke:2px var(--ink); }
.hero-bottom { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; position:relative; z-index:2; }
.hero-note { max-width:360px; font-size:clamp(14px,1.5vw,19px); line-height:1.3; }
.hero-index { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.12em; }
.chaos-shape { position:absolute; pointer-events:none; z-index:1; }
.shape-star {
  width:clamp(100px,17vw,245px); aspect-ratio:1; right:13%; top:15%;
  background:var(--orange); clip-path:polygon(50% 0,61% 34%,98% 18%,75% 50%,100% 79%,62% 68%,50% 100%,38% 68%,0 82%,25% 50%,2% 18%,40% 34%);
  transform:rotate(-17deg); animation: wobble 9s ease-in-out infinite alternate;
}
.shape-orbit {
  width:clamp(130px,21vw,290px); aspect-ratio:1; right:4%; bottom:8%;
  border:clamp(12px,2vw,26px) solid var(--blue); border-radius:48% 52% 44% 56%;
  transform:rotate(28deg); animation: drift 12s ease-in-out infinite alternate;
}
.shape-orbit:after { content:""; position:absolute; width:40%; height:40%; background:var(--pink); border-radius:50%; left:-15%; top:10%; }
.shape-scribble { left:48%; top:34%; width:130px; height:90px; border:8px solid var(--purple); border-left:0; border-bottom:0; border-radius:50%; transform:rotate(28deg); }
@keyframes wobble { to { transform:rotate(18deg) scale(1.08); } }
@keyframes drift { to { transform:translate(-25px,18px) rotate(-12deg); } }
.section-heading {
  padding:22px var(--gutter); border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  display:flex; justify-content:space-between; align-items:center; gap:15px;
  text-transform:uppercase; font-size:11px; font-weight:900; letter-spacing:.14em;
}
.project-grid {
  padding: clamp(20px,3vw,46px) var(--gutter) 90px;
  display:grid; grid-template-columns:repeat(12,1fr); gap:clamp(24px,4vw,60px) clamp(14px,2vw,28px);
}
.project-card { grid-column:span 6; min-width:0; position:relative; }
.project-card:nth-child(4n+2) { grid-column:span 5; margin-top:90px; }
.project-card:nth-child(4n+3) { grid-column:2 / span 6; margin-top:-25px; }
.project-card:nth-child(4n+4) { grid-column:8 / span 5; margin-top:65px; }
.project-link { display:block; }
.project-media {
  position:relative; overflow:hidden; background:#ddd; aspect-ratio:4/3;
  isolation:isolate;
}
.project-card:nth-child(3n) .project-media { aspect-ratio: 5/6; }
.project-card:nth-child(4n) .project-media { aspect-ratio: 16/10; }
.project-media img, .project-media video {
  width:100%; height:100%; object-fit:cover; transition:transform .7s cubic-bezier(.2,.7,.2,1);
}
.project-media video { position:absolute; inset:0; opacity:0; }
.project-card.is-playing video { opacity:1; }
.project-link:hover .project-media img { transform:scale(1.035) rotate(-.5deg); }
.project-card.is-playing .project-media img { opacity:0; }
.project-meta { display:flex; justify-content:space-between; gap:12px; padding-top:12px; align-items:baseline; }
.project-title { margin:0; font-size:clamp(17px,2vw,27px); line-height:1; font-weight:800; letter-spacing:-.055em; }
.project-category { font-size:10px; text-transform:uppercase; letter-spacing:.12em; font-weight:800; text-align:right; }
.project-card:nth-child(odd):after {
  content:""; position:absolute; width:clamp(34px,5vw,70px); aspect-ratio:1; background:var(--lime);
  border-radius:50%; right:-22px; top:14%; z-index:-1;
}
.project-card:nth-child(3n):after {
  width:70px; height:70px; border-radius:0; background:var(--pink);
  clip-path:polygon(50% 0,100% 100%,0 75%); right:auto; left:-30px; top:60%;
}
.empty-projects { padding:50px var(--gutter); font-size:18px; }
.page-intro { padding:clamp(55px,10vw,130px) var(--gutter) 55px; }
.page-title { font-size:clamp(54px,11vw,150px); line-height:.85; letter-spacing:-.09em; text-transform:uppercase; margin:0; }
.page-content { padding:0 var(--gutter) 100px; max-width:1000px; font-size:clamp(17px,2vw,23px); line-height:1.5; }
.single-project-head { padding:clamp(45px,8vw,110px) var(--gutter) 35px; position:relative; }
.single-project-head:after { content:""; position:absolute; width:120px; height:120px; border:18px solid var(--orange); border-radius:50%; right:12%; top:12%; pointer-events:none; }
.single-project-title { font-size:clamp(55px,12vw,160px); line-height:.82; letter-spacing:-.09em; text-transform:uppercase; margin:0; max-width:1100px; }
.single-project-description { max-width:680px; margin-top:28px; font-size:18px; line-height:1.45; }
.project-body { padding:20px var(--gutter) 90px; }
.project-body > * { max-width:1100px; margin-left:auto; margin-right:auto; }
.project-body img { width:100%; height:auto; margin:35px auto; }
.project-body p { max-width:700px; font-size:18px; line-height:1.55; }
.project-body video { width:100%; margin:35px auto; }
.project-footer-nav { display:flex; justify-content:space-between; gap:20px; padding:28px var(--gutter); border-top:1px solid var(--line); text-transform:uppercase; font-size:12px; font-weight:900; }
.site-footer { padding:55px var(--gutter) 25px; background:var(--ink); color:var(--paper); position:relative; overflow:hidden; }
.footer-big { font-size:clamp(55px,12vw,165px); line-height:.8; letter-spacing:-.1em; font-weight:900; text-transform:uppercase; margin:0 0 55px; position:relative; z-index:1; }
.footer-row { display:flex; justify-content:space-between; gap:20px; font-size:11px; text-transform:uppercase; letter-spacing:.1em; position:relative; z-index:1; }
.footer-splash { position:absolute; width:180px; height:180px; background:var(--purple); border-radius:42% 58% 62% 38%; right:12%; top:15%; transform:rotate(35deg); }
@media (max-width:700px) {
  .site-header { align-items:flex-start; }
  .menu-toggle { display:block; }
  .primary-nav { display:none; position:absolute; top:100%; left:0; right:0; padding:20px var(--gutter); background:var(--paper); border-bottom:1px solid var(--line); flex-direction:column; align-items:flex-start; }
  .primary-nav.is-open { display:flex; }
  .hero { min-height:620px; }
  .hero-title { font-size:clamp(70px,20vw,130px); }
  .shape-star { right:8%; top:28%; }
  .shape-orbit { right:-8%; bottom:10%; }
  .shape-scribble { left:58%; top:50%; }
  .project-grid { display:block; padding-top:25px; }
  .project-card, .project-card:nth-child(4n+2), .project-card:nth-child(4n+3), .project-card:nth-child(4n+4) {
    margin:0 0 42px; width:100%;
  }
  .project-card:nth-child(even) { width:88%; margin-left:auto !important; }
  .project-card:nth-child(odd) { width:94%; }
  .project-card:nth-child(3n) .project-media { aspect-ratio:4/3; }
  .project-meta { align-items:flex-start; }
  .project-category { max-width:38%; }
  .footer-row { flex-direction:column; }
}

/* Project card options added in v1.1 */
.project-card-wide { grid-column: span 2; }
.project-card-tall .project-media { aspect-ratio: 3 / 4; }
.project-card-wide .project-media { aspect-ratio: 16 / 9; }
.project-sticker { position:absolute; z-index:3; top:12px; right:12px; display:inline-block; padding:8px 11px; background:var(--lime); color:var(--ink); border:1px solid var(--ink); border-radius:999px; font-size:10px; line-height:1; font-weight:900; letter-spacing:.08em; text-transform:uppercase; transform:rotate(5deg); }
.project-card { position:relative; }
@media (max-width:700px) { .project-card-wide { grid-column:span 1; } }


/* Editable front page: Gutenberg content sits above the automatic project grid. */
.front-page-content { position:relative; padding: clamp(28px, 5vw, 72px) var(--gutter) 45px; }
.front-page-content > * { max-width: 1200px; margin-left:auto; margin-right:auto; }
.front-page-content > .alignwide { max-width: 1400px; }
.front-page-content > .alignfull { max-width:none; margin-left:calc(var(--gutter) * -1); margin-right:calc(var(--gutter) * -1); }
.front-page-content h1, .front-page-content h2, .front-page-content h3 { font-weight:900; letter-spacing:-.075em; line-height:.92; text-transform:uppercase; }
.front-page-content h1 { font-size:clamp(58px, 12vw, 160px); }
.front-page-content h2 { font-size:clamp(38px, 7vw, 92px); }
.front-page-content p, .front-page-content li { font-size:clamp(17px, 2vw, 22px); line-height:1.45; }
.front-page-content .wp-block-image img, .front-page-content .wp-block-gallery img { border:2px solid var(--ink); }
.front-page-content .wp-block-button__link { background:var(--ink); color:var(--paper); border-radius:0; font-weight:900; text-transform:uppercase; }
.front-page-content .wp-block-cover, .front-page-content .wp-block-group { position:relative; }
.front-page-content .wp-block-separator { border:0; height:8px; max-width:180px; background:var(--orange); margin-top:35px; margin-bottom:35px; }
.project-placeholder { width:100%; height:100%; min-height:260px; background:linear-gradient(135deg,#2547ff,#ff68b8,#d7ff37); }


/* Floating sticker layer */
.torelh-floating-layer{position:fixed;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.torelh-floating-item{position:absolute;left:var(--float-x);top:var(--float-y);width:var(--float-size);height:auto;max-width:none;object-fit:contain;transform:translate(-50%,-50%) rotate(var(--float-rotation));filter:drop-shadow(3px 5px 0 rgba(0,0,0,.12));will-change:transform}
.torelh-floating-item.motion-float{animation:torelh-float 7s ease-in-out infinite}
.torelh-floating-item.motion-spin{animation:torelh-spin 16s linear infinite}
.torelh-floating-item.motion-bounce{animation:torelh-bounce 3.8s ease-in-out infinite}
.torelh-floating-item.motion-none{animation:none}
.torelh-floating-item.speed-slow{animation-duration:12s}
.torelh-floating-item.speed-fast{animation-duration:3.5s}
@keyframes torelh-float{0%,100%{transform:translate(-50%,-50%) rotate(var(--float-rotation)) translateY(0)}50%{transform:translate(-50%,-50%) rotate(calc(var(--float-rotation) + 7deg)) translateY(-22px)}}
@keyframes torelh-spin{from{transform:translate(-50%,-50%) rotate(var(--float-rotation))}to{transform:translate(-50%,-50%) rotate(calc(var(--float-rotation) + 360deg))}}
@keyframes torelh-bounce{0%,100%{transform:translate(-50%,-50%) rotate(var(--float-rotation)) translateY(0)}50%{transform:translate(-50%,-50%) rotate(var(--float-rotation)) translateY(-34px)}}
@media(max-width:700px){.torelh-floating-item{width:calc(var(--float-size) * .68);opacity:.88}}
@media(prefers-reduced-motion:reduce){.torelh-floating-item{animation:none!important}}


/* v1.4: dark canvas, bright collage accents, no project sticker labels */
:root {
  --paper: #101010;
  --ink: #f4f1e9;
  --line: rgba(244,241,233,.24);
}
body { background:#101010; color:#f4f1e9; }
.site-header { background:#101010; border-bottom-color:rgba(244,241,233,.24); }
.primary-nav a:hover { border-color:var(--pink); }
.menu-toggle { color:var(--ink); border-color:var(--ink); }
.hero-title .outline { -webkit-text-stroke-color:var(--ink); }
.section-heading { border-color:rgba(244,241,233,.24); }
.project-media { background:#242424; }
.project-title, .project-category { color:var(--ink); }
.page-content, .single-project-description, .project-body { color:var(--ink); }
.project-footer-nav { border-top-color:rgba(244,241,233,.24); }
.primary-nav { color:var(--ink); }
@media (max-width:700px) {
  .primary-nav { background:#101010; border-bottom-color:rgba(244,241,233,.24); }
}
/* Remove the optional sticker/label badge from project cards. */
.project-sticker { display:none !important; }


/* v1.5: choose whether floating stickers sit behind or in front of page content */
.site-header, .site-main, .site-footer { position:relative; z-index:1; }
.torelh-floating-layer { position:fixed; inset:0; pointer-events:none; overflow:hidden; }
.torelh-floating-layer-background { z-index:0; }
.torelh-floating-layer-foreground { z-index:8; }
.torelh-floating-item { pointer-events:none; }

/* Full-bleed home title: extends to the viewport edges, not the content gutter. */
.hero-title {
  width:100vw;
  max-width:none;
  margin-left:calc(-1 * var(--gutter));
  font-size:clamp(68px,18vw,280px);
  letter-spacing:-.11em;
}
@media(max-width:700px) {
  .hero-title { font-size:clamp(58px,17.5vw,128px); }
}


/* v1.6: robust layer stacking and per-element scroll behavior */
body { position:relative; isolation:isolate; }
.torelh-floating-layer { position:absolute; inset:0 auto auto 0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.torelh-floating-layer-background { z-index:0; }
.torelh-floating-layer-foreground { position:fixed; inset:0; width:auto; height:auto; z-index:20; }
.site-header, .site-main, .site-footer { position:relative; z-index:1; }
.torelh-floating-item.position-fixed { position:fixed; }
.torelh-floating-item.position-page { position:absolute; }
.torelh-floating-layer-background .torelh-floating-item { z-index:0; }
.torelh-floating-layer-foreground .torelh-floating-item { z-index:20; }


/* v1.7: floating layers are rendered immediately inside body, not inside footer */
body { position:relative; isolation:isolate; }
.torelh-floating-layer {
  pointer-events:none;
  overflow:visible;
}
.torelh-floating-layer-background { z-index:0; }
.torelh-floating-layer-foreground { z-index:20; }
.torelh-floating-position-fixed {
  position:fixed !important;
  inset:0 !important;
  width:100%;
  height:100%;
}
.torelh-floating-position-page {
  position:absolute !important;
  top:0;
  left:0;
  right:0;
  width:100%;
  height:100%;
}
.torelh-floating-layer-background.torelh-floating-position-page { z-index:0; }
.torelh-floating-layer-background.torelh-floating-position-fixed { z-index:0; }
.torelh-floating-layer-foreground.torelh-floating-position-page,
.torelh-floating-layer-foreground.torelh-floating-position-fixed { z-index:20; }
.torelh-floating-item {
  position:absolute !important;
  left:var(--float-x);
  top:var(--float-y);
  width:var(--float-size);
  height:auto;
  max-width:none;
  object-fit:contain;
  transform:translate(-50%,-50%) rotate(var(--float-rotation));
  pointer-events:none;
}
.torelh-floating-item.motion-none { animation:none !important; }

/* v1.7: pages and project content can use the full viewport width */
.page-content {
  width:100%;
  max-width:none;
}
.page-content > * {
  max-width:none;
}
.page-content > .alignwide,
.page-content > .alignfull {
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
}
.page-content > .alignfull {
  width:100vw;
  max-width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}
.project-body {
  width:100%;
  max-width:none;
}
.project-body > * {
  max-width:none;
  margin-left:0;
  margin-right:0;
}
.project-body p,
.project-body li,
.project-body blockquote {
  max-width:700px;
}
.project-body img,
.project-body video,
.project-body figure,
.project-body .wp-block-cover,
.project-body .wp-block-gallery {
  width:100%;
  max-width:none;
}
@media (max-width:700px) {
  .page-content, .project-body { padding-left:var(--gutter); padding-right:var(--gutter); }
  .page-content > .alignfull {
    width:100vw;
    max-width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
  }
}


/* v1.8: motion uses individual transform properties so positioning cannot cancel animation */
.torelh-floating-item.motion-float {
  animation-name:torelh-float-v18 !important;
  animation-duration:7s !important;
  animation-timing-function:ease-in-out !important;
  animation-iteration-count:infinite !important;
  animation-play-state:running !important;
}
.torelh-floating-item.motion-spin {
  animation-name:torelh-spin-v18 !important;
  animation-duration:16s !important;
  animation-timing-function:linear !important;
  animation-iteration-count:infinite !important;
  animation-play-state:running !important;
}
.torelh-floating-item.motion-bounce {
  animation-name:torelh-bounce-v18 !important;
  animation-duration:3.8s !important;
  animation-timing-function:ease-in-out !important;
  animation-iteration-count:infinite !important;
  animation-play-state:running !important;
}
.torelh-floating-item.motion-none {
  animation:none !important;
}
.torelh-floating-item.speed-slow { animation-duration:12s !important; }
.torelh-floating-item.speed-normal { animation-duration:7s !important; }
.torelh-floating-item.motion-spin.speed-normal { animation-duration:16s !important; }
.torelh-floating-item.motion-bounce.speed-normal { animation-duration:3.8s !important; }
.torelh-floating-item.speed-fast { animation-duration:3.2s !important; }

@keyframes torelh-float-v18 {
  0%,100% { translate:0 0; rotate:0deg; }
  50% { translate:0 -24px; rotate:7deg; }
}
@keyframes torelh-spin-v18 {
  from { rotate:0deg; }
  to { rotate:360deg; }
}
@keyframes torelh-bounce-v18 {
  0%,100% { translate:0 0; }
  50% { translate:0 -42px; }
}

/* Explicit motion choice takes precedence over OS/browser reduced-motion defaults. */
.torelh-floating-item.motion-float,
.torelh-floating-item.motion-spin,
.torelh-floating-item.motion-bounce { animation-play-state:running !important; }

/* v1.17: remove decorative shapes attached to project cards; flying elements are managed separately. */
.project-card:nth-child(odd):after,
.project-card:nth-child(3n):after { content:none !important; display:none !important; }

/* v1.17: generated SVG shapes behave like imported flying stickers. */
.torelh-floating-item.torelh-floating-shape{display:block;width:var(--float-size);height:var(--float-size);object-fit:contain}
.torelh-floating-shape svg{display:block;width:100%;height:100%}

/* v1.22: cleaner SVG edges for generated flying shapes */
.torelh-floating-shape svg{width:100%;height:100%;overflow:visible;shape-rendering:geometricPrecision;}

/* Editable footer figure */
.footer-splash { display:flex; align-items:center; justify-content:center; pointer-events:none; }
.footer-splash svg,.footer-splash img { display:block; width:100%; height:100%; object-fit:contain; }
.footer-splash img { object-fit:contain; }
.site-footer .footer-big,.site-footer .footer-row { color:inherit; }
.site-footer .footer-row a { color:inherit; }

/* v1.24: the footer decoration is now ONLY the selected SVG or uploaded image.
   Remove the legacy CSS blob that used to sit behind it. */
.site-footer .footer-splash {
  background: transparent !important;
  border-radius: 0 !important;
  transform: none !important;
  box-shadow: none !important;
}
.site-footer .footer-splash > svg,
.site-footer .footer-splash > img {
  background: transparent !important;
}


/* v1.26: optimized animated cursor; position is composited and color phase never resets */
@media (hover: hover) and (pointer: fine) {
  body.torelh-custom-cursor-active,
  body.torelh-custom-cursor-active a,
  body.torelh-custom-cursor-active button,
  body.torelh-custom-cursor-active input,
  body.torelh-custom-cursor-active textarea,
  body.torelh-custom-cursor-active select,
  body.torelh-custom-cursor-active [role="button"],
  body.torelh-custom-cursor-active summary {
    cursor: none !important;
  }

  .torelh-custom-cursor {
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #ff27b7;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--cursor-x, -100px), var(--cursor-y, -100px), 0) translate(-50%, -50%);
    transition:
      width 240ms cubic-bezier(.2,.8,.2,1),
      height 240ms cubic-bezier(.2,.8,.2,1),
      opacity 160ms ease,
      background-color 220ms ease;
    animation: torelh-cursor-color-cycle 32s linear infinite;
    will-change: transform, opacity;
    contain: layout paint;
  }

  .torelh-custom-cursor.is-visible { opacity: 1; }
  .torelh-custom-cursor.is-clickable {
    width: 13px;
    height: 13px;
    background-color: #000 !important;
    /* Deliberately keep the color animation running underneath the hover color. */
  }
}

@keyframes torelh-cursor-color-cycle {
  0%   { background-color: #ff27b7; }
  16%  { background-color: #ff5a36; }
  32%  { background-color: #f5e642; }
  48%  { background-color: #54e66b; }
  64%  { background-color: #27b7ff; }
  80%  { background-color: #8252ff; }
  100% { background-color: #ff27b7; }
}

@media (prefers-reduced-motion: reduce) {
  .torelh-custom-cursor { animation-duration: 90s; transition-duration: 300ms; }
}

/* v1.39: preview-only home cards and remove decorative arrow indicators globally */
.project-preview-only{display:block;cursor:default;color:inherit;text-decoration:none}
.project-preview-only:hover{color:inherit}
.project-preview-only:after,.project-preview-only:before,
.project-link:after,.project-link:before,

.project-preview-only .project-media{pointer-events:none}

/* v1.40: keep the native pointer hidden over non-link project previews too */
@media (hover:hover) and (pointer:fine) {
  body.torelh-custom-cursor-active,
  body.torelh-custom-cursor-active * { cursor:none !important; }
}


/* v1.40: editorial Work index with scroll-linked project previews */
.work-archive{width:100%;max-width:none}
.work-heading{padding-left:clamp(22px,4vw,72px);padding-right:clamp(22px,4vw,72px)}
.work-index-layout{display:grid;grid-template-columns:minmax(230px,28%) minmax(0,1fr);gap:clamp(28px,5vw,90px);padding:0 clamp(22px,4vw,72px) 100px;align-items:start}
.work-index{position:sticky;top:32px;align-self:start;max-height:calc(100vh - 64px);overflow:auto;padding:12px 0 28px}
.work-index-label{font-size:10px;font-weight:900;letter-spacing:.16em;margin-bottom:24px;color:var(--orange)}
.work-index ol{list-style:none;margin:0;padding:0}
.work-index li{border-top:1px solid rgba(255,255,255,.18);transition:border-color .25s}
.work-index li:last-child{border-bottom:1px solid rgba(255,255,255,.18)}
.work-index li a{display:grid;grid-template-columns:32px minmax(0,1fr);gap:12px;padding:15px 4px;color:rgba(255,255,255,.48);text-decoration:none;transition:color .25s,padding .25s}
.work-index-number{font-size:10px;font-weight:800;opacity:.65;padding-top:4px}
.work-index-title{font-size:clamp(15px,1.5vw,23px);line-height:1.05;font-weight:900}
.work-index li.is-active{border-color:var(--orange)}
.work-index li.is-active a{color:#fff;padding-left:12px}
.work-index li.is-active .work-index-number{color:var(--orange);opacity:1}
.work-project-stream{min-width:0;display:flex;flex-direction:column;gap:clamp(70px,12vh,150px)}
.work-project-entry{min-width:0;scroll-margin-top:8vh;opacity:.55;transform:translateY(24px);transition:opacity .5s ease,transform .5s ease}
.work-project-entry.is-active{opacity:1;transform:translateY(0)}
.work-project-link{display:block;color:inherit;text-decoration:none}
.work-project-media{width:100%;height:min(72vh,760px);min-height:300px;overflow:hidden;background:#171717}
.work-project-media img,.work-project-media video{display:block;width:100%;height:100%;object-fit:contain}
.work-project-caption{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding-top:12px}
.work-project-title{font-size:clamp(18px,2vw,30px);font-weight:900;line-height:1.05}
.work-project-cta{font-size:9px;font-weight:900;letter-spacing:.12em;white-space:nowrap}
@media(max-width:760px){
 .work-index-layout{grid-template-columns:1fr;gap:22px;padding-left:18px;padding-right:18px}
 .work-index{top:0;z-index:20;max-height:none;padding:10px 0;background:#101010}
 .work-index-label{margin-bottom:8px}
 .work-index ol{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px}
 .work-index li,.work-index li:last-child{border:0;flex:0 0 auto}
 .work-index li a{display:block;padding:8px 11px;border:1px solid rgba(255,255,255,.2);font-size:12px}
 .work-index-number{display:none}
 .work-index-title{font-size:12px;white-space:nowrap}
 .work-index li.is-active a{border-color:var(--orange);padding-left:11px}
 .work-project-stream{gap:64px}
 .work-project-media{height:58vh;min-height:240px}
}

/* v1.41: stronger native-cursor suppression, including hovered project media */
@media (hover:hover) and (pointer:fine) {
 html body.torelh-custom-cursor-active,
 html body.torelh-custom-cursor-active *,
 html body.torelh-custom-cursor-active *:hover,
 html body.torelh-custom-cursor-active *:focus,
 html body.torelh-custom-cursor-active *:active { cursor:none !important; }
 html body.torelh-custom-cursor-active .torelh-custom-cursor { cursor:none!important; }
}
/* Cinematic Work index */
.work-cinematic-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:clamp(24px,5vw,90px);padding:0 clamp(22px,4vw,72px) 8vh;align-items:start}
.work-title-rail{min-width:0}
.work-title-rail .work-index-label{position:sticky;top:16px;z-index:2;display:block;margin:0 0 12px;padding:12px 0;background:#101010}
.work-title-stop{min-height:54vh;display:flex;align-items:center;gap:clamp(12px,2vw,30px);border-top:1px solid rgba(255,255,255,.16);color:rgba(255,255,255,.28);cursor:none!important;transition:color .35s ease,padding .35s ease}
.work-title-stop:last-child{border-bottom:1px solid rgba(255,255,255,.16)}
.work-title-stop h2{font-size:clamp(38px,6.2vw,100px);line-height:.9;letter-spacing:-.065em;font-weight:500;margin:0;max-width:100%;transition:transform .4s ease}
.work-title-stop.is-active{color:#fff;padding-left:12px}
.work-title-stop.is-active h2{transform:translateX(8px)}
.work-title-number{font-size:10px;font-weight:800;color:var(--orange);flex:0 0 22px;opacity:.9}
.work-preview-stage{position:sticky;top:8vh;align-self:start;padding-top:6vh}
.work-preview-frame{width:100%;height:min(76vh,820px);min-height:340px;background:#171717;position:relative;overflow:hidden}
.work-preview-frame>a{display:block;position:relative;width:100%;height:100%;cursor:none!important}
.work-preview-frame img,.work-preview-frame video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.work-preview-frame video{display:none}
.work-preview-open{position:absolute;right:18px;bottom:18px;padding:9px 12px;background:var(--orange);color:#111;font-size:9px;font-weight:900;letter-spacing:.12em}
.work-preview-meta{display:flex;justify-content:space-between;gap:20px;padding-top:14px;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
@media(max-width:760px){
 .work-cinematic-layout{grid-template-columns:1fr;padding:0 18px 60px;gap:10px}
 .work-title-rail{display:flex;flex-direction:column}
 .work-title-rail .work-index-label{position:relative;top:auto}
 .work-title-stop{min-height:22vh}
 .work-title-stop h2{font-size:clamp(32px,10vw,58px)}
 .work-preview-stage{position:sticky;top:12px;grid-row:1;padding-top:0;z-index:4;background:#101010;padding-bottom:10px}
 .work-preview-frame{height:42vh;min-height:220px}
 .work-title-stop{min-height:30vh}
}


/* v1.42: generous cinematic spacing and scroll-gated project previews */
.work-cinematic-layout{
  width:100%;
  max-width:1800px;
  margin:0 auto;
  box-sizing:border-box;
  grid-template-columns:minmax(0, .92fr) minmax(0, 1.08fr);
  gap:clamp(44px,7vw,120px);
  padding:0 clamp(28px,5vw,90px) 12vh;
}
.work-title-rail{
  min-width:0;
  padding-left:clamp(24px,5vw,88px);
  padding-right:clamp(8px,1.5vw,24px);
}
.work-title-rail .work-index-label{
  margin-bottom:clamp(28px,5vh,64px);
  letter-spacing:.16em;
}
.work-title-stop{
  min-height:68vh;
  padding:0 0 0 clamp(4px,1vw,16px);
  gap:clamp(14px,2vw,28px);
}
.work-title-stop h2{
  font-size:clamp(34px,5.1vw,82px);
  line-height:.94;
  letter-spacing:-.055em;
  overflow-wrap:anywhere;
}
.work-title-stop.is-active{padding-left:clamp(12px,1.8vw,28px)}
.work-preview-stage{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(28px);
  transition:opacity .55s ease,transform .55s ease,visibility .55s;
  padding-top:8vh;
}
.work-preview-stage.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.work-preview-frame{
  height:min(72vh,780px);
  min-height:360px;
  background:transparent;
}
.work-preview-frame img,.work-preview-frame video{object-fit:contain}
@media(max-width:760px){
  .work-cinematic-layout{grid-template-columns:1fr;gap:24px;padding:0 20px 70px}
  .work-title-rail{padding:0 12px}
  .work-title-rail .work-index-label{margin-bottom:18px}
  .work-title-stop{min-height:42vh;padding-left:4px}
  .work-title-stop h2{font-size:clamp(34px,9vw,58px)}
  .work-preview-stage{grid-row:1;position:sticky;top:12px;padding-top:0;background:#101010;z-index:4}
  .work-preview-frame{height:42vh;min-height:220px}
}

/* v1.43: clean typographic project index inspired by the supplied reference */
body.post-type-archive-project{background:#fff!important;color:#080808!important}
body.post-type-archive-project .site-header{background:#fff!important;color:#080808!important;border-bottom:0!important;padding:14px clamp(22px,2vw,40px)!important}
body.post-type-archive-project .site-brand,
body.post-type-archive-project .primary-nav a,
body.post-type-archive-project .menu-toggle{color:#080808!important}
body.post-type-archive-project .site-main{background:#fff!important;color:#080808!important}
body.post-type-archive-project .site-footer{display:none!important}
.adrian-work-page{min-height:calc(100vh - 70px);position:relative;background:#fff!important;color:#080808!important;padding:clamp(34px,5vh,62px) clamp(22px,2vw,40px) 88px!important;box-sizing:border-box}
.adrian-work-intro{margin:0 0 24px 0}
.adrian-work-intro>span{display:block;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.adrian-work-intro h1{font-size:clamp(38px,3vw,58px);line-height:.85;letter-spacing:-.075em;font-weight:900;margin:4px 0 0}
.adrian-work-intro h1 span{color:#f04432}
.adrian-project-list{width:min(1120px,66vw);margin:0 auto 0 34%;display:flex;flex-direction:column;gap:clamp(14px,2.5vh,26px)}
.adrian-project-row{position:relative;display:grid;grid-template-columns:36px auto auto 1fr;align-items:start;column-gap:12px;min-height:clamp(66px,8.2vh,92px);color:#080808;text-decoration:none;isolation:isolate}
.adrian-project-number{font-size:14px;line-height:1.4;padding-top:10px;white-space:nowrap}
.adrian-project-name{font-size:clamp(36px,4vw,68px);line-height:1.05;letter-spacing:-.065em;font-weight:400;white-space:nowrap;transition:color .2s ease}
.adrian-project-category{font-size:14px;line-height:1.5;padding-top:10px;white-space:nowrap}
.adrian-project-preview{display:flex;gap:8px;align-items:flex-start;padding-left:12px;opacity:0;transform:translateX(12px);transition:opacity .25s ease,transform .25s ease;pointer-events:none}
.adrian-project-preview img{width:clamp(72px,6vw,116px);height:clamp(52px,4.3vw,78px);object-fit:cover;border-radius:5px;display:block}
.adrian-project-row.is-current .adrian-project-name{color:#e32620}
.adrian-project-row.is-current .adrian-project-preview{opacity:1;transform:translateX(0)}
.adrian-project-row:hover .adrian-project-name{color:#e32620}
.adrian-work-footer{position:fixed;bottom:18px;left:clamp(22px,2vw,40px);right:clamp(22px,2vw,40px);display:flex;justify-content:space-between;align-items:center;font-size:clamp(13px,1.2vw,22px);font-weight:700;pointer-events:none}
@media(max-width:900px){
 .adrian-project-list{width:88%;margin-left:8%}
 .adrian-project-row{grid-template-columns:32px auto auto;gap:8px;min-height:74px}
 .adrian-project-name{font-size:clamp(32px,6vw,54px);white-space:normal}
 .adrian-project-category{font-size:11px}
 .adrian-project-preview{position:absolute;right:0;top:100%;z-index:2;background:#fff;padding:5px}
}
@media(max-width:560px){
 .adrian-work-page{padding-top:32px!important}
 .adrian-project-list{width:100%;margin:28px 0 0;gap:14px}
 .adrian-project-row{grid-template-columns:30px minmax(0,1fr);column-gap:8px;min-height:62px}
 .adrian-project-name{font-size:clamp(34px,10vw,48px);white-space:normal}
 .adrian-project-category{grid-column:2;padding:0;font-size:11px;opacity:.7}
 .adrian-project-preview{grid-column:2;position:relative;right:auto;top:auto;padding:5px 0;display:none}
 .adrian-project-row.is-current .adrian-project-preview{display:flex}
}

/* v1.44 - rebuilt Work index and project detail pages from the supplied motion reference */
body.post-type-archive-project{background:#fff!important;color:#080808!important}
body.post-type-archive-project .site-header{background:#fff!important;color:#080808!important;border:0!important;padding:14px clamp(22px,2.2vw,42px)!important}
body.post-type-archive-project .site-brand,body.post-type-archive-project .primary-nav a,body.post-type-archive-project .menu-toggle{color:#080808!important}
body.post-type-archive-project .site-footer{display:none!important}
.reference-work-index{background:#fff!important;color:#080808!important;min-height:100vh;padding:26px clamp(22px,2.2vw,42px) 70px!important;position:relative}
.rwi-topline{margin:0 0 30px}
.rwi-topline>span{display:block;font-size:8px;line-height:1.2;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.rwi-topline h1{font-size:clamp(38px,3vw,58px);line-height:.82;letter-spacing:-.085em;font-weight:900;margin:3px 0 0}
.rwi-topline h1 span{color:#f04432}
.rwi-list{width:min(850px,67vw);margin:0 auto 0 35%;display:flex;flex-direction:column;gap:clamp(10px,1.5vh,19px)}
.rwi-item{display:grid;grid-template-columns:32px auto auto minmax(0,1fr);align-items:start;column-gap:8px;min-height:clamp(42px,6.1vh,66px);position:relative;color:#080808;text-decoration:none}
.rwi-number{font-size:12px;line-height:1.3;padding-top:7px;white-space:nowrap}
.rwi-title{font-size:clamp(34px,3.9vw,64px);font-weight:400;letter-spacing:-.07em;line-height:1.02;white-space:nowrap;transition:color .2s ease}
.rwi-category{font-size:12px;line-height:1.4;padding-top:8px;white-space:nowrap}
.rwi-preview{display:flex;gap:7px;align-items:flex-start;padding:0 0 0 10px;opacity:0;transform:translateX(10px);transition:opacity .22s ease,transform .22s ease;pointer-events:none}
.rwi-preview img{width:clamp(70px,6.4vw,116px);height:clamp(48px,4.4vw,78px);object-fit:cover;border-radius:5px}
.rwi-item.is-active .rwi-title,.rwi-item:hover .rwi-title,.rwi-item:focus-visible .rwi-title{color:#e32620}
.rwi-item.is-active .rwi-preview,.rwi-item:hover .rwi-preview,.rwi-item:focus-visible .rwi-preview{opacity:1;transform:translateX(0)}
.rwi-bottom{position:fixed;bottom:16px;left:clamp(22px,2.2vw,42px);right:clamp(22px,2.2vw,42px);display:flex;justify-content:space-between;font-size:13px;pointer-events:none}
.rwi-empty{margin:20vh 35%;font-size:22px}
body.single-project{background:#203d6b!important;color:#fff!important}
body.single-project .site-header{background:#203d6b!important;color:#fff!important;border:0!important;padding:14px clamp(22px,2.2vw,42px)!important}
body.single-project .site-brand,body.single-project .primary-nav a,body.single-project .menu-toggle{color:#fff!important}
body.single-project .site-footer{display:none!important}
.reference-project-page{background:#203d6b!important;color:#fff!important;min-height:100vh;padding:clamp(30px,5vh,64px) clamp(22px,2.2vw,42px) 80px!important}
.rp-intro{min-height:38vh;display:flex;flex-direction:column;justify-content:flex-start}
.rp-title-line{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.rp-title-line h1{font-size:clamp(42px,5vw,86px);line-height:.95;letter-spacing:-.07em;font-weight:400;margin:0}
.rp-category{font-size:12px;padding-top:9px}
.rp-overview{display:grid;grid-template-columns:1fr minmax(260px,36%);gap:24px;margin-top:clamp(32px,6vh,70px);font-size:14px;line-height:1.45}
.rp-overview>span{font-size:11px}
.rp-overview p{margin:0 0 12px}
.rp-content{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px;align-items:start}
.rp-content>*{grid-column:span 12;min-width:0;margin:0 0 10px}
.rp-content figure{margin:0 0 10px}
.rp-content img,.rp-content video{display:block;width:100%;height:auto;max-width:100%}
.rp-content .wp-block-image img{width:100%}
.rp-content .wp-block-columns{grid-column:span 12;gap:10px}
.rp-content .wp-block-column{min-width:0}
.rp-content .wp-block-video video{width:100%}
.rp-content p{font-size:15px;line-height:1.5;max-width:760px}
.rp-next-project{display:flex;justify-content:space-between;gap:16px;padding:26px 0 10px;font-size:13px}
.rp-next-project a{color:inherit;text-decoration:none}
.rp-next-project a:hover{text-decoration:underline}
@media(max-width:800px){
 .rwi-list{width:92%;margin:28px 0 0 7%}
 .rwi-item{grid-template-columns:28px minmax(0,auto);row-gap:2px;min-height:58px}
 .rwi-title{font-size:clamp(34px,7vw,54px);white-space:normal}
 .rwi-category{grid-column:2;font-size:10px;padding:0}
 .rwi-preview{grid-column:2;padding:6px 0;display:none}
 .rwi-item.is-active .rwi-preview{display:flex}
 .rp-intro{min-height:35vh}
 .rp-overview{grid-template-columns:1fr;gap:10px}
}
@media(max-width:520px){
 .reference-work-index{padding-top:24px!important}
 .rwi-list{width:100%;margin-left:0}
 .rwi-title{font-size:clamp(32px,9vw,46px)}
 .rp-title-line h1{font-size:clamp(38px,11vw,58px)}
 .rp-next-project{font-size:11px}
}

/* v1.45 layout correction: centered list and reliable hover preview */
body.post-type-archive-project .reference-work-index,
.reference-work-index{width:100%;box-sizing:border-box}
.rwi-list{width:min(100%,1040px)!important;margin:0 auto!important}
.rwi-item{grid-template-columns:36px max-content max-content minmax(100px,1fr)!important;align-items:start}
.rwi-preview{min-width:0}
.rwi-preview img{object-fit:cover}
@media(min-width:801px){
 .rwi-list{padding-left:clamp(0px,5vw,90px);padding-right:clamp(0px,5vw,90px);box-sizing:border-box}
 .rwi-item{min-height:clamp(54px,7vh,76px)}
 .rwi-preview{opacity:0;visibility:hidden;transform:translateX(14px);transition:opacity .25s ease,transform .25s ease,visibility .25s ease}
 .rwi-item.is-active .rwi-preview,.rwi-item:hover .rwi-preview,.rwi-item:focus-visible .rwi-preview{opacity:1;visibility:visible;transform:translateX(0)}
}
@media(max-width:800px){
 .rwi-list{width:100%!important;margin:28px auto 0!important;padding:0 4vw;box-sizing:border-box}
 .rwi-item{grid-template-columns:30px minmax(0,1fr)!important}
 .rwi-preview{display:none;opacity:0;visibility:hidden}
 .rwi-item.is-active .rwi-preview{display:flex;opacity:1;visibility:visible;transform:none}
 .rwi-preview img{width:min(42vw,150px);height:clamp(72px,22vw,112px);border-radius:4px}
}

/* v1.46 - split-screen Work index: titles left, large project preview right */
body.post-type-archive-project{background:#101010!important;color:#f5f3ef!important}
body.post-type-archive-project .site-header{background:#101010!important;color:#f5f3ef!important;border-bottom:1px solid rgba(255,255,255,.16)!important}
body.post-type-archive-project .site-brand,
body.post-type-archive-project .primary-nav a,
body.post-type-archive-project .menu-toggle{color:#f5f3ef!important}
body.post-type-archive-project .site-main,
body.post-type-archive-project .reference-work-index{background:#101010!important;color:#f5f3ef!important}
body.post-type-archive-project .site-footer{display:none!important}
.reference-work-index{position:relative;min-height:calc(100vh - 70px);box-sizing:border-box;padding:28px 4vw 76px!important;background:#101010!important;color:#f5f3ef!important;overflow:visible}
.rwi-topline{margin:0 0 26px!important}
.rwi-topline>span{color:#f5f3ef!important}
.rwi-topline h1{color:#f5f3ef!important}
.rwi-topline h1 span{color:#f04432!important}
.rwi-list{width:45%!important;max-width:none!important;margin:0!important;padding:0!important;display:flex;flex-direction:column;gap:clamp(13px,2.2vh,24px)!important;box-sizing:border-box}
.rwi-item{display:grid;grid-template-columns:34px minmax(0,max-content) minmax(0,1fr)!important;align-items:start;column-gap:9px;min-height:clamp(48px,6.4vh,70px)!important;position:relative;color:#f5f3ef!important;text-decoration:none}
.rwi-number{color:rgba(245,243,239,.65)!important;padding-top:9px}
.rwi-title{color:#f5f3ef!important;font-size:clamp(30px,3.3vw,56px)!important;line-height:1.02!important;white-space:normal!important;transition:color .2s ease}
.rwi-category{color:rgba(245,243,239,.7)!important;padding-top:9px}
.rwi-item:hover .rwi-title,.rwi-item:focus-visible .rwi-title,.rwi-item.is-active .rwi-title{color:#f04432!important}
.rwi-preview{position:fixed!important;z-index:2;top:clamp(105px,14vh,150px)!important;right:4vw!important;bottom:clamp(72px,10vh,100px)!important;width:46vw!important;height:auto!important;max-width:none!important;min-width:0!important;padding:0!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;opacity:0!important;visibility:hidden!important;transform:translateY(8px)!important;transition:opacity .28s ease,transform .28s ease,visibility .28s ease!important;pointer-events:none!important}
.rwi-preview img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;border-radius:0!important}
.rwi-item.is-active .rwi-preview,.rwi-item:hover .rwi-preview,.rwi-item:focus-visible .rwi-preview{opacity:1!important;visibility:visible!important;transform:translateY(0)!important}
.rwi-bottom{color:#f5f3ef!important;left:4vw!important;right:4vw!important}
.rwi-empty{color:#f5f3ef!important}
@media(max-width:800px){
 .reference-work-index{padding:24px 5vw 76px!important}
 .rwi-list{width:100%!important;margin:0!important;padding:0!important;gap:12px!important}
 .rwi-item{grid-template-columns:28px minmax(0,1fr)!important;min-height:52px!important}
 .rwi-title{font-size:clamp(30px,7vw,48px)!important}
 .rwi-category{grid-column:2;padding:0!important;font-size:10px}
 .rwi-preview{position:relative!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;grid-column:2;width:100%!important;height:clamp(180px,55vw,320px)!important;margin:10px 0 8px!important;display:none!important;opacity:0!important;visibility:hidden!important;transform:none!important}
 .rwi-item.is-active .rwi-preview{display:flex!important;opacity:1!important;visibility:visible!important}
 .rwi-preview img{width:100%!important;height:100%!important;object-fit:contain!important}
}


/* v1.47 - independently scrolling title index with synchronized active preview */
@media (min-width:801px) {
  body.post-type-archive-project .reference-work-index {
    height: calc(100vh - 70px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.post-type-archive-project .rwi-topline {
    flex: 0 0 auto !important;
  }
  body.post-type-archive-project .rwi-list {
    width: 47% !important;
    height: calc(100vh - 235px) !important;
    min-height: 240px !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    scroll-behavior: smooth !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(245,243,239,.28) transparent;
    padding: 8vh 24px 12vh 0 !important;
    box-sizing: border-box !important;
    gap: clamp(22px, 4.5vh, 54px) !important;
  }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar { width: 4px; }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar-track { background: transparent; }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar-thumb {
    background: rgba(245,243,239,.28);
    border-radius: 4px;
  }
  body.post-type-archive-project .rwi-item {
    flex: 0 0 auto !important;
    opacity: .36 !important;
    transform: scale(.94) !important;
    transform-origin: left center !important;
    transition: opacity .35s ease, transform .45s cubic-bezier(.2,.75,.25,1) !important;
    min-height: clamp(54px, 7vh, 82px) !important;
  }
  body.post-type-archive-project .rwi-item.is-active {
    opacity: 1 !important;
    transform: scale(1.06) !important;
  }
  body.post-type-archive-project .rwi-title {
    color: rgba(245,243,239,.88) !important;
    transition: color .3s ease, opacity .3s ease !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-title {
    color: rgba(245,243,239,.48) !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-title,
  body.post-type-archive-project .rwi-item:hover .rwi-title,
  body.post-type-archive-project .rwi-item:focus-visible .rwi-title {
    color: #f04432 !important;
  }
  body.post-type-archive-project .rwi-number,
  body.post-type-archive-project .rwi-category {
    transition: opacity .3s ease, color .3s ease !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-number,
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-category {
    opacity: .35 !important;
  }
  body.post-type-archive-project .rwi-preview {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(18px) scale(.94) !important;
    transition: opacity .45s ease, transform .55s cubic-bezier(.2,.75,.25,1), visibility .45s ease !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-preview {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
  }
  body.post-type-archive-project .rwi-preview img {
    transition: transform .65s cubic-bezier(.2,.75,.25,1), opacity .4s ease !important;
    transform: scale(1) !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-preview img {
    transform: scale(1.015) !important;
  }
}
@media (max-width:800px) {
  body.post-type-archive-project .rwi-item {
    opacity: .48 !important;
    transition: opacity .3s ease, transform .35s ease !important;
  }
  body.post-type-archive-project .rwi-item.is-active {
    opacity: 1 !important;
    transform: scale(1.015) !important;
    transform-origin: left center !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-title {
    color: rgba(245,243,239,.48) !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-title {
    color: #f04432 !important;
  }
}


/* v1.48 - clean scroll-only title rail and detached right-side preview */
@media (min-width:801px) {
  body.post-type-archive-project {
    height:100vh !important;
    overflow:hidden !important;
  }
  body.post-type-archive-project .reference-work-index {
    height:calc(100vh - 70px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  body.post-type-archive-project .rwi-list {
    overflow-y:auto !important;
    overflow-x:hidden !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    overscroll-behavior:contain !important;
    scroll-snap-type:y proximity;
  }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar {
    display:none !important;
    width:0 !important;
    height:0 !important;
  }
  body.post-type-archive-project .rwi-item {
    opacity:1 !important;
    transform:none !important;
    scroll-snap-align:center;
    transition:opacity .35s ease !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-title {
    color:#f5f3ef !important;
    opacity:.43 !important;
    font-size:clamp(25px,2.7vw,44px) !important;
    transition:opacity .35s ease,font-size .35s ease,color .35s ease !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-title {
    color:#f04432 !important;
    opacity:1 !important;
    font-size:clamp(34px,3.5vw,58px) !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-number,
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-category {
    color:#f5f3ef !important;
    opacity:.35 !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-number,
  body.post-type-archive-project .rwi-item.is-active .rwi-category {
    color:#f5f3ef !important;
    opacity:.9 !important;
  }
  body.post-type-archive-project .rwi-item .rwi-preview {
    display:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage {
    position:fixed !important;
    z-index:30 !important;
    top:clamp(105px,14vh,150px) !important;
    right:4vw !important;
    bottom:clamp(72px,10vh,100px) !important;
    width:46vw !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    opacity:0 !important;
    visibility:hidden !important;
    transform:translateY(18px) scale(.97) !important;
    transition:opacity .4s ease,transform .5s cubic-bezier(.2,.75,.25,1),visibility .4s ease !important;
    pointer-events:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage.is-visible {
    opacity:1 !important;
    visibility:visible !important;
    transform:translateY(0) scale(1) !important;
  }
  body.post-type-archive-project .rwi-preview-stage img {
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
  }
}
@media (max-width:800px) {
  body.post-type-archive-project .rwi-list {
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
  }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar {
    display:none !important;
  }
  body.post-type-archive-project .rwi-item:not(.is-active) .rwi-title {
    color:#f5f3ef !important;
    opacity:.45 !important;
    font-size:clamp(25px,6vw,40px) !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-title {
    color:#f04432 !important;
    opacity:1 !important;
  }
  body.post-type-archive-project .rwi-preview-stage {display:none !important;}
}


/* v1.49 - reliable title-rail scrolling, compact title hierarchy, sharper previews */
@media (min-width:801px) {
  body.post-type-archive-project .rwi-list {
    position:relative !important;
    width:46% !important;
    height:calc(100vh - 245px) !important;
    max-height:calc(100vh - 245px) !important;
    min-height:220px !important;
    margin:0 !important;
    padding:10px 12px 24px 0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    scroll-behavior:smooth !important;
    scroll-snap-type:y proximity !important;
    outline:none !important;
    gap:clamp(8px,1.2vh,14px) !important;
  }
  body.post-type-archive-project .rwi-list::-webkit-scrollbar {
    display:none !important;width:0!important;height:0!important;
  }
  body.post-type-archive-project .rwi-item {
    min-height:clamp(42px,5.2vh,58px) !important;
    grid-template-columns:30px minmax(0,max-content) minmax(0,1fr) !important;
    align-items:center !important;
    scroll-snap-align:center !important;
    cursor:pointer !important;
  }
  body.post-type-archive-project .rwi-title {
    font-size:clamp(17px,1.55vw,24px) !important;
    line-height:1.08 !important;
    color:#f5f3ef !important;
    opacity:.34 !important;
    transform:scale(1) !important;
    transform-origin:left center !important;
    transition:font-size .3s ease,opacity .3s ease,color .3s ease,transform .3s ease !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-title {
    font-size:clamp(27px,2.45vw,39px) !important;
    color:#f04432 !important;
    opacity:1 !important;
    transform:scale(1.015) !important;
  }
  body.post-type-archive-project .rwi-number,
  body.post-type-archive-project .rwi-category {
    font-size:10px !important;
    opacity:.3 !important;
    transition:opacity .3s ease,color .3s ease !important;
  }
  body.post-type-archive-project .rwi-item.is-active .rwi-number,
  body.post-type-archive-project .rwi-item.is-active .rwi-category {
    opacity:.9 !important;
  }
  body.post-type-archive-project .rwi-preview-stage {
    right:5vw !important;
    width:40vw !important;
    top:clamp(120px,16vh,165px) !important;
    bottom:clamp(90px,12vh,120px) !important;
  }
  body.post-type-archive-project .rwi-preview-stage img {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    image-rendering:auto !important;
  }
}


/* v1.52: archive-only scroll lock, clearly compact inactive titles and usable wheel rail */
@media (min-width: 801px) {
  body.post-type-archive-project .reference-work-index {
    height: calc(100vh - 70px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-list {
    width: 47% !important;
    max-width: 47% !important;
    height: 62vh !important;
    max-height: 62vh !important;
    min-height: 260px !important;
    flex: 0 1 62vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 18px 18px 22px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    gap: 20px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overscroll-behavior: contain !important;
    scroll-behavior: auto !important;
    scroll-snap-type: y proximity !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-list::-webkit-scrollbar {
    display: none !important; width: 0 !important; height: 0 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: stretch !important;
    min-height: 58px !important;
    height: auto !important;
    gap: 8px !important;
    opacity: 1 !important;
    transform: none !important;
    text-align: center !important;
    scroll-snap-align: center !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-number {
    grid-column: 1 !important; grid-row: 1 !important;
    justify-self: start !important; font-size: 9px !important; line-height: 1 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-title {
    grid-column: 2 !important; grid-row: 1 !important;
    display: block !important; width: 100% !important; max-width: 100% !important;
    justify-self: center !important; text-align: center !important;
    white-space: normal !important; overflow-wrap: anywhere !important;
    font-size: 12px !important; line-height: 1.15 !important; font-weight: 500 !important;
    letter-spacing: -.025em !important; color: #f5f3ef !important; opacity: .38 !important;
    transform: none !important;
    transition: font-size .3s ease, opacity .3s ease, color .3s ease !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-title {
    font-size: clamp(30px, 2.8vw, 44px) !important;
    line-height: 1 !important; font-weight: 600 !important;
    color: #f04432 !important; opacity: 1 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item:hover .rwi-title,
  body.post-type-archive-project .reference-work-index .rwi-item:focus-visible .rwi-title {
    color: #f04432 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-number,
  body.post-type-archive-project .reference-work-index .rwi-category { font-size: 9px !important; opacity: .35 !important; }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-number,
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-category { opacity: .9 !important; }
}
@media (max-width: 800px) {
  body.post-type-archive-project .reference-work-index .rwi-list {
    height: auto !important; max-height: none !important; overflow: visible !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item:not(.is-active) .rwi-title {
    font-size: 14px !important; opacity: .45 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-title {
    font-size: clamp(26px, 7vw, 38px) !important; opacity: 1 !important; color: #f04432 !important;
  }
}


/* v1.53 - left-aligned compact index and layered adjacent project catalogue */
@media (min-width:801px) {
  body.post-type-archive-project .reference-work-index .rwi-list {
    width:47% !important; max-width:47% !important;
    padding:18px 28px 22px 0 !important;
    gap:clamp(18px,2.8vh,30px) !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item {
    grid-template-columns:34px minmax(0,1fr) !important;
    text-align:left !important; justify-items:start !important;
    justify-content:start !important; min-height:clamp(44px,6vh,68px) !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-number {
    justify-self:start !important; text-align:left !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-title {
    justify-self:start !important; text-align:left !important;
    width:auto !important; max-width:100% !important;
    font-size:12px !important; line-height:1.12 !important;
    opacity:.42 !important; color:#f5f3ef !important;
    transform:scale(1) !important; transform-origin:left center !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-title {
    font-size:clamp(30px,2.65vw,43px) !important;
    line-height:1.02 !important; opacity:1 !important;
    color:#f04432 !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item:hover .rwi-title,
  body.post-type-archive-project .reference-work-index .rwi-item:focus-visible .rwi-title {
    color:#f04432 !important;
  }
  body.post-type-archive-project .rwi-preview-stage {
    right:4.5vw !important; width:43vw !important;
    top:clamp(105px,14vh,145px) !important;
    bottom:clamp(70px,9vh,95px) !important;
    display:grid !important; grid-template-rows:1fr 1.5fr 1fr !important;
    align-items:center !important; justify-items:stretch !important;
    gap:10px !important; overflow:hidden !important;
    opacity:0 !important; visibility:hidden !important;
    transform:translateY(12px) !important;
  }
  body.post-type-archive-project .rwi-preview-stage.is-visible {
    opacity:1 !important; visibility:visible !important; transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-card {
    min-height:0 !important; width:100% !important; height:100% !important;
    display:flex !important; align-items:center !important; justify-content:center !important;
    overflow:hidden !important; opacity:0 !important;
    transform:scale(.94) !important;
    transition:opacity .45s ease,transform .55s cubic-bezier(.2,.75,.25,1) !important;
  }
  body.post-type-archive-project .rwi-preview-card.has-image { opacity:.22 !important; }
  body.post-type-archive-project .rwi-preview-current {
    opacity:1 !important; transform:scale(1) !important;
  }
  body.post-type-archive-project .rwi-preview-card img {
    display:block !important; width:100% !important; height:100% !important;
    max-width:100% !important; max-height:100% !important;
    object-fit:contain !important; object-position:center !important;
  }
  body.post-type-archive-project .rwi-preview-prev { align-self:end !important; }
  body.post-type-archive-project .rwi-preview-next { align-self:start !important; }
}
@media (max-width:800px) {
  body.post-type-archive-project .reference-work-index .rwi-item { text-align:left !important; }
  body.post-type-archive-project .reference-work-index .rwi-item:not(.is-active) .rwi-title {font-size:13px !important;}
}


/* v1.54 - stronger catalogue hierarchy, active preview stays fully visible, adjacent previews fade and move */
@media (min-width:801px) {
  body.post-type-archive-project .reference-work-index .rwi-item {
    transition: min-height .42s cubic-bezier(.2,.75,.25,1), padding .42s ease !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-title {
    font-size:9px !important;
    line-height:1.05 !important;
    opacity:.34 !important;
    color:#f5f3ef !important;
    transform:scale(.98) !important;
    transform-origin:left center !important;
    transition:font-size .42s cubic-bezier(.2,.75,.25,1), opacity .42s ease, color .42s ease, transform .42s cubic-bezier(.2,.75,.25,1) !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-title {
    font-size:clamp(32px,2.8vw,46px) !important;
    line-height:1 !important;
    opacity:1 !important;
    color:#f04432 !important;
    transform:scale(1) translateX(5px) !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item:not(.is-active) .rwi-number,
  body.post-type-archive-project .reference-work-index .rwi-item:not(.is-active) .rwi-category {
    opacity:.22 !important;
    transition:opacity .4s ease !important;
  }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-number,
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-category { opacity:.9 !important; }

  body.post-type-archive-project .rwi-preview-stage {
    perspective:1100px !important;
  }
  body.post-type-archive-project .rwi-preview-card {
    will-change:transform,opacity,filter !important;
    transition:opacity .55s ease, transform .7s cubic-bezier(.2,.75,.25,1), filter .55s ease !important;
    -webkit-mask-image:linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%) !important;
    mask-image:linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%) !important;
  }
  body.post-type-archive-project .rwi-preview-card.has-image { opacity:.24 !important; filter:blur(.35px) !important; }
  body.post-type-archive-project .rwi-preview-current {
    opacity:1 !important;
    filter:none !important;
    transform:translateY(0) scale(1) !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
    z-index:2 !important;
  }
  body.post-type-archive-project .rwi-preview-prev {
    opacity:.2 !important;
    transform:translateY(16px) scale(.94) rotateX(2deg) !important;
  }
  body.post-type-archive-project .rwi-preview-next {
    opacity:.2 !important;
    transform:translateY(-16px) scale(.94) rotateX(-2deg) !important;
  }
  body.post-type-archive-project .rwi-preview-prev.has-image,
  body.post-type-archive-project .rwi-preview-next.has-image { opacity:.24 !important; }
}
@media (max-width:800px) {
  body.post-type-archive-project .reference-work-index .rwi-item:not(.is-active) .rwi-title { font-size:10px !important; opacity:.35 !important; }
  body.post-type-archive-project .reference-work-index .rwi-item.is-active .rwi-title { font-size:clamp(28px,7vw,40px) !important; opacity:1 !important; }
}


/* v1.55 - enforce active item opacity and directional fades in the work catalogue */
@media (min-width:801px) {
  body.post-type-archive-project main.reference-work-index .rwi-list .rwi-item {
    opacity:1 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list .rwi-item:not(.is-active) > .rwi-title {
    font-size:9px !important;
    line-height:1.1 !important;
    opacity:.30 !important;
    color:#f5f3ef !important;
    transform:scale(.96) !important;
    transform-origin:left center !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list .rwi-item.is-active > .rwi-title {
    font-size:clamp(32px,2.8vw,46px) !important;
    line-height:1 !important;
    opacity:1 !important;
    color:#f04432 !important;
    transform:scale(1.02) translateX(5px) !important;
  }
  body.post-type-archive-project .rwi-preview-stage {
    isolation:isolate !important;
  }
  body.post-type-archive-project .rwi-preview-card {
    position:relative !important;
    overflow:hidden !important;
    will-change:transform,opacity,filter !important;
    transition:opacity .6s ease, transform .75s cubic-bezier(.2,.75,.25,1), filter .6s ease !important;
  }
  /* The selected project must win over the generic has-image opacity rule. */
  body.post-type-archive-project .rwi-preview-card.rwi-preview-current.has-image {
    opacity:1 !important;
    filter:none !important;
    transform:translateY(0) scale(1.10) !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
    z-index:3 !important;
  }
  /* Preview above: transparent at its top edge, becoming clearer downward. */
  body.post-type-archive-project .rwi-preview-card.rwi-preview-prev.has-image {
    opacity:.34 !important;
    filter:blur(.25px) !important;
    transform:translateY(12px) scale(.91) !important;
    -webkit-mask-image:linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.08) 18%, #000 100%) !important;
    mask-image:linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.08) 18%, #000 100%) !important;
    z-index:1 !important;
  }
  /* Preview below: clearer at its top edge, fading toward the bottom. */
  body.post-type-archive-project .rwi-preview-card.rwi-preview-next.has-image {
    opacity:.34 !important;
    filter:blur(.25px) !important;
    transform:translateY(-12px) scale(.91) !important;
    -webkit-mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.08) 82%, transparent 100%) !important;
    mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.08) 82%, transparent 100%) !important;
    z-index:1 !important;
  }
  body.post-type-archive-project .rwi-preview-card.rwi-preview-current img {
    transform:scale(1.015) !important;
    transition:transform .75s cubic-bezier(.2,.75,.25,1) !important;
  }
}


/* v1.56 - equal-sized catalogue previews for consistent scrolling */
@media (min-width:801px) {
  body.post-type-archive-project .rwi-preview-stage {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:repeat(3,minmax(0,1fr)) !important;
    align-items:stretch !important;
    justify-items:stretch !important;
    gap:12px !important;
  }
  body.post-type-archive-project .rwi-preview-card {
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    align-self:stretch !important;
    justify-self:stretch !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-card.rwi-preview-current.has-image {
    opacity:1 !important;
    filter:none !important;
    transform:none !important;
    z-index:3 !important;
  }
  body.post-type-archive-project .rwi-preview-card.rwi-preview-prev.has-image {
    opacity:.34 !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-card.rwi-preview-next.has-image {
    opacity:.34 !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-card img {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
  }
}


/* v1.58 - rebuild Work title rail and preview layout with selectors matching archive-project.php */
@media (min-width:801px) {
  body.post-type-archive-project {
    height:100vh !important;
    overflow:hidden !important;
  }
  body.post-type-archive-project main.reference-work-index {
    position:relative !important;
    display:block !important;
    height:calc(100vh - 70px) !important;
    min-height:0 !important;
    overflow:hidden !important;
    padding:0 3vw 0 3vw !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-topline {
    position:relative !important;
    z-index:2 !important;
    margin:24px 0 12px !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list {
    position:relative !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:flex-start !important;
    align-items:stretch !important;
    gap:0 !important;
    width:47% !important;
    max-width:47% !important;
    height:calc(100vh - 255px) !important;
    max-height:calc(100vh - 255px) !important;
    min-height:220px !important;
    margin:0 !important;
    padding:0 24px 35px 0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
    scroll-behavior:auto !important;
    scroll-snap-type:y proximity !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list::-webkit-scrollbar {
    display:none !important;
    width:0 !important;
    height:0 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item {
    display:grid !important;
    grid-template-columns:34px minmax(0,1fr) !important;
    align-items:center !important;
    justify-content:start !important;
    justify-items:start !important;
    flex:0 0 auto !important;
    width:100% !important;
    min-height:clamp(74px,10vh,92px) !important;
    height:auto !important;
    margin:0 !important;
    padding:7px 0 !important;
    text-align:left !important;
    opacity:1 !important;
    scroll-snap-align:center !important;
    scroll-margin-block:36vh !important;
    transition:min-height .35s ease,padding .35s ease !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item > .rwi-number {
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:start !important;
    font-size:9px !important;
    line-height:1 !important;
    opacity:.34 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item > .rwi-title {
    grid-column:2 !important;
    grid-row:1 !important;
    display:block !important;
    width:auto !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
    color:#f5f3ef !important;
    font-size:12px !important;
    line-height:1.12 !important;
    font-weight:400 !important;
    letter-spacing:-.045em !important;
    opacity:.48 !important;
    transform:none !important;
    transform-origin:left center !important;
    transition:font-size .38s cubic-bezier(.2,.75,.25,1),opacity .3s ease,color .3s ease,transform .38s cubic-bezier(.2,.75,.25,1) !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item:not(.is-active) > .rwi-title {
    font-size:12px !important;
    opacity:.42 !important;
    color:#f5f3ef !important;
    transform:scale(1) !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item.is-active {
    min-height:clamp(88px,12vh,112px) !important;
    padding:12px 0 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item.is-active > .rwi-title {
    font-size:clamp(30px,2.55vw,42px) !important;
    line-height:1.02 !important;
    font-weight:500 !important;
    opacity:1 !important;
    color:#f04432 !important;
    transform:translateX(5px) !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item.is-active > .rwi-number {
    opacity:.9 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item > .rwi-category,
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item > .rwi-preview {
    display:none !important;
  }

  body.post-type-archive-project .rwi-preview-stage {
    position:fixed !important;
    z-index:20 !important;
    top:clamp(105px,14vh,145px) !important;
    right:3vw !important;
    bottom:clamp(65px,8vh,85px) !important;
    width:43vw !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:repeat(3,minmax(0,1fr)) !important;
    align-items:stretch !important;
    justify-items:stretch !important;
    gap:8px !important;
    overflow:hidden !important;
    opacity:0 !important;
    visibility:hidden !important;
    transform:translateY(10px) !important;
    transition:opacity .35s ease,transform .45s ease,visibility .35s ease !important;
    pointer-events:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage.is-visible {
    opacity:1 !important;
    visibility:visible !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    background:rgba(255,255,255,.025) !important;
    transform:none !important;
    transition:opacity .4s ease,filter .4s ease !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card img {
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.has-image {
    opacity:.25 !important;
    filter:blur(.2px) !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-current.has-image {
    opacity:1 !important;
    filter:none !important;
    transform:scale(1.035) !important;
    z-index:3 !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-prev.has-image {
    -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 100%) !important;
    mask-image:linear-gradient(to bottom,transparent 0%,#000 100%) !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-next.has-image {
    -webkit-mask-image:linear-gradient(to top,transparent 0%,#000 100%) !important;
    mask-image:linear-gradient(to top,transparent 0%,#000 100%) !important;
  }
}


/* v1.59 - definitive Work catalogue rhythm, active focus and preview consistency */
@media (min-width:801px) {
  body.post-type-archive-project main.reference-work-index .rwi-list {
    height:calc(100vh - 205px) !important;
    max-height:calc(100vh - 205px) !important;
    padding-top:4px !important;
    padding-bottom:24px !important;
    scroll-padding-block:42vh !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item {
    min-height:42px !important;
    height:auto !important;
    padding:3px 0 !important;
    margin:0 !important;
    transition:min-height .42s cubic-bezier(.2,.75,.25,1), padding .42s cubic-bezier(.2,.75,.25,1) !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item:not(.is-active) > .rwi-title {
    font-size:11px !important;
    line-height:1.08 !important;
    font-weight:400 !important;
    opacity:.34 !important;
    color:#f5f3ef !important;
    transform:none !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item.is-active {
    min-height:92px !important;
    padding:10px 0 !important;
  }
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item.is-active > .rwi-title {
    font-size:clamp(30px,2.8vw,46px) !important;
    line-height:1.02 !important;
    font-weight:600 !important;
    opacity:1 !important;
    color:#f04432 !important;
    transform:translateX(6px) !important;
  }
  body.post-type-archive-project .rwi-preview-stage {
    top:clamp(112px,15vh,150px) !important;
    bottom:clamp(62px,7vh,78px) !important;
    width:min(43vw,680px) !important;
    grid-template-rows:repeat(3,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card {
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    aspect-ratio:16 / 9 !important;
    background:transparent !important;
    overflow:hidden !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card img {
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-current.has-image {
    opacity:1 !important;
    filter:none !important;
    transform:scale(1.045) !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-prev.has-image {
    opacity:.26 !important;
    -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 92%) !important;
    mask-image:linear-gradient(to bottom,transparent 0%,#000 92%) !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card.rwi-preview-next.has-image {
    opacity:.26 !important;
    -webkit-mask-image:linear-gradient(to top,transparent 0%,#000 92%) !important;
    mask-image:linear-gradient(to top,transparent 0%,#000 92%) !important;
  }
}
@media (max-width:800px) {
  body.post-type-archive-project main.reference-work-index .rwi-list > .rwi-item:not(.is-active) > .rwi-title {font-size:12px !important;opacity:.42 !important;}
}


/* v2.31.3: reliable tablet/mobile navigation layering and touch targets */
@media (max-width:900px) {
  .site-header { position:relative!important; z-index:10000!important; align-items:center!important; }
  .menu-toggle { display:block!important; position:relative; z-index:10002; min-height:44px; cursor:pointer; touch-action:manipulation; }
  .primary-nav { display:none!important; position:absolute!important; top:100%!important; left:0!important; right:0!important; z-index:10001!important; width:100%!important; max-height:calc(100svh - 76px); overflow-y:auto!important; padding:18px var(--gutter) 24px!important; margin:0!important; flex-direction:column!important; align-items:stretch!important; gap:0!important; background:#101010!important; color:#f5f3ef!important; border-bottom:1px solid rgba(255,255,255,.2)!important; box-shadow:0 16px 28px rgba(0,0,0,.35); pointer-events:auto!important; }
  .primary-nav.is-open { display:flex!important; }
  .primary-nav > a, .primary-nav > li, .primary-nav li > a { display:flex!important; align-items:center!important; width:100%!important; min-height:52px!important; padding:14px 4px!important; box-sizing:border-box!important; color:#f5f3ef!important; border-bottom:1px solid rgba(255,255,255,.18)!important; pointer-events:auto!important; position:relative!important; z-index:1!important; touch-action:manipulation; }
  .primary-nav ul { display:block!important; position:static!important; width:100%!important; }
}


/* v2.31.9: restore the active red frame and align smaller adjacent previews */
@media (min-width:801px) {
  body.post-type-archive-project .work-preview {
    top:50% !important;
    right:clamp(24px,4vw,72px) !important;
    bottom:auto !important;
    width:min(47vw,780px) !important;
    height:min(72vh,720px) !important;
    grid-template-rows:minmax(0,.48fr) minmax(0,1.35fr) minmax(0,.48fr) !important;
    gap:12px !important;
    transform:translateY(calc(-50% + 10px)) !important;
    overflow:visible !important;
  }
  body.post-type-archive-project .work-preview.is-visible {
    transform:translateY(-50%) !important;
  }
  body.post-type-archive-project .work-preview .work-preview-card {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:0 !important;
    min-height:0 !important;
    width:100% !important;
    height:100% !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
    border:0 !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.025) !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
    transform:none !important;
    filter:none !important;
  }
  body.post-type-archive-project .work-preview .work-preview-before,
  body.post-type-archive-project .work-preview .work-preview-after {
    width:72% !important;
    opacity:0 !important;
    transform:none !important;
    border:1px solid rgba(240,68,50,.38) !important;
  }
  body.post-type-archive-project .work-preview .work-preview-before.has-image,
  body.post-type-archive-project .work-preview .work-preview-after.has-image {
    opacity:.38 !important;
  }
  body.post-type-archive-project .work-preview .work-preview-active {
    width:100% !important;
    opacity:0 !important;
    z-index:4 !important;
    border:2px solid #f04432 !important;
    border-radius:20px !important;
    box-shadow:0 0 0 1px rgba(240,68,50,.12) !important;
  }
  body.post-type-archive-project .work-preview .work-preview-active.has-image {
    opacity:1 !important;
    transform:none !important;
    filter:none !important;
  }
  body.post-type-archive-project .work-preview .work-preview-card img {
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
    transform:none !important;
  }
}


/* v2.32.0: browser-consistent active outline and true vertical preview stack */
@media (min-width:801px) {
  body.post-type-archive-project .rwi-preview-stage {
    position:fixed !important;
    top:clamp(90px,11vh,125px) !important;
    bottom:clamp(70px,9vh,100px) !important;
    right:4vw !important;
    left:auto !important;
    width:min(43vw,700px) !important;
    height:auto !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:minmax(0,.58fr) minmax(0,1.5fr) minmax(0,.58fr) !important;
    align-items:stretch !important;
    justify-items:center !important;
    gap:9px !important;
    overflow:visible !important;
    perspective:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card {
    position:relative !important;
    inset:auto !important;
    grid-column:1 !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    margin:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    overflow:hidden !important;
    border:0 !important;
    border-radius:18px !important;
    background:transparent !important;
    transform:none !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
    filter:none !important;
    box-sizing:border-box !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-prev {
    grid-row:1 !important;
    width:72% !important;
    opacity:.3 !important;
    z-index:1 !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-current {
    grid-row:2 !important;
    width:100% !important;
    opacity:1 !important;
    z-index:3 !important;
    border:0 !important;
    box-shadow:inset 0 0 0 2px #f04432, 0 0 0 1px #f04432 !important;
    outline:2px solid #f04432 !important;
    outline-offset:-2px !important;
    border-radius:20px !important;
    -webkit-mask-image:none !important;
    mask-image:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-next {
    grid-row:3 !important;
    width:72% !important;
    opacity:.3 !important;
    z-index:1 !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card img {
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
    transform:none !important;
  }
  body.post-type-archive-project .rwi-preview-stage .rwi-preview-card:not(.has-image) {
    opacity:0 !important;
  }
}


/* v2.33.4: Remove the oversized reserved gap between project title and content
   across every single project page. */
body.single-project .rp-intro {
  min-height: 0;
  margin-bottom: clamp(24px, 3vw, 44px);
}
body.single-project .rp-overview {
  margin-top: clamp(18px, 3vh, 32px);
}
body.single-project .rp-content {
  margin-top: 0;
}
@media (max-width: 800px) {
  body.single-project .rp-intro {
    min-height: 0;
    margin-bottom: 24px;
  }
}
