/* Общие стили */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'IBM Plex Serif', serif;
    /* Изменено на 'IBM Plex Serif' */
    box-sizing: border-box;
    scroll-behavior: smooth;
    background-color: #f9f9f9;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
    /* Основной цвет текста */
    line-height: 1.6;
    /* Удобочитаемость */
}

.wrapper {
    flex: 1;
    max-width: 1200px;
    /* Максимальная ширина контента */
    margin: 0 auto;
    /* Центрирование контента */
    padding: 40px 20px;
    /* Отступы для мобильных устройств */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Центрирование содержимого */
}

header {
    background: #fff;
    color: #000;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
    /* Легкая тень для заголовка */
    max-width: 1200px;
    /* Ограничение ширины хедера */
    margin: 0 auto;
    /* Центрирование хедера */
}

.logo span:first-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #A52A2A;
}

.logo span:nth-child(2) {
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: underline;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after,
nav ul li a:active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu .bar {
    height: 3px;
    width: 25px;
    background-color: #000;
    margin: 4px 0;
    transition: 0.4s;
}

.content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    max-width: 1200px;
    /* Ограничение ширины */
    margin: 0 auto;
    /* Центрирование */
    gap: 40px;
    /* Отступ между текстом и аватаром */
}

.content .text {
    flex: 1;
    max-width: 50%;
    /* Ограничение ширины текста */
    padding: 0 20px;
    /* Добавляем отступы для текста */
}

.content .avatar {
    flex: 1;
    text-align: center;
    /* Центрирование аватара */
}

.content .avatar img {
    max-width: 100%;
    /* Аватар адаптируется под ширину */
    height: auto;
    border-radius: 8px;
    /* Легкое скругление углов */
}

.resume-button {
    background-color: #A52A2A;
    color: white;
    border: none;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-radius: 4px;
    /* Скругление кнопки */
    margin-top: 20px;
}

.resume-button:hover {
    background-color: #555;
    transform: scale(1.05);
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    width: 100%;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 60px;
    /* Отступ между футером и последним блоком */
}

.certificate-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    /* Оборачивание на маленьких экранах */
    gap: 40px;
    /* Отступ между сертификатами */
}

.certificate-item {
    text-align: center;
    /* Центрирование содержимого */
    max-width: 300px;
    /* Ограничение ширины одного сертификата */
}

.certificate-item h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
    /* Отступ между заголовком и изображением */
    color: #333;
    /* Цвет текста */
}

.certificate-image {
    width: 300px;
    /* Фиксированная ширина */
    height: 200px;
    /* Фиксированная высота */
    object-fit: cover;
    /* Сохраняет пропорции изображения */
    border: 1px solid #ccc;
    padding: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
}

.certificate-image:hover {
    transform: scale(1.1);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    /* Тень при наведении */
}

.section {
    padding: 50px 20px;
    /* Внутренние отступы для разделов */
    background-color: #fff;
    margin: 40px auto 0;
    /* Вертикальный отступ сверху и горизонтальное центрирование */
    border-radius: 8px;
    max-width: 1200px;
    /* Ограничение ширины */
}

.section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 2em;
}

.section p {
    line-height: 1.6;
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    /* Ограничение ширины текста */
    margin: 0 auto;
    /* Центрирование */
}

.section ul {
    padding-left: 20px;
    list-style-type: disc;
    color: #555;
    max-width: 800px;
    /* Ограничение ширины */
    margin: 0 auto;
    /* Центрирование */
}

.section a {
    color: #A52A2A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.section a:hover {
    color: #555;
}

/* Медиа-запросы */
@media (max-width: 840px) {
    .wrapper {
        padding: 1px;
    }

    .navigation {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    header {
        justify-content: space-between;
        padding: 10px 20px;
    }

    .logo {
        text-align: center;
        flex: 1;
    }

    .hamburger-menu {
        order: -1;
    }

    .navigation.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background-color: #fff;
        text-align: center;
        box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
    }

    .navigation.active ul {
        flex-direction: column;
    }

    .navigation.active ul li {
        margin: 10px 0;
    }

    .content {
        flex-direction: column;
        /* На мобильных устройствах текст и аватар будут один над другим */
        align-items: center;
        /* Центрирование текста и аватара */
    }

    .content .text {
        max-width: 100%;
        /* Текст занимает всю ширину экрана */
    }

    .content .avatar {
        margin-top: 20px;
        /* Отступ между текстом и аватаром */
    }

    .content .avatar img {
        max-width: 100%;
        height: auto;
        padding: 10px;
    }

    .certificate-container {
        flex-direction: column;
        align-items: center;
    }

    .certificate-image {
        max-width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 30px 10px;
        /* Уменьшаем отступы для мобильных устройств */
        margin-top: 40px;
        /* Уменьшаем вертикальный отступ для мобильных устройств */
    }

    .section h2 {
        font-size: 1.8em;
    }

    .section p,
    .section ul {
        font-size: 1em;
    }

    .section ul {
        padding-left: 15px;
    }
        
    .certificate-container {
            flex-direction: column;
        }
    
        .certificate-image {
            width: 100%;
            height: auto;
        }
}