/* ============================================================
   Resume AI — "Neural" Theme
   
   Premium AI-native design, built to outclass V3 "Impact-First".
   Designed for AI/ML QE leadership roles.
   
   Design philosophy:
   - AI-specific impact dashboard as the first visual
   - Core skills as structured capsule groups (not flat text)
   - Timeline experience with refined dot markers
   - AI Agent Projects rendered as distinct cards
   - Outfit font — geometric, clean, modern (same as V3)
   - Deep blue palette with cyan metric highlights
   - Compact: fits 2 pages, zero wasted space
   ============================================================ */

/* ---------- Palette ---------- */
:root {
    --ai-primary: #1e3a5f;
    --ai-accent: #2563eb;
    --ai-accent-light: #eff6ff;
    --ai-accent-mid: #bfdbfe;
    --ai-highlight: #0891b2;
    --ai-highlight-light: #ecfeff;
    --ai-text: #0f172a;
    --ai-text-secondary: #334155;
    --ai-text-muted: #64748b;
    --ai-bg: #ffffff;
    --ai-card-bg: #f8fafc;
    --ai-border: #e2e8f0;
    --ai-metric-bg: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
}

/* ---------- Page ---------- */
@page {
    size: A4;
    margin: 0.35in 0.4in;
}

/* ---------- Base — Outfit everywhere ---------- */
.resume-page {
    font-family: 'Outfit', sans-serif;
    font-size: 9.5pt;
    font-weight: 400;
    line-height: 1.38;
    color: var(--ai-text);
    background: var(--ai-bg);
}

.resume-page * {
    font-family: inherit;
}

/* Kill inherited ul/li indentation for all AI sections */
.resume-page .ai-summary ul,
.resume-page .ai-job ul,
.resume-page .ai-projects ul,
.resume-page .ai-achievements ul,
.resume-page .ai-project-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-inline-start: 0;
    margin-inline-start: 0;
}

/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */
.ai-header {
    text-align: center;
    padding: 0 0 4px 0;
    position: relative;
}

.resume-page .ai-header h1 {
    font-size: 15pt;
    font-weight: 300;
    letter-spacing: 2.5pt;
    text-transform: uppercase;
    color: var(--ai-primary);
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.15;
    white-space: nowrap;
}

.resume-page .ai-header::after {
    content: '';
    display: block;
    width: 52px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--ai-accent), var(--ai-highlight));
    margin: 4px auto 5px auto;
    border-radius: 2px;
}

.ai-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 8.5pt;
    color: var(--ai-text-secondary);
}

.ai-contact a {
    color: var(--ai-text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.15s;
}

.ai-contact a:hover {
    color: var(--ai-accent);
}

.ai-contact .iconify {
    font-size: 10px;
    color: var(--ai-accent);
}

/* ══════════════════════════════════════════
   IMPACT METRICS DASHBOARD
   ══════════════════════════════════════════ */
.ai-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 7px 0 9px 0;
    border: 1px solid var(--ai-accent-mid);
    border-radius: 6px;
    overflow: hidden;
    background: var(--ai-metric-bg);
}

.ai-metric {
    text-align: center;
    padding: 8px 4px 6px 4px;
}

.ai-metric:not(:last-child) {
    border-right: 1px solid rgba(37, 99, 235, 0.15);
}

.ai-metric-value {
    display: block;
    font-size: 17pt;
    font-weight: 700;
    color: var(--ai-highlight);
    line-height: 1.1;
    letter-spacing: -0.5pt;
}

.ai-metric-label {
    display: block;
    font-size: 6.5pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9pt;
    color: var(--ai-text-muted);
    margin-top: 2px;
    line-height: 1.15;
}

/* ══════════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════════ */
.ai-section-title {
    font-size: 9pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2pt;
    color: var(--ai-primary);
    margin: 9px 0 4px 0;
    padding: 0 0 2px 0;
    border-bottom: 1.5px solid var(--ai-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-section-title:first-child {
    margin-top: 0;
}

.ai-section-title .iconify {
    font-size: 11px;
    color: var(--ai-accent);
}

/* ══════════════════════════════════════════
   PROFESSIONAL SUMMARY
   ══════════════════════════════════════════ */
.resume-page .ai-summary ul li {
    font-size: 9.5pt;
    line-height: 1.38;
    color: var(--ai-text);
    padding: 1.5px 0 1.5px 14px;
    margin: 0;
    position: relative;
}

.resume-page .ai-summary ul li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 9px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ai-accent);
}

/* ══════════════════════════════════════════
   CORE SKILLS — Structured Capsule Groups
   ══════════════════════════════════════════ */
.ai-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0 3px 0;
}

.ai-skill-pill {
    display: inline-block;
    font-size: 8pt;
    color: var(--ai-primary);
    background: var(--ai-accent-light);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--ai-accent-mid);
    line-height: 1.3;
}

.ai-skill-pill strong {
    font-weight: 600;
    color: var(--ai-accent);
    font-size: 8pt;
}

.ai-skill-subs {
    font-size: 7.5pt;
    color: var(--ai-text-secondary);
    font-weight: 400;
}

/* ══════════════════════════════════════════
   TECHNICAL SKILLS — Compact Tags
   ══════════════════════════════════════════ */
.ai-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 2px 0 3px 0;
}

.ai-tech-tag {
    display: inline-block;
    font-size: 8pt;
    font-weight: 400;
    color: var(--ai-text-secondary);
    border: 1px solid var(--ai-border);
    padding: 1.5px 6px;
    border-radius: 3px;
    line-height: 1.3;
}

