/* ==========================================================================
   SkillForge Student CV / Resume Stylesheet
   Modern, Executive, Print-Ready Layout
   ========================================================================== */

:root {
    --cv-bg: #f8fafc;
    --cv-card-bg: #ffffff;
    --cv-primary: #1e293b;
    --cv-accent: #4f46e5;
    --cv-accent-light: #eef2ff;
    --cv-text: #334155;
    --cv-text-muted: #64748b;
    --cv-border: #e2e8f0;
    --cv-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.cv-body {
    background-color: var(--cv-bg);
    color: var(--cv-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    padding: 30px 16px 60px;
}

/* CV Action Topbar (Screen only) */
.cv-action-bar {
    max-width: 920px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 14px 22px;
    border-radius: 12px;
    border: 1px solid var(--cv-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    gap: 12px;
    flex-wrap: wrap;
}

.cv-bar-left, .cv-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.cv-btn-primary {
    background: #4f46e5;
    color: #ffffff;
}

.cv-btn-primary:hover {
    background: #4338ca;
}

.cv-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.cv-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cv-btn-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cv-btn-success:hover {
    background: #d1fae5;
    color: #065f46;
}

/* CV Sheet Container */
.cv-paper {
    max-width: 920px;
    margin: 0 auto;
    background: var(--cv-card-bg);
    border-radius: 16px;
    border: 1px solid var(--cv-border);
    box-shadow: var(--cv-shadow);
    overflow: hidden;
}

/* Header Section */
.cv-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 40px;
    display: flex;
    gap: 28px;
    align-items: center;
    position: relative;
}

.cv-avatar-wrap {
    flex-shrink: 0;
}

.cv-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cv-avatar-fallback {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cv-header-info {
    flex-grow: 1;
}

.cv-name {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
}

.cv-headline {
    font-size: 1.05rem;
    color: #38bdf8;
    font-weight: 600;
    margin-bottom: 14px;
}

.cv-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.cv-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cv-contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s;
}

.cv-contact-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Two-Column Grid Layout */
.cv-content-grid {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 600px;
}

/* Left Column / Sidebar */
.cv-sidebar {
    background: #f8fafc;
    border-right: 1px solid var(--cv-border);
    padding: 34px 26px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Right Main Column */
.cv-main-body {
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section Headings */
.cv-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.cv-section-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 38px;
    height: 2px;
    background: #4f46e5;
}

/* Skill Tags */
.cv-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cv-skill-pill {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Badges / Certifications */
.cv-badge-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.cv-badge-icon {
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cv-badge-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
}

.cv-badge-sub {
    font-size: 0.75rem;
    color: #64748b;
}

/* Education & Experience Items */
.cv-item {
    margin-bottom: 18px;
}

.cv-item-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.cv-item-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 6px;
}

.cv-item-desc {
    font-size: 0.88rem;
    color: #475569;
    white-space: pre-line;
    line-height: 1.55;
}

/* Verified Course Table */
.cv-course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cv-course-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-course-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
}

.cv-course-track {
    font-size: 0.78rem;
    color: #64748b;
}

.cv-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 700;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Footer note */
.cv-footer {
    padding: 18px 36px;
    border-top: 1px solid var(--cv-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #94a3b8;
    background: #ffffff;
}

/* ==========================================================================
   Print Stylesheet (@media print)
   ========================================================================== */
@media print {
    body.cv-body {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .cv-action-bar,
    .admin-sidebar,
    .admin-topbar,
    nav.site-navbar,
    footer {
        display: none !important;
    }

    .cv-paper {
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .cv-header {
        background: #0f172a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #ffffff !important;
        padding: 25px !important;
    }

    .cv-content-grid {
        grid-template-columns: 260px 1fr !important;
    }

    .cv-sidebar {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 20px !important;
    }

    .cv-main-body {
        padding: 20px !important;
    }
}

/* Responsive on mobile */
@media (max-width: 768px) {
    .cv-content-grid {
        grid-template-columns: 1fr;
    }
    .cv-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--cv-border);
    }
    .cv-header {
        flex-direction: column;
        text-align: center;
        padding: 26px;
    }
    .cv-contact-row {
        justify-content: center;
    }
}
