body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #1e1e1e; /* темнее фон */
    color: #e6e6e6;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}
body {
    background: linear-gradient(135deg, #1e1e1e, #292929); /* темнее градиент */
    animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Обычные ссылки */
a {
    color: #a8c0ff; /* Светло-голубой цвет */
    text-decoration: none; /* Убираем подчеркивание для чистого вида */
    transition: color 0.3s ease; /* Плавный переход цвета */
}

/* Ссылки при наведении */
a:hover {
    color: #91b3ff; /* Чуть темнее светло-голубого для эффекта наведения */
}

/* Кликнутые ссылки (посещённые) */
a:visited {
    color: #a8c0ff; /* Светло-голубой цвет для кликнутых ссылок */
}

/* Ссылки в активном состоянии */
a:active {
    color: #7ca6ff; /* Ещё немного темнее для активного состояния */
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    box-sizing: border-box;
    overflow: hidden;
}
.main-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}
.header {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 100px;
}
.header img {
    width: 270px;
    height: 360px;
    border-radius: 5px;
    border: 4px solid #333; /* темнее рамку изображения */
    object-fit: cover;
}
.header h1 {
    margin: 20px 0;
    font-size: 3rem;
    color: #e6b400;
}
.header p {
    font-size: 1.6rem;
    color: #a8a8a8;
}
.header h1, .card-title {
    text-shadow: 0 0 2px rgba(230, 180, 0, 0.4);
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
    align-items: stretch;
    box-sizing: border-box;
}
.card {
    background-color: #2a2a2a; /* темнее фон карточки */
    border: 2px solid #222; /* темнее рамка карточки */
    border-radius: 5px;
    padding: 20px;
    width: calc(100% - 40px);
    margin: 25px auto;
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.5s ease;
    flex-grow: 1;
    box-sizing: border-box;
    position: relative;
}
.card-visible {
    opacity: 1;
    transform: translateX(0);
}
.card-title {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2a2a2a; /* темнее фон заголовка карточки */
    padding: 5px 15px;
    border: 2px solid #222;
    border-radius: 5px;
    color: #e6b400;
    font-size: 2.5rem;
    text-align: center;
}
.card p,
.card ul {
    margin-bottom: 15px;
    color: #cccccc;
}
.card:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

strong {
    font-weight: bold;
    color: #e6e6e6;
}
.experience {
    background-color: #2a2a2a; /* темнее фон для опыта */
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    border: 2px solid #222; /* темнее рамка опыта */
}
.experience h3 {
    color: #e6b400;
    margin-bottom: 10px;
    font-weight: 700;
}
.experience ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}
.experience ul li {
    margin-bottom: 10px;
    color: #cccccc;
}
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #e6b400;
    color: #2e2e2e;
    border: none;
    padding: 8px 12px; /* Уменьшенные отступы */
    border-radius: 5px;
    font-size: 1.2rem; /* Уменьшенный размер шрифта */
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease; /* Плавные переходы для эффектов */
}
.back-to-top:hover {
    transform: scale(1.1); /* Легкое увеличение */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); /* Немного более глубокая тень */
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-mobile {
    margin: 30px 0;
    background-color: #e6b400;
    color: #2e2e2e;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

/* Показываем кнопку только на мобильных устройствах */
@media (max-width: 768px) {
    .back-to-top-mobile {
        opacity: 1;
        visibility: visible;
    }
}



.certificates {
    display: flex;
    flex-wrap: wrap;
    gap: 50px; /* Расстояние между сертификатами */
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 50px;
}

.certificate {
    position: relative;
    width: 300px; /* Размер сертификата */
    height: auto; /* Автоматическая высота */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.certificate img {
    width: 100%;
    height: auto; /* Поддержание формата 4:3 */
    border-radius: 5px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.certificate:hover img {
    transform: scale(1.05);
}

.certificate-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    color: #e6b400;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 5px;
}

.certificate:hover .certificate-link {
    opacity: 1;
}

.certificate-caption {
    margin-top: 10px; /* Отступ над подписью */
    font-size: 1.2rem;
    color: #e6e6e6;
}

.certificate-coming-soon img {
    opacity: 0.7;
    filter: grayscale(50%);
}

.skill-item strong {
    color: #e6e6e6;
}

.skills-container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    justify-content: center; /* Центрируем колонки в контейнере */
    flex-wrap: wrap;
}

.skills-column {
    flex: 1;
    min-width: 280px;
    text-align: center; /* Центрируем текст заголовков */
    margin-top: 20px;
}

.skills-column h3 {
    color: #e6b400;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center; /* Центрируем заголовки */
}

.skill-item {
    border: 2px solid #444;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #2e2e2e;
    color: #cccccc;
    line-height: 1.5;
    text-align: left; /* Оставляем текст самих навыков выровненным по левому краю для читаемости */
}

@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    .header img {
        width: 180px;
        height: 240px;
    }
    .header h1 {
        font-size: 2rem;
    }
    .header p {
        font-size: 1.2rem;
    }
    .back-to-top {
        display: none;
    }
    .footer-links {
        flex-direction: column; /* Располагаем ссылки в колонку */
        align-items: center; /* Центрируем ссылки по горизонтали */
        gap: 15px; /* Уменьшенный отступ между ссылками */
    }

}

@media (max-width: 480px) {
    .wrapper {
        width: 100%;
    }
    .back-to-top {
        display: none;
    }
    .main-container {
        padding: 10px;
    }
    .header img {
        width: 150px;
        height: 200px;
    }
    .header h1 {
        font-size: 1.5rem;
    }
    .header p {
        font-size: 1rem;
    }
    .cards-container {
        gap: 10px;
    }
    .card {
        width: 100%; /* увеличиваем ширину карточек */
        padding: 15px; /* уменьшаем внутренний отступ для более компактного вида */
    }

    .card-title {
        font-size: 1.8rem; /* Уменьшаем размер заголовка раздела */
        padding: 4px 10px;
        top: -15px; /* изменяем позицию заголовка */
        white-space: nowrap; /* предотвращает перенос текста на новую строку */
        overflow: hidden; /* обрезает текст, если он выходит за границы */
        text-overflow: ellipsis; /* добавляет троеточие, если текст обрезан */
    }
    .skills-column h3 {
        font-size: 1.5rem; /* Уменьшаем размер h3 для подзаголовков в колонках */
    }
    .back-to-top-mobile{
        visibility: visible;
    }
    .skill-item {
        max-width: 100%;
    }

}
footer {
    max-width: 90%; /* Ограничиваем ширину, чтобы футер выглядел как карточка */
    margin: 40px auto; /* Центрируем футер */
    padding: 20px 40px;
    text-align: center;
    color: #e6e6e6;
    font-size: 1.2rem;
    background-color: transparent; /* Прозрачный фон */
    box-shadow: none; /* Убираем тень */
}

footer p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e6b400;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-icon {
    color: #a8a8a8; /* Сероватый цвет текста по умолчанию */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px; /* Отступ между иконкой и текстом */
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, border 0.3s ease;
}

.footer-icon:hover {
    color: #ffffff; /* Белый цвет текста при наведении */
    background-color: #444; /* Тёмный фон при наведении */
    transform: scale(1.02); /* Легкое увеличение при наведении */
    border: 2px solid #e6b400; /* Жёлтая обводка при наведении */
}

.footer-icon:visited {
    color: #a8a8a8; /* Цвет текста после посещения остаётся серым */
}

.material-icons {
    font-size: 1.3rem; /* Размер иконок чуть больше текста */
    line-height: 1;
}
