/* =====================================================================
   work-plus.css — the Work page.
   Loads AFTER styles.css, which supplies nav + footer.
   Quiet, typographic layout; same palette and fonts as the home page.
   Deliberately light on effects: no blend layers, no infinite animations,
   no filter transitions on large surfaces.
   ===================================================================== */

.work-page {
    --wk-c1: 209, 63, 63;      /* brand crimson */
    --wk-c2: 255, 138, 91;     /* ember         */
    --wk-line: rgba(255, 255, 255, 0.08);
    --wk-dim: rgba(255, 255, 255, 0.46);
    --wk-ease: cubic-bezier(0.22, 1, 0.36, 1);
    background: #0c0b0e;
}

.work-page main {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.4rem 6rem;
}

/* ---------------------------------------------------------------------
   1. Hero — big quiet type
   ------------------------------------------------------------------ */
.wk-hero {
    padding: 8rem 0 4.5rem;
}

.wk-eyebrow {
    margin: 0 0 1.1rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.34);
}

/* Colour comes from the global h1 rule in styles.css — the same crimson
   gradient the home page hero uses, so the two headings match. Setting
   `color` here would do nothing: that rule also sets
   -webkit-text-fill-color: transparent, which wins over color. */
.wk-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 17vw, 11rem);
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: -0.055em;
}

.wk-lede {
    max-width: 34rem;
    margin: 2rem 0 0;
    font-size: clamp(1rem, 2.1vw, 1.14rem);
    line-height: 1.65;
    color: var(--wk-dim);
}

.wk-lede strong {
    color: #fff;
    font-weight: 600;
}

.wk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.wk-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.44rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--wk-line);
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.25s var(--wk-ease), border-color 0.25s var(--wk-ease), background 0.25s var(--wk-ease);
}

.wk-pill b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.wk-pill i { font-size: 0.75em; opacity: 0.7; }

.wk-pill--link:hover {
    color: #fff;
    border-color: rgba(var(--wk-c1), 0.5);
    background: rgba(var(--wk-c1), 0.12);
}

.wk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------
   2. Disciplines — backend / frontend / systems
   ------------------------------------------------------------------ */
.wk-disciplines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    margin: 1rem 0 5rem;
    background: var(--wk-line);
    border: 1px solid var(--wk-line);
    border-radius: 1.1rem;
    overflow: hidden;
}

.wk-disc {
    padding: 1.85rem 1.6rem;
    background: #0e0d11;
}

.wk-disc-n {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgb(var(--wk-c1));
    font-variant-numeric: tabular-nums;
}

.wk-disc-h {
    margin: 0 0 0.55rem;
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    color: #fff;
}

.wk-disc-p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--wk-dim);
}

/* ---------------------------------------------------------------------
   3. Featured — the one big card
   ------------------------------------------------------------------ */
.wk-featured[hidden] { display: none; }

.wk-feat {
    position: relative;
    display: block;
    padding: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 4.5rem;
    border-radius: 1.5rem;
    background: #111015;
    border: 1px solid var(--wk-line);
    text-decoration: none;
    transition: border-color 0.3s var(--wk-ease), background 0.3s var(--wk-ease);
}

.wk-feat:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: #141319;
}

.wk-feat-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.wk-feat-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 1rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(150deg, rgba(var(--wk-c1), 0.9), rgba(var(--wk-c2), 0.55));
    overflow: hidden;
}

.wk-feat-mark img { width: 100%; height: 100%; object-fit: cover; }

.wk-feat-id { min-width: 0; }

.wk-feat-role {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

.wk-feat-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 700;
    color: #fff;
}

.wk-feat-go {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--wk-line);
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.25s var(--wk-ease), border-color 0.25s var(--wk-ease), background 0.25s var(--wk-ease);
}

.wk-feat:hover .wk-feat-go {
    color: #fff;
    border-color: rgba(var(--wk-c1), 0.55);
    background: rgba(var(--wk-c1), 0.18);
}

.wk-feat-h {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6.5vw, 4.2rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: #f4f1f2;
}

.wk-feat-p {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--wk-dim);
}

.wk-feat-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.wk-feat-stack li,
.wk-card-stack li {
    padding: 0.24rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wk-line);
}

/* ---------------------------------------------------------------------
   4. List head + filters
   ------------------------------------------------------------------ */
.wk-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.wk-list-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.wk-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wk-filter {
    padding: 0.36rem 0.85rem;
    border-radius: 2rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: 1px solid var(--wk-line);
    cursor: pointer;
    transition: color 0.25s var(--wk-ease), border-color 0.25s var(--wk-ease), background 0.25s var(--wk-ease);
}

.wk-filter:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }

.wk-filter.is-active {
    color: #fff;
    background: rgba(var(--wk-c1), 0.18);
    border-color: rgba(var(--wk-c1), 0.5);
}

/* ---------------------------------------------------------------------
   5. Grid
   ------------------------------------------------------------------ */
