body {
    --primary-color: #d63241;
    --primary-light: rgba(214, 50, 65, 0.1);
    --primary-medium: rgba(214, 50, 65, 0.2);
    --primary-dark: #b02635;
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(214, 50, 65, 0.15);
    --icon-bg: rgba(214, 50, 65, 0.12);
    --shadow-color: rgba(214, 50, 65, 0.08);
}

body.b {
    --bg-color: #1c2136s;
    --text-primary: #ffffff;
    --text-secondary: #a4a4a4;
    --card-bg: #1c2136;
    --card-border: rgba(214, 50, 65, 0.25);
    --icon-bg: rgba(214, 50, 65, 0.15);
    --shadow-color: rgba(214, 50, 65, 0.12);
}

/* ── Section ────────────────────────────────────────────── */
.jobs-section {
    background: var(--bg-color);
    min-height: 100vh;
    padding: 96px 0 80px;
    font-family: "DM Sans", sans-serif;
    position: relative;
    overflow: hidden;
}

/* Ambient blob — uses portfolio primary-light */
.jobs-section::before {
    content: "";
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        var(--primary-light) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.jobs-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        var(--primary-light) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ──────────────────────────────────────────── */
.jobs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ── Header ─────────────────────────────────────────────── */
.jobs-header {
    text-align: center;
    margin-bottom: 64px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jobs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px solid var(--primary-medium);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.jobs-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.jobs-title {
    font-family: Outfit, sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
}

.jobs-title span {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.jobs-title span::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: expandWidth 0.8s 0.4s ease-out forwards;
}

@keyframes expandWidth {
    to {
        width: 100%;
    }
}

.jobs-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Count strip ────────────────────────────────────────── */
.jobs-count-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 0 2px;
}

.jobs-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.jobs-count strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Grid ───────────────────────────────────────────────── */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* ── Job Card ───────────────────────────────────────────── */
.job-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    opacity: 0;
    animation: card-in 0.55s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Staggered entrance */
.job-card:nth-child(1) {
    animation-delay: 0.05s;
}
.job-card:nth-child(2) {
    animation-delay: 0.12s;
}
.job-card:nth-child(3) {
    animation-delay: 0.19s;
}
.job-card:nth-child(4) {
    animation-delay: 0.26s;
}
.job-card:nth-child(5) {
    animation-delay: 0.33s;
}
.job-card:nth-child(6) {
    animation-delay: 0.4s;
}
.job-card:nth-child(7) {
    animation-delay: 0.47s;
}
.job-card:nth-child(8) {
    animation-delay: 0.54s;
}
.job-card:nth-child(9) {
    animation-delay: 0.61s;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shine sweep on hover */
.job-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-light),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

/* Left accent bar */
.job-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--primary-color),
        var(--primary-dark)
    );
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transform: scaleY(0);
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.job-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px var(--shadow-color);
    border-color: var(--primary-color);
}

.job-card:hover::before {
    left: 100%;
}

.job-card:hover::after {
    opacity: 1;
    transform: scaleY(1);
}

/* ── Card Header ────────────────────────────────────────── */
.job-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.job-title {
    font-family: "Sora", "Syne", sans-serif;
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.job-card:hover .job-title {
    color: var(--primary-color);
}

.job-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px solid var(--primary-medium);
    padding: 4px 12px;
    border-radius: 100px;
}

.job-badge.badge-open {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.25);
}

.job-badge.badge-closed {
    color: var(--text-secondary);
    background: transparent;
    border-color: var(--card-border);
}

body.b .job-badge.badge-open {
    color: #4ade80;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(74, 222, 128, 0.2);
}

/* ── Meta pills ─────────────────────────────────────────── */
.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.job-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--icon-bg);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 400;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}

.job-card:hover .job-meta-item {
    border-color: var(--primary-medium);
    background: var(--primary-light);
}

.job-meta-icon {
    font-size: 0.85rem;
    line-height: 1;
}

/* ── Description ────────────────────────────────────────── */
.job-description {
    font-size: clamp(13px, 1.5vw, 15px);
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
    flex: 1;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* ── Divider ────────────────────────────────────────────── */
.job-card-divider {
    height: 1px;
    background: var(--card-border);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: background 0.4s ease;
}

.job-card:hover .job-card-divider {
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* ── Card Footer ────────────────────────────────────────── */
.job-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.job-type-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ── Button ─────────────────────────────────────────────── */
.job-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary-color);
    padding: 9px 20px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--shadow-color);
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.job-btn:hover::before {
    opacity: 1;
}

