html, body { margin: 0; background: #141414; }
#charles-gallery { container-type:inline-size; background:#141414; color:#bec4b8; color-scheme:dark;
  font:500 14px/1.13 "Helvetica Neue","PingFang SC",Arial,sans-serif; }
#charles-gallery * {box-sizing:border-box}
#charles-gallery .cg-screen {position:relative; height:100vh;height:100svh;min-height:360px; overflow:hidden; isolation:isolate}
#charles-gallery button,#charles-gallery a {font:inherit;color:inherit;background:transparent;border:0;padding:0;letter-spacing:inherit;text-decoration:none}
#charles-gallery button:focus-visible,#charles-gallery a:focus-visible {outline:2px solid #d8decc;outline-offset:3px}
@media (any-pointer:fine) {
  #charles-gallery button:enabled,#charles-gallery a[href] {cursor:pointer}
  #charles-gallery .cg-track.cg-dragging,
  #charles-gallery .cg-track.cg-dragging .cg-panel {cursor:grabbing}
}
#charles-gallery .cg-head,#charles-gallery .cg-foot {position:absolute;left:2.25%;right:3.45%;z-index:2;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
#charles-gallery .cg-head {top:4.2%;height:clamp(34px,4.4cqi,55px)}
#charles-gallery .cg-foot {bottom:4.6%;align-items:flex-end;color:#b5bcaf}
#charles-gallery .cg-head button {pointer-events:auto}
#charles-gallery .cg-brand {
  display:inline-block;
  font:800 clamp(29px,4.2cqi,58px)/.9 "Impact","Archivo Black","Helvetica Neue",sans-serif;
  letter-spacing:.05em;
  transform:scaleX(.82);
  transform-origin:left center;
}
#charles-gallery .cg-about {min-height:44px;font:550 12px/1.1 Arial,sans-serif;text-decoration:underline;text-underline-offset:4px}
#charles-gallery .cg-intro {display:none;white-space:pre-line}
#charles-gallery .cg-meter {position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:clamp(2px,.42cqi,5px);width:20%;height:33px;pointer-events:none}
#charles-gallery .cg-meter i {display:block;width:1px;flex-shrink:0;background:#81857f;opacity:.5}
#charles-gallery .cg-track {position:absolute;inset:16% 0 15%;touch-action:pan-y pinch-zoom;user-select:none}
#charles-gallery .cg-panel {position:absolute;left:50%;top:50%;margin:0;overflow:hidden;will-change:transform;touch-action:pan-y pinch-zoom}
#charles-gallery .cg-panel span {display:block;width:100%;height:100%;background-size:cover;background-repeat:no-repeat;pointer-events:none}
#charles-gallery .cg-foot p {margin:0;font:500 clamp(10px,1.1cqi,13px)/1.15 Arial,sans-serif;letter-spacing:.015em}
#charles-gallery .cg-availability {display:block;min-height:1lh}
#charles-gallery .cg-live {clip-path:inset(50%);height:1px;width:1px;overflow:hidden;position:absolute}
#charles-gallery .cg-sheet[hidden] {display:none}
#charles-gallery .cg-sheet {position:absolute;inset:0;z-index:4;background:#141414;display:grid;grid-template-rows:auto 1fr;padding:clamp(15px,3cqi,34px);color:#e1e2da}
#charles-gallery .cg-sheet-top {display:flex;align-items:center;justify-content:space-between;font-size:12px}
#charles-gallery .cg-close {display:grid;place-items:center;width:44px;height:44px;font:400 28px/1 Arial,sans-serif}
#charles-gallery .cg-project {display:grid;grid-template-columns:minmax(0,1.7fr) minmax(160px,1fr);align-items:center;gap:4cqi;min-height:0}
#charles-gallery .cg-project img {display:block;width:100%;height:78%;object-fit:cover}
#charles-gallery .cg-project small {letter-spacing:.08em;color:#aeb0a5}
#charles-gallery .cg-project h2 {font:600 clamp(32px,5.5cqi,74px)/1.2 "Songti SC",serif;margin:14px 0}
#charles-gallery .cg-project p {font-size:14px;line-height:1.65;color:#bfc0b8;margin:0 0 16px}
#charles-gallery .cg-project a:not([hidden]) {display:inline-flex;min-height:44px;align-items:center;border-bottom:1px solid currentColor}
#charles-gallery .cg-project.cg-biography {grid-template-columns:minmax(0,620px);justify-content:center}
#charles-gallery .cg-project.cg-biography p {white-space:pre-line}
#charles-gallery .cg-project img[hidden] {display:none}
@container(max-width:540px) {
  #charles-gallery .cg-screen {min-height:400px}
  #charles-gallery .cg-head,#charles-gallery .cg-foot {left:5%;right:5%}
  #charles-gallery .cg-project {grid-template-columns:1fr;grid-template-rows: minmax(0,1fr) auto;gap:10px;padding-bottom:10px}
  #charles-gallery .cg-project img {height:100%}
  #charles-gallery .cg-project.cg-biography {align-content:center;grid-template-rows:auto}
}
@media (max-width:540px), (hover:none) and (pointer:coarse) {
  html {overscroll-behavior-y:none}
  #charles-gallery .cg-screen {
    display:flex;
    flex-direction:column;
    justify-content:center;
    height:auto;
    min-height:100vh;
    min-height:100svh;
    padding-block:clamp(18px,4svh,34px) clamp(36px,15svh,112px);
  }
  #charles-gallery .cg-head,#charles-gallery .cg-foot,#charles-gallery .cg-intro {
    width:min(90%,24rem);
    margin-inline:auto;
  }
  #charles-gallery .cg-head,#charles-gallery .cg-foot {
    position:relative;
    inset:auto;
  }
  #charles-gallery .cg-head {height:auto;min-height:34px}
  #charles-gallery .cg-about,
  #charles-gallery .cg-meter,
  #charles-gallery .cg-track,
  #charles-gallery .cg-availability {display:none}
  #charles-gallery .cg-intro {
    display:block;
    margin-block:clamp(16px,3svh,24px) 0;
    font-size:clamp(16px,4.2vw,20px);
    line-height:1.55;
    text-align:left;
  }
  #charles-gallery .cg-foot {margin-top:6px}
}
#charles-gallery .cg-sheet[data-work] {background:#e2e2df;color:#212322}
#charles-gallery .cg-sheet[data-work] .cg-project {position:relative;display:flex;flex-direction:column;justify-content:center;gap:12px}
#charles-gallery .cg-sheet[data-work] .cg-project img {width:64%;height:57%}
#charles-gallery .cg-sheet[data-work] .cg-project>div {text-align:center}
#charles-gallery .cg-sheet[data-work] .cg-project h2 {position:absolute;top:11%;left:0;right:0;margin:0;pointer-events:none;font:900 clamp(52px,10cqi,118px)/1 "Songti SC",serif;letter-spacing:.06em;color:#333a3e;text-shadow:0 1px 12px #e2e2df55}
#charles-gallery .cg-sheet[data-work] .cg-project small {display:none}
#charles-gallery .cg-sheet[data-work] .cg-project p {color:inherit;margin:0}
@container(max-width:540px) {
 #charles-gallery .cg-sheet[data-work] .cg-project img {width:86%;height:52%}
 #charles-gallery .cg-sheet[data-work] .cg-project h2 {top:12%;font-size:clamp(44px,11cqi,62px)}
}
#charles-gallery .cg-sheet[data-work="huawai"] .cg-project img {width:auto;max-width:86%;object-fit:contain}
