:root {
    --ink: var(--text-dark);
    --muted-ink: var(--text-light);
    --brand: var(--gold);
    --panel: var(--primary-dark);
    --card: var(--card-bg);
    --rule: var(--border-color);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg-color);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg-color);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.top-rule {
    width: 100%;
    height: 6px;
    background: var(--gold);
}

.profile-page {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 42px;
}

.credentials-page .profile-header {
    display: block;
    padding: 0;
    color: inherit;
    background: transparent;
}

.eyebrow,
.education-block h3,
.books-block h3 {
    margin: 0;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.identity-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 128px;
    margin-top: 17px;
}

.identity-copy {
    padding-top: 15px;
}

.identity-copy h1 {
    margin: 0;
    color: var(--text-title);
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.8px;
}

.tagline {
    margin: 13px 0 0;
    color: var(--brand);
    font-size: 22px;
    line-height: 1.2;
}

.cpc-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 127px;
    height: 111px;
    flex: 0 0 127px;
    margin-top: 1px;
}

.cpc-mark img {
    display: block;
    width: 127px;
    height: 111px;
    object-fit: contain;
}

.role-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 75px;
    padding: 13px 20px 14px;
    color: #ffffff;
    background: var(--panel);
    border-radius: 10px;
}

.role-banner strong {
    font-size: 16px;
    line-height: 1.25;
}

.role-banner span {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.25;
}

.intro-section {
    padding-top: 41px;
}

.intro-section h2,
.recognition-section > h2 {
    margin: 0;
    color: var(--text-title);
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.35px;
}

.intro-section > p {
    margin: 18px 0 0;
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.47;
}

.intro-section > p + p {
    margin-top: 47px;
}

.education-block {
    margin-top: 39px;
}

.education-block p,
.books-block p {
    margin: 16px 0 0;
    color: var(--muted-ink);
    font-size: 14px;
    line-height: 1.45;
}

.recognition-section {
    margin-top: 42px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.credential-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 19px;
}

.credential-card {
    min-height: 254px;
    padding: 19px 18px 16px;
    overflow: hidden;
    border-radius: 11px;
    background: var(--card);
    border: 1px solid var(--border-color);
}

.credential-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 94px;
    background-image: url("assets/reference.jpg");
    background-repeat: no-repeat;
    background-size: 834px 1180px;
}

.credential-logo--ccs {
    background-position: -87px -763px;
}

.credential-logo--cpd-group {
    background: #ffffff;
}

.credential-logo--cpd-group img {
    display: block;
    width: 100%;
    height: 94px;
    object-fit: contain;
}

.credential-logo--cpd-international {
    background-position: -611px -773px;
}

.credential-card h3 {
    min-height: 37px;
    margin: 13px 0 0;
    color: var(--text-title);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.credential-card p {
    margin: 23px 0 0;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.35;
}

.books-block {
    margin-top: 29px;
}

.books-block p {
    margin-top: 16px;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
}

.profile-footer {
    margin-top: 43px;
    padding-top: 18px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    line-height: 1.6;
}

.profile-course-link {
    margin-top: 1.5rem;
}

@media (max-width: 720px) {
    .profile-page {
        width: min(100% - 32px, 560px);
        padding-top: 28px;
    }

    .identity-row {
        min-height: 0;
    }

    .identity-copy h1 {
        font-size: clamp(30px, 7vw, 42px);
    }

    .tagline {
        font-size: clamp(18px, 4vw, 22px);
    }

    .cpc-mark {
        width: 96px;
        height: 92px;
        flex-basis: 96px;
        margin-left: 18px;
    }

    .cpc-mark img {
        width: 96px;
        height: 92px;
    }

    .credential-grid {
        grid-template-columns: 1fr;
    }

    .credential-card {
        min-height: 230px;
    }

    .books-block p {
        white-space: normal;
    }
}

@media print {
    .top-rule {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .profile-page {
        width: 728px;
    }
}
