/**
 * Modern homepage — claymorphism composition matching Jobs United mock.
 * Characters use transparent PNGs (no boxes). Job cards have soft color.
 */

body.jobcv-homepage-modern,
body.jobcv-homepage-modern .site-content {
    background: #f7f6fb;
    overflow-x: hidden;
    overflow-x: clip;
}

body.jobcv-homepage-modern .site-main,
body.jobcv-homepage-modern #content,
body.jobcv-homepage-modern .content-area {
    max-width: none;
    padding: 0;
    background: transparent;
    overflow-x: hidden;
    overflow-x: clip;
}

.modern-home {
    --modern-ink: #22263a;
    --modern-muted: #75798c;
    --modern-violet: #7c6cf0;
    --modern-violet-deep: #6556d8;
    --modern-lilac: #f0eef8;
    --modern-line: rgba(110, 100, 170, .1);
    --modern-soft-shadow: 0 12px 32px -20px rgba(50, 40, 90, .18);
    --modern-radius: 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 2.2vw, 1.5rem) 1.75rem;
    padding-left: max(clamp(1rem, 2.2vw, 1.5rem), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(1rem, 2.2vw, 1.5rem), env(safe-area-inset-right, 0px));
    color: var(--modern-ink);
    /* Keep vertical overflow visible so absolute clay art is never clipped.
       Horizontal bleed is contained by the page body instead. */
    overflow: visible;
}

.modern-home *,
.modern-home *::before,
.modern-home *::after {
    box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────── */
.modern-hero {
    position: relative;
    /* Above the jobs panel so taller clay figures aren't covered at the seam. */
    z-index: 3;
    isolation: isolate;
    overflow: visible;
    min-height: 390px;
    margin: 0 calc(-1 * clamp(1rem, 2.2vw, 1.5rem));
    /* Extra bottom room so clay pedestals are never clipped by the stats row. */
    padding: clamp(2.1rem, 4vw, 3.25rem) clamp(1rem, 8vw, 7.5rem) clamp(2.1rem, 3.4vw, 2.85rem);
    /* Flat soft canvas only — no radial banding that creates rough haze rings. */
    background: linear-gradient(180deg, #faf9fc 0%, #f7f6fb 100%);
}

.modern-hero__glow {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    /* Soft ambient wash only — very low opacity, huge blur. */
    filter: blur(110px);
    pointer-events: none;
    opacity: .12;
    transform: translateZ(0);
}
.modern-hero__glow--left {
    left: -4rem;
    top: 22%;
    width: 22rem;
    height: 22rem;
    background: #d8d2ea;
}
.modern-hero__glow--right {
    right: -4.5rem;
    top: 12%;
    width: 24rem;
    height: 24rem;
    background: #d4cde6;
}

/* Free-floating clay figures — no boxes, no backgrounds */
.modern-home figure.modern-hero__figure,
.modern-home figure.modern-side-card__art {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}
.modern-home figure.modern-hero__figure img,
.modern-home figure.modern-side-card__art img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100%;
}
.modern-hero__figure {
    position: absolute;
    /* Above stats so pedestals are never covered / “cut off”. */
    z-index: 4;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    pointer-events: none;
    user-select: none;
    /* Shared baseline — both pedestals sit on the same line. */
    bottom: 1.15rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modern-hero__figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: bottom center;
    background: none !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    image-rendering: auto;
    /* Soft lift — keep cutouts clean on light and dark canvases. */
    filter:
        saturate(.94)
        drop-shadow(0 14px 20px rgba(70, 55, 120, .1));
    -webkit-user-drag: none;
}
.modern-hero__figure--left,
.modern-hero__figure--right {
    width: clamp(168px, 17vw, 228px);
    bottom: 1.55rem;
}
.modern-hero__figure--left {
    left: clamp(.5rem, 2.5vw, 2.25rem);
}
.modern-hero__figure--right {
    right: clamp(.5rem, 2.5vw, 2.25rem);
    /* Same baseline as briefcase so pedestals align. */
    bottom: 1.55rem;
}

.modern-hero__content {
    position: relative;
    z-index: 3;
    width: min(100%, 680px);
    margin: 0 auto;
    text-align: center;
}

.modern-hero h1 {
    margin: 0 auto .65rem;
    max-width: 17ch;
    color: var(--modern-ink);
    font-size: clamp(1.9rem, 3.3vw, 2.55rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.12;
}

.modern-hero__content > p {
    max-width: 44ch;
    margin: 0 auto;
    color: var(--modern-muted);
    font-size: clamp(.86rem, 1.1vw, .95rem);
    line-height: 1.55;
    font-weight: 500;
}

/* Search — wide pill, perfectly centered */
.modern-search {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr auto;
    align-items: stretch;
    width: min(100%, 700px);
    margin: 1.4rem auto 0;
    padding: .32rem;
    border: 1px solid rgba(120, 110, 160, .07);
    border-radius: 999px;
    background: #fff;
    box-shadow:
        0 18px 40px -28px rgba(50, 40, 90, .28),
        0 2px 10px rgba(50, 40, 90, .035);
}

.modern-search__field {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 .9rem;
    border-right: 1px solid rgba(107, 74, 239, .1);
}
.modern-search__field--category { padding-right: .35rem; }
.modern-search__field svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-right: .5rem;
    color: #9b90c4;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.modern-search input,
.modern-search select {
    width: 100%;
    min-width: 0;
    padding: .7rem 0;
    border: 0;
    outline: 0;
    color: var(--modern-ink);
    background: transparent;
    font: inherit;
    font-size: .78rem;
    font-weight: 500;
}
.modern-search input::placeholder { color: #9b96ad; }
.modern-search select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b90c4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .1rem center;
    cursor: pointer;
}
.modern-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 118px;
    margin-left: .1rem;
    padding: 0 1.2rem;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #8474f0, #6d5ce0);
    box-shadow: 0 10px 20px -12px rgba(100, 85, 190, .55);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease;
}
.modern-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px -10px rgba(83, 56, 209, .8);
}
.modern-search button span { font-size: 1rem; line-height: 1; }

