.paper[hidden] { display: none; }
.cv-workspace { position: relative; width: min(794px, calc(100vw - 32px)); margin: auto; }
.project-rail { position: absolute; left: calc(100% + 16px); width: clamp(64px, calc((100vw - 794px) / 2 - 40px), 136px); display: grid; gap: 24px; color: #d5e3f6; font: 12px/1.4 var(--display); }
.project-rail[hidden] { display: none; }
.sheet:not(.settled) .project-rail { visibility: hidden; }
.rail-section h3 { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: #eef3fa; }
.sample-previews { display: grid; gap: 12px; }
.preview-thumb { display: block; width: 100%; border: 0; border-radius: 6px; background: #14243b; padding: 0; color: #d5e3f6; text-align: left; cursor: pointer; font: inherit; overflow: hidden; box-shadow: 0 6px 16px -8px #000; transition: transform .2s var(--ease); }
.preview-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.preview-thumb span { display: block; padding: 7px 8px; }
.preview-thumb:hover { transform: translateY(-3px); }
.preview-thumb:focus-visible, .project-website:focus-visible { outline: 2px solid #f2c46d; outline-offset: 3px; }
.project-website { display: block; margin-top: 8px; padding: 7px 5px; border: 1px solid #536984; border-radius: 5px; color: #d5e3f6; text-align: center; text-decoration: none; }
.project-website:hover { background: #20334f; border-color: #8fc5ff; }
.sample-facts { margin: 0; }
.sample-facts dt { color: #b6c7df; margin-top: 10px; }
.sample-facts dd { margin: 2px 0 0; color: #eef3fa; }
.playground { position: fixed; inset: auto; box-sizing: border-box; width: 360px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: 0; padding: 12px; overflow: auto; border: 1px solid #40516c; border-radius: 12px; background: #0c1524; color: #eef3fa; font: 14px/1.5 var(--display); box-shadow: 0 16px 45px -12px #0009; }
.playground::backdrop { background: transparent; }
.playground[hidden] { display: none; }
.playground:popover-open { animation: up .22s var(--ease); }
.preview-close { display: block; margin: 0 0 10px auto; padding: 4px 8px; border: 0; background: transparent; color: #c9d8ec; cursor: pointer; font: inherit; }
.preview-close:focus-visible { outline: 2px solid #f2c46d; }
.expanded-sample { display: block; width: 100%; height: auto; border-radius: 5px; }
.sample-caption { margin: 12px 0 0; color: #bed2ed; }
.cv-body .skill { cursor: default; }
.cv-body .skill:hover { color: var(--print); }
.cv-body .skill:hover::after { background: var(--print); }
@media (max-width: 980px) {
  .cv-workspace { display: flex; flex-direction: column; }
  .cv-pages { display: contents; }
  .project-rail { position: static; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px auto; }
  .page2 { order: 2; }
}
@media (max-width: 560px) {
  .project-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-section:first-child { grid-column: 1 / -1; }
  .sample-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .playground, .project-rail { display: none !important; }
  .cv-workspace, .cv-pages { display: block; width: auto; margin: 0; }
}