.job-btn span,
.job-btn-arrow {
    position: relative;
    z-index: 1;
}

.job-btn-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.job-btn:hover .job-btn-arrow {
    transform: translateX(3px);
}

/* ── No Jobs ────────────────────────────────────────────── */
.no-jobs {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 32px;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 2px dashed var(--card-border);
    border-radius: 20px;
}

.no-jobs-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-jobs-title {
    font-family: "Sora", "Syne", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination-wrapper {
    margin-top: 52px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-wrapper nav a,
.pagination-wrapper nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-wrapper nav a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.pagination-wrapper nav [aria-current="page"] span {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 991px) {
    .jobs-section {
        padding: 80px 0 60px;
    }
    .jobs-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .jobs-section {
        padding: 64px 0 50px;
    }
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .jobs-header {
        margin-bottom: 40px;
    }
    .job-card {
        padding: 22px;
    }
    .jobs-count-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 479px) {
    .jobs-container {
        padding: 0 15px;
    }
    .job-meta {
        gap: 6px;
    }
    .job-meta-item {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
    .job-card {
        padding: 18px;
    }
}

/* ============================================================
   JOB DETAIL PAGE 
   ============================================================ */

/* ── Section ────────────────────────────────────────────── */
.jd-section {
    background: var(--bg-color);
    min-height: 100vh;
    padding: 40px 0 80px;
    font-family: "DM Sans", sans-serif;
    position: relative;
    overflow: hidden;
}

.jd-section::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -180px;
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        var(--primary-light) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ──────────────────────────────────────────── */
.jd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.jd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease-out;
}

.jd-bc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition:
        gap 0.3s ease,
        opacity 0.3s ease;
}

.jd-bc-link:hover {
    gap: 10px;
    opacity: 0.8;
    text-decoration: none;
}

.jd-bc-sep {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.jd-bc-current {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

/* ── Two-column layout ──────────────────────────────────── */
.jd-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* ══════════════════════════════════════
   LEFT CONTENT
══════════════════════════════════════ */

/* ── Hero Card ──────────────────────────────────────────── */
.jd-hero-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    animation: fadeInUp 0.55s ease-out;
    position: relative;
    overflow: hidden;
}

.jd-hero-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--primary-dark),
        transparent
    );
}

.jd-hero-top {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Badge */
.jd-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 12px;
    width: fit-content;
}

.jd-badge.badge-open {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.jd-badge.badge-closed {
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--card-border);
}

.jd-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 2s ease-in-out infinite;
}

body.b .jd-badge.badge-open {
    color: #4ade80;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(74, 222, 128, 0.2);
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.jd-job-title {
    font-family: "Sora", "Syne", sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}

.jd-company-tag {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.01em;
}

/* Meta grid */
.jd-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.jd-meta-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--icon-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 10px 16px;
    transition: all 0.3s ease;
}

.jd-meta-pill:hover {
    border-color: var(--primary-medium);
    background: var(--primary-light);
}

.jd-meta-icon {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.jd-meta-pill > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.jd-meta-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.jd-meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Content Blocks ─────────────────────────────────────── */
.jd-block {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: border-color 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
}

.jd-block:hover {
    border-color: var(--primary-medium);
}

.jd-block-title {
    font-family: "Sora", "Syne", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

.jd-block-icon {
    font-size: 1.2rem;
}

/* Prose */
.jd-prose {
    font-size: clamp(14px, 1.5vw, 15px);
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 300;
}

/* Checklist */
.jd-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jd-check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: clamp(13px, 1.5vw, 15px);
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 300;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.jd-check-item:hover {
    background: var(--primary-light);
}

.jd-check-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.jd-check-icon--star {
    background: var(--icon-bg);
    color: var(--primary-color);
    font-size: 0.7rem;
    border: 1px solid var(--primary-medium);
}

/* Skills */
.jd-skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jd-skill-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px solid var(--primary-medium);
    padding: 6px 14px;
    border-radius: 100px;
    transition: all 0.3s ease;
    cursor: default;
}

.jd-skill-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* ══════════════════════════════════════
   RIGHT SIDEBAR — Apply Form
══════════════════════════════════════ */
.jd-sidebar {
    position: sticky;
    top: 100px;
}

.jd-form-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px var(--shadow-color);
    animation: fadeInUp 0.65s 0.1s ease-out both;
    position: relative;
}

