/* ── Header ── */
.cs-header {
    padding: 5rem 0 3.5rem;
    border-bottom: 0.5px solid var(--border);
}

.cs-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.tag {
    font-size: 15px;
    letter-spacing: 0.03em;
    color: var(--bg);
    background: var(--fg-mid);
    padding: 5px 13px;
    border-radius: 100px;
}

.cs-title {
    font-family: var(--serif);
    font-size: clamp(43px, 6vw, 67px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    max-width: 18ch;
}

.cs-subtitle {
    font-size: 29px;
    color: var(--fg-muted);
    margin-bottom: 1.75rem;
    font-style: italic;
    line-height: 1.4;
}

.cs-overview {
    font-size: 25px;
    color: var(--fg-mid);
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 68ch;
}

.cs-meta {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.meta-label {
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--fg-muted);
    margin-bottom: 3px;
}

.meta-val {
    font-size: 17px;
    color: var(--fg-mid);
}

/* ── Hero image ── */
.cs-hero-img {
    width: 100%;
    height: auto;
    min-height: 320px;
    background: #f0f3f8;
    border-radius: var(--radius);
    margin: 3.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3rem;
}

/* ── Live site link (projects) ── */
.cs-site-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 17px;
    color: var(--fg);
    border: 0.5px solid var(--border-md);
    padding: 10px 18px;
    border-radius: 100px;
    transition: border-color 0.15s, background 0.15s;
}

    .cs-site-link:hover {
        border-color: var(--fg);
        background: rgba(0,0,0,0.03);
    }

.cs-site-notice {
    font-size: 14px;
    color: var(--fg-muted);
    margin-top: 0.6rem;
    display: block;
}

/* ── Body ── */
.cs-body section {
    padding: 3.5rem 0;
    border-top: 0.5px solid var(--border);
}

.cs-body h2 {
    font-family: var(--sans);
    font-size: 44px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.cs-body h3 {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    margin-top: 1.75rem;
    color: var(--fg);
}

.cs-body p {
    font-size: 25px;
    color: var(--fg-mid);
    line-height: 1.75;
    margin-bottom: 1rem;
    max-width: 68ch;
}

    .cs-body p:last-child {
        margin-bottom: 0;
    }

.cs-body ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.cs-body li {
    font-size: 25px;
    color: var(--fg-mid);
    line-height: 1.75;
    padding: 0.65rem 0 0.65rem 1.25rem;
    border-top: 0.5px solid var(--border);
    position: relative;
    max-width: 68ch;
}

    .cs-body li:last-child {
        border-bottom: 0.5px solid var(--border);
    }

    .cs-body li::before {
        content: '—';
        position: absolute;
        left: 0;
        color: var(--fg-muted);
        font-size: 13px;
        top: 0.9rem;
    }

/* ── Pull quote ── */
.cs-pullquote {
    border-left: 2px solid var(--fg);
    padding: 0.25rem 0 0.25rem 1.5rem;
    margin: 2rem 0;
    max-width: 58ch;
}

    .cs-pullquote p {
        font-family: var(--serif);
        font-size: 24px !important;
        line-height: 1.5 !important;
        color: var(--fg) !important;
        margin-bottom: 0 !important;
    }

/* ── Image placeholder ── */
.cs-img-placeholder {
    width: 100%;
    height: 300px;
    background: rgba(0,0,0,0.03);
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-muted);
    font-size: 14px;
    letter-spacing: 0.05em;
    margin: 1.75rem 0;
}

    .cs-img-placeholder.short {
        height: 200px;
    }

/* ── Outcome stats ── */
.cs-outcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.cs-outcome {
    background: rgba(0,0,0,0.025);
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
}

