#projects { container-type:inline-size; --project-gap:6.9cqw; }
#projects img { display:block; }
#projects .device { padding:0; border:0; background:transparent; }
#projects img[data-shot="dark"] { display:none; }
:root[data-theme="dark"] #projects img[data-shot="light"] { display:none; }
:root[data-theme="dark"] #projects img[data-shot="dark"] { display:block; }
@media (prefers-color-scheme:dark) {
  :root:not([data-theme]) #projects img[data-shot="light"] { display:none; }
  :root:not([data-theme]) #projects img[data-shot="dark"] { display:block; }
}
#projects :focus-visible { outline-offset:-2px; }
#projects .pt-strip { width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; }
#projects .pt-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
#projects .pt-strip.is-dragging { cursor: grabbing; user-select: none; }
#projects .pt-track { --device-gap:3.1cqw; --device-height: max(215px,31.4cqw); --bar-height: clamp(12px,1.18cqw,17px); display: flex; align-items: flex-start; width: max-content; gap: var(--device-gap); padding: 0 0 clamp(22px,2.5cqw,40px) var(--content-inset); }
#projects .pt-intro { width: 34cqw; flex:none; margin-right: calc(var(--project-gap) - var(--device-gap)); }
#projects .project-heading { display:flex; align-items:center; gap:.35em; font-size:var(--content-title-size); margin:0 0 .7em; }
#projects h2 { margin:0; }
#projects .platforms { display:flex; align-items:center; gap:.2em; }
#projects .platforms img { width:.8em; height:.8em; filter:var(--icon-filter); }
.platform-credit { margin:0 var(--content-inset) 1.5rem; color:var(--muted); font-size:.8125rem; }
.platform-credit a { text-decoration:underline; text-underline-offset:.18em; }
#projects .copy { margin:0; }
#projects .links { display:flex; flex-wrap:wrap; align-items:center; gap:.5em 1.5em; margin:1.25em 0 0; }
#projects .links a { text-decoration:underline; text-underline-offset:.18em; white-space:nowrap; }
#projects .device { display:block; flex:none; height:var(--device-height); cursor:inherit; overflow:hidden; }
#projects .phone { width:calc(var(--device-height) * 332 / 736); border-radius:14% / 6.5%; }
#projects .phone img { width:100%; height:100%; }
#projects .window { width:calc((var(--device-height) - var(--bar-height)) * 1138 / 800); border-radius:5px; --chrome:light-dark(#e0dfda,#343434); --address:light-dark(#f5f4f0,#232323); --address-ink:light-dark(#44423f,#e2e2e2); }
#projects .window img { width:100%; height:calc(100% - var(--bar-height)); }
#projects .browser-bar { display:flex; align-items:center; position:relative; background:var(--chrome); color:var(--address-ink); height:var(--bar-height); padding-inline:7px; gap:3px; font-family:Arial,sans-serif; }
#projects .browser-bar i { display:block; width:clamp(4px,.37cqw,5px); height:clamp(4px,.37cqw,5px); border-radius:50%; background:#ff625a; }
#projects .browser-bar i:nth-child(2) { background:#ffbf40; }
#projects .browser-bar i:nth-child(3) { background:#39c851; }
#projects .url { position:absolute; inset-inline:31%; background:var(--address); border-radius:3px; font-size:clamp(8px,.65cqw,10px); text-align:center; line-height:1.25; }
#projects .broxy { display:grid; grid-template-columns: min(44cqw,560px) minmax(0,35cqw); align-items:start; gap:clamp(20px,3.1cqw,40px); overflow-x:clip; padding:clamp(16px,2.3cqw,36px) var(--page-gutter) clamp(30px,4cqw,64px) var(--content-inset); }
/* Both PNGs have a 1924 × 1280 window at (112, 76). Align the window to
   the grid and let the surrounding shadow extend into the page gutter. */
#projects .bro-shot { display:block; position:relative; width:100%; aspect-ratio:1924 / 1280; }
#projects .bro-shot img {
  position:absolute;
  width:calc(100% * 2148 / 1924);
  height:auto;
  left:calc(-100% * 112 / 1924);
  top:calc(-100% * 76 / 1280);
  pointer-events:none;
}
@container (max-width: 600px) {
  #projects .pt-track { --device-height:calc((100cqw - 16px) * 800 / 1422 + var(--bar-height)); display:grid; grid-template-columns:68cqw max-content; grid-template-rows:auto auto; gap:20px 24px; padding-bottom:16px; }
  #projects .pt-intro { grid-column:1; grid-row:1; width:auto; margin:0; }
  #projects .phone { grid-column:1; grid-row:2; justify-self:center; }
  #projects .window { grid-column:2; grid-row:2; }
  #projects .broxy { grid-template-columns:1fr; gap:20px; }
  #projects .bro-shot { grid-row:2; width:100%; }
  #projects .broxy article { grid-row:1; }
}
