:root {
    --primary-orange: #2E7D32;
    --secondary-orange: #43A047;
    --primary-grey: #1A1F22;
    --light-grey: #5D6D7E;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--primary-grey);
    background: linear-gradient(145deg, #fff 0%, #f6f8fb 65%, #E8F5E9 100%);
    line-height: 1.65;
}

body.dark-mode {
    --primary-grey: #E6EDF3;
    --light-grey: #A9B4BF;
    --bg-light: #0B1220;
    --white: #111827;
    background: linear-gradient(145deg, #0b1220 0%, #0f172a 65%, #1f2937 100%);
    color: var(--primary-grey);
}

.cs-hero-inner a {
    color: inherit;
}

.cs-hero-inner hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    margin: 1rem 0 1.6rem;
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.cs-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 0.9rem;
}

.cs-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-orange);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    text-decoration: none;
    margin-top: 1rem;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.4rem 1.4rem 4rem;
}

.cs-project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Project image viewer ─────────────────────────────── */
.cs-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cs-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.06), rgba(67, 160, 71, 0.04));
    border: 1px solid rgba(46, 125, 50, 0.14);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.10);
}

body.dark-mode .cs-stage {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.12), rgba(15, 23, 42, 0.6));
    border-color: rgba(46, 125, 50, 0.3);
}

.cs-stage-fig {
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.cs-stage-fig img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

.cs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-grey);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cs-nav:hover {
    background: #fff;
    color: var(--primary-orange);
    transform: translateY(-50%) scale(1.08);
}

.cs-prev { left: 14px; }
.cs-next { right: 14px; }

body.dark-mode .cs-nav {
    background: rgba(15, 23, 42, 0.85);
    color: #e6edf3;
}

.cs-expand {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cs-expand:hover { background: rgba(0, 0, 0, 0.65); }

.cs-counter {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
}

.cs-thumbs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
}

.cs-thumb {
    flex: 0 0 auto;
    width: 84px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: none;
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cs-thumb:hover { opacity: 0.9; transform: translateY(-2px); }

.cs-thumb.active {
    opacity: 1;
    border-color: var(--primary-orange);
}

/* ── Lightbox ─────────────────────────────────────────── */
.cs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 1rem;
    background: rgba(8, 12, 20, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cs-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.cs-lb-img {
    max-width: 92vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.cs-lightbox.open .cs-lb-img { transform: scale(1); }

.cs-lb-nav,
.cs-lb-close {
    position: absolute;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cs-lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 1.4rem;
}

.cs-lb-nav:hover { background: rgba(255, 255, 255, 0.25); }
.cs-lb-prev { left: 2.2vw; }
.cs-lb-next { right: 2.2vw; }

.cs-lb-close {
    top: 1.4rem;
    right: 1.6rem;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 1.3rem;
}

.cs-lb-close:hover { background: rgba(255, 255, 255, 0.25); }

.cs-lb-counter {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cs-brief h3 {
    margin-bottom: 0.6rem;
}

.cs-brief h4 {
    margin: 1.4rem 0 0.4rem;
}

.cs-badge {
    display: inline-block;
    background: rgba(46, 125, 50, 0.12);
    color: var(--primary-orange);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    margin: 0.2rem 0.25rem 0 0;
}

.cs-pager {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

.cs-pager a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-orange);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .cs-hero {
        padding-top: 6rem;
    }

    .cs-hero-grid,
    .cs-project-grid {
        grid-template-columns: 1fr;
    }

    .cs-stage-fig img { max-height: 360px; }
    .cs-nav { width: 38px; height: 38px; }
    .cs-lb-nav { width: 44px; height: 44px; }
}
