/* DARK P08, Figma frame 1673:8104. Uses the existing fixed-board scaler. */
#main #cq-coding > .cq05-stage { display: none; }

html[data-theme="dark"] #main #cq-coding.portfolio-sheet {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1920px;
  min-height: 0;
  height: calc(1400px * var(--zk592-scale, 1) + 4px);
  padding: 0;
  border: 2px solid #372942;
  border-radius: 22px;
  overflow: clip;
  background: #060713;
  box-shadow: 0 14px 45px #07030c36;
}

html[data-theme="dark"] #main #cq-coding > :not(.cq05-stage, .u-header, .u-footer, .anchor-alias),
html[data-theme="dark"] #main #cq-coding::before,
html[data-theme="dark"] #main #cq-coding::after { display: none; }

html[data-theme="dark"] #main #cq-coding > .u-running {
  display: flex;
  position: absolute;
  inset-inline: 0;
  z-index: 5;
}

html[data-theme="dark"] #main #cq-coding > .u-header { top: 0; }
/* Align the divider with the matrix crop at y=1340 on the 1400px board. */
html[data-theme="dark"] #main #cq-coding > .u-footer {
  bottom: 0;
  height: calc(60px * var(--zk592-scale, 1));
  min-height: 0;
}

html[data-theme="dark"] #main #cq-coding > .cq05-stage {
  --cq05-title: 'ZK08 Title', 'LogoSC Unbounded Sans', sans-serif;
  --cq05-text: 'Portfolio Inter', 'PingFang SC', sans-serif;
  --cq05-skew: matrix(1, 0, -.115457259, .993312418, 0, 0);
  display: block;
  position: absolute;
  inset: 0 auto auto 0;
  width: 1920px;
  height: 1400px;
  padding: 0;
  margin: 0;
  isolation: isolate;
  transform: scale(var(--zk592-scale, 1));
  transform-origin: top left;
  color: white;
  font-family: var(--cq05-text);
}

#main #cq-coding .cq05-stage :is(h2, h3, p, figure) { margin: 0; padding: 0; }
#main #cq-coding .cq05-stage img { display: block; max-width: none; }

.cq05-background {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: linear-gradient(180deg, #060713, #0a0e24 56.747%, #090517 89.503%, #21003c 103.18%);
}

.cq05-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #060713 20.804%, #0a0e2480 66.335%, #090517);
}

.cq05-trails {
  position: absolute;
  left: 0;
  top: 291.62px;
  width: 1920px;
  height: 1271.9px;
}

.cq05-checker { position: absolute; left: 0; top: 1075px; z-index: -2; }

#main #cq-coding .cq05-stage .cq05-number {
  position: absolute;
  left: 589px;
  top: -120px;
  z-index: -1;
  pointer-events: none;
  color: transparent;
  font: 700 820px/normal 'Portfolio Trash', sans-serif;
  letter-spacing: -57.4px;
  white-space: nowrap;
  background: linear-gradient(-22.794531deg, #9d59ff0a 20.981%, #7424ff30 62.234%);
  background-clip: text;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.cq05-heading { position: absolute; left: 80px; top: 120px; width: 1760px; height: 152.311px; }

.cq05-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 42px;
  font: 700 32px/1.3 var(--cq05-text);
  white-space: nowrap;
}

#main #cq-coding .cq05-eyebrow b {
  display: grid;
  place-items: center;
  width: 191.348px;
  height: 36px;
  border: 1px solid white;
  border-radius: 24px;
  font: 700 24px/1.2 'Portfolio Trash', sans-serif;
  transform: skewX(-6.63deg) scaleY(.993312418);
}

#main #cq-coding .cq05-heading h2 {
  position: absolute;
  top: 50px;
  left: 0;
  width: 1297.784px;
  height: 102.311px;
  color: white;
  font: 400 86px/1.2 var(--cq05-title);
  letter-spacing: 0;
  white-space: nowrap;
}

.cq05-heading h2 span {
  position: absolute;
  top: 0;
  left: 11.892px;
  width: 602px;
  height: 103px;
  transform: var(--cq05-skew);
  transform-origin: top left;
}

.cq05-heading h2 span + span {
  left: 633.784px;
  width: 664px;
  color: transparent;
  background: linear-gradient(263.804522deg, #e2caff -19.95%, #964dff 75.058%, #2429ff 121.1%, #3d22b6 137.16%);
  background-clip: text;
}

/* One crop for all five source columns; individual displays can be replaced inside it. */
.cq05-matrix {
  position: absolute;
  left: 45px;
  top: 313px;
  width: 1830px;
  height: 1027px;
  border-radius: 16px;
  overflow: hidden;
  filter: drop-shadow(0 16px 10px #0000000d);
}

.cq05-row {
  position: absolute;
  left: 6px;
  top: -704px;
  display: flex;
  align-items: center;
  gap: 40px;
  height: 2085.861px;
}

.cq05-column {
  display: flex;
  flex: 0 0 331.681px;
  flex-direction: column;
  gap: 40px;
}

.cq05-phone { position: relative; width: 331.681px; height: 668.620px; flex: none; }
.cq05-layer, .cq05-arrow { position: absolute; }
.cq05-frame-outer { left: 2.646px; top: 0; }
.cq05-key-right { left: 329.344px; top: 152.492px; }
.cq05-key-left { left: 1px; top: 90.002px; }
.cq05-frame-inner { left: 7.331px; top: 4.684px; }
.cq05-screen-base { left: 19.830px; top: 17.186px; }
.cq05-notch { left: 93.188px; top: 17.186px; }
.cq05-camera { left: 185.036px; top: 19.980px; }
.cq05-speaker { left: 139.641px; top: 21.375px; }

.cq05-screen {
  position: absolute;
  left: 19.830px;
  top: 17.186px;
  width: 292.656px;
  height: 634.253px;
  border-radius: 31.245px;
  overflow: hidden;
}

.cq05-screen img { width: 100%; height: 100%; object-fit: cover; }

.cq05-arrow { transform: scaleY(-1); pointer-events: none; }
.cq05-arrow-a { left: 306.082px; top: 143px; }
.cq05-arrow-b { left: 1059px; top: 139px; }
.cq05-arrow-c { left: 1423.850px; top: 393.317px; }

@media screen and (min-width: 769px) {
  body:not(.canvas-mode) #main #cq-coding .cq05-heading {
    top: max(120px, calc((var(--portfolio-row-height) + 7px) / var(--zk592-scale, 1)));
  }
}

@media screen and (max-width: 768px) {
  html[data-theme="dark"] body:not(.canvas-mode) #main #cq-coding.portfolio-sheet {
    /* Scale to the matrix crop and reserve the standard 44px header and footer. */
    height: calc(1340px * var(--zk592-scale, 1) + 92px);
  }
  html[data-theme="dark"] body:not(.canvas-mode) #main #cq-coding > .cq05-stage { top: 44px; }
  html[data-theme="dark"] body:not(.canvas-mode) #main #cq-coding > .u-footer { height: 44px; }
}