/* Stats — soft open row, aligned under search */
.modern-stat-grid {
    position: relative;
    /* Below clay figures so side pedestals stay fully visible. */
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    width: min(100%, 720px);
    margin: 1.25rem auto 0;
}
.modern-stat {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    padding: .55rem .7rem;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, .62);
}
.modern-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #6b4aef;
    background: rgba(107, 74, 239, .1);
}
.modern-stat__icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.modern-stat dt {
    margin: 0;
    color: var(--modern-ink);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.modern-stat dd {
    margin: .1rem 0 0;
    color: var(--modern-muted);
    font-size: .6rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Dashboard: full-width jobs panel (side cards removed) ─ */
.modern-dashboard,
.modern-dashboard--jobs-only {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    margin-top: 1.25rem;
}

.modern-side-card,
.modern-jobs {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(120, 110, 160, .06);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--modern-soft-shadow);
}

/* Jobs panel above side-card clay bleed so art never steals clicks. */
.modern-jobs {
    z-index: 2;
}
.modern-side-card {
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding: 1.3rem 1.15rem 0;
}
.modern-side-card h2 {
    margin: 0 0 .95rem;
    color: var(--modern-ink);
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
}
.modern-side-card ul {
    display: flex;
    flex-direction: column;
    gap: .72rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.modern-side-card li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    color: #555a72;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.35;
}
.modern-side-card li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    color: #6b4aef;
    background: rgba(107, 74, 239, .12);
    font-size: .58rem;
    font-weight: 800;
}
.modern-side-card__cta {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    margin-top: 1.15rem;
    padding: .8rem .95rem;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #8474f0, #6d5ce0);
    box-shadow: 0 12px 22px -14px rgba(90, 75, 180, .55);
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease;
}
.modern-side-card__cta:hover {
    color: #fff;
    transform: translateY(-1px);
}

