body {
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.container {
    padding-top: 0.5rem !important; /* вместо стандартного 1.5rem */
}

.categories-bar {
    margin-top: 0 !important; /* убираем лишний зазор сверху */
    margin-bottom: 1rem;
}


pre code{
    /*background-color: #f5f5f5;*/
    background-color: #ffffdd;
    color: #000000;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    padding: 1em;
    border-radius: 8px;
    display: block;
    overflow-x: auto;
    line-height: 1.5;
    white-space: pre;
    border: 1px solid #d1d5da;
}

img {
    max-width: 100%;
    height: auto;
}

article .border-top {
    font-size: 1rem;
    line-height: 1.5;
}

@media (min-width: 768px) {
    article .border-top {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}

.post-content {
    max-width: 90ch;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* === INDEX PAGE STYLES === */

/* Основной блок профиля */
.profile-section {
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    align-items: center; /* текст и фото выровнены по центру */
    gap: 2rem;
    text-align: left;
}

/* Контентная часть (текст) */
.profile-content {
    flex: 1; /* занимает оставшееся пространство */
}

/* Фото */
.profile-photo {
    width: auto;
    height: 280px;
    border-radius: 30%; /* чуть округлое фото */
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0; /* не сжимается при узком экране */
    order: 2; /* фото справа на десктопе */
}

/* Заголовок и подзаголовок */
.name-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #343a40;
}

.subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Контактная строка под подзаголовком */
.contact-line {
    display: inline-flex;
    gap: 0.5rem;
    font-size: 1.05rem;
    margin-top: -1rem;
    color: #495057;
}

.contact-line a {
    color: #343a40;
    text-decoration: none;
    transition: color 0.2s ease;
    /*margin: 0 0.2rem; !* пробелы вокруг "/" *!*/
}

.contact-line a:hover {
    text-decoration: underline;
}

/* === MOBILE (до 768px) === */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column; /* текст и фото в колонку */
        text-align: center;
        gap: 2rem;
    }

    .profile-photo {
        order: 0; /* фото наверху */
        align-self: center;
        height: 220px;
        max-width: 80%;
    }

    .name-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .contact-line {
        font-size: 1rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem; /* расстояние между ссылками */
    }

    .contact-line a {
        margin: 0; /* убираем лишние отступы */
    }
}

/* === END INDEX PAGE === */

main {
    flex: 1;
}

footer {
    margin-top: auto;
}