/* Portfolio-only reading layer. The research page does not load this file. */
html { scrollbar-gutter: stable; }
.bio-text { font-size: 14px; color: #555; }
.project-item:hover { opacity: .85; }
.project-link:focus-visible { outline: 1px solid #000; outline-offset: 6px; }
.project-backdrop { position: fixed; inset: 0; z-index: 210; background: rgba(255,255,255,.78); }
.project-backdrop[hidden] { display: none; }
.project-panel { top: 0; right: 0; width: min(55vw,800px); height: 100vh; height: 100dvh; z-index: 220; transform: translateX(100%); visibility: hidden; overscroll-behavior: contain; scroll-padding-top: 86px; }
.project-panel.active { transform: translateX(0); visibility: visible; }
.project-panel.expanded { width: 100%; }
.panel-content { width: 100%; max-width: 1480px; margin-inline: auto; }
.panel-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #ddd; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 24px; }
.panel-project-name { margin-right: auto; font: 12px/1.5 'Courier New',monospace; letter-spacing: .5px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-header button { min-height: 44px; padding: 8px 10px; font: 12px/1.4 'Courier New',monospace; color: #111; background: #fff; border: 1px solid #ddd; cursor: pointer; text-decoration: none; }
.panel-header button:hover { border-color: #111; }
.panel-header button:focus-visible, .project-contents button:focus-visible, .project-return button:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
#panelClose { min-width: 56px; border-color: #111; }
#projectShareField { flex-basis: 100%; width: 100%; padding: 8px; font: 12px 'Courier New',monospace; border: 1px solid #ccc; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.portfolio-project .panel-section, .project-neighbours, .project-return { padding: 34px; }
.portfolio-project .panel-title { font-size: 24px; line-height: 1.35; margin-bottom: 8px; }
.portfolio-project .panel-meta { font-size: 11px; color: #5b5b5b; line-height: 1.7; }
.portfolio-project .panel-description { font-size: 15px; line-height: 1.8; color: #292929; max-width: 70ch; margin: 0 0 26px; }
.portfolio-project .panel-section-title { color: #373737; font-size: 12px; line-height: 1.6; margin-bottom: 22px; }
.portfolio-project .project-summary { margin-top: 30px; }
.portfolio-project .panel-details { gap: 10px; margin-top: 22px; }
.portfolio-project .panel-detail-item { font-size: 12px; line-height: 1.7; gap: 18px; }
.portfolio-project .detail-label { min-width: 86px; }
.portfolio-project .detail-value { margin: 0; }
.portfolio-project .panel-image-item { margin: 30px 0 40px; }
.portfolio-project .project-hero { margin: 24px 0 0; }
.project-image-link { display: block; }
.project-image-link:focus-visible { outline: 2px solid #111; outline-offset: 5px; }
.portfolio-project .panel-caption { font-size: 12px; line-height: 1.6; color: #636363; text-align: left; margin-top: 10px; max-width: 85ch; }
.project-contents { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 20px 34px; border-bottom: 1px solid #ddd; }
.project-contents button { border: 0; background: transparent; padding: 8px 0; font: 11px/1.5 'Courier New',monospace; color: #333; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; }
.project-contents button:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-subheading { font: 12px/1.7 'Courier New',monospace; letter-spacing: 1px; text-transform: uppercase; margin: 48px 0 18px; color: #333; }
.project-neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-bottom: 1px solid #ddd; }
.project-neighbour { display: flex; flex-direction: column; gap: 10px; font-family: 'Courier New',monospace; color: #111; text-decoration: none; }
.project-neighbour:last-child { text-align: right; }
.project-neighbour span { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.project-neighbour strong { font-size: 15px; line-height: 1.6; font-weight: normal; }
.project-neighbour:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.project-return button { min-height: 44px; border: 0; background: #fff; color: #111; cursor: pointer; font: 12px/1.6 'Courier New',monospace; text-decoration: underline; text-underline-offset: 4px; }
.project-notes summary, .cortex-boards summary { cursor: pointer; font: 12px/1.6 'Courier New',monospace; padding: 12px 0; }
.project-notes details[open] summary { margin-bottom: 24px; }
.project-notes .panel-description { font-size: 14px; }
.comparison-stage { position: relative; overflow: hidden; }
.comparison-stage > img { width: 100%; height: auto; display: block; }
.comparison-before { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.comparison-before img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comparison-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; pointer-events: none; }
.comparison-control { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; font: 12px/1.5 'Courier New',monospace; margin-top: 12px; }
.comparison-control input { width: 100%; height: 44px; accent-color: #111; cursor: ew-resize; }
.comparison-originals { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 12px; }
.comparison-originals a { font: 11px/1.6 'Courier New',monospace; color: #555; min-height: 44px; padding-block: 12px; }
.project-comparison { margin: 30px 0 40px; }
.portfolio-film { margin: 30px 0 40px; }
.portfolio-film video { width: 100%; height: auto; max-height: 880px; object-fit: contain; background: #fafaf8; display: block; }
.portfolio-film .cortex-film-toggle { min-height: 44px; font-size: 12px; }
.portfolio-film .cortex-film-title { font-size: 12px; color: #333; }
.original-media-link { display: inline-block; font: 11px/1.6 'Courier New',monospace; color: #666; margin-top: 10px; }
.portfolio-project .cortex-films { gap: 40px 28px; }
.portfolio-project .cortex-development { gap: 28px; }
.portfolio-project .cortex-development .panel-image-item { margin-bottom: 10px; }
.project-panel.expanded .portfolio-project .panel-section { padding: 46px 50px; }
.project-panel.expanded .project-intro { display: grid; grid-template-columns: minmax(0,2fr) minmax(220px,1fr); gap: 12px 55px; }
.project-panel.expanded .project-intro > .panel-title, .project-panel.expanded .project-intro > .panel-meta, .project-panel.expanded .project-intro > .project-hero { grid-column: 1 / -1; }
.project-panel.expanded .project-intro .panel-details { margin-top: 30px; }
.project-panel.expanded .project-contents { padding-inline: 50px; }
.lightbox { z-index: 500; }
.lightbox.active { gap: 16px; padding: 76px 55px 92px; }
.lightbox-image { max-width: min(1400px,90vw); max-height: calc(100dvh - 180px); }
.lightbox-close, .lightbox-nav { min-width: 44px; min-height: 44px; }
.lightbox-close { top: 18px; right: 22px; }
.lightbox-caption { position: absolute; bottom: 34px; left: 80px; right: 230px; max-width: 80ch; font: 12px/1.6 'Courier New',monospace; color: #333; }
.lightbox-original { position: absolute; bottom: 32px; right: 28px; font: 12px/1.6 'Courier New',monospace; color: #111; min-height: 44px; padding-top: 12px; }
.lightbox-count { position: absolute; top: 30px; left: 28px; font: 12px 'Courier New',monospace; color: #333; }
@media (max-width: 900px) {
    .project-panel, .project-panel.expanded { width: 100%; }
    .panel-header { padding: 8px 16px; }
    #panelExpand { display: none; }
    .panel-project-name { max-width: 45%; }
    .portfolio-project .panel-section, .project-panel.expanded .portfolio-project .panel-section, .project-neighbours, .project-return { padding: 28px 20px; }
    .project-panel.expanded .project-intro { display: block; }
    .project-contents, .project-panel.expanded .project-contents { padding: 16px 20px; gap: 6px 18px; }
    .portfolio-project .panel-title { font-size: 22px; }
    .portfolio-project .panel-description { font-size: 15px; }
    .portfolio-project .cortex-films { grid-template-columns: 1fr; }
    .portfolio-film video { max-height: 80dvh; }
    .project-neighbour strong { font-size: 13px; }
    .lightbox.active { padding: 74px 14px 120px; }
    .lightbox-image { max-width: 96vw; max-height: calc(100dvh - 200px); }
    .lightbox-caption { bottom: 76px; left: 20px; right: 20px; font-size: 11px; }
    .lightbox-original { bottom: 16px; right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .project-panel, .lightbox-image { transition: none; }
    .project-panel { scroll-behavior: auto; }
}
