/* === CASE STUDY PAGE — BuzzingFrame ===
   Styles for individual project case study pages (work/*.html)
   Depends on shared.css + web3.css for grid, glassmorphism, typography
   ================================================ */

/* --- 1. BACK LINK (Fixed glassmorphism pill) --- */
.cs-back-link {
    position: fixed;
    top: 28px;
    left: 2.5vw;
    z-index: 99;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(8, 8, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    color: var(--text-grey);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.cs-back-link:hover {
    color: var(--text-white);
    border-color: var(--accent-mint);
}

/* --- 2. HERO SECTION --- */
.cs-hero {
    padding: 14vh 0 6vh;
    width: 100%;
}

.cs-hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-mint);
    font-size: 0.75rem;
    margin-bottom: 15px;
    display: block;
    letter-spacing: 0.05em;
    opacity: 0.85;
    text-transform: uppercase;
}

.cs-hero-title {
    font-family: var(--font-main);
    font-size: clamp(2.4rem, 4vw, 3.5rem);
    line-height: 1.08;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text-white);
    max-width: 800px;
    text-shadow: 0 2px 30px rgba(1, 1, 2, 0.9), 0 0 60px rgba(1, 1, 2, 0.7);
}

.cs-hero-subtitle {
    font-family: var(--font-main);
    font-size: 1.25rem;
    color: var(--text-white);
    opacity: 0.85;
    line-height: 1.5;
    max-width: 700px;
    margin-bottom: 30px;
    text-shadow: 0 2px 20px rgba(1, 1, 2, 0.8);
}

/* --- 3. TAG PILLS --- */
.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-grey);
    transition: all 0.3s ease;
}

.cs-tag:hover {
    border-color: var(--accent-mint);
    color: var(--accent-mint);
    background: rgba(52, 254, 194, 0.1);
}

/* --- 4. HERO IMAGE (full-width) --- */
.cs-hero-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(52, 254, 194, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.cs-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- 5. BODY TEXT SECTIONS --- */
.cs-body-text h2 {
    font-family: var(--font-main);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.cs-body-text p {
    font-family: var(--font-main);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-grey);
    margin-bottom: 1.5rem;
    max-width: 720px;
}

.cs-body-text p:last-child {
    margin-bottom: 0;
}

.cs-body-text strong {
    color: var(--text-white);
    font-weight: 600;
}

/* --- 6. IMAGE GRIDS --- */
.cs-image-full {
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(52, 254, 194, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.cs-image-full img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.cs-image-grid {
    display: grid;
    gap: 16px;
}

.cs-image-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cs-image-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cs-image-grid-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(52, 254, 194, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.cs-image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 7. PROJECT METRICS PANEL --- */
.cs-metrics {
    background: var(--surface-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    transition: border-color 0.3s ease;
}

.cs-metrics:hover {
    border-color: var(--border-hover);
}

.cs-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-mint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.cs-metric-value {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-white);
}

.cs-metric-value a {
    color: var(--accent-mint);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.cs-metric-value a:hover {
    opacity: 0.7;
}

/* --- 8. SECTION SPACING --- */
.cs-section {
    padding: 8vh 0;
    width: 100%;
}

.cs-section+.cs-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- 9. NEXT PROJECT NAV --- */
.cs-next-project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.cs-next-project:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
}

.cs-next-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-mint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    display: block;
}

.cs-next-title {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-white);
}

.cs-next-arrow {
    font-size: 1.5rem;
    color: var(--text-grey);
    transition: color 0.3s ease;
}

.cs-next-project:hover .cs-next-arrow {
    color: var(--accent-mint);
}


/* --- 10. RESPONSIVE: 1024px --- */
@media (max-width: 1024px) {
    .cs-back-link {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 20px;
    }

    .cs-hero {
        padding: 10vh 0 4vh;
    }
}


/* --- RESPONSIVE: 768px --- */
@media (max-width: 768px) {
    .cs-hero-title {
        font-size: 2rem;
    }

    .cs-hero-subtitle {
        font-size: 1.1rem;
    }

    .cs-image-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-metrics {
        grid-template-columns: repeat(2, 1fr);
        padding: 30px;
    }

    .cs-body-text p {
        font-size: 1rem;
    }

    .cs-next-project {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 30px;
    }
}


/* --- RESPONSIVE: 480px --- */
@media (max-width: 480px) {

    .cs-image-grid.cols-2,
    .cs-image-grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .cs-metrics {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .cs-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cs-tag {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cs-section {
        padding: 6vh 0;
    }
}