/* ══════════════════════════════════════════
   EXPERIENCE — Timeline
   ══════════════════════════════════════════ */
.ai-experience {
    position: relative;
    padding-left: 0;
    margin-left: 0;
}

.ai-experience::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 3px;
    bottom: 3px;
    width: 1.5px;
    background: linear-gradient(180deg, var(--ai-accent), var(--ai-accent-mid));
}

.ai-job {
    position: relative;
    margin-bottom: 6px;
    padding-bottom: 0;
}

.ai-job::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ai-bg);
    border: 1.5px solid var(--ai-accent);
    z-index: 1;
}

.ai-job:first-child::before {
    background: var(--ai-highlight);
    border-color: var(--ai-highlight);
}

.ai-job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
}

.ai-job-title {
    font-size: 10pt;
    font-weight: 600;
    color: var(--ai-primary);
    margin: 0;
    line-height: 1.25;
}

.ai-job-dates {
    font-size: 8.5pt;
    font-weight: 400;
    color: var(--ai-text-muted);
    white-space: nowrap;
}

.ai-job-company {
    font-size: 8.5pt;
    font-weight: 500;
    color: var(--ai-highlight);
    margin: 0;
    line-height: 1.2;
}

.resume-page .ai-job ul {
    list-style: none;
    padding: 0;
    margin: 2px 0 0 0;
}

.resume-page .ai-job ul li {
    font-size: 9pt;
    color: var(--ai-text);
    padding: 0.5px 0 0.5px 14px;
    margin: 0;
    position: relative;
    line-height: 1.38;
}

.resume-page .ai-job ul li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: var(--ai-text-muted);
}

.ai-job ul li strong {
    font-weight: 600;
}

/* ══════════════════════════════════════════
   AI AGENT PROJECTS — Cards
   ══════════════════════════════════════════ */
.ai-projects {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 2px 0 3px 0;
}

.ai-project-card {
    background: var(--ai-accent-light);
    border: 1px solid var(--ai-accent-mid);
    border-left: 3px solid var(--ai-accent);
    border-radius: 4px;
    padding: 5px 10px;
}

.ai-project-title {
    font-size: 9.5pt;
    font-weight: 600;
    color: var(--ai-primary);
    margin: 0 0 2px 0;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-project-title .iconify {
    font-size: 11px;
    color: var(--ai-accent);
}

.resume-page .ai-project-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resume-page .ai-project-card ul li {
    font-size: 9pt;
    color: var(--ai-text);
    padding: 0.5px 0 0.5px 14px;
    margin: 0;
    position: relative;
    line-height: 1.38;
}

.resume-page .ai-project-card ul li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: var(--ai-accent);
}

/* ══════════════════════════════════════════
   KEY ACHIEVEMENTS — Highlighted Strip
   ══════════════════════════════════════════ */
.ai-achievements {
    background: var(--ai-highlight-light);
    border-radius: 4px;
    padding: 5px 10px;
    margin: 2px 0 3px 0;
    border: 1px solid rgba(8, 145, 178, 0.15);
}

.resume-page .ai-achievements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resume-page .ai-achievements ul li {
    font-size: 9pt;
    color: var(--ai-text);
    padding: 1px 0 1px 12px;
    position: relative;
    line-height: 1.38;
}

.resume-page .ai-achievements ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    background: var(--ai-highlight);
    border-radius: 1px;
    transform: rotate(45deg);
}

/* ══════════════════════════════════════════
   CERTIFICATIONS — Badge Chips
   ══════════════════════════════════════════ */
.ai-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0 3px 0;
}

.ai-cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8pt;
    font-weight: 500;
    color: var(--ai-text-secondary);
    background: var(--ai-card-bg);
    border: 1px solid var(--ai-border);
    border-radius: 3px;
    padding: 2.5px 8px;
}

.ai-cert-badge .iconify {
    color: var(--ai-accent);
    font-size: 10px;
}

.ai-cert-badge a {
    color: var(--ai-text-secondary);
    text-decoration: none;
}

.ai-cert-badge a:hover {
    color: var(--ai-accent);
}

/* ══════════════════════════════════════════
   EDUCATION
   ══════════════════════════════════════════ */
.ai-education {
    margin: 2px 0 3px 0;
}

.ai-edu-entry {
    margin-bottom: 1px;
    font-size: 8.5pt;
    color: var(--ai-text);
    line-height: 1.3;
}

.ai-edu-entry strong {
    font-weight: 600;
}

/* ══════════════════════════════════════════
   SCREEN PREVIEW
   ══════════════════════════════════════════ */
@media screen {
    .resume-page {
        max-width: 8.27in;
        margin: 0 auto;
        box-shadow:
            0 1px 3px rgba(37, 99, 235, 0.06),
            0 4px 16px rgba(37, 99, 235, 0.08),
            0 12px 32px rgba(0, 0, 0, 0.05);
        border-radius: 3px;
        padding: 0.35in 0.4in;
    }
}

/* ══════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════ */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .resume-page {
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        max-width: none;
    }
}

/* ---------- Page break controls ---------- */
.ai-section-title { break-after: avoid; }
.ai-job-header { break-after: avoid; }
.ai-job-company { break-after: avoid; }
.ai-project-card { break-inside: avoid; }
.ai-cert-badge { break-inside: avoid; }

/* ---------- Responsive ---------- */
@media screen and (max-width: 600px) {
    .ai-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-job-header {
        flex-direction: column;
    }
}
