/* =====================================================================
   PROJECTS DIRECTORY — works.html category grid + the 9 category pages.
   Loaded only on those pages, after qazi-theme.css. Reuses the site's
   glass cards (.shadow-box + .ac-*), fonts and colour tokens.
   ===================================================================== */

/* ---------- works.html: directory ---------- */
.projects-directory .container > .section-heading { display: flex; margin-bottom: 14px; }
.projects-directory .dir-intro {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
    color: #bcbcbc;
    font-size: 16px;
    line-height: 1.6;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px 16px 24px;
    color: inherit;
}
.cat-card:hover { color: inherit; }
.cat-card .cat-card-img {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #0b0d15;
    margin-bottom: 18px;
}
.cat-card .cat-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s var(--lg-ease, ease);
}
.cat-card:hover .cat-card-img img,
.cat-card:focus-visible .cat-card-img img { transform: scale(1.05); }

.cat-card-body { display: flex; flex-direction: column; flex: 1; padding: 0 6px; }
.cat-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.cat-num { color: rgb(var(--lg-neon)); font-weight: 600; }
.cat-count {
    color: #d7dae2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(var(--lg-neon), .1);
    box-shadow: inset 0 0 0 1px rgba(var(--lg-neon), .3);
    letter-spacing: .04em;
}
.cat-card-title {
    color: #fff;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 8px;
}
.cat-card p {
    color: #a9adb8;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}
.cat-card-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.cat-card-cta img { opacity: .35; transition: opacity .3s, transform .4s var(--lg-ease, ease); }
.cat-card:hover .cat-card-cta img { opacity: 1; transform: rotate(45deg); }
.projects-directory .more-work { margin-top: 32px; justify-content: center; }

/* ---------- category pages: breadcrumb ---------- */
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    color: #bcbcbc;
    font-size: 14px;
}
.crumbs li + li::before { content: '/'; margin-right: 6px; opacity: .45; }
.crumbs a { color: #bcbcbc; transition: color .2s; }
.crumbs a:hover { color: rgb(var(--c-cyan)); }
.crumbs [aria-current] { color: #fff; }
.breadcrumb-area .breadcrumb-content .section-heading.cat-title { font-size: 48px; line-height: 1.1; }

/* ---------- category pages: intro ---------- */
.category-area { padding-top: 10px; }
.cat-intro {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: center;
    padding: 24px;
    margin-bottom: 56px;
}
.cat-intro-media { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; }
.cat-intro-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cat-kicker {
    color: rgb(var(--lg-neon));
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.cat-intro-text > p:not(.cat-kicker) { color: #e3e5ea; font-size: 16px; line-height: 1.65; margin-bottom: 18px; }
.cat-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.cat-stats li {
    padding: 8px 14px;
    border-radius: 999px;
    color: #d7dae2;
    font-size: 13px;
    background: rgba(255,255,255,.05);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}
.cat-stats b { color: rgb(var(--lg-neon)); font-weight: 600; margin-right: 4px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; }

.cat-h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 22px;
}
.cat-h2 small { color: #9a9ea8; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------- project cards ---------- */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}
.proj-card { display: flex; flex-direction: column; padding: 14px 14px 22px; height: 100%; scroll-margin-top: 30px; }
.proj-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    overflow: hidden;
    background: #0b0d15;
    margin-bottom: 16px;
}
.proj-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .9s var(--lg-ease, ease);
}
.proj-thumb img.fit-contain { object-fit: contain; object-position: center; background: #fff; }
.proj-card:hover .proj-thumb img { transform: scale(1.05); }

.proj-thumb--ph {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}
.proj-thumb--ph::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7,8,12,.15), rgba(7,8,12,.85));
}
.proj-thumb--ph span {
    position: relative;
    z-index: 1;
    padding: 16px 18px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.proj-body { display: flex; flex-direction: column; flex: 1; padding: 0 6px; }
.proj-kicker { color: rgb(var(--lg-neon)); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.proj-title { color: #fff; font-size: 19px; font-weight: 500; line-height: 1.3; margin: 0 0 8px; }
.proj-desc { color: #b4b8c2; font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.proj-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.proj-tech li {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #e3e5ea;
    background: rgba(var(--lg-neon), .08);
    box-shadow: inset 0 0 0 1px rgba(var(--lg-neon), .25);
}
.proj-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.proj-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: rgba(255,255,255,.05);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
    transition: background .25s, box-shadow .25s, color .25s;
    position: relative;
    z-index: 3;
}
.proj-link:hover { color: #fff; background: rgba(var(--lg-neon), .16); box-shadow: inset 0 0 0 1px rgba(var(--lg-neon), .55), 0 0 18px -6px rgba(var(--lg-neon), .7); }
.proj-link.primary { color: #0a0b12; background: linear-gradient(120deg, rgb(var(--c-cyan)), rgb(var(--c-violet)) 55%, rgb(var(--c-pink))); box-shadow: none; }
.proj-link.primary:hover { color: #0a0b12; filter: brightness(1.1); }
.proj-link .ico { width: 14px; height: 14px; }

/* compact (CV-listed) cards */
.proj-grid--compact .proj-thumb { aspect-ratio: 16 / 7; }
.proj-grid--compact .proj-title { font-size: 17px; }

/* ---------- empty state ---------- */
.cat-empty { padding: 40px; text-align: center; margin-bottom: 56px; }
.cat-empty h2 { color: #fff; font-size: 22px; font-weight: 500; margin-bottom: 10px; }
.cat-empty p { color: #b4b8c2; max-width: 560px; margin: 0 auto 22px; line-height: 1.6; }
.cat-empty .proj-links { justify-content: center; }

/* ---------- pager ---------- */
.cat-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}
.cat-pager a.pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 22px;
    color: #fff;
}
.cat-pager a.pager-link small { color: #9a9ea8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cat-pager a.pager-link span { font-size: 16px; font-weight: 500; }
.cat-pager .next { text-align: right; }
.cat-pager .pager-all { align-self: center; }

/* ---------- responsive ---------- */
@media (max-width: 1090px) {
    .cat-grid, .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-intro { grid-template-columns: 260px 1fr; gap: 28px; }
    .breadcrumb-area .breadcrumb-content .section-heading.cat-title { font-size: 40px; }
}
@media (max-width: 767px) {
    .cat-intro { grid-template-columns: 1fr; }
    .cat-intro-media { max-width: 420px; }
    .cat-pager { grid-template-columns: 1fr 1fr; }
    .cat-pager .pager-all { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
    .breadcrumb-area .breadcrumb-content .section-heading.cat-title { font-size: 32px; }
}
@media (max-width: 585px) {
    .cat-grid, .proj-grid { grid-template-columns: 1fr; }
    .cat-pager { grid-template-columns: 1fr; }
    .cat-pager .next { text-align: left; }
    .cat-empty { padding: 28px 20px; }
    .breadcrumb-area .breadcrumb-content .section-heading.cat-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .cat-card .cat-card-img img, .proj-thumb img, .cat-card-cta img { transition: none; }
    .cat-card:hover .cat-card-img img, .proj-card:hover .proj-thumb img { transform: none; }
}

/* texture layer inside the new glass blocks (same as template cards) */
.cat-card > .bg-img,
.cat-intro > .bg-img,
.cat-empty > .bg-img {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .1;
    border-radius: inherit;
    pointer-events: none;
}
.proj-kicker em { font-style: normal; color: #9a9ea8; text-transform: none; letter-spacing: 0; }
.proj-thumb--ph .ph-badge {
    margin: 0 0 14px 16px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(7,8,12,.55);
    box-shadow: inset 0 0 0 1px rgba(var(--lg-neon), .45);
    color: rgb(var(--lg-neon));
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}
