/* Curated projects. Deliberately scoped to avoid changing the site's existing styles. */
.project-page {
    width: 100%;
    box-sizing: border-box;
    /* Start the catalog/detail panels over the 80vh absolute slideshow.
       The slideshow stays behind them and scrolls away with the document. */
    padding-top: clamp(15rem, 40vh, 23rem);
    position: relative;
    z-index: 1;
}
.project-viewer { opacity: 1; transition: opacity 170ms ease; }
.project-viewer.is-changing { opacity: 0; }
.project-showcase, .project-detail {
    box-sizing: border-box;
    width: min(95vw, 1600px);
    margin: 2rem auto;
    padding: clamp(1.25rem, 4vw, 2.6rem);
    background: rgba(32, 32, 32, .97);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px;
    box-shadow: 0 14px 35px rgba(0,0,0,.35);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.project-showcase-heading { margin-bottom: 1.5rem; text-align: center; }
.project-showcase-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.project-showcase-heading p { color: #dedede; }
.project-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 1.25rem; }
.project-card { border-radius:20px; background: rgba(42,42,42,.95); overflow:hidden; border:1px solid rgba(255,255,255,.14); transition: transform 180ms ease, border-color 180ms ease; }
.project-card:hover { transform: translateY(-3px); border-color:rgba(140,180,255,.65); }
.project-card:focus-within { outline:2px solid #8cb4ff; outline-offset:3px; }
.project-card-link { color:#fff; text-decoration:none; height:100%; display:flex; flex-direction:column; }
.project-card-link:hover { color:#fff; }
.project-card-image { width:100%; height:180px; display:block; object-fit:cover; background:#383838; }
.project-card-image-placeholder { display:flex; align-items:center; justify-content:center; padding:1.2rem; text-align:center; overflow-wrap:anywhere; letter-spacing:.16em; font:700 clamp(1.4rem,3vw,2rem) monospace; color:#e4edff; background:radial-gradient(circle at 80% 20%,rgba(74,114,185,.3),transparent 60%),linear-gradient(135deg,#272c36,#363636); }
.project-card-body { padding:1.2rem; display:flex; flex-direction:column; flex:1; gap:.6rem; }
.project-card-body h3 { margin:0; font-size:1.4rem; }
.project-card-body p { margin:0; padding:0; line-height:1.6; color:#dedede; }
.project-eyebrow { text-transform:uppercase; letter-spacing:.11em; font: .82rem monospace; color:#a8c5ff; }
.project-card-footer { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; margin-top:auto; padding-top:.6rem; }
.project-status { border-radius:999px; display:inline-block; background:#383838; border:1px solid rgba(255,255,255,.16); padding:.4rem .7rem; color:#e3e3e3; font:.75rem monospace; }
.project-view-link { color:#a8c5ff; font:.88rem monospace; white-space:nowrap; }
.project-empty { padding:2rem; text-align:center; color:white; }
/* Leave room for full-width schematics and CAD renders while keeping prose readable. */
.project-detail { max-width: none; }
.project-detail-header .project-summary,
.project-detail-section > p,
.project-detail-section > ul { max-width: 85ch; }
.project-detail-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; }
.project-back-link { color:#a8c5ff; font-family:monospace; font-size:1rem; text-decoration:none; }
.project-back-link:hover { text-decoration:underline; }
.project-detail-header { margin:2rem 0; }
.project-detail-header h1 { margin:.6rem 0; font-size:clamp(2.2rem,5vw,3.8rem); }
.project-detail-header h1:focus { outline:none; }
.project-detail-header .project-subtitle { font-size:1.2rem; color:#ddd; font-weight:400; }
.project-detail p, .project-detail li { line-height:1.75; font-size:1.05rem; }
.project-detail p { padding:0; }
.project-detail .project-summary { font-size:1.16rem; color:#ececec; }
.project-detail-section { border-top:1px solid rgba(255,255,255,.14); margin-top:2rem; padding-top:1rem; }
.project-detail-section h2, .project-detail-technologies h2 { font-size:1.4rem; }
.project-detail-section ul { padding-left:1.5rem; }
.project-detail-figure { margin:1.8rem 0; }
.project-detail-figure img { width:100%; max-height:550px; object-fit:contain; border-radius:12px; }
.project-detail-figure figcaption { color:#cfcfcf; font:.88rem/1.6 monospace; text-align:center; }
.project-tag-list { display:flex; flex-wrap:wrap; list-style:none; padding:0; gap:.5rem; }
.project-tag-list li { border:1px solid rgba(255,255,255,.16); background:#343434; border-radius:999px; padding:.35rem .75rem; font:.87rem monospace; }
.project-detail-section p a, .project-detail-section li a, .project-related-links a { color:#a8c5ff; text-underline-offset:.17em; }
.project-detail-section p a:hover, .project-detail-section li a:hover, .project-related-links a:hover { color:#d0e2ff; }
.project-back-bottom { display:inline-block; margin-top:2rem; }
#githubExplorer { box-sizing:border-box; width:min(95vw, 1600px); margin:2rem auto; padding:clamp(1.25rem,4vw,2.6rem); background:rgba(32,32,32,.97); border:1px solid rgba(255,255,255,.14); border-radius:24px; box-shadow:0 14px 35px rgba(0,0,0,.35); -webkit-backdrop-filter:none; backdrop-filter:none; }
#githubExplorer .gh-explorer-root { box-sizing:border-box; width:100%; background:transparent; box-shadow:none; border:none; margin:0; padding:0; -webkit-backdrop-filter:none; backdrop-filter:none; }
#githubExplorer .gh-explorer-inner { width:100%; }
.project-index-only[hidden] { display:none !important; }
@media(max-width:700px) {
    .project-detail, .project-showcase { width:95vw; border-radius:17px; }
    #githubExplorer { width:95vw; }
    .project-detail-top { align-items:flex-start; }
}
@media(prefers-reduced-motion:reduce) {
    .project-viewer, .project-card { transition:none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .project-showcase, .project-detail, #githubExplorer { background-color: rgba(32,32,32,.97); }
}

/* Firefox/WebRender: same visual surface, without backdrop compositing. */
@supports (-moz-appearance: none) {
    .project-showcase,
    .project-detail,
    #githubExplorer {
        background-color: rgba(32, 32, 32, .97);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
