
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #edeef0;
    font-family: Arial, sans-serif;
    color: #222;
}

a {
    text-decoration: none;
    color: #2787e8;
}

/* Основная структура */

.container {
    max-width: 1420px;
    margin: 28px auto;
    display: grid;
    grid-template-columns: 190px 785px 350px;
    gap: 18px;
    align-items: start;
}

/* Левое меню */

.sidebar {
    padding-top: 2px;
}

.sidebar a {
    display: block;
    padding: 14px 10px;
    color: #52606d;
    font-size: 17px;
}

.sidebar a:hover {
    color: #2787e8;
}

/* Профиль */

.profile {
    background: white;
    border-radius: 11px;
    overflow: hidden;
    margin-bottom: 18px;
}

/* Обложка */

.cover {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #d9e8f5;
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

/* Белая область профиля */

.profile-info {
    min-height: 168px;
    padding: 23px 20px 20px 200px;
    position: relative;
    background: white;
}

/* Аватарка */

.avatar {
    position: absolute;
    top: -65px;
    left: 25px;
    width: 150px;
    height: 150px;
    border: 5px solid white;
    border-radius: 50%;
    overflow: hidden;
    background: #dce8f3;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Имя и статус */

.name h1 {
    font-size: 24px;
    margin: 0 0 8px;
}

.name p {
    color: #626d78;
    font-size: 18px;
    margin: 0 0 10px;
}

.name small {
    color: #87919c;
    font-size: 14px;
}

/* Кнопка */

.button {
    position: absolute;
    right: 20px;
    top: 24px;
    padding: 12px 18px;
    background: #eaf2fa;
    border-radius: 8px;
    font-size: 17px;
}

/* Карточки */

.card {
    background: white;
    border-radius: 11px;
    padding: 20px;
    margin-bottom: 18px;
}

.card h2 {
    font-size: 20px;
    margin: 0 0 20px;
}

.card h3 {
    font-size: 19px;
    margin: 0 0 20px;
}

.card p {
    color: #596570;
    font-size: 18px;
    line-height: 1.7;
}

/* Информация обо мне */

.details {
    border-top: 1px solid #e7e8ec;
    padding-top: 18px;
    margin-top: 18px;
}

.details div {
    padding: 12px 0;
    color: #52606d;
    font-size: 17px;
}

.details span {
    display: inline-block;
    width: 155px;
    color: #87919c;
}

/* Правая колонка */

.right-sidebar .card {
    padding: 22px;
}

.right-sidebar p {
    margin: 12px 0;
}

.right-sidebar a {
    display: inline-block;
    font-size: 17px;
    margin-bottom: 8px;
}

/* Адаптация для телефона */

@media (max-width: 1100px) {

    .container {
        grid-template-columns: 150px minmax(0, 1fr);
        padding: 0 15px;
    }

    .right-sidebar {
        grid-column: 2;
    }
}

@media (max-width: 650px) {

    .container {
        display: block;
        margin: 10px;
    }

    .sidebar {
        display: flex;
        overflow-x: auto;
    }

    .sidebar a {
        white-space: nowrap;
        font-size: 13px;
    }

    .cover {
        height: 140px;
    }

    .profile-info {
        padding: 90px 15px 20px;
    }

    .avatar {
        width: 115px;
        height: 115px;
        top: -55px;
    }

    .button {
        top: 12px;
        right: 12px;
    }

    .right-sidebar {
        display: block;
    }

    .details span {
        width: 115px;
    }
}
