/* FINAL PRINT STYLESHEET */
:root {
    --print-black: #000000;
}

/* 1. AGGRESSIVE RESET */
* {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    /* Force visibility */
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
    mask: none !important;
    clip-path: none !important;
}

/* 2. PAGE CONFIG */
@page {
    margin: 1.25cm;
    size: auto;
}

html,
body {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: white !important;
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.4;
    display: block !important;
    position: relative !important;
}

/* 3. HIDING ELEMENTS */
.background-globes,
.action-buttons,
.globe,
/* .portfolio-section: Removed to allow Detailed Portfolio in Print */
/* Hidden for shorthand */
.timeline-line,
.timeline-marker {
    display: none !important;
}

/* 4. LAYOUT CONTAINERS */
/* Reset these to be simple block containers */
.glass-container,
.cv-content,
.header-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    flex: none !important;
}

/* 5. COMPONENTS */

/* Header */
.cv-header {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 26pt;
    font-weight: 700;
    color: #000 !important;
    margin-bottom: 5px;
    display: block;
}

.title {
    color: #0369a1 !important;
    font-size: 12pt;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.contact-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 9pt;
    color: #444 !important;
}

/* Sections */
.section {
    display: block !important;
    margin-bottom: 25px;
    page-break-inside: auto;
    break-inside: auto;
}

.section h2 {
    font-size: 14pt;
    font-weight: 700;
    color: #0369a1 !important;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
    padding-bottom: 3px;
    page-break-after: avoid;
}

/* Work History */
.timeline {
    display: block !important;
    padding: 0 !important;
}

.timeline-item {
    display: block !important;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
    page-break-inside: auto;
    /* Allow breaking long jobs */
    break-inside: auto;
}

.timeline-item:last-child {
    border-bottom: none;
}

.role-header {
    margin-bottom: 5px;
}

.role-header h3 {
    font-size: 12pt;
    font-weight: 700;
    display: inline-block;
    margin-right: 10px;
}

.company {
    font-weight: 600;
    color: #0369a1 !important;
    font-size: 10pt;
}

.date {
    font-size: 9pt;
    color: #666 !important;
    font-style: italic;
    display: block;
}

.description {
    margin-top: 5px;
    color: #333 !important;
}

/* Projects */
.projects-list {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f8f8 !important;
    border: 1px solid #eee !important;
    border-radius: 4px;
}

.project-item {
    font-size: 9pt;
    margin-bottom: 4px;
}

/* Skills */
.skills-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px;
}

.skill-tag {
    border: 1px solid #bbb;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9pt;
    font-weight: 500;
}

/* Grid Layouts (Education/Refs) */
.grid-2-col,
.references-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    page-break-inside: avoid;
}

.card,
.ref-card {
    border: 1px solid #ddd !important;
    padding: 12px;
    border-radius: 6px;
    background: #fff !important;
}

.card h3 {
    font-size: 11pt;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* Footer */
.cv-footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 8pt;
    color: #888 !important;
}

/* 8. PROJECT CARDS (PORTFOLIO) */
.portfolio-section {
    display: block !important;
    page-break-before: always;
    /* Start detailed portfolio on new page if needed */
}

.project-card-detailed {
    border: 1px solid #ccc !important;
    background: #fff !important;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    page-break-inside: avoid;
    /* Prevent card from splitting */
    box-shadow: none !important;
}

.project-header-detailed {
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.project-title {
    font-size: 11pt;
    font-weight: 700;
    color: #000;
}

.project-company {
    font-size: 10pt;
    font-weight: 600;
    color: #0369a1;
}

.project-tech-stack {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dotted #eee;
}

.tech-badge {
    border: 1px solid #999;
    color: #333;
    padding: 2px 6px;
    font-size: 8pt;
    border-radius: 4px;
    margin-right: 5px;
    display: inline-block;
    background: #fdfdfd !important;
}