.cs-outcome-num {
    font-family: var(--serif);
    font-size: 53px;
    letter-spacing: -0.025em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cs-outcome-label {
    font-size: 16px;
    color: var(--fg-mid);
    line-height: 1.5;
}

/* ── Split cards ── */
.cs-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.cs-split-card {
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.cs-split-card-label {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 0.6rem;
}

.cs-split-card h3 {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    margin-top: 0;
    color: var(--fg);
}

.cs-split-card p {
    font-size: 16px !important;
    line-height: 1.65 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
}

/* ── Process steps ── */
.cs-steps {
    margin-top: 1.75rem;
    list-style: none;
    padding: 0;
}

.cs-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-top: 0.5px solid var(--border);
    align-items: start;
}

    .cs-step:last-child {
        border-bottom: 0.5px solid var(--border);
    }

    .cs-step::before {
        display: none;
    }

.cs-step-num {
    font-family: var(--serif);
    font-size: 26px;
    color: var(--fg-muted);
    padding-top: 2px;
}

.cs-step-title {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.35rem;
}

.cs-step-body {
    font-size: 17px;
    color: var(--fg-mid);
    line-height: 1.7;
    max-width: 60ch;
}

/* ── Constraint cards ── */
.cs-constraint {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    margin: 1.75rem 0;
    align-items: start;
    max-width: 68ch;
}

.cs-constraint-icon {
    font-size: 18px;
    padding-top: 1px;
}

.cs-constraint-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--fg);
}

.cs-constraint-body {
    font-size: 16px;
    color: var(--fg-mid);
    line-height: 1.65;
}

/* ── Workstream cards ── */
.cs-workstreams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.cs-workstream {
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.cs-workstream-num {
    font-family: var(--serif);
    font-size: 26px;
    color: var(--fg-muted);
    margin-bottom: 0.75rem;
}

.cs-workstream-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--fg);
}

.cs-workstream p {
    font-size: 16px !important;
    color: var(--fg-mid);
    line-height: 1.65 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
}

/* ── Learnings grid ── */
.cs-learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.cs-learning {
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.cs-learning-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.cs-learning p {
    font-size: 16px !important;
    line-height: 1.65 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
}

/* ── Concept cards (projects) ── */
.cs-concept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.cs-concept {
    border: 0.5px solid var(--border-md);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.cs-concept-title {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    color: var(--fg);
}

.cs-concept p {
    font-size: 16px !important;
    color: var(--fg-mid);
    line-height: 1.65 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
}

/* ── Tech stack pills ── */
.cs-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.cs-tech-pill {
    font-size: 16px;
    color: var(--fg-mid);
    border: 0.5px solid var(--border-md);
    padding: 6px 14px;
    border-radius: 100px;
}

/* ── Video embed ── */
.cs-video {
    margin: 3.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
}

    .cs-video iframe {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

/* ── Nav footer ── */
.cs-nav-footer {
    padding: 3.5rem 0;
    border-top: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cs-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

    .cs-nav-link span:first-child {
        font-size: 13px;
        letter-spacing: 0.08em;
        color: var(--fg-muted);
        text-transform: uppercase;
    }

    .cs-nav-link span:last-child {
        font-family: var(--serif);
        font-size: 24px;
        letter-spacing: -0.01em;
        color: var(--fg);
        transition: letter-spacing 0.2s;
    }

    .cs-nav-link:hover span:last-child {
        letter-spacing: 0.01em;
    }

    .cs-nav-link.next {
        text-align: right;
    }

    .cs-nav-link.prev {
        text-align: left;
    }

/* ── Responsive ── */
@media (max-width: 700px) {
    .cs-meta {
        gap: 1.5rem;
    }

    .cs-split {
        grid-template-columns: 1fr;
    }

    .cs-concept-grid {
        grid-template-columns: 1fr;
    }

    .cs-nav-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Lightbox ── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

    #lightbox.active {
        display: flex;
    }

#lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: var(--radius);
    object-fit: contain;
    cursor: default;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

#lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    #lightbox-close:hover {
        background: rgba(255,255,255,0.22);
    }

/* ── Image hover — indicates expandable ── */
.cs-body img,
.cs-hero-img img,
.img-contained,
.img-pair img {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

    .cs-body img:hover,
    .cs-hero-img img:hover,
    .img-contained:hover,
    .img-pair img:hover {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
        transform: translateY(-2px);
    }