/* Art bleeds out of card — no boxed image frame */
.modern-side-card__art {
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% + 1.6rem);
    margin: .85rem -.8rem 0;
    padding: 0;
    border: 0;
    background: none;
    overflow: visible;
    pointer-events: none;
}
.modern-side-card__art img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    background: none !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter:
        saturate(.86)
        brightness(1.03)
        drop-shadow(0 0 1px #ffffff)
        drop-shadow(0 0 1px #ffffff)
        drop-shadow(0 10px 16px rgba(70, 55, 120, .08));
}
.modern-side-card--start {
    background: linear-gradient(180deg, #fff 58%, #f8f7fc 100%);
}
.modern-side-card--start .modern-side-card__art {
    margin-top: auto;
    margin-bottom: -.35rem;
}
.modern-side-card--benefits {
    background: linear-gradient(180deg, #fff 50%, #f8f7fc 100%);
}
.modern-side-card__art--star {
    width: 72%;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: -.2rem;
}

/* Jobs panel */
.modern-jobs {
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.15rem 1rem;
}
.modern-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.modern-section-heading h2 {
    margin: 0;
    color: var(--modern-ink);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.03em;
}
.modern-text-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--modern-violet);
    font-size: .76rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}
.modern-text-link:hover { color: var(--modern-violet-deep); }

/* Top employers — compact logo+name chips (aligned with job cards) */
.modern-employers,
.modern-employers--chips {
    margin: 0 0 1.1rem;
}
.modern-employers .modern-section-heading {
    margin-bottom: .7rem;
}
.modern-employers__scroller,
.modern-employers__panel {
    display: contents;
}
.modern-employers__panel::before,
.modern-employers__track::before {
    content: none;
    display: none;
}
.modern-employers__track {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.modern-employer-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: .45rem .8rem .45rem .45rem;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 18px -16px rgba(15, 23, 42, .28);
    color: #0f172a;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.modern-employer-chip:hover {
    border-color: rgba(99, 102, 241, .35);
    box-shadow: 0 2px 8px rgba(99, 102, 241, .12), 0 10px 22px -16px rgba(15, 23, 42, .3);
    transform: translateY(-1px);
    color: #0f172a;
}
.modern-employer-chip__logo {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.modern-employer-chip__logo .jobcv-avatar,
.modern-employer-chip__logo .modern-employer-chip__avatar,
.modern-employer-chip__logo img,
.modern-employer-chip__logo > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
    background: transparent;
}
.modern-employer-chip__name {
    min-width: 0;
    max-width: 11.5rem;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modern-job-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: .7rem;
    flex: 1 1 auto;
}

/* Featured-jobs carousel — continuous smooth loop + prev/next */
.modern-job-carousel {
    position: relative;
    margin: 0 -.15rem;
    padding: 0 2.6rem;
}
.modern-job-carousel__viewport {
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.modern-job-carousel__track {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    width: max-content;
    padding: .15rem 0 .35rem;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}
.modern-job-carousel.is-static {
    padding: 0;
}
.modern-job-carousel.is-static .modern-job-carousel__track {
    flex-wrap: wrap;
    width: 100%;
    will-change: auto;
    transform: none !important;
}
.modern-job-carousel.is-static .modern-job-carousel__viewport {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
}
.modern-job-carousel .modern-job-card {
    position: relative;
    flex: 0 0 clamp(230px, 24vw, 280px);
    align-self: stretch;
    width: clamp(230px, 24vw, 280px);
    height: auto;
    min-height: 0;
}
.modern-job-carousel__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #4f46e5;
    box-shadow: 0 10px 24px -16px rgba(15, 23, 42, .45);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.modern-job-carousel__nav--prev { left: 0; }
.modern-job-carousel__nav--next { right: 0; }
.modern-job-carousel__nav svg { display: block; }
.modern-job-carousel__nav:hover {
    background: #fff;
    border-color: #c7d2fe;
    color: #4338ca;
    box-shadow: 0 14px 28px -14px rgba(99, 102, 241, .35);
}
.modern-job-carousel__nav:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
html[data-color-scheme="dark"] .modern-job-carousel__nav {
    background: rgba(30, 27, 46, .96);
    border-color: rgba(167, 139, 250, .28);
    color: #c4b5fd;
    box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .7);
}
html[data-color-scheme="dark"] .modern-job-carousel__nav:hover {
    background: rgba(40, 35, 62, .98);
    border-color: rgba(167, 139, 250, .45);
    color: #ddd6fe;
}
@media (prefers-reduced-motion: reduce) {
    .modern-job-carousel:not(.is-static) .modern-job-carousel__viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .modern-job-carousel:not(.is-static) .modern-job-carousel__track {
        will-change: auto;
        transform: none !important;
    }
    .modern-job-carousel:not(.is-static) .modern-job-carousel__track .modern-job-card[data-carousel-clone] {
        display: none;
    }
    .modern-job-carousel:not(.is-static) .modern-job-card {
        scroll-snap-align: start;
    }
}

/* Job cards — richer detail layout with standout salary */
.modern-job-card {
    --card-tint: #f5f3fa;
    --card-accent: #7c6cf0;
    --chip-bg: rgba(124, 108, 240, .1);
    --chip-fg: #6a5bd4;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    /* Equal-height rows (grid + carousel) so posted dates share one baseline. */
    align-self: stretch;
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
    padding: .95rem;
    overflow: hidden;
    border: 1px solid rgba(120, 110, 160, .08);
    border-radius: 20px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, .78), transparent 48%),
        var(--card-tint);
    box-shadow: 0 10px 26px -20px rgba(50, 40, 90, .2);
    transition: transform .18s ease, box-shadow .18s ease;
}
.modern-job-card .jobcv-found-ribbon {
    z-index: 7;
    pointer-events: none;
}
.modern-job-card .jobcv-found-ribbon-card span {
    font-size: clamp(.78rem, 1.5vw, 1.05rem);
    padding: .42rem .55rem;
    letter-spacing: .1em;
}
.modern-job-card.is-employee-found {
    cursor: default;
}
.modern-job-card.is-employee-found .modern-job-card__heart {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
.modern-job-card.is-employee-found .modern-job-card__go.is-disabled {
    pointer-events: none;
    cursor: not-allowed;
}
/* Title stretch-link covers body; leave posted date + footer free. */
.modern-job-card h3 a::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 5.1rem;
    z-index: 1;
    border-radius: inherit;
}
.modern-job-card.is-employee-found h3 a::after {
    content: none;
    display: none;
}
.modern-job-card footer {
    position: relative;
    z-index: 5;
    pointer-events: auto;
}
.modern-section-heading--latest {
    margin-top: 1.35rem;
}
.modern-job-card:nth-child(4n + 1),
.modern-job-card--tone-1 {
    --card-tint: #f3f1f9;
    --card-accent: #7c6cf0;
    --chip-bg: rgba(124, 108, 240, .1);
    --chip-fg: #6a5bd4;
}
.modern-job-card:nth-child(4n + 2),
.modern-job-card--tone-2 {
    --card-tint: #f1f5fa;
    --card-accent: #6b8fbf;
    --chip-bg: rgba(107, 143, 191, .12);
    --chip-fg: #5a7aa6;
}
.modern-job-card:nth-child(4n + 3),
.modern-job-card--tone-3 {
    --card-tint: #faf2f6;
    --card-accent: #c47a9a;
    --chip-bg: rgba(196, 122, 154, .12);
    --chip-fg: #a86684;
}
.modern-job-card:nth-child(4n + 4),
.modern-job-card--tone-4 {
    --card-tint: #f1f7f4;
    --card-accent: #6aab90;
    --chip-bg: rgba(106, 171, 144, .12);
    --chip-fg: #56967c;
}
@media (hover: hover) and (pointer: fine) {
    .modern-job-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 30px -20px rgba(50, 40, 90, .25);
    }
}

