/* 1. Общие настройки и палитра (3-5 цветов) [cite: 108, 109] */
:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 2. Фиксированная навигация [cite: 13, 14, 17] */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

/* Обновленные стили выпадающего меню */
.dropdown {
    position: relative;
    list-style: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    /* Появляется строго под основной ссылкой */
    left: 0;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 0;
}

.dropdown:hover>.dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-main) !important;
    padding: 12px 20px;
    margin: 0;
    display: block;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent) !important;
}

/* Стили для вложенного меню (Влево) */
.submenu {
    position: relative;
    list-style: none;
}

.submenu-content {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    /* Сдвигаем ВЛЕВО относительно родителя */
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: -8px 8px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 0;
}

/* Показываем вложенное меню при наведении на "Практическую" */
.submenu:hover>.submenu-content {
    display: block;
}

/* Убираем лишние отступы у списков в навигации */
nav ul {
    margin: 0;
    padding: 1rem;
}

/* 3. Hero-секция (100vh) [cite: 26] */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.anim-text {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: bold;
    border-right: 2px solid var(--accent);
    /* Эффект печати */
    white-space: nowrap;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto 2rem;
    animation: typing 3.5s steps(40, end), blink .75s step-end infinite;
}

/* Стилизация кнопки "Связаться со мной" [cite: 24] */
.btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 28px;
    background-color: var(--accent);
    color: var(--bg-dark);
    /* Темный текст на светлом фоне */
    text-decoration: none;
    /* Убираем то самое подчеркивание со скриншота */
    border-radius: 50px;
    /* Делаем края закругленными */
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    /* Плавность для ховера */
    border: 2px solid var(--accent);
}

.btn:hover {
    background-color: transparent;
    color: var(--accent);
    /* При наведении меняем фон и текст местами */
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    /* Эффект свечения */
    transform: scale(1.05);
    /* Легкое увеличение */
}

/* 4. Навыки с прогресс-барами  */
section {
    padding: 100px 10% 60px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Добавляем расстояние между карточками */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    /* Это создаст те самые отступы между блоками */
    margin-bottom: 3rem;
}

/* Стили для блока Soft Skills */
.soft-skills-box {
    margin-top: 2rem;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.soft-skills-box h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.soft-skills-box ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.soft-skills-box li {
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
}

.bar {
    background: #334155;
    height: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.progress {
    background: var(--accent);
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent);
}

/* Контейнер для всей шкалы */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Вертикальная линия посередине */
.timeline::before {
    content: '';
    position: absolute;
    left: 31px;
    /* Выравнивание по центру точек */
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 40px;
}

/* Точка на линии */
.timeline-dot {
    position: absolute;
    left: 22px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    z-index: 1;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    /* Небольшой интерактив при наведении */
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--text-main);
}

/* 5. Карточки проектов с Hover-эффектом [cite: 89, 96] */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Контейнер для текста внутри карточки */
.project-info {
    padding: 1.5rem;
}

.project-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* Картинка заполнит блок без искажений */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-info h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

/* Стили технологий (тэги) */
.project-tech {
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Кнопки внутри карточки */
.project-links {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-small.outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-small:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* 6. Форма контактов [cite: 100] */
form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    background: var(--card-bg);
    color: white;
}

button {
    padding: 1rem;
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}



/* Анимации [cite: 27] */
@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent)
    }
}