/* ==========================================================================
   Case Studies / Work Section Stylesheet
   Shajjad Khan Portfolio — Production Grade
   ========================================================================== */

.work-page {
    background-color: var(--bg-primary, #050811);
    color: var(--text-primary, #f1f5f9);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.work-main {
    flex: 1 0 auto;
    padding-top: 100px;
    padding-bottom: 80px;
}

/* Header & Breadcrumb */
.work-header {
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding-bottom: 32px;
}

.work-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-dim, #7a8aa0);
    margin-bottom: 16px;
}

.work-breadcrumb a {
    color: var(--accent-cyan, #06b6d4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.work-breadcrumb a:hover {
    color: var(--accent-emerald, #10b981);
    text-decoration: underline;
}

.work-breadcrumb-sep {
    opacity: 0.5;
}

.work-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #ffffff;
}

.work-tagline {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-secondary, #cbd5e1);
    max-width: 820px;
    margin-bottom: 24px;
}

/* Meta Bar */
.work-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--text-dim, #7a8aa0);
    padding: 16px 20px;
    background: var(--surface-1, rgba(14, 22, 40, 0.6));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
}

.work-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.work-meta-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: var(--text-dim, #7a8aa0);
}

.work-meta-val {
    color: #ffffff;
    font-weight: 600;
}

/* Metrics Grid */
.work-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 36px 0;
}

.work-metric-card {
    background: var(--surface-2, rgba(14, 22, 40, 0.85));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.work-metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.3);
}

.work-metric-val {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.work-metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #cbd5e1);
    font-weight: 500;
}

/* Article / Narrative Body */
.work-body {
    max-width: 860px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary, #cbd5e1);
}

.work-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 48px;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.work-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-top: 36px;
    margin-bottom: 14px;
}

.work-body p {
    margin-bottom: 22px;
}

.work-body ul, .work-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.work-body li {
    margin-bottom: 10px;
}

.work-body strong {
    color: #ffffff;
}

.work-callout {
    background: rgba(16, 185, 129, 0.05);
    border-left: 4px solid var(--accent-emerald, #10b981);
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 32px 0;
    color: #e2e8f0;
}

.work-callout-cyan {
    background: rgba(6, 182, 212, 0.05);
    border-left-color: var(--accent-cyan, #06b6d4);
}

.work-callout-gold {
    background: rgba(245, 158, 11, 0.05);
    border-left-color: var(--accent-gold, #f59e0b);
}

.work-callout p:last-child {
    margin-bottom: 0;
}

/* Spec Table */
.work-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.95rem;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    overflow: hidden;
}

.work-spec-table th, .work-spec-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.work-spec-table th {
    background: rgba(14, 22, 40, 0.9);
    color: #ffffff;
    font-weight: 600;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.85rem;
}

.work-spec-table tr:last-child td {
    border-bottom: none;
}

.work-spec-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Tech Pill Strip */
.work-tech-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 36px 0;
}

.work-tech-pill {
    font-size: 0.8rem;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: #cbd5e1;
    padding: 4px 12px;
    border-radius: 999px;
}

/* Image Figures */
.work-figure {
    margin: 36px 0;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 12px;
    overflow: hidden;
    background: #080d1a;
}

.work-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.work-figure-caption {
    padding: 12px 18px;
    font-size: 0.85rem;
    color: var(--text-dim, #7a8aa0);
    background: rgba(14, 22, 40, 0.8);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Work Index Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.work-card {
    background: var(--surface-1, rgba(14, 22, 40, 0.7));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.work-card-flagship {
    grid-column: 1 / -1;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(14, 22, 40, 0.9) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.work-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.work-card-badge {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-gold {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.work-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.work-card-desc {
    font-size: 0.95rem;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.work-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    padding-top: 18px;
    font-size: 0.85rem;
    color: var(--accent-emerald, #10b981);
    font-weight: 600;
}

.work-cta-box {
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(14, 22, 40, 0.9) 0%, rgba(10, 15, 29, 0.95) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 16px;
    text-align: center;
}

.work-cta-box h3 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.work-cta-box p {
    color: var(--text-secondary, #cbd5e1);
    max-width: 600px;
    margin: 0 auto 24px auto;
}

/* Responsive adjustments */
@media (max-width: 820px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
    .work-metric-val {
        font-size: 1.85rem;
    }
    .work-body h2 {
        font-size: 1.45rem;
    }
}