.modern-job-card__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: -.1rem 0 0;
}
.modern-job-card__new {
    display: inline-flex;
    align-items: center;
    padding: .16rem .45rem;
    border-radius: 999px;
    color: #1f7a4d;
    background: rgba(34, 197, 94, .14);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.modern-job-card__identity {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    min-width: 0;
}
.modern-job-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--card-accent), #b098ff);
    font-size: .75rem;
    font-weight: 800;
    box-shadow: 0 6px 14px -8px rgba(62, 40, 140, .45);
}
.modern-job-card__logo .jobcv-avatar,
.modern-job-card__logo .job-card-company-logo {
    /* Size comes from PHP inline (40px on modern cards). Strip chrome only. */
    border-radius: 50% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
}
.modern-job-card__logo img,
.modern-job-card__logo .jobcv-avatar img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    background: transparent !important;
    border: 0;
}
.modern-job-card__identity-text {
    min-width: 0;
    flex: 1 1 auto;
}
.modern-job-card__company {
    margin: 0 0 .18rem;
    overflow: hidden;
    color: var(--modern-muted);
    font-size: .68rem;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modern-job-card h3 {
    margin: 0;
    color: var(--modern-ink);
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}
.modern-job-card h3 a {
    color: inherit;
    text-decoration: none;
}
.modern-job-card__category {
    margin: .28rem 0 0;
    overflow: hidden;
    color: var(--chip-fg, #6a5bd4);
    font-size: .68rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modern-job-card__location,
.modern-job-card__posted {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin: 0;
    min-width: 0;
    color: #6a6f86;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.25;
}
.modern-job-card__location > span:not(.modern-job-card__icon),
.modern-job-card__posted > span:not(.modern-job-card__icon) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* CSS-mask icons (not inline SVG) — avoids mobile WebKit painting solid black path fills. */
.modern-job-card__location .modern-job-card__icon,
.modern-job-card__posted .modern-job-card__icon,
span.modern-job-card__icon {
    display: inline-block !important;
    flex: 0 0 14px !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    background-color: currentColor !important;
    background-image: none !important;
    opacity: .85;
    overflow: hidden;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.modern-job-card__icon--pin {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-5.7 7-11a7 7 0 1 0-14 0c0 5.3 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-5.7 7-11a7 7 0 1 0-14 0c0 5.3 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}
.modern-job-card__icon--clock {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
.modern-job-card__tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: .28rem;
    min-width: 0;
    pointer-events: none;
}
.modern-chip {
    display: inline-flex;
    max-width: 100%;
    padding: .24rem .5rem;
    overflow: hidden;
    border-radius: 999px;
    color: #4b5568;
    background: rgba(107, 114, 128, .1);
    font-size: .58rem;
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modern-job-card__salary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .28rem .4rem;
    margin-top: .1rem;
    padding: .55rem .7rem;
    border: 1px solid rgba(124, 108, 240, .16);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 108, 240, .12), rgba(124, 108, 240, .05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
.modern-job-card__salary-value {
    color: #5b45d6;
    font-size: .92rem;
    font-weight: 850;
    letter-spacing: -.02em;
    line-height: 1.15;
    word-break: break-word;
}
.modern-job-card__salary-period {
    color: #6d63a8;
    font-size: .62rem;
    font-weight: 700;
    white-space: nowrap;
}
/* Posted date + actions always share one bottom block across a row. */
.modern-job-card__bottom {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-top: auto;
    padding-top: .45rem;
    width: 100%;
    flex: 0 0 auto;
}
.modern-job-card__posted {
    position: relative;
    z-index: 2;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 1.2em;
}
.modern-job-card footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    margin: 0 !important;
    padding: 0 !important;
}
.modern-job-card__heart.job-like-btn,
.modern-job-card__heart {
    position: relative;
    z-index: 6;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: center !important;
    flex: 0 0 36px !important;
    box-sizing: border-box !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    cursor: pointer;
    border-radius: 50% !important;
    color: var(--card-accent);
    background: rgba(255, 255, 255, .92) !important;
    line-height: 0 !important;
    overflow: hidden !important;
    transition: transform .15s ease, background .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.modern-job-card__heart.job-like-btn::before,
.modern-job-card__heart.job-like-btn::after {
    /* Keep like animation particles from painting solid blobs on small cards. */
    width: .7rem !important;
    height: .7rem !important;
}
.modern-job-card__heart svg {
    display: block;
    width: 16px;
    height: 16px;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
}
.modern-job-card__heart:hover {
    color: #e11d48;
    background: #fff;
    transform: scale(1.05);
}
.modern-job-card__heart.is-liked,
.modern-job-card__heart.liked {
    color: #ef4444;
    background: #fef2f2;
}
.modern-job-card__heart.is-liked svg,
.modern-job-card__heart.liked svg {
    fill: currentColor;
}
.modern-job-card__go {
    position: relative;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    padding: 0 .85rem;
    border-radius: 11px;
    color: #fff !important;
    background: linear-gradient(135deg, #7558ec, #5d40d9);
    box-shadow: 0 8px 16px -12px rgba(80, 55, 200, .75);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}
.modern-job-card__go:hover {
    filter: brightness(1.04);
    color: #fff !important;
}
.modern-job-card__go.is-disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.modern-empty-jobs {
    padding: 2.5rem 1rem;
    border: 1px dashed var(--modern-line);
    border-radius: 16px;
    text-align: center;
}

.modern-job-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1rem;
    color: #6d6685;
    font-size: .72rem;
    font-weight: 650;
}
.modern-job-pages a,
.modern-job-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}
.modern-job-pages a:hover { color: var(--modern-violet); }
.modern-job-pages .is-current {
    color: #fff;
    background: var(--modern-violet);
    font-weight: 800;
}

/* Bottom CTA */
.modern-bottom-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.15rem 0 0;
    padding: 1.05rem 1.4rem;
    border: 1px solid rgba(120, 110, 160, .06);
    border-radius: 22px;
    background: linear-gradient(105deg, #f1eff8, #f8f7fc);
    box-shadow: var(--modern-soft-shadow);
}
.modern-bottom-cta div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.modern-bottom-cta strong {
    color: var(--modern-ink);
    font-size: .92rem;
    font-weight: 800;
}
.modern-bottom-cta div span {
    color: var(--modern-muted);
    font-size: .72rem;
    font-weight: 500;
}
.modern-bottom-cta > a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 0 0 auto;
    padding: .75rem 1.1rem;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #8474f0, #6d5ce0);
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 18px -14px rgba(90, 75, 180, .5);
}
.modern-bottom-cta > a:hover { color: #fff; }

/* ── Dark mode (matches claymorphism dark mock) ───────── */
html[data-color-scheme="dark"] body.jobcv-homepage-modern,
html[data-color-scheme="dark"] body.jobcv-homepage-modern .site-content,
html[data-color-scheme="dark"] body.jobcv-homepage-modern #main-content,
html[data-color-scheme="dark"] body.jobcv-homepage-modern .content-area {
    background: #0c0a14 !important;
}

html[data-color-scheme="dark"] .modern-home {
    --modern-ink: #f4f1ff;
    --modern-muted: #a9a3c0;
    --modern-violet: #a78bfa;
    --modern-violet-deep: #c4b5fd;
    --modern-lilac: #1a1530;
    --modern-line: rgba(167, 139, 250, .16);
    --modern-soft-shadow: 0 18px 40px -22px rgba(0, 0, 0, .65), 0 0 0 1px rgba(167, 139, 250, .04);
}

html[data-color-scheme="dark"] .modern-hero {
    /* Flat dark canvas — no haze orbs in dark mode (they read as rough glow). */
    background: linear-gradient(180deg, #12101c 0%, #0c0a14 100%);
}
html[data-color-scheme="dark"] .modern-hero__glow {
    display: none !important;
}
html[data-color-scheme="dark"] .modern-hero h1 { color: #f7f4ff; }
html[data-color-scheme="dark"] .modern-hero__content > p { color: #a9a3c0; }

.modern-clay-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

html[data-color-scheme="dark"] .modern-hero__figure img {
    /* Soft dark blend — keep satin clay finish (same feel as briefcase). */
    filter:
        url(#jobcv-clay-deflinge)
        saturate(.95)
        brightness(1.04)
        contrast(1.0)
        drop-shadow(0 0 1px #0c0a14)
        drop-shadow(0 14px 22px rgba(0, 0, 0, .36))
        drop-shadow(0 0 16px rgba(124, 92, 191, .10));
}
html[data-color-scheme="dark"] .modern-side-card__art img {
    filter:
        url(#jobcv-clay-deflinge)
        saturate(.92)
        brightness(1.03)
        contrast(1.04)
        drop-shadow(0 0 .8px #151225)
        drop-shadow(0 0 1.6px #151225)
        drop-shadow(0 10px 14px rgba(0, 0, 0, .28));
}

html[data-color-scheme="dark"] .modern-search {
    border-color: rgba(167, 139, 250, .18);
    background: #171327;
    box-shadow:
        0 18px 40px -26px rgba(0, 0, 0, .7),
        inset 0 1px 0 rgba(255, 255, 255, .04);
}
html[data-color-scheme="dark"] .modern-search__field {
    border-right-color: rgba(167, 139, 250, .14);
}
html[data-color-scheme="dark"] .modern-search__field svg { color: #9b8fd0; }
html[data-color-scheme="dark"] .modern-search input,
html[data-color-scheme="dark"] .modern-search select {
    color: #f4f1ff;
}
html[data-color-scheme="dark"] .modern-search input::placeholder { color: #7e7798; }
html[data-color-scheme="dark"] .modern-search select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b8fd0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
html[data-color-scheme="dark"] .modern-search select option {
    color: #f4f1ff;
    background: #171327;
}
html[data-color-scheme="dark"] .modern-search button {
    background: linear-gradient(135deg, #9b7ef5, #6d4de0);
    box-shadow: 0 12px 24px -12px rgba(124, 92, 246, .75);
}

html[data-color-scheme="dark"] .modern-stat {
    background: rgba(28, 22, 50, .72);
    border: 1px solid rgba(167, 139, 250, .1);
    box-shadow: none;
}
html[data-color-scheme="dark"] .modern-stat__icon {
    color: #b5a0ff;
    background: rgba(167, 139, 250, .14);
}
html[data-color-scheme="dark"] .modern-stat dt { color: #f4f1ff; }
html[data-color-scheme="dark"] .modern-stat dd { color: #9b94b4; }

html[data-color-scheme="dark"] .modern-jobs,
html[data-color-scheme="dark"] .modern-side-card {
    border-color: rgba(167, 139, 250, .14);
    background: #151225;
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6);
}
html[data-color-scheme="dark"] .modern-side-card--start,
html[data-color-scheme="dark"] .modern-side-card--benefits {
    background: linear-gradient(180deg, #17132a 46%, #12101f 100%);
}
html[data-color-scheme="dark"] .modern-side-card h2,
html[data-color-scheme="dark"] .modern-section-heading h2 {
    color: #f4f1ff;
}
html[data-color-scheme="dark"] .modern-side-card li { color: #b3acc8; }
html[data-color-scheme="dark"] .modern-side-card li > span {
    color: #b5a0ff;
    background: rgba(167, 139, 250, .16);
}
html[data-color-scheme="dark"] .modern-side-card__cta {
    background: linear-gradient(135deg, #9b7ef5, #6d4de0);
    box-shadow: 0 12px 24px -12px rgba(124, 92, 246, .7);
}
html[data-color-scheme="dark"] .modern-text-link { color: #b5a0ff; }
html[data-color-scheme="dark"] .modern-text-link:hover { color: #d4c8ff; }

html[data-color-scheme="dark"] .modern-employers__panel {
    border: 0;
    background: transparent;
    box-shadow: none;
}
html[data-color-scheme="dark"] .modern-employers__panel::before {
    content: none;
    display: none;
}
html[data-color-scheme="dark"] .modern-employers__track::before {
    content: none;
    display: none;
}
html[data-color-scheme="dark"] .modern-employer-chip {
    background: #151e32;
    border-color: rgba(167, 139, 250, .16);
    color: #e2e8f0;
}
html[data-color-scheme="dark"] .modern-employer-chip__logo {
    background: #0f1629;
    border-color: rgba(167, 139, 250, .2);
}
html[data-color-scheme="dark"] .modern-employer-chip__name {
    color: #e2e8f0;
}

/* Dark job cards — deep tinted panels matching mock */
html[data-color-scheme="dark"] .modern-job-card {
    border-color: rgba(167, 139, 250, .1);
    background:
        linear-gradient(165deg, rgba(255, 255, 255, .04), transparent 46%),
        var(--card-tint);
    box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .55);
}
html[data-color-scheme="dark"] .modern-job-card:nth-child(4n + 1),
html[data-color-scheme="dark"] .modern-job-card--tone-1 {
    --card-tint: #2a2150;
    --card-accent: #b5a0ff;
    --chip-bg: rgba(181, 160, 255, .16);
    --chip-fg: #d4c8ff;
}
html[data-color-scheme="dark"] .modern-job-card:nth-child(4n + 2),
html[data-color-scheme="dark"] .modern-job-card--tone-2 {
    --card-tint: #1c2a42;
    --card-accent: #8eb4e0;
    --chip-bg: rgba(142, 180, 224, .16);
    --chip-fg: #c2daf2;
}
html[data-color-scheme="dark"] .modern-job-card:nth-child(4n + 3),
html[data-color-scheme="dark"] .modern-job-card--tone-3 {
    --card-tint: #342030;
    --card-accent: #d4a0b8;
    --chip-bg: rgba(212, 160, 184, .16);
    --chip-fg: #ecc4d4;
}
html[data-color-scheme="dark"] .modern-job-card:nth-child(4n + 4),
html[data-color-scheme="dark"] .modern-job-card--tone-4 {
    --card-tint: #1c302a;
    --card-accent: #8fc4ae;
    --chip-bg: rgba(143, 196, 174, .16);
    --chip-fg: #c2e0d2;
}
html[data-color-scheme="dark"] .modern-job-card h3,
html[data-color-scheme="dark"] .modern-job-card h3 a { color: #f4f1ff; }
html[data-color-scheme="dark"] .modern-job-card__company,
html[data-color-scheme="dark"] .modern-job-card__location,
html[data-color-scheme="dark"] .modern-job-card__posted { color: #a9a3c0; }
html[data-color-scheme="dark"] .modern-job-card__category { color: #c4b5fd; }
html[data-color-scheme="dark"] .modern-job-card__logo {
    background: linear-gradient(145deg, #8b6ff0, #c4b5fd);
    box-shadow: 0 8px 16px -10px rgba(124, 92, 246, .55);
}
html[data-color-scheme="dark"] .modern-chip {
    color: #d1d5db;
    background: rgba(255, 255, 255, .08);
}
html[data-color-scheme="dark"] .modern-job-card__salary {
    border-color: rgba(181, 160, 255, .22);
    background: linear-gradient(135deg, rgba(181, 160, 255, .2), rgba(181, 160, 255, .08));
    box-shadow: none;
}
html[data-color-scheme="dark"] .modern-job-card__salary-value { color: #d4c8ff; }
html[data-color-scheme="dark"] .modern-job-card__salary-period { color: #b5a0ff; }
html[data-color-scheme="dark"] .modern-job-card__new {
    color: #86efac;
    background: rgba(34, 197, 94, .18);
}
html[data-color-scheme="dark"] .modern-job-card__location,
html[data-color-scheme="dark"] .modern-job-card__posted {
    color: #a9a3c0;
}
html[data-color-scheme="dark"] .modern-job-card__icon {
    color: #a9a3c0;
}
html[data-color-scheme="dark"] .modern-job-card__heart.job-like-btn,
html[data-color-scheme="dark"] .modern-job-card__heart {
    color: var(--card-accent);
    background: rgba(255, 255, 255, .1) !important;
}
html[data-color-scheme="dark"] .modern-job-card__heart:hover {
    color: #fb7185;
    background: rgba(255, 255, 255, .16) !important;
}
html[data-color-scheme="dark"] .modern-job-card__go {
    background: linear-gradient(135deg, #9b7ef5, #6d4de0);
}
@media (hover: hover) and (pointer: fine) {
    html[data-color-scheme="dark"] .modern-job-card:hover {
        box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(167, 139, 250, .12);
    }
}

html[data-color-scheme="dark"] .modern-job-pages { color: #8e87a8; }
html[data-color-scheme="dark"] .modern-job-pages a:hover { color: #c4b5fd; }
html[data-color-scheme="dark"] .modern-job-pages .is-current {
    color: #fff;
    background: #8b5cf6;
    box-shadow: 0 6px 14px -8px rgba(139, 92, 246, .7);
}

html[data-color-scheme="dark"] .modern-empty-jobs {
    border-color: rgba(167, 139, 250, .18);
    color: #a9a3c0;
}

html[data-color-scheme="dark"] .modern-bottom-cta {
    border-color: rgba(167, 139, 250, .14);
    background: linear-gradient(105deg, #221a40, #141122);
    box-shadow: 0 14px 32px -20px rgba(0, 0, 0, .55);
}
html[data-color-scheme="dark"] .modern-bottom-cta strong { color: #f4f1ff; }
html[data-color-scheme="dark"] .modern-bottom-cta div span { color: #a9a3c0; }
html[data-color-scheme="dark"] .modern-bottom-cta > a {
    background: linear-gradient(135deg, #9b7ef5, #6d4de0);
    box-shadow: 0 12px 22px -12px rgba(124, 92, 246, .65);
}

@media (max-width: 720px) {
    html[data-color-scheme="dark"] .modern-search {
        border: 1px solid rgba(167, 139, 250, .18) !important;
        background: rgba(18, 14, 32, .78) !important;
        -webkit-backdrop-filter: blur(14px) saturate(1.1);
        backdrop-filter: blur(14px) saturate(1.1);
        box-shadow:
            0 16px 32px -24px rgba(0, 0, 0, .7),
            inset 0 1px 0 rgba(255, 255, 255, .05) !important;
    }
    html[data-color-scheme="dark"] .modern-search__field {
        border: 0 !important;
        border-bottom: 0 !important;
        background: rgba(28, 22, 50, .96) !important;
        box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .14) !important;
    }
    html[data-color-scheme="dark"] .modern-search input,
    html[data-color-scheme="dark"] .modern-search select {
        color: #f4f1ff !important;
    }
    html[data-color-scheme="dark"] .modern-search input::placeholder {
        color: #7e7798 !important;
    }
}

/* Responsive — tablet / laptop */
@media (max-width: 1100px) {
    .modern-dashboard,
    .modern-dashboard--jobs-only {
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
    }
    .modern-job-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .modern-job-carousel .modern-job-card {
        flex-basis: 230px;
        width: 230px;
    }
    .modern-hero__figure--left,
    .modern-hero__figure--right { width: clamp(128px, 14.5vw, 180px); }
}

/* Tablet portrait / small laptop */
@media (max-width: 920px) {
    .modern-hero {
        min-height: 0;
        padding-left: clamp(1rem, 4vw, 2.5rem);
        padding-right: clamp(1rem, 4vw, 2.5rem);
    }
    .modern-hero__figure--left,
    .modern-hero__figure--right {
        bottom: 1.25rem;
        opacity: .94;
        width: 124px;
    }
    .modern-hero__figure--left {
        left: .35rem;
    }
    .modern-hero__figure--right {
        right: .35rem;
        bottom: 1.25rem;
    }
    .modern-hero__content { width: min(100%, 560px); }
    .modern-search {
        grid-template-columns: 1.2fr 1fr auto;
        width: min(100%, 620px);
    }
    .modern-search__field--category { display: none; }
    .modern-dashboard,
    .modern-dashboard--jobs-only {
        grid-template-columns: minmax(0, 1fr);
        gap: .9rem;
    }
    .modern-jobs {
        grid-column: auto;
        order: 0;
    }
    .modern-job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modern-job-carousel .modern-job-card {
        flex-basis: 220px;
        width: 220px;
        min-height: 0;
    }

    .modern-home .modern-employers__track {
        gap: .5rem !important;
    }
}

/* Phones + large phones */
@media (max-width: 720px) {
    .modern-home {
        padding: 0 .85rem 1.5rem;
        padding-left: max(.85rem, env(safe-area-inset-left, 0px));
        padding-right: max(.85rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
    }
    .modern-hero {
        min-height: 0;
        margin: 0 calc(-1 * max(.85rem, env(safe-area-inset-left, 0px)));
        margin-right: calc(-1 * max(.85rem, env(safe-area-inset-right, 0px)));
        padding: 1.35rem .95rem 1.15rem;
        overflow: hidden;
        border-radius: 0 0 22px 22px;
    }
    .modern-hero__glow { opacity: .08; }
    .modern-hero__figure { display: none; }
    .modern-hero h1 {
        max-width: 18ch;
        font-size: clamp(1.5rem, 6.8vw, 1.85rem);
        letter-spacing: -.035em;
        line-height: 1.15;
    }
    .modern-hero__content > p {
        font-size: .86rem;
        max-width: 36ch;
        line-height: 1.5;
        margin-left: auto;
        margin-right: auto;
    }

    /* Stacked search — soft fields that blend with the hero, not a hard white slab */
    .modern-search {
        grid-template-columns: 1fr;
        gap: .4rem;
        width: 100%;
        margin-top: 1.15rem;
        padding: .5rem;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 22px;
        background: rgba(255, 255, 255, .55);
        -webkit-backdrop-filter: blur(14px) saturate(1.05);
        backdrop-filter: blur(14px) saturate(1.05);
        box-shadow:
            0 16px 32px -26px rgba(50, 40, 90, .28),
            inset 0 1px 0 rgba(255, 255, 255, .75);
    }
    .modern-search__field {
        border-right: 0;
        border-bottom: 0;
        border-radius: 14px;
        background: rgba(255, 255, 255, .88);
        box-shadow: inset 0 0 0 1px rgba(120, 110, 160, .06);
        padding: .15rem 1rem;
        min-height: 48px;
    }
    .modern-search__field--location { display: flex; }
    .modern-search__field--category { display: flex; }
    .modern-search__field:last-of-type { border-bottom: 0; }
    .modern-search input,
    .modern-search select {
        font-size: 16px;
        padding: .85rem 0;
        background: transparent;
    }
    .modern-search button {
        width: 100%;
        min-height: 48px;
        min-width: 0;
        margin: .1rem 0 0;
        border-radius: 14px;
        font-size: .9rem;
    }

    .modern-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
        width: 100%;
        margin-top: 1.05rem;
    }
    .modern-stat {
        padding: .7rem .7rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, .82);
    }
    .modern-stat dt { font-size: 1rem; }
    .modern-stat dd {
        white-space: normal;
        font-size: .62rem;
        line-height: 1.3;
    }

    .modern-dashboard {
        grid-template-columns: 1fr;
        gap: .75rem;
        margin-top: .95rem;
    }
    .modern-jobs {
        grid-column: auto;
        order: -1; /* Featured jobs first on mobile */
        padding: .9rem .8rem .85rem;
        border-radius: 18px;
    }
    .modern-section-heading {
        flex-wrap: nowrap;
        align-items: baseline;
        gap: .4rem .65rem;
        margin-bottom: .7rem;
    }
    .modern-section-heading h2 {
        font-size: .98rem;
        flex: 1 1 auto;
        min-width: 0;
    }
    .modern-section-heading--latest {
        margin-top: 1.05rem;
    }
    .modern-text-link { font-size: .72rem; }

    .modern-employers {
        margin-bottom: 1rem;
    }
    .modern-home .modern-employers__track {
        gap: .45rem !important;
    }
    .modern-home .modern-employer-chip {
        flex: 1 1 calc(50% - .45rem);
        max-width: calc(50% - .23rem);
        padding: .4rem .7rem .4rem .4rem;
        border-radius: 12px;
    }
    .modern-home .modern-employer-chip__name {
        max-width: none;
        font-size: .78rem;
    }

    .modern-side-card {
        padding: 1rem .95rem 0;
        border-radius: 18px;
    }
    .modern-side-card h2 { font-size: .95rem; margin-bottom: .7rem; }
    .modern-side-card li { font-size: .78rem; }
    .modern-side-card--benefits { display: flex; }
    .modern-side-card--benefits .modern-side-card__art { display: none; }
    .modern-side-card__art {
        width: min(58%, 160px);
        margin-left: auto;
        margin-right: auto;
        margin-top: .55rem;
    }
    .modern-side-card__cta {
        min-height: 46px;
        justify-content: center;
        text-align: center;
        font-size: .8rem;
        border-radius: 12px;
    }

    .modern-job-grid {
        grid-template-columns: 1fr;
        gap: .65rem;
    }
    .modern-job-carousel {
        margin: 0;
        padding: 0 2.35rem;
    }
    .modern-job-carousel__nav {
        width: 36px;
        height: 36px;
    }
    .modern-job-carousel__viewport {
        mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
    }
    .modern-job-carousel__track {
        gap: .6rem;
    }
    .modern-job-carousel .modern-job-card {
        flex: 0 0 min(82vw, 280px);
        align-self: stretch;
        width: min(82vw, 280px);
        height: auto;
    }
    .modern-job-carousel.is-static .modern-job-carousel__track {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: .65rem;
    }
    .modern-job-carousel.is-static .modern-job-card {
        width: 100%;
        flex: none;
    }

    /*
     * Mobile cards: same composition as desktop (identity → meta → chips →
     * salary → posted → footer). Avatar is rendered at 40px in PHP so the
     * logo slot no longer fights inline 56px !important.
     */
    .modern-job-card {
        gap: .38rem;
        min-height: 0 !important;
        padding: .9rem .9rem .8rem;
        border-radius: 18px;
        overflow: hidden;
    }
    .modern-job-card .jobcv-found-ribbon {
        z-index: 7;
    }
    .modern-job-card .jobcv-found-ribbon-card span {
        font-size: .7rem;
        padding: .3rem .42rem;
        letter-spacing: .08em;
    }
    .modern-job-card__identity {
        align-items: center;
        gap: .6rem;
    }
    .modern-job-card__logo {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
    }
    .modern-job-card__company {
        margin: 0 0 .12rem;
        font-size: .66rem;
    }
    .modern-job-card h3 {
        font-size: .9rem;
        line-height: 1.28;
        -webkit-line-clamp: 2;
    }
    .modern-job-card__location,
    .modern-job-card__posted {
        gap: .28rem;
        font-size: .66rem;
    }
    .modern-job-card__icon {
        flex-basis: 13px;
        width: 13px;
        height: 13px;
    }
    .modern-job-card__tags {
        gap: .25rem;
    }
    .modern-chip {
        padding: .22rem .48rem;
        font-size: .56rem;
    }
    .modern-job-card__salary {
        display: flex;
        flex-wrap: nowrap;
        align-items: baseline;
        gap: .25rem .35rem;
        margin-top: .05rem;
        padding: .48rem .65rem;
        border-radius: 12px;
    }
    .modern-job-card__salary-value {
        font-size: .88rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .modern-job-card__salary-period {
        flex: 0 0 auto;
        font-size: .6rem;
    }
    .modern-job-card__bottom {
        margin-top: auto;
        padding-top: .35rem;
        gap: .4rem;
    }
    .modern-job-card__posted {
        margin: 0 !important;
        padding: 0 !important;
    }
    .modern-job-card footer {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: .5rem;
        margin: 0 !important;
        padding: 0 !important;
    }
    .modern-job-card h3 a::after {
        bottom: 4.85rem;
    }
    /* Beat global .job-like-btn { width/height: 44px } from style.css */
    .modern-job-card__heart.job-like-btn,
    .modern-job-card__heart {
        flex: 0 0 36px !important;
        align-self: center !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        aspect-ratio: 1 / 1 !important;
        border: 0 !important;
        border-radius: 50% !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, .92) !important;
        overflow: hidden !important;
    }
    .modern-job-card__heart svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 auto;
    }
    .modern-job-card__go {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        height: 36px;
        min-height: 36px;
        padding: 0 .8rem;
        border-radius: 11px;
        font-size: .78rem;
        white-space: nowrap;
    }
    .modern-job-pages {
        display: none; /* Decorative desktop pagination — hide on phones */
    }

    .modern-bottom-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: .9rem;
        padding: 1.2rem 1.05rem;
        border-radius: 20px;
        margin-top: 1rem;
    }
    .modern-bottom-cta strong { font-size: 1rem; }
    .modern-bottom-cta div span { font-size: .78rem; }
    .modern-bottom-cta > a {
        justify-content: center;
        min-height: 50px;
        font-size: .86rem;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .modern-hero h1 { font-size: 1.45rem; letter-spacing: -.03em; }
    .modern-stat-grid { gap: .4rem; }
    .modern-stat__icon { width: 28px; height: 28px; }
    .modern-job-carousel .modern-job-card {
        flex-basis: min(84vw, 240px);
        width: min(84vw, 240px);
    }
}

/* Short landscape phones — keep hero compact, hide clay */
@media (max-height: 480px) and (orientation: landscape) {
    .modern-hero {
        min-height: 0;
        padding-top: 1.1rem;
        padding-bottom: .75rem;
    }
    .modern-hero__figure { display: none; }
    .modern-stat-grid { display: none; }
    .modern-search { margin-top: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
    .modern-search button,
    .modern-job-card,
    .modern-side-card__cta,
    .modern-hero__figure--left,
    .modern-hero__figure--right {
        animation: none !important;
        transition: none !important;
    }
}
