* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px;
    background: #eeeeee;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: #222222;
}

.cv-container {
    width: 210mm;
    min-height: 297mm;
    margin: auto;
    background: #ffffff;
    padding: 18mm 20mm;
}

/* ================= HEADER ================= */

.header {
    text-align: center;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 12px;
}

.header h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0.5px;
}

.headline {
    margin: 6px 0 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.contact-info,
.profile-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 7px;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info a,
.profile-links a {
    color: #333;
    transition: color 0.2s ease;
}

.contact-info a:hover,
.profile-links a:hover {
    color: #2563eb;
    text-decoration: none;
}

.contact-info i,
.profile-links i {
    margin-right: 4px;
}

a {
    color: #222222;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ================= SECTIONS ================= */

.section {
    margin-top: 18px;
}

.section h2 {
    font-size: 15px;
    margin: 0 0 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid #d9d9d9;
    border-left: 4px solid #2563eb;
    padding-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


.section p {
    margin: 5px 0;
    font-size: 12px;
    line-height: 1.5;
}

#summary p {
    text-align: justify;
}

/* ================= EDUCATION ================= */

.education-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.coursework {
    font-size: 11.5px !important;
    color: #555555;
}

/* ================= SKILLS ================= */

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 25px;
}

.skills-grid strong {
    font-size: 12px;
}

.skills-grid p {
    margin-top: 3px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.skill-tags span {
    border: 1px solid #d7dce2;
    background: #f7f9fc;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10.5px;
}

/* ================= PROJECTS ================= */

.project {
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eeeeee;
}

.project:last-child {
    border-bottom: none;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.project-header strong a {
    color: #222;
}

.project-header strong a:hover {
    color: #2563eb;
    text-decoration: none;
}

.project ul {
    margin: 5px 0 0 18px;
    padding: 0;
}

.project li {
    font-size: 11.5px;
    line-height: 1.45;
    margin-bottom: 3px;
}

.justify-text {
    text-align: justify;
}

.project-links {
    display: flex;
    gap: 6px;
}

.project-links a {
    border: 1px solid #d5dbe3;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    color: #2563eb;
    transition: all 0.2s ease;
}

.project-links a:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
}

.project-stack {
    margin-top: 4px;
    margin-bottom: 3px;
    font-size: 10.5px;
    color: #666;
    letter-spacing: 0.1px;
}

/* ================= PRINT ================= */

@page {
    size: A4;
    margin: 0;
}

@media print {

    body {
        background: #ffffff;
        padding: 0;
    }

    body > .download-cv {
        display: none !important;
    }

    .cv-container {
        width: 210mm;
        min-height: auto;
        margin: 0;
        padding: 7mm 14mm;
        zoom: 0.96;
    }

    .headline {
        font-size: 13px;
        white-space: nowrap;
    }

    .section {
        margin-top: 10px;
    }

    .section p {
        line-height: 1.3;
    }

    .project {
        margin-bottom: 7px;
        padding-bottom: 5px;
    }

    .project li {
        line-height: 1.35;
        margin-bottom: 2px;
    }

    a {
        color: #222222;
        text-decoration: none;
    }

    .profile-links a {
        font-size: 0;
    }

    .profile-links a i {
        font-size: 12px;
    }

    .profile-links a[href*="github.com"]::after {
        content: "github.com/abdulrehmanml";
        font-size: 12px;
    }

    .profile-links a[href*="linkedin.com"]::after {
        content: "linkedin.com/in/abdul-rehmanmughal";
        font-size: 12px;
    }
}

/* ================= DOWNLOAD CV ================= */

.download-cv {
    position: fixed;
    top: 35px;
    right: 20px;
    z-index: 1000;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 8px 13px;
    border: 1px solid #2563eb;
    border-radius: 5px;

    background: #ffffff;
    color: #2563eb;

    font-size: 11px;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ================= RESPONSIVE ================= */

@media screen and (max-width: 900px) {

    body {
        padding: 10px;
    }

    .cv-container {
        width: 100%;
        min-height: auto;
        padding: 25px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .education-header,
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

}

@media screen and (max-width: 600px) {

    body {
        padding: 0;
    }

    .cv-container {
        padding: 20px 16px;
    }

    .header h1 {
        font-size: 25px;
    }

    .headline {
        font-size: 13px;
    }

    .contact-info,
    .profile-links {
        font-size: 11px;
        gap: 8px;
    }

    .section {
        margin-top: 15px;
    }

    .section h2 {
        font-size: 14px;
    }

    .project-header {
        gap: 7px;
    }

    .project-links {
        flex-wrap: wrap;
    }

    .download-cv {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 10px;
    }
}

