/* ==========================================
   1. ОБЩИЕ НАСТРОЙКИ И ПЛАВНЫЙ СКРОЛЛ
   ========================================== */

/* Включаем плавную прокрутку при клике на ссылки в навигации */
html {
    scroll-behavior: smooth;
}

/* Сбрасываем стандартные отступы браузера */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ФОН С ГРАДИЕНТОМ И ЦЕНТРИРОВАНИЕ */
body {
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #2d3748;
    
    /* Градиентный фон (углы 135 градусов, переход 3 цветов) */
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    background-attachment: fixed; /* Фон остаётся неподвижным при скролле */
    
    /* Flexbox для выравнивания содержимого строго по центру по горизонтали */
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ==========================================
   2. ВЕРХНЯЯ НАВИГАЦИЯ (HEADER / NAV)
   ========================================== */

.header {
    width: 100%;
    position: sticky; /* Залипает наверху при прокрутке */
    top: 0;
    z-index: 1000;
    
    /* Эффект матового стекла (Glassmorphism) */
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px; /* Расстояние между пунктами меню */
}

.nav a {
    text-decoration: none;
    color: #f7c94d;
    font-weight: 600;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 8px;
    
    /* Плавный переход цвета при наведении */
    transition: all 0.3s ease;
}

/* Анимация пунктов меню при наведении */
.nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fef08a; /* Лёгкий золотистый оттенок */
}

.card {
    background-color: #ffffff; /* Белый выделенный фон */
    width: 90%;
    max-width: 650px; /* Чтобы карточка не была слишком широкой на ПК */
    margin: 40px auto 30px auto;
    padding: 40px;
    border-radius: 24px; /* Закругления углов карточки */
    
    /* Мягкая объёмная тень */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    
    /* Анимация подъема самой карточки при наведении */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Эффект легкого всплытия карточки при наведении */
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.section {
    text-align: center;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%; /* 50% делает картинку идеально круглой */
    object-fit: cover;  /* Не даёт прямоугольному фото сжаться или исказиться */
    border: 4px solid #f3f4f6;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    
    /* Плавная анимация аватарки */
    transition: transform 0.4s ease;
}

/* При наведении аватарка немного увеличивается и поворачивается */
.avatar:hover {
    transform: scale(1.08) rotate(4deg);
}

/* Заголовки и тексты */
h1 {
    font-size: 28px;
    color: #1a202c;
    margin-bottom: 5px;
}

h2 {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 20px;
}

.subtitle {
    color: #4f46e5;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
}

.description {
    line-height: 1.6;
    color: #4a5568;
    font-size: 15px;
}

/* Разделительные полосы */
.divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
    margin: 35px 0;
}


/* ==========================================
   5. ИКОНКИИ СОЦСЕТЕЙ И ССЫЛКИ
   ========================================== */

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Автоперенос на новую строку, если не влезают */
}

/* Кнопка-ссылка */
.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    
    /* КЛЮЧЕВОЕ СВОЙСТВО: задает плавность анимаций */
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.social-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* АНИМАЦИЯ ПРИ НАВЕДЕНИИ (HOVER) НА СОЦСЕТИ */
.social-btn:hover {
    transform: translateY(-4px) scale(1.05); /* Увеличение и подъем вверх */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Кастомные цвета при наведении на конкретную соцсеть */
.social-btn.youtube:hover {
    background-color: #ff0000;
    color: #ffffff;
    border-color: #ff0000;
}

.social-btn.telegram:hover {
    background-color: #229ed9;
    color: #ffffff;
    border-color: #229ed9;
}

.social-btn.github:hover {
    background-color: #24292e;
    color: #ffffff;
    border-color: #24292e;
}

.specs-list {
    list-style: none;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    text-align: left;
}

.specs-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.specs-list li:last-child {
    border-bottom: none; /* Убираем черту у последнего элемента */
}

.specs-list span {
    color: #718096;
}

.specs-list strong {
    color: #1a202c;
}

.footer {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

summary {
    list-style: none;
    cursor: pointer;
}

summary::-webkit-details-marker {
    display: none;
}

.skills-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f3f4f6;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: #4f46e5;
    user-select: none;
    transition: background-color 0.3s ease;
}

.skills-summary:hover {
    background-color: #e5e7eb;
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

details[open] .arrow {
    transform: rotate(180deg);
}

.skills-content {
    padding: 20px 10px 10px 10px;
    text-align: left;
}

.skills-content h3 {
    font-size: 15px;
    color: #6b7280;
    margin: 15px 0 10px 0;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #eeefbe; 
    color: #374151;
    padding: 6px 14px;
    border-radius: 20px;       
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #4f46e5;
    color: #ffffff;
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

details[open] .skills-content {
    animation: fadeIn 0.4s ease-in-out;
}

@media (max-width: 600px) {
    .card {
        width: 92%;
        padding: 25px 20px;
        margin-top: 20px;
    }

    .nav ul {
        gap: 10px;
    }

    .nav a {
        font-size: 14px;
        padding: 4px 8px;
    }

    .social-links {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
        justify-content: center;
    }

    .specs-list li {
        flex-direction: column;
        gap: 4px;
    }
}