.project-single {
    padding-block: var(--space-l) var(--space-2xl);
    /* width comes from .container — keeps wrappers aligned across pages */
}
.project-single .project-content,
.project-single .project-related-posts { max-width: 80ch; }
.project-single header { margin-block-end: var(--space-l); }
.project-single h1 {
    /* Base typographic treatment from .heading-display in _headings.css */
    font-size: var(--fs-step-4);
    margin-block-end: var(--space-s);
}
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: var(--fs-step--1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: var(--fs-step--2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.status-active {
    background: rgba(34, 211, 238, 0.12);
    color: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: var(--glow-sm);
}
.status-archived {
    background: var(--color-bg-soft);
    color: var(--color-muted);
}

.project-hero { margin-block-end: var(--space-l); }
.project-hero img {
    border-radius: var(--radius-m);
    border: 1px solid var(--color-line);
}

.project-content { font-size: var(--fs-step-0); line-height: 1.7; color: var(--color-text); }
.project-content > * + * { margin-block-start: var(--space-m); }
.project-content h2 { font-size: var(--fs-step-2); }
.project-content h3 { font-size: var(--fs-step-1); }

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-block-start: var(--space-l);
}
/* .project-links a — base ghost-pill style from buttons.css */

.project-tech { margin-block-start: var(--space-l); }
.project-tech h3 {
    /* Shared .label-sub treatment from _headings.css */
    margin-block-end: var(--space-xs);
}
.project-tech ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    list-style: none;
    padding: 0;
}
/* Uppercase letter-spaced pill (same fix as .project-card-tech li): centre the caps by geometry, not font metrics.
   - trailing letter-spacing after the last glyph pushes text left → trim it
     from the right padding;
   - caps have no descenders but the line box reserves room for them → trim
     the line box to cap height where text-box is supported (Chrome 133+,
     Safari 18.2+), line-height: 1 elsewhere. */
.project-tech li {
    line-height: 1;
    padding: 0.45rem calc(0.7rem - 0.06em) 0.45rem 0.7rem;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    font-family: var(--font-mono);
    font-size: var(--fs-step--2);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
@supports (text-box: trim-both cap alphabetic) {
    .project-tech li {
        text-box: trim-both cap alphabetic;
        padding-block: 0.5rem;
    }
}

.project-related-posts {
    margin-block-start: var(--space-2xl);
    padding-block-start: var(--space-l);
    border-top: 1px solid var(--color-line);
}
.project-related-posts h3 {
    /* Shared .label-sub treatment from _headings.css */
    margin-block-end: var(--space-m);
}
.project-related-posts ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0;
}
.project-related-posts li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-m);
    padding-block: var(--space-s);
    border-bottom: 1px solid var(--color-line);
}
.project-related-posts li a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-step-1);
    color: var(--color-text);
    text-decoration: none;
}
.project-related-posts li a:hover { color: var(--color-accent); }
.project-related-posts time {
    color: var(--color-faint);
    font-family: var(--font-mono);
    font-size: var(--fs-step--2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ─── Project head: icon + title + chips + store buttons ─────────────────── */
.project-head {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: var(--space-m);
    align-items: center;
    margin-block-end: var(--space-l);
}
.project-head h1 { margin-block-end: var(--space-2xs); }
.project-icon {
    width: 128px;
    height: 128px;
    border-radius: 28px;
    border: 1px solid var(--color-line);
    box-shadow: var(--glow-sm);
}
.project-tagline {
    color: var(--color-muted);
    font-size: var(--fs-step-1);
    margin-block-end: var(--space-s);
    max-width: 60ch;
}
.project-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3xs);
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-s);
}
.project-chips li:not(.status) {
    font-family: var(--font-mono);
    font-size: var(--fs-step--2);
    line-height: 1;
    padding: 0.45rem calc(0.7rem - 0.06em) 0.45rem 0.7rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.project-stores { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0; }
@media (max-width: 599px) {
    .project-head { grid-template-columns: 1fr; }
    .project-icon { width: 96px; height: 96px; border-radius: 22px; }
    .project-stores .btn { flex: 1 1 100%; justify-content: center; }
}

/* ─── Screenshot strip: Swiper (drag/swipe), click → modal ────────────────── */
.project-shots { margin-block-end: var(--space-l); }
.project-shots .swiper-wrapper { list-style: none; padding: 0; margin: 0; }
.project-shots .swiper-slide { width: clamp(160px, 62vw, 240px); }
.project-shots a { display: block; border-radius: var(--radius-m); cursor: zoom-in; }
.project-shots a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
/* No JS / Swiper not loaded: native horizontal scroll with snap. */
.project-shots .swiper:not(.swiper-initialized) .swiper-wrapper {
    gap: var(--space-s);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--color-line-strong) transparent;
    padding-block-end: var(--space-xs);
}
.project-shots .swiper:not(.swiper-initialized) .swiper-slide { flex-shrink: 0; scroll-snap-align: start; }
.project-shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-m);
    border: 1px solid var(--color-line);
    user-select: none;
    -webkit-user-drag: none;
}

/* ─── Screenshot modal ─────────────────────────────────────────────────────── */
.shots-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text);
    overflow: hidden;
}
.shots-modal::backdrop { background: rgb(5 6 13 / 0.92); backdrop-filter: blur(6px); }
.shots-modal .swiper { width: 100%; height: 100%; }
.shots-modal .swiper-wrapper { list-style: none; padding: 0; margin: 0; }
.shots-modal .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-s);
    box-sizing: border-box;
}
.shots-modal-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-m);
    border: 1px solid var(--color-line);
    user-select: none;
    -webkit-user-drag: none;
}
.shots-modal-close,
.shots-modal-nav {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-line-strong);
    border-radius: 50%;
    background: rgb(5 6 13 / 0.6);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out-expo), color var(--dur-fast) var(--ease-out-expo);
}
.shots-modal-close:hover, .shots-modal-nav:hover,
.shots-modal-close:focus-visible, .shots-modal-nav:focus-visible { border-color: var(--color-accent); color: var(--color-accent); outline: none; }
.shots-modal-close { top: var(--space-s); right: var(--space-s); }
.shots-modal-nav { top: 50%; translate: 0 -50%; }
.shots-modal-prev { left: var(--space-s); }
.shots-modal-next { right: var(--space-s); }
.shots-modal-nav.swiper-button-disabled { opacity: 0.3; cursor: default; }
.shots-modal-count {
    position: absolute;
    z-index: 2;
    bottom: var(--space-s);
    left: 50%;
    translate: -50% 0;
    margin: 0;
    font-family: var(--font-mono);
    font-size: var(--fs-step--1);
    color: var(--color-muted);
}
/* Phones: swipe is the navigation; arrows would cover the picture. */
@media (max-width: 600px) {
    .shots-modal-nav { display: none; }
}
