/* ==========================================================
   DevoEnv — Works / Portfolio Page
   ========================================================== */

/* WORKS HERO */
.works-hero {
    padding: 9rem 0 5rem;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.works-hero-orb {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(0, 62, 217, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.works-hero .section-label { margin-bottom: 1.2rem; }

.works-hero h1 {
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: -2.5px;
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.works-hero h1 em {
    font-style: normal;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.works-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* FILTER TABS */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.filter-btn {
    padding: 0.55rem 1.3rem;
    border-radius: 50px;
    border: 1.5px solid rgba(0, 62, 217, 0.15);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: rgba(0, 62, 217, 0.4);
    color: var(--primary);
    background: rgba(0, 62, 217, 0.05);
}

.filter-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 62, 217, 0.3);
}

/* WORKS GRID */
.works-section { padding: 0 0 7rem; }

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

/* Card shell */
.work-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 62, 217, 0.1);
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 62, 217, 0.22);
}

.work-card.hidden { display: none; }

/* Image area */
.work-img {
    height: 230px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.work-card.featured .work-img { height: 300px; }

.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.work-card:hover .work-img img { transform: scale(1.07); }

/* Gradient overlay on image */
.work-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(5,10,30,0.78) 100%);
    transition: background 0.4s ease;
}

.work-card:hover .work-img-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(5,10,30,0.88) 100%);
}

/* Category + year floating on image bottom */
.work-img-meta {
    position: absolute;
    bottom: 1rem;
    left: 1.4rem;
    right: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}

.work-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.28rem 0.75rem;
    border-radius: 50px;
    border: 1px solid;
}

.work-year {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* Hover CTA overlay */
.work-img-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.work-card:hover .work-img-cta { opacity: 1; }

.work-img-cta span {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    letter-spacing: 0.04em;
    transform: translateY(8px);
    transition: transform 0.35s ease;
}

.work-card:hover .work-img-cta span { transform: translateY(0); }

/* Card info */
.work-info {
    padding: 1.6rem 1.8rem 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-info h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.55rem;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.work-info p {
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.2rem;
    flex: 1;
}

.work-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-bottom: 1.2rem;
}

.work-pill {
    font-size: 0.7rem;
    padding: 0.22rem 0.65rem;
    border-radius: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    background: rgba(0, 62, 217, 0.07);
    border: 1px solid rgba(0, 62, 217, 0.14);
    color: var(--primary);
}

.work-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 62, 217, 0.05);
    border: 1px solid rgba(0, 62, 217, 0.1);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.work-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.work-result strong { color: var(--text-primary); font-weight: 700; }

/* FEATURED CASE STUDY */
.work-card.featured { grid-column: span 2; }

/* RESULTS BAND */
.results-band {
    background: var(--bg-card);
    border: 1px solid rgba(0, 62, 217, 0.1);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 5rem;
    box-shadow: var(--shadow-sm);
}

.rb-item {
    text-align: center;
    padding: 0.5rem 1rem;
    border-right: 1px solid rgba(0, 62, 217, 0.08);
}

.rb-item:last-child { border-right: none; }

.rb-num {
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.rb-label { font-size: 0.85rem; color: var(--text-secondary); }

/* CTA SECTION */
.works-cta {
    background: var(--gradient-1);
    border-radius: 28px;
    padding: 4.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.works-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.works-cta-content { position: relative; z-index: 1; }

.works-cta h2 {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1.5px;
    margin-bottom: 0.8rem;
}

.works-cta p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.88);
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.75;
}

.works-cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* SECTION SHARED (used in works page) */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--primary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    background: rgba(0, 62, 217, 0.07);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 62, 217, 0.15);
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); }
    .work-card.featured { grid-column: span 2; }
    .results-band { grid-template-columns: repeat(2, 1fr); }
    .rb-item:nth-child(2) { border-right: none; }
    .rb-item:nth-child(3) { border-top: 1px solid rgba(0,62,217,0.08); }
    .rb-item:nth-child(4) { border-top: 1px solid rgba(0,62,217,0.08); border-right: none; }
}

@media (max-width: 768px) {
    .works-hero h1 { font-size: 2.4rem; letter-spacing: -1.5px; }
    .works-grid { grid-template-columns: 1fr; }
    .work-card.featured { grid-column: span 1; }
    .results-band { grid-template-columns: repeat(2, 1fr); padding: 1.5rem; }
    .works-cta { padding: 3rem 1.5rem; }
    .works-cta h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .results-band { grid-template-columns: 1fr; }
    .rb-item { border-right: none; border-bottom: 1px solid rgba(0,62,217,0.08); }
    .rb-item:last-child { border-bottom: none; }
}
