/* V1.2.1: scoped creative Lab and homepage access. */
.lab-home-preview { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(26px, 4vw, 42px); }
.lab-home-preview h2 { margin: 12px 0; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.lab-home-preview p { max-width: 730px; margin: 0; color: var(--muted); line-height: 1.7; }
.lab-home-preview > .btn { flex-shrink: 0; }
.lab-page .lab-project { overflow: hidden; }
.lab-page .lab-project-intro { padding: clamp(26px, 4vw, 46px); }
.lab-page .lab-project-intro h2 { margin: 16px 0 20px; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.1; }
.lab-page .lab-project-intro .lead { max-width: 860px; }
.lab-page .lab-project-figure { margin: 0; }
.lab-page .lab-project-figure img { display: block; width: 100%; height: auto; }
.lab-page .lab-project-figure figcaption { padding: 16px clamp(26px, 4vw, 46px); font-size: .8rem; color: var(--muted); }
.lab-page .lab-project-story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: clamp(26px, 4vw, 46px); border-top: 1px solid var(--line); }
.lab-page .lab-project-story h3 { margin: 0 0 14px; font-size: 1.4rem; }
.lab-page .lab-project-story p, .lab-page .lab-skills p { margin: 0; color: var(--muted); line-height: 1.75; }
.lab-page .lab-skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.lab-page .lab-skills article { padding: 26px; }
.lab-page .lab-skills h3 { margin: 0 0 14px; font-size: 1.2rem; }
#lab a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 1040px) { .lab-page .lab-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .lab-home-preview { flex-direction: column; align-items: stretch; }
  .lab-page .lab-project-story, .lab-page .lab-skills { grid-template-columns: 1fr; }
  .lab-home-preview > .btn { width: 100%; }
}

/* V1.3: compact, authentic Lab preview on the homepage. */
.lab-home-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; overflow: hidden; }
.lab-home-preview > img { width: 100%; height: 100%; object-fit: cover; }
.lab-home-preview > div { padding: clamp(26px, 4vw, 42px); }
.lab-home-preview .btn { margin-top: 24px; }
@media (max-width: 760px) { .lab-home-preview { grid-template-columns: 1fr; } .lab-home-preview > img { height: auto; } }

/* V1.4: creative library and project-to-project navigation. */
.lab-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lab-gallery-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.lab-gallery-card > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--panel); }
.lab-gallery-card > div { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.lab-gallery-card h2 { font-size: 1.7rem; margin: 20px 0 14px; }
.lab-gallery-card p { color: var(--muted); line-height: 1.7; }
.lab-gallery-card .btn { margin-top: auto; align-self: start; }
.lab-project-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.lab-page .lab-human-note { padding: 16px 20px; border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), .06); color: var(--text); line-height: 1.7; }
@media (max-width: 1040px) { .lab-gallery { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .lab-project-nav .btn, .lab-gallery-card .btn { width: 100%; white-space: normal; } }

.lab-video-poster { position: relative; display: block; }
.lab-video-poster > span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid var(--line-strong); border-radius: 50%; color: white; background: rgba(0,0,0,.75); font-size: 1.5rem; }
.lab-video-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }
