/*!
 * JR ATS Core — Public CV Stylesheet
 * Elementor-resistant version: !important on critical layout/color rules
 * and higher-specificity selectors (html .jrats-cv-wrap) to win over
 * Elementor and theme defaults.
 *
 * Brand color: #5277ba
 */

html .jrats-cv-wrap {
    --jrats-cv-brand: #5277ba;
    --jrats-cv-brand-50: #eef3fb;
    --jrats-cv-brand-100: #dce5f3;
    --jrats-cv-brand-700: #3d5a92;
    --jrats-cv-ink: #0f172a;
    --jrats-cv-ink-soft: #475569;
    --jrats-cv-ink-mute: #94a3b8;
    --jrats-cv-surface: #ffffff;
    --jrats-cv-surface-soft: #f8fafc;
    --jrats-cv-border: #e2e8f0;
    --jrats-cv-rule: #d1dbe9;
    --jrats-cv-radius: 12px;
    --jrats-cv-radius-sm: 6px;
    --jrats-cv-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    max-width: 880px !important;
    margin: 0 auto !important;
    padding: 24px 16px 120px !important;
    color: #0f172a !important;
    font-family: var(--jrats-cv-font) !important;
    line-height: 1.55 !important;
    background: #fff !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: left !important;
    direction: ltr;
}

html .jrats-cv-wrap *,
html .jrats-cv-wrap *::before,
html .jrats-cv-wrap *::after {
    box-sizing: border-box !important;
}

/* ============================================================================
 * Empty / not-found
 * ========================================================================= */

html .jrats-cv-empty {
    min-height: 60vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
html .jrats-cv-empty-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .04) !important;
    padding: 48px 32px !important;
    text-align: center !important;
    max-width: 420px !important;
}
html .jrats-cv-empty-icon {
    font-size: 48px !important;
    margin-bottom: 12px !important;
    opacity: .5 !important;
}
html .jrats-cv-empty h2 {
    margin: 0 0 8px !important;
    font-size: 20px !important;
    color: #0f172a !important;
}
html .jrats-cv-empty p {
    margin: 0 !important;
    color: #475569 !important;
    font-size: 14px !important;
}

/* ============================================================================
 * HERO HEADER
 * ========================================================================= */

html .jrats-cv-hero {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 20px !important;
    align-items: center !important;
    padding: 0 0 24px !important;
    margin-bottom: 24px !important;
    border-bottom: 2px solid #5277ba !important;
}

html .jrats-cv-hero-text {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    min-width: 0 !important;
}

html .jrats-cv-avatar {
    width: 88px !important;
    height: 88px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 3px solid #fff !important;
    box-shadow: 0 0 0 1px #e2e8f0 !important;
    flex: 0 0 auto !important;
    background: #eef3fb !important;
}
html .jrats-cv-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

html .jrats-cv-headline {
    min-width: 0 !important;
}
html .jrats-cv-name {
    margin: 0 0 4px !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.15 !important;
    color: #0f172a !important;
}
html .jrats-cv-position {
    margin: 0 !important;
    font-size: 15px !important;
    color: #3d5a92 !important;
    font-weight: 500 !important;
}

/* QR card */
html .jrats-cv-qr-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 10px !important;
    text-align: center !important;
    width: 116px !important;
}
html .jrats-cv-qr {
    width: 92px !important;
    height: 92px !important;
    margin: 0 auto !important;
}
html .jrats-cv-qr img,
html .jrats-cv-qr canvas {
    display: block !important;
    margin: 0 auto !important;
}
html .jrats-cv-qr-label {
    margin: 6px 0 0 !important;
    font-size: 11px !important;
    color: #475569 !important;
    letter-spacing: 0.3px !important;
}

/* ============================================================================
 * Section blocks
 * ========================================================================= */

html .jrats-cv-section {
    margin-bottom: 28px !important;
}
html .jrats-cv-section-title {
    margin: 0 0 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #3d5a92 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #d1dbe9 !important;
}

html .jrats-cv-summary-text {
    margin: 0 !important;
    color: #475569 !important;
    font-size: 14.5px !important;
    line-height: 1.65 !important;
}

/* TIMELINE LIST — Experience + Education */
html .jrats-cv-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
html .jrats-cv-list-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid #d1dbe9 !important;
    margin: 0 !important;
    list-style: none !important;
}
html .jrats-cv-list-item:last-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}
html .jrats-cv-item-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}
html .jrats-cv-item-headings {
    min-width: 0 !important;
    flex: 1 1 60% !important;
}
html .jrats-cv-item-title {
    margin: 0 0 2px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}
html .jrats-cv-item-subtitle {
    margin: 0 0 2px !important;
    font-size: 14px !important;
    color: #3d5a92 !important;
    font-weight: 500 !important;
}
html .jrats-cv-item-meta {
    margin: 0 !important;
    font-size: 13px !important;
    color: #475569 !important;
}
html .jrats-cv-item-dates {
    margin: 0 !important;
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
}
html .jrats-cv-item-desc {
    margin: 6px 0 0 !important;
    color: #475569 !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
}

/* CHIPS */
html .jrats-cv-chips {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
}
html .jrats-cv-chips li {
    margin: 0 !important;
    list-style: none !important;
}
html .jrats-cv-chip {
    padding: 4px 12px !important;
    border-radius: 999px !important;
    background: #eef3fb !important;
    color: #3d5a92 !important;
    border: 1px solid #dce5f3 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
}
html .jrats-cv-chip-soft {
    background: #f8fafc !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}

/* CERTIFICATIONS */
html .jrats-cv-cert-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
html .jrats-cv-cert-item {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 6px 12px !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid #d1dbe9 !important;
    font-size: 14px !important;
    list-style: none !important;
}
html .jrats-cv-cert-item:last-child {
    border-bottom: 0 !important;
}
html .jrats-cv-cert-name {
    font-weight: 600 !important;
    color: #0f172a !important;
}
html .jrats-cv-cert-name a {
    color: #3d5a92 !important;
    text-decoration: none !important;
}
html .jrats-cv-cert-name a:hover {
    text-decoration: underline !important;
}
html .jrats-cv-cert-issuer {
    color: #475569 !important;
}
html .jrats-cv-cert-date {
    color: #94a3b8 !important;
    margin-left: auto !important;
    font-variant-numeric: tabular-nums;
    font-size: 13px !important;
}

/* PORTFOLIO */
html .jrats-cv-portfolio-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 8px !important;
}
html .jrats-cv-portfolio-list li {
    margin: 0 !important;
    list-style: none !important;
}
html .jrats-cv-portfolio-link {
    display: block !important;
    padding: 10px 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    color: #0f172a !important;
    transition: border-color .15s ease, background .15s ease !important;
}
html .jrats-cv-portfolio-link:hover {
    border-color: #5277ba !important;
    background: #eef3fb !important;
}
html .jrats-cv-portfolio-label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #3d5a92 !important;
    margin-bottom: 2px !important;
}
html .jrats-cv-portfolio-url {
    display: block !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    word-break: break-all !important;
}

/* ============================================================================
 * Action bar (floating)
 * ========================================================================= */

html .jrats-cv-actionbar {
    position: fixed !important;
    left: 50% !important;
    bottom: 20px !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 8px !important;
    padding: 8px !important;
    background: rgba(255, 255, 255, .92) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08), 0 24px 48px rgba(15, 23, 42, .08) !important;
    backdrop-filter: saturate(180%) blur(12px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(12px) !important;
    z-index: 50 !important;
    max-width: calc(100vw - 32px) !important;
}

html .jrats-cv-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 18px !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
html .jrats-cv-btn:focus-visible {
    outline: 2px solid #5277ba !important;
    outline-offset: 2px !important;
}
html .jrats-cv-btn:active {
    transform: translateY(1px) !important;
}

html .jrats-cv-btn-primary {
    background: #5277ba !important;
    color: #fff !important;
    border-color: #5277ba !important;
    box-shadow: 0 6px 16px rgba(82, 119, 186, .22) !important;
}
html .jrats-cv-btn-primary:hover {
    background: #3d5a92 !important;
    border-color: #3d5a92 !important;
    color: #fff !important;
}

html .jrats-cv-btn-secondary {
    background: #fff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}
html .jrats-cv-btn-secondary:hover {
    border-color: #5277ba !important;
    color: #3d5a92 !important;
    background: #eef3fb !important;
}

html .jrats-cv-btn.is-flashing {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}

/* ============================================================================
 * Responsive
 * ========================================================================= */

@media (max-width: 720px) {
    html .jrats-cv-wrap {
        padding: 16px 12px 120px !important;
    }
    html .jrats-cv-hero {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    html .jrats-cv-hero-text {
        gap: 14px !important;
    }
    html .jrats-cv-qr-card {
        margin: 0 auto !important;
    }
    html .jrats-cv-name {
        font-size: 24px !important;
    }
    html .jrats-cv-actionbar {
        bottom: 12px !important;
        padding: 6px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        border-radius: 18px !important;
    }
    html .jrats-cv-btn {
        padding: 9px 14px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 420px) {
    html .jrats-cv-avatar {
        width: 72px !important;
        height: 72px !important;
    }
    html .jrats-cv-name {
        font-size: 22px !important;
    }
}

/* ============================================================================
 * Print — ATS-optimized
 * ========================================================================= */

@media print {
    html .jrats-cv-no-print,
    html .jrats-cv-actionbar,
    html .jrats-cv-qr-card {
        display: none !important;
    }
    @page {
        margin: 14mm 14mm 16mm 14mm;
    }
    body {
        background: #fff !important;
    }
    html .jrats-cv-wrap {
        max-width: none !important;
        padding: 0 !important;
        color: #000 !important;
        background: #fff !important;
    }
    html .jrats-cv-section {
        page-break-inside: avoid;
        margin-bottom: 16px !important;
    }
    html .jrats-cv-list-item {
        page-break-inside: avoid;
    }
    html .jrats-cv-hero {
        padding-bottom: 12px !important;
        margin-bottom: 14px !important;
        border-bottom-width: 1.5px !important;
    }
    html .jrats-cv-name {
        font-size: 22px !important;
    }
    html .jrats-cv-position {
        font-size: 13px !important;
    }
    html .jrats-cv-section-title {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        padding-bottom: 3px !important;
    }
    html .jrats-cv-summary-text,
    html .jrats-cv-item-desc {
        font-size: 11px !important;
        line-height: 1.55 !important;
    }
    html .jrats-cv-item-title {
        font-size: 13px !important;
    }
    html .jrats-cv-item-subtitle,
    html .jrats-cv-item-dates {
        font-size: 11px !important;
    }
    html .jrats-cv-chip {
        background: #fff !important;
        border-color: #d1d5db !important;
        color: #111827 !important;
        font-size: 11px !important;
        padding: 2px 8px !important;
    }
    html .jrats-cv-cert-item,
    html .jrats-cv-list-item {
        border-color: #e5e7eb !important;
    }
    html .jrats-cv-cert-name a,
    html .jrats-cv-portfolio-link {
        color: #000 !important;
        text-decoration: underline !important;
    }
}


/* ============================================================================
 * Phase 10A — Watermark overlay
 * ========================================================================= */

html .jrats-cv-watermark {
    position: fixed !important;
    bottom: 8px !important;
    right: 8px !important;
    z-index: 49 !important;
    padding: 4px 10px !important;
    background: rgba(15, 23, 42, .6) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    border-radius: 4px !important;
    pointer-events: none !important;
    opacity: 0.85 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    max-width: 280px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

@media print {
    html .jrats-cv-watermark { display: none !important; }
}
