/* Основные стили для body */
body {
    counter-reset: section-counter;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #fff;
}

/* Контейнер */
.container {
    max-width: 1340px;
    width: 100%;
    padding: 0 20px 20px;
    box-sizing: border-box;
    background-color: #fff;
}

/* Стили для header */
.header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    height: 50vh;
}

/* Изображение в header, занимающее 38% */
.header-image {
    width: 38%;
    background-color: rgb(255, 255, 255); /* Фон для случая, если изображение не загрузится */
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Стиль для изображения */
.header-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Если изображение не загрузилось */
.header-image.image-error {
    background-color: rgba(217, 217, 217, 1); /* Цвет фона */
}


/* Контент в header, занимающий 62% */
.header-content {
    width: 62%;
    padding-top: 1.5em;
}

/* Меню */
.menu {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
}

.menu ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-direction: row;
    justify-content: space-between;
    align-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.menu a {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 22.5px;
    color: rgba(128, 128, 128, 1);
    text-decoration: none;
    display: block;
}

.menu a:hover {
    color: rgba(128, 128, 128, 1);
    text-shadow: 0px 0px 8px rgba(128, 128, 128, 0.5);
}

/* Разделитель */
.header-divider {
    margin: 1.5em 0;
    border-top: 1px solid rgba(217, 217, 217, 1);
}

.introblock {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: calc(100% - 4.5em);
    flex-direction: column;
}

/* Разделитель */
.intro-divider {
    border-top: 1px solid rgba(217, 217, 217, 1);
}

/* Заголовки и текст */
.header-content h1, .header-content h2 {
    font-family: 'Unbounded', sans-serif;
    margin: 0 0 10px;
}

.header-content p {
    margin: 0;

    text-align: left;
}

/* Стиль для элемента p с классом name */
.name {
    font-family: 'Unbounded', sans-serif;
    text-transform: uppercase;
    font-size: 40px;
    font-weight: 400;
    line-height: 48px;
    color: transparent; /* Начинаем с прозрачного текста */
    background: linear-gradient(92.18deg, #1B1923 0%, #3E3A4E 50%, #1B1923 100%);
    -webkit-background-clip: text; /* Поддержка для веб-клипа фона */
    background-clip: text; /* Клип по тексту */
}

/* Стиль для элемента p с классом surname */
.surname {
    font-family: 'Unbounded', sans-serif;
    text-transform: uppercase;
    font-size: 70px;
    font-weight: 500;
    line-height: 84px;
    color: transparent; /* Начинаем с прозрачного текста */
    background: linear-gradient(92.18deg, #1B1923 0%, #3E3A4E 50%, #1B1923 100%);
    -webkit-background-clip: text; /* Поддержка для веб-клипа фона */
    background-clip: text; /* Клип по тексту */
}

.position {
    font-family: Montserrat;
    text-transform: uppercase;
    color: transparent; /* Начинаем с прозрачного текста */
    background: rgba(128, 128, 128, 1);
    -webkit-background-clip: text; /* Поддержка для веб-клипа фона */
    background-clip: text; /* Клип по тексту */
    padding-top: 1em;
    padding-bottom: 2em;
}


/* Стиль для текста с иконкой слева */
.icon-text {
    display: flex;
    align-items: center;
    gap: 10px; 
    font-family: Montserrat;
    font-size: 15px;
    font-weight: 500;
    line-height: 22.5px;
    padding-bottom: 1em;
/* Отступ между иконкой и текстом */
}

.icon-text img {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Базовые стили для всех ссылок на странице */
a {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 22.5px;
    color: rgba(128, 128, 128, 1); /* Основной цвет ссылки */
    text-decoration: none; /* Убирает стандартное подчёркивание */
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Состояние при наведении */
a:hover {
    color: rgba(128, 128, 128, 1); /* Синий цвет при наведении */
    text-shadow: 0px 0px 8px rgba(128, 128, 128, 0.5);; /* Свечение при наведении */
}

/* Состояние при нажатии */
a:active {
    color: #030303; /* Более тёмный синий при нажатии */
}

/* Состояние для посещённых ссылок */
a:visited {
    color: rgba(100, 100, 100, 1); /* Цвет для посещённых ссылок */
}

/* Кнопка для скачивания */
.download-button {
    padding: 1em 3em;
    margin-top: 2em;
    font-size: 1em;
    color: #fff;
    background: linear-gradient(92.18deg, #1B1923 0%, #3E3A4E 50%, #1B1923 100%);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2em;
    font-family: 'Montserrat';
    font-weight: 100;
}

.download-button svg {
    fill: white;
}

.section {
    margin-bottom: 6em;
}

/* Оформление заголовка */
.section-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 48px;
    text-align: left;
    text-transform: uppercase; /* Верхний регистр */
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 20px;
    color: rgba(204, 204, 204, 1);
    margin: 1.3em 0;
}

/* Порядковый номер заголовка */
.section-title::after {
    counter-increment: section-counter; /* Увеличивает счётчик только один раз */
    content: "0" counter(section-counter); /* Добавляет порядковый номер */
    font-size: 40px;
    font-weight: 400;
    color: rgba(204, 204, 204, 1);
    text-align: right;
}

.section p{
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    font-family: Montserrat;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: rgba(27, 25, 35, 1);
}

/* Секция карточек */
.cards-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 0;
}

/* Стили для карточек */
.card {
    width: calc(33.33% - 90px); /* Три карточки в ряду с отступами */
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Стили для изображений в карточках */
.card img {
    height: auto;
    max-height: 77px;
    margin-bottom: 3em;
}

/* Текстовая подпись для карточек */
.card-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #555;
}

/* Секция карточек */
.cards-result {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 40px 0;
    margin: 0 auto;
}

/* Стили для карточек */
.cards-result .card {
    width: calc(50% - 90px); /* Три карточки в ряду с отступами */
    padding: 20px;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
    justify-content: left;
}

/* Стили для изображений в карточках */
.cards-result .card img {
    height: auto;
    max-height: 77px;
    margin-bottom: 1em;
}

.cards-result h3{
    text-align: left;
    color: rgba(27, 25, 35, 1);
}

.cards-result p{
    text-align: left;
    color: rgba(128, 128, 128, 1);
}

.skills-m {
    display: none;
}

.burger-menu {
    display: none;
}


/* Секция "Опыт работы" */
.work-experience {
    padding: 40px 0;
}

.timeline {
    max-width: 1100px;
    margin: 0 auto;
}
.timeline p {
    text-align:left;
    font-size: 15px;
    color: rgba(128, 128, 128, 1);
    margin-bottom: 1em;
}
/* Элементы таймлайна */
.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

/* Точка и линия таймлайна */
.timeline-marker {
    width: 10px;
    height: 10px;
    background: linear-gradient(92.18deg, #1B1923 0%, #3E3A4E 50%, #1B1923 100%);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 5px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 25px;
    height: 100%;
    width: 2px;
    background-color: rgba(217, 217, 217, 1);
}

/* Контент с правой стороны */
.timeline-content {
    margin-left: 4em;
    padding-left: 20px;
}

/* Период работы */
.work-period {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1em;
    font-size: 13px;
    font-weight: 400;
    line-height: 19.5px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    color: rgba(128, 128, 128, 1);

}

/* Название компании */
.company-name {
    font-family: 'Unbounded', sans-serif;
    font-size: 40px;
    font-weight: 400;
    margin-bottom: 5px;
    color:linear-gradient(92.18deg, #1B1923 0%, #3E3A4E 50%, #1B1923 100%);
}

/* Должность */
.job-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #555;
}

/* Список обязанностей */
.responsibilities {
    list-style-type: disc;
    margin: 0;
    padding-left: 0;
}

.responsibilities li {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 5px;
    list-style: none; /* Убираем стандартные маркеры */
    position: relative;
    padding-left: 20px;
}

/* Добавляем квадратные точки */
.responsibilities li::before {
    content: "■"; /* Черная квадратная точка */
    font-size: 1em;
    color: #000;
    position: absolute;
    left: 0;
    top: -2px; /* Выравниваем по вертикали */
}

.institution-name{
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5em;
    font-weight: 400;
}
.degree{
    padding-top: 1em;
    font-weight: 400;
}

/* Секция "PET-проекты" */
.pet-projects {
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Стиль для карточек */
.pet-projects .card {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    transition: transform 0.3s ease;
}


/* Изображение в карточке */
.pet-projects .card-image {
    width: 200px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Контент в карточке */
.pet-projects .card-content {
    display: flex;
    flex-direction: column;
    justify-content: left;
}

.pet-projects .card-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    text-align: left;
}

.pet-projects .card-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    text-align: left;
    margin: 3px 0;
}

.icon-ext{
    margin-bottom: -3px!important;
}

footer {
    width: 100%;
    background: black;
    position: absolute;
    left: 0;
    height: 7vh;
}


/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {

    .m-contacts {
        position: absolute;
        bottom: 4em;
        left: 2em;
    }
    .m-contacts a{
        color: white;
    }

    .header {
        flex-direction: column;
        align-items: center;
        height: 90vh;
    }
    /* Блокировка прокрутки страницы */
    .no-scroll {
        overflow: hidden;
    }
    .burger-menu {
        display: block;
    }
   /* Стили для кнопки "бургер" */
    .burger-button {
        position: absolute;
        top: 1em;
        right: 1.5em;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        z-index: 1000;
    }

    /* Скрытое меню по умолчанию */
    .mobile-menu-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px); /* Эффект размытия */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }

    /* Показ меню */
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Стили для навигации */
    .mobile-nav {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Кнопка закрытия меню */
    .close-button {
        position: static;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
    }

    /* Стили для ссылок в меню */
    .mobile-nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .mobile-nav ul li {
        margin: 20px 0;
    }

    .mobile-nav ul li a {
        font-family: 'Montserrat', sans-serif;
        font-size: 24px;
        font-weight: 500;
        color: #fff;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .mobile-nav ul li a:hover {
        color: #007bff;
    }


    .card {
        width: calc(50% - 20px); /* Две карточки в ряду на планшетах */
    }

    .header-image {
        width: 100%;
        min-width: 200px;
        height: autod;
    }

    .header-content {
        width: 100%;
        padding: 0;
        align-items: center;
        text-align: center;
    }
    .menu{
        display:none;
    }
    .menu ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .download-button {
        width: 100%;
        padding: 1em;
        justify-content: center;
    }

    .name {
        font-size: 1.5em;
    }

    .surname {
        font-size: 2em;
    }

    .section {
        padding: 20px 0;
        margin-bottom: 0;
    }

    .section-title {
        font-size: 30px;
    }
    
    .section p {
        text-align: left;
        font-size: 1em;
    }
    .skills {
        display: none;
    }
    .skills-m {
        display: flex;
        gap: 1em;
    }
    .cards-result img { 
        display: none;
    }
    .cards-result h3 { 
        margin: 0.4em 0;
    }

    .cards-result .card {
        width: 100%;
        padding: 0 20px 0 0;
    }
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-content {
        margin-left: 1.32em;
        padding-left: 0;
        border-left: none;
    }
    .company-name {
        font-size: 24px;
    }
    .timeline p {
        font-size: 0.9em;
        line-height: 1.2em;
    }

    .pet-projects .card {
        flex-direction: column;
        text-align: center;
        padding:0;
    }

    .pet-projects .card-image {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
}