/* Top accent line */
.jd-form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--primary-dark)
    );
}

/* Form header */
.jd-form-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--card-border);
    background: var(--primary-light);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jd-form-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jd-form-emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.jd-form-title {
    font-family: "Sora", "Syne", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.jd-form-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.jd-form-job-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--card-bg);
    border: 1px solid var(--primary-medium);
    padding: 5px 12px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Form body */
#jobApplyForm {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Field ──────────────────────────────────────────────── */
.jd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jd-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.jd-required {
    color: var(--primary-color);
    margin-left: 2px;
}

/* Input wrapper */
.jd-input-wrap {
    position: relative;
}

.jd-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.3s ease;
}

.jd-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    background: var(--bg-color);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    font-size: 0.875rem;
    font-family: "DM Sans", sans-serif;
    color: var(--text-primary);
    outline: none;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
    box-sizing: border-box;
}

.jd-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.jd-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--card-bg);
}

.jd-input:focus ~ .jd-input-icon,
.jd-input-wrap:focus-within .jd-input-icon {
    color: var(--primary-color);
}

.jd-input.is-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

/* ── File upload ────────────────────────────────────────── */
.jd-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.jd-file-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-color);
    border: 1.5px dashed var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jd-file-label:hover,
.jd-file-label.dragging {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.jd-file-label.has-file {
    border-style: solid;
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.jd-file-label.is-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.jd-file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--icon-bg);
    border: 1px solid var(--primary-medium);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.jd-file-label:hover .jd-file-icon,
.jd-file-label.has-file .jd-file-icon {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.jd-file-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jd-file-main {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jd-file-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ── Field error ────────────────────────────────────────── */
.jd-field-error {
    font-size: 0.75rem;
    color: #e53e3e;
    font-weight: 500;
    min-height: 16px;
    display: block;
}

/* ── Submit button ──────────────────────────────────────── */
.jd-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.jd-submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jd-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px var(--shadow-color);
}

.jd-submit-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.jd-submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.jd-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.jd-submit-btn.loading {
    cursor: wait;
}

.jd-btn-text,
.jd-btn-arrow,
.jd-btn-loader {
    position: relative;
    z-index: 1;
}

.jd-btn-arrow {
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.jd-submit-btn:hover .jd-btn-arrow {
    transform: translateX(3px);
}

.jd-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.jd-spin {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form note */
.jd-form-note {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* ── Shared animations ──────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── SweetAlert2 custom theming ─────────────────────────── */
.swal-custom-popup {
    font-family: "DM Sans", sans-serif !important;
    border-radius: 20px !important;
    border: 2px solid var(--card-border) !important;
    box-shadow: 0 20px 60px var(--shadow-color) !important;
}

.swal-custom-btn {
    border-radius: 12px !important;
    font-family: "DM Sans", sans-serif !important;
    font-weight: 600 !important;
    padding: 10px 28px !important;
    font-size: 0.9rem !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .jd-layout {
        grid-template-columns: 1fr 340px;
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .jd-layout {
        grid-template-columns: 1fr;
    }

    .jd-sidebar {
        position: static;
        order: -1; /* form above content on mobile */
    }

    .jd-form-card {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .jd-section {
        padding: 24px 0 60px;
    }

    .jd-hero-card,
    .jd-block {
        padding: 24px;
    }

    .jd-job-title {
        font-size: 1.7rem;
    }

    .jd-meta-grid {
        gap: 8px;
    }

    .jd-meta-pill {
        padding: 8px 12px;
    }

    #jobApplyForm {
        padding: 20px;
    }

    .jd-form-header {
        padding: 22px 20px 16px;
    }
}

@media (max-width: 479px) {
    .jd-container {
        padding: 0 15px;
    }

    .jd-hero-card,
    .jd-block {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .jd-form-card {
        border-radius: 16px;
    }

    .jd-meta-grid {
        gap: 6px;
    }

    .jd-meta-pill {
        padding: 7px 10px;
        border-radius: 10px;
    }
}
