/* Compact cards share a layout; category color distinguishes their surfaces. */
.research-grid,.current-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;align-items:start}
.research-grid>.project{display:block;height:auto;min-height:0}
.research-grid>.project>.project-body{display:block;flex:none}
.research-grid .project-summary{margin-bottom:0}
.research-grid .research-details{margin-top:24px}
.current-grid>.current-project,.current-grid>.current-project:last-child{display:block;padding:0;margin:0;gap:0;border:1px solid #c9c1da;border-radius:28px;overflow:hidden;background:#f0edf6;box-shadow:var(--elevation-1)}
:root[data-theme=dark] .current-grid>.current-project{background:#292632;border-color:#51465f}
.current-grid .current-copy{padding:28px}
.current-grid .current-copy h3{font-size:25px;line-height:1.18}
.current-grid .current-copy .project-meta{color:#70598a;margin:10px 0 0}
:root[data-theme=dark] .current-grid .current-project .project-meta{color:#c9b2e8}
.current-grid .current-description{margin-top:14px;line-height:1.7}
.current-grid .current-collaboration{margin-top:20px;font-size:12px;line-height:1.7}
.current-grid .current-figure{margin:0;min-width:0}
.current-grid .current-visual{border-radius:0;box-shadow:none;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff}
.current-grid .current-visual--terrain{background:var(--soft)}
.current-grid .current-visual img{display:block;width:100%;height:100%;max-height:none;object-fit:contain}
.current-grid .film-preview .research-film{width:100%;height:100%}
.current-grid .current-visual video,.current-grid .current-visual iframe{width:100%;height:100%;object-fit:contain}
.research-masonry.is-masonry{grid-auto-rows:1px;row-gap:0}
.research-masonry>.project,.research-masonry>.current-project{position:relative;transition:transform 220ms ease-out,box-shadow 280ms,border-color 280ms}
.research-masonry>.project:hover,.research-masonry>.current-project:hover{transform:none}
@media(max-width:640px){
 .research-grid,.current-grid{grid-template-columns:1fr;gap:24px}
 .research-masonry.is-masonry{grid-auto-rows:auto;row-gap:24px}
 .research-masonry>*{grid-row:auto!important}
 .current-grid .current-copy{padding:24px}
 .current-grid>.current-project,.current-grid>.current-project:last-child{border-radius:24px}
}
@media(prefers-reduced-motion:reduce){.research-masonry>.project,.research-masonry>.current-project{transition:none;transform:none!important}}

/* Preview crops are presentation-only; full figures remain in the project details. */
#drones .project-image.film-preview{aspect-ratio:4/3}
#drones .research-film img{object-fit:cover;object-position:center;transform:none;background:#472463}
#fish .project-image.film-preview{aspect-ratio:4/3}
#fish .research-film img{object-fit:cover;object-position:center 55%;transform:none}
#spiders .research-film img{object-fit:cover;object-position:center;transform:none}
.preview-credit{position:absolute;right:10px;bottom:9px;max-width:55%;padding:3px 6px;border-radius:4px;background:#1020199c;color:#fff;font-size:8px;line-height:1.3;z-index:1}

/* Compact figures use their own proportions rather than a letterboxed frame. */
.current-grid .current-visual--compact{aspect-ratio:auto}
.current-grid .current-visual--compact img{height:auto;object-fit:contain}


/* Research context follows the title in ordinary text. */
.research-grid .project-meta{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;margin:10px 0 0;line-height:1.5}

/* Mouse hover adds only a small lift and a soft shadow. */
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 .research-masonry>.project:hover,.research-masonry>.current-project:hover{transform:translateY(-2px);box-shadow:var(--elevation-2)}
}

/* A faint green surface echoes the target color in completed research. */
:root{--past-surface:#f6f9f3;--past-border:#d5dfce}
:root[data-theme=dark]{--past-surface:#1f2c23;--past-border:#3b4c3d}
.research-grid>.project{background:var(--past-surface);border-color:var(--past-border)}
.research-grid>.project .project-meta{color:var(--green)}
