
    /* —— Убираем разрывы слов и дефисы (как и было) —— */
    *, *::before, *::after {
        hyphens: none !important;
        -webkit-hyphens: none !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }
    .profile-header h1, .profile-header h2, .project-title, .project-url {
        white-space: nowrap !important;
    }



// ────── МОЩНЫЙ ТИПОГРАФ: убираем висячие предлоги и союзы ──────
document.addEventListener("DOMContentLoaded", function() {
    const textNodes = document.createTreeWalker(
        document.body,
        NodeFilter.SHOW_TEXT,
        null,
        false
    );

    const shortWords = /^(?!\s)(в|на|и|а|но|от|к|по|с|у|о|для|при|за|над|под|без|до|про|из|об|во|не|же|бы|ли|да|то|или|ни|уж|ещё|как|чем|что|чтобы|если|когда|пока|хотя|чтоб|ведь|зато|ибо|либо|лишь|пусть|хоть|едва|дабы|чуть|раз|аж|вот|там|тут|так|нет|ну|всё|все|это|эту|этим|этой|этот|эта|эти)$/i;

    let node;
    while (node = textNodes.nextNode()) {
        if (!node.nodeValue.trim() || node.parentElement.closest('script, style, textarea')) continue;

        let html = node.nodeValue
            .replace(/(\s+)([внаикосудляпризатопобездовпроизобво]+)(\s+)/gi, '$1$2&nbsp;')
            .replace(/(\s+)([внаикосудляпризатопобездовпроизобво]+)([,\.\!\?\;\:\)\]])/gi, '$1$2$3');

        if (html !== node.nodeValue) {
            const span = document.createElement('span');
            span.innerHTML = html;
            node.parentNode.replaceChild(span, node);
        }
    }
});
