/* Project gallery: existing Communex typography, blue surfaces and mint accents. */
html[data-site-page="references"] [data-site-view="home"],
html:not([data-site-page="references"]) [data-site-view="references"] { display: none !important; }
.cx-references { --ref-line: #a5d3e633; --ref-accent: #72e6d2; --ref-muted: #c7dce6; color: #f2f4f3; background: linear-gradient(180deg,#005c91 0%,#004b77 40%,#003d63 100%); }
.cx-references :is(p,h1,h2,h3,ul) { margin: 0; }
.cx-references :is(section[id],h1) { scroll-margin-top: calc(var(--nav-bar-height,88px) + 36px); }
.cx-references :is(a,h1):focus-visible { outline: 2px solid var(--ref-accent); outline-offset: 6px; border-radius: 5px; }
.cx-references .cx-references-eyebrow { color: var(--ref-accent); font-size: 12px; line-height: 1.6; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 24px; }
.cx-references-intro { padding-top: calc(var(--nav-bar-height,88px) + 72px); padding-bottom: 28px; position: relative; }
.cx-references-hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: clamp(28px,4vw,72px); align-items: center; }
.cx-references-lead { min-width: 0; padding-bottom: 35px; }
.cx-references h1 { max-width: 16ch; font-size: clamp(38px,4.2vw,64px); font-weight: 500; line-height: 1.08; letter-spacing: -.04em; }
.cx-references-lead > p { max-width: 43ch; color: var(--ref-muted); font-size: 17px; line-height: 1.7; margin-top: 28px; }
.cx-references-network { position: relative; width: 100%; aspect-ratio: 6/5; isolation: isolate; }
.cx-references-network::before { content: ''; position: absolute; inset: 12% 9%; border-radius: 50%; background: radial-gradient(ellipse,#4999bf26,transparent 69%); transform: rotate(-15deg); }
.cx-network-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cx-network-lines ellipse { stroke: #9dcee424; stroke-dasharray: 3 8; }
.cx-network-lines .ref-wire { stroke: #72e6d280; stroke-width: 1.3; }
.cx-network-hub { position: absolute; top: 46%; left: 50%; transform: translate(-50%,-50%) rotate(-3deg); display: grid; justify-items: center; gap: 12px; width: 36%; padding: 22px 12px; border: 1px solid #ade8eb66; border-radius: 18px; background: linear-gradient(145deg,#1774a2,#00426b); box-shadow: inset 0 1px 0 #ffffff30,0 22px 35px #00243d55; }
.cx-network-hub img { width: 85%; height: auto; }
.cx-network-hub span { color: #d3e8f1; font-size: clamp(8px,.72vw,11px); white-space: nowrap; }
.cx-network-node { position: absolute; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 32%; min-height: 108px; padding: 17px; border: 1px solid #b4e0f64a; border-radius: 16px; background: linear-gradient(140deg,#165e84ed,#003858f5); box-shadow: inset 0 1px 0 #ffffff26,0 17px 28px #00243d42; color: #f2f4f3; text-decoration: none; transition: translate .4s cubic-bezier(.22,1,.36,1),border-color .3s,background-color .3s; }
.cx-network-node:hover { translate: 0 -5px; border-color: var(--ref-accent); background-color: #09577d; }
.cx-network-node:active { translate: 0 -1px; }
.cx-network-node strong { font-size: clamp(10px,.95vw,14px); font-weight: 500; line-height: 1.4; }
.cx-network-node > span:not(.cx-network-logo,.cx-network-arrow) { margin-top: 3px; color: #adc9d9; font-size: clamp(9px,.74vw,11px); }
.cx-network-node-1 { left: 3%; top: 2%; transform: rotate(-4deg); }
.cx-network-node-2 { right: 1%; top: 11%; transform: rotate(4deg); }
.cx-network-node-3 { left: 2%; top: 58%; transform: rotate(-3deg); }
.cx-network-node-4 { right: 1%; top: 57%; transform: rotate(4deg); }
.cx-network-node-5 { left: 35%; bottom: 0; transform: rotate(-2deg); }
.cx-network-logo { display: flex; align-items: center; width: 100%; height: 28px; margin-bottom: 10px; }
.cx-network-logo img { width: auto; max-width: 100%; height: 100%; object-fit: contain; object-position: left; }
.cx-network-logo.has-stmuv img { width: 100%; height: auto; filter: url(#stmuv-white-transparent); }
.cx-network-arrow { position: absolute; top: 10px; right: 12px; color: #9fd8dc; font-size: 13px; }
.cx-references-index { display: flex; flex-wrap: wrap; gap: 4px 32px; margin-top: 40px; padding-block: 20px; border-block: 1px solid var(--ref-line); }
.cx-references-index a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #e4eff5; font-size: 14px; line-height: 1.5; text-decoration: none; transition: color .2s; }
.cx-references-index a span { font-family: "JetBrains Mono",monospace; color: var(--ref-accent); font-size: 11px; }
.cx-references-index a:hover { color: var(--ref-accent); }
.cx-reference { padding-block: clamp(48px,6vw,90px); }
.cx-reference + .cx-reference { position: relative; }
.cx-reference + .cx-reference::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg,transparent,#99c5db40,transparent); }
.cx-reference-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(40px,7vw,112px); align-items: center; perspective: 1400px; }
.cx-reference-identity { --ref-rx: 0deg; --ref-ry: 0deg; position: relative; min-width: 0; padding: clamp(24px,2.7vw,40px); border: 1px solid #b1dded4d; border-radius: 25px; background: linear-gradient(145deg,#287eaa59,#003859b3 80%); box-shadow: inset 0 1px 0 #ffffff24,inset 0 -1px 0 #00243d88,0 30px 55px -20px #00243d88; transform: rotateX(var(--ref-rx)) rotateY(var(--ref-ry)); transition: transform .65s cubic-bezier(.22,1,.36,1); }
.cx-reference-identity::before { content: ''; position: absolute; inset: 9px -9px -12px 9px; border: 1px solid #9fd2e222; border-radius: inherit; background: #002f4a25; z-index: -1; transform: rotate(1.5deg); pointer-events: none; }
.cx-reference:nth-of-type(odd) .cx-reference-identity { grid-column: 2; grid-row: 1; }
.cx-reference:nth-of-type(odd) .cx-reference-copy { grid-column: 1; grid-row: 1; }
.cx-reference-copy { min-width: 0; }
.cx-reference .cx-reference-category { display: flex; align-items: baseline; gap: 12px; color: var(--ref-accent); font-size: 11px; line-height: 1.6; margin-bottom: 18px; }
.cx-reference-category span { font-family: "JetBrains Mono",monospace; font-size: 12px; padding-right: 12px; border-right: 1px solid var(--ref-line); }
.cx-reference h2 { max-width: 24ch; font-size: clamp(26px,2.5vw,36px); font-weight: 500; line-height: 1.18; letter-spacing: -.03em; overflow-wrap: anywhere; }
.cx-reference .cx-reference-organisation { max-width: 38ch; color: var(--ref-muted); font-size: 14px; line-height: 1.6; margin-top: 14px; }
.cx-reference .cx-reference-context { color: var(--ref-muted); font-size: 12px; line-height: 1.6; margin-top: 4px; }
.cx-reference-logo { display: block; width: 150px; height: 46px; object-fit: contain; object-position: left center; margin-top: 20px; opacity: .9; }
/* Convert the original JPG's white background to alpha without changing the source asset. */
.cx-reference-logo-stmuv { width: min(100%,360px); padding: 8px; margin-top: 20px; }
.cx-references .cx-reference-logo-stmuv > img { width: 100%; height: auto; margin: 0; opacity: 1; filter: url(#stmuv-white-transparent); }
.cx-reference-scene { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--ref-line); }
.cx-reference-scene > svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--ref-accent); }
.ref-scene-orbit { stroke: #a3d3e51f; stroke-width: 1; }
.ref-wire { stroke: var(--ref-accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ref-scene-node > rect, .ref-scene-sheet > rect { fill: #074469; stroke: #b2e1ef66; stroke-width: 1; filter: drop-shadow(0 8px 7px #00243d55); }
.ref-scene-node text, .ref-scene-sheet text { fill: #e3f0f4; font-size: 13px; font-weight: 500; }
.ref-scene-core circle { fill: #075a79; stroke: #72e6d280; stroke-width: 1; }
.ref-scene-small circle { fill: #72e6d2; }
.ref-scene-small text { fill: #b6d6e2; font-size: 12px; }
.ref-scene-message rect { fill: #0b5c7c; stroke: #72e6d28c; }
.ref-scene-message text { fill: #e3f0f4; font-size: 14px; }
.ref-scene-message > path, .ref-scene-sheet > path { stroke: #9dcedc66; stroke-width: 2; stroke-linecap: round; }
.ref-scene-district > rect { fill: #074469; stroke: #b2e1ef66; }
.cx-reference .cx-reference-scene-caption { text-align: center; font-size: 11px; color: #b6d4e1; line-height: 1.5; margin-top: 8px; }
.cx-reference .cx-reference-summary { max-width: 26ch; color: #f2f4f3; font-size: clamp(25px,2.5vw,36px); font-weight: 500; line-height: 1.22; letter-spacing: -.03em; margin-bottom: 32px; }
.cx-reference-details { display: grid; gap: 24px; }
.cx-reference-details > div { padding-left: 20px; border-left: 1px solid #9fd6df4d; }
.cx-reference-details h3 { font-size: 11px; color: var(--ref-accent); line-height: 1.6; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.cx-reference-details p { color: var(--ref-muted); font-size: 15px; line-height: 1.75; max-width: 55ch; }
.cx-reference-topics { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 22px 0 0; margin-top: 28px !important; border-top: 1px solid var(--ref-line); list-style: none; }
.cx-reference-topics li { color: #b6d4e1; font-size: 11px; line-height: 1.6; }
.cx-reference-topics li::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--ref-accent); margin: 0 7px 2px 0; }
.cx-references-contact { position: relative; padding-block: clamp(64px,8vw,120px); background: linear-gradient(130deg,#00466e,#002d4b); border-top: 1px solid var(--ref-line); }
.cx-references-contact-layout { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cx-references-contact h2 { font-size: clamp(30px,3.5vw,50px); line-height: 1.15; font-weight: 500; letter-spacing: -.03em; }
.cx-references-contact p:last-child { color: var(--ref-muted); font-size: 16px; line-height: 1.65; max-width: 58ch; margin-top: 20px; }
.cx-references-contact a { flex: 0 0 auto; gap: 24px; }
/* Motion is progressive enhancement: every diagram is complete without JS. */
.has-ref-motion .ref-float { animation: ref-float 6s ease-in-out infinite; }
.has-ref-motion .ref-float-alt { animation: ref-float 7s -3s ease-in-out infinite reverse; }
/* Keep project links stationary; the central decorative hub carries the float. */
.has-ref-motion .cx-network-hub { animation: ref-float 7s ease-in-out infinite; }
.has-ref-motion .cx-reference .ref-wire { opacity: .2; transition: opacity .7s ease calc(var(--wire,0) * .13s); }
.has-ref-motion .cx-reference.is-in-view .ref-wire { opacity: 1; }
.has-ref-motion .cx-reference:not(.is-in-view) :is(.ref-float,.ref-float-alt),
.has-ref-motion .cx-references-network:not(.is-in-view) .cx-network-hub,
.has-ref-motion[data-ref-paused] :is(.ref-float,.ref-float-alt,.cx-network-hub) { animation-play-state: paused; }
@keyframes ref-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (min-width: 1600px) { .cx-references-network { max-width: 650px; justify-self: end; } }
@media (max-width: 1100px) {
  .cx-network-node { padding: 12px; min-height: 92px; }
  .cx-network-hub { padding-block: 17px; }
  .cx-reference-layout { gap: 40px; }
}
@media (max-width: 991px) {
  .cx-references-intro { padding-top: calc(var(--nav-bar-height,72px) + 56px); }
  .cx-references-hero { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
  .cx-references h1 { font-size: 42px; }
  .cx-references-lead > p { font-size: 15px; }
  .cx-network-node { padding: 10px; min-height: 84px; }
  .cx-network-logo { height: 22px; margin-bottom: 6px; }
  .cx-network-hub { gap: 8px; border-radius: 13px; }
  .cx-network-hub span { font-size: 7px; }
  .cx-reference-layout { gap: 32px; }
  .cx-reference-identity { padding: 24px; }
  .cx-reference .cx-reference-summary { font-size: 28px; }
}
@media (max-width: 767px) {
  .cx-references-intro { padding-top: calc(var(--nav-bar-height,72px) + 42px); padding-bottom: 8px; }
  .cx-references-hero,.cx-reference-layout { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .cx-references h1 { max-width: 18ch; font-size: clamp(36px,8vw,52px); }
  .cx-references-lead { padding-bottom: 0; }
  .cx-references-lead > p { max-width: 55ch; font-size: 16px; margin-top: 24px; }
  .cx-references-network { width: min(100%,520px); justify-self: center; margin-top: 4px; }
  .cx-network-node { min-height: 87px; }
  .cx-network-node strong { font-size: clamp(9px,2.7vw,14px); }
  .cx-network-node > span:not(.cx-network-logo,.cx-network-arrow) { font-size: clamp(8px,2vw,11px); }
  .cx-network-hub span { font-size: clamp(7px,1.65vw,9px); }
  .cx-network-arrow { top: 6px; right: 7px; font-size: 11px; }
  .cx-references-index { margin-top: 32px; gap: 0 24px; padding-block: 14px; }
  .cx-reference:nth-of-type(n) .cx-reference-identity { grid-column: 1; grid-row: 1; }
  .cx-reference:nth-of-type(n) .cx-reference-copy { grid-column: 1; grid-row: 2; }
  .cx-reference h2 { font-size: 28px; }
  .cx-reference-identity { padding: 24px 20px; border-radius: 20px; }
  .cx-reference-identity::before { inset: 6px -5px -7px 6px; transform: rotate(.7deg); }
  .cx-reference .cx-reference-category { margin-bottom: 12px; font-size: 10px; }
  .cx-reference .cx-reference-organisation { margin-top: 12px; font-size: 14px; }
  .cx-reference-scene { margin-top: 20px; }
  .cx-reference .cx-reference-summary { margin-bottom: 24px; font-size: 28px; max-width: 30ch; }
  .cx-reference-details p { font-size: 15px; }
  .cx-references-contact-layout { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 359px) {
  .cx-network-node { padding: 8px; min-height: 80px; border-radius: 12px; }
  .cx-network-node strong { font-size: 8.5px; }
  .cx-network-node > span:not(.cx-network-logo,.cx-network-arrow) { font-size: 7px; }
  .cx-reference h2 { font-size: 25px; }
}
@media (max-width: 479px) {
  .cx-network-node strong { font-size: 11px; }
  .cx-network-node > span:not(.cx-network-logo,.cx-network-arrow) { display: none; }
  .cx-network-node-1 { width: 34%; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-references *, .cx-references *::before { animation: none !important; transition: none !important; }
  .cx-reference-identity { transform: none; }
  .cx-references .ref-wire { opacity: 1; }
}