.wk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.wk-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.45rem 1.55rem;
    border-radius: 1.15rem;
    background: #100f14;
    border: 1px solid var(--wk-line);
    text-decoration: none;
    transition: border-color 0.28s var(--wk-ease), background 0.28s var(--wk-ease), transform 0.28s var(--wk-ease);
}

a.wk-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.16);
    background: #15141a;
}

.wk-card-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}

.wk-card-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 0.7rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(150deg, rgba(var(--wk-c1), 0.75), rgba(var(--wk-c2), 0.4));
    overflow: hidden;
}

.wk-card-mark img { width: 100%; height: 100%; object-fit: cover; }

.wk-card-role {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.38);
}

.wk-card-year {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

.wk-card-h {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: #fff;
}

.wk-card-p {
    margin: 0 0 1.15rem;
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--wk-dim);
    flex-grow: 1;
}

.wk-card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Live Roblox numbers. Only rendered once the API answers, so the card has
   no empty row when it doesn't. */
.wk-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.15rem;
    padding-top: 1.05rem;
    border-top: 1px solid var(--wk-line);
}

.wk-feat .wk-stats { gap: 1.6rem; }

.wk-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.42);
}

.wk-stat i { font-size: 0.85em; color: rgba(var(--wk-c1), 0.85); }

.wk-stat b {
    color: #fff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.wk-feat .wk-stat { font-size: 0.9rem; }

.wk-tag {
    position: absolute;
    top: 1.5rem;
    right: 1.45rem;
    padding: 0.16rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #041e14;
    background: #6ee7b7;
}

/* ---------------------------------------------------------------------
   6. Note, empty state, CTA
   ------------------------------------------------------------------ */
.wk-note {
    margin: 0 0 1.5rem;
    padding: 0.8rem 1.05rem;
    border-radius: 0.8rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--wk-dim);
    background: rgba(52, 211, 153, 0.06);
    border: 1px dashed rgba(52, 211, 153, 0.3);
}

.wk-note[hidden] { display: none; }
.wk-note i { color: #6ee7b7; margin-right: 0.3rem; }

.wk-note code {
    padding: 0.08rem 0.35rem;
    border-radius: 0.3rem;
    background: rgba(0, 0, 0, 0.4);
    color: #e8e8ea;
}

.wk-empty {
    padding: 3.5rem 1.5rem;
    text-align: center;
    border-radius: 1.15rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.wk-empty[hidden] { display: none; }
.wk-empty-h { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.wk-empty-p { margin: 0; font-size: 0.9rem; color: var(--wk-dim); }

.wk-cta {
    margin-top: 6rem;
    padding-top: 3.5rem;
    border-top: 1px solid var(--wk-line);
}

.wk-cta-h {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f4f1f2;
}

.wk-cta-p { margin: 0 0 1.6rem; font-size: 0.95rem; color: var(--wk-dim); }

.wk-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.wk-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.3rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wk-line);
    transition: color 0.25s var(--wk-ease), background 0.25s var(--wk-ease),
        border-color 0.25s var(--wk-ease), transform 0.25s var(--wk-ease);
}

.wk-btn:hover { color: #fff; transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }

.wk-btn--primary {
    color: #fff;
    background: rgba(var(--wk-c1), 0.9);
    border-color: transparent;
}

.wk-btn--primary:hover { background: rgb(var(--wk-c1)); }

/* ---------------------------------------------------------------------
   7. Entrance — opacity + transform only (both compositor-driven)
   ------------------------------------------------------------------ */
.wk-ready .wk-hero > *,
.wk-ready .wk-disc,
.wk-ready .wk-feat,
.wk-ready .wk-card {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.6s var(--wk-ease) calc(var(--i, 0) * 60ms),
        transform 0.6s var(--wk-ease) calc(var(--i, 0) * 60ms);
}

.wk-ready .wk-hero.is-in > *,
.wk-ready .wk-disciplines.is-in .wk-disc,
.wk-ready .wk-featured.is-in .wk-feat,
.wk-ready .wk-grid.is-in .wk-card {
    opacity: 1;
    transform: translateY(0);
}

/* Outranks the entrance transform above, which would otherwise cancel the
   hover lift declared at lower weight in section 5. */
.wk-ready .wk-grid.is-in a.wk-card:hover {
    transform: translateY(-3px);
}

/* ---------------------------------------------------------------------
   8. Responsive + motion guards
   ------------------------------------------------------------------ */
@media (max-width: 760px) {
    .work-page main { padding: 0 1.1rem 4rem; }
    .wk-hero { padding: 6rem 0 3rem; }
    .wk-disciplines { margin-bottom: 3.5rem; }
    .wk-feat { margin-bottom: 3.5rem; }
    .wk-grid { grid-template-columns: 1fr; }
    .wk-cta { margin-top: 4rem; padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .wk-ready .wk-hero > *,
    .wk-ready .wk-disc,
    .wk-ready .wk-feat,
    .wk-ready .wk-card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
