/* ===== Базовые настройки ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Светлая тема */
    --bg-color-rgb: 248, 250, 252;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --card-bg: rgba(255, 255, 255, 0.85);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --border-color: rgba(226, 232, 240, 0.6);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --glass: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --accent-color: #06b6d4;
    --glass: rgba(255, 255, 255, 0.1);
    --bg-color-rgb: 248, 249, 250;
    --primary-color-rgb: 37, 99, 235;
    --secondary-color-rgb: 124, 58, 237;
}

body.dark-theme {
    /* Темная тема - стильная, не слишком темная */
    --bg-color-rgb: 15, 23, 42;
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --primary-color: #60a5fa;
    --secondary-color: #a78bfa;
    --accent-color: #22d3ee;
    --card-bg: rgba(30, 41, 59, 0.75);
    --nav-bg: rgba(15, 23, 42, 0.92);
    --border-color: rgba(51, 65, 85, 0.6);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    --glass: rgba(255, 255, 255, 0.05);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

/* ФИКС СМЕЩЕНИЯ НА МОБИЛЬНЫХ */
html, body {
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* ===== НАВИГАЦИЯ - ПЕРЕРАБОТАНА ДЛЯ МОБИЛЬНЫХ ===== */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 30px;
    position: relative;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    z-index: 1002;
}

/* ===== ОСНОВНОЕ МЕНЮ ДЛЯ ДЕСКТОПА ===== */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    padding: 10px 20px;
    border-radius: 12px;
    transition: var(--transition);
    font-size: 0.95rem;
    display: block;
}

.nav-menu a:hover {
    background: var(--glass);
    color: var(--primary-color);
}

.nav-menu a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* ===== КНОПКИ ===== */
.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

#themeToggle, .menu-toggle {
    background: var(--glass);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

#themeToggle:hover, .menu-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.menu-toggle {
    display: none;
}

/* ===== ПЕРЕРАБОТАННОЕ МОБИЛЬНОЕ МЕНЮ ===== */
@media (max-width: 768px) {
    /* ФИКС ОСНОВНОГО ЛАЙАУТА */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    /* НАВИГАЦИЯ - УПРОЩЕННАЯ ВЕРСИЯ */
    nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding: 0 !important;
        height: 70px !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 1000 !important;
        background: var(--nav-bg) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    
    .nav-container {
        padding: 0 15px !important;
        height: 70px !important;
        max-width: 100% !important;
    }
    
    /* КНОПКА БУРГЕРА - ВСЕГДА ВИДИМА НА МОБИЛЬНЫХ */
    .menu-toggle {
        display: flex !important;
        z-index: 1002 !important;
        background: var(--glass) !important;
        border: 1px solid var(--border-color) !important;
    }
    
    /* Скрываем кнопку темы на мобильных */
    #themeToggle {
        display: none !important;
    }
    
    /* ===== МОБИЛЬНОЕ МЕНЮ - ПРОСТАЯ И РАБОЧАЯ ВЕРСИЯ ===== */
    .nav-menu {
        /* Скрытое состояние */
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        overflow: hidden !important;
        
        /* Стили меню */
        background: var(--nav-bg) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        
        /* Расположение элементов */
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        margin: 0 !important;
        
        /* Границы и тени */
        border-top: 1px solid var(--border-color) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        
        /* Анимация */
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        opacity: 0;
        visibility: hidden;
        z-index: 999 !important;
    }
    
    /* Активное состояние меню */
    .nav-menu.active {
        height: calc(100vh - 70px) !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow-y: auto !important;
        padding: 20px 0 !important;
    }
    
    /* Элементы меню */
    .nav-menu li {
        width: 90% !important;
        max-width: 400px !important;
        margin: 8px 0 !important;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease !important;
        transition-delay: 0.1s !important;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Создаем задержку для каждого элемента */
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s !important; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.15s !important; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.2s !important; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.25s !important; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.3s !important; }
    
    /* Ссылки меню */
    .nav-menu a {
        display: block !important;
        width: 100% !important;
        padding: 18px 25px !important;
        text-align: center !important;
        font-size: 1.2rem !important;
        background: var(--glass) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 15px !important;
        margin: 5px auto !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
        color: white !important;
        border-color: transparent !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3) !important;
    }
    
    /* ===== ОСТАЛЬНЫЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ ===== */
    /* Герой секция */
    .hero {
        padding-top: 100px !important;
        min-height: auto !important;
        padding-bottom: 40px !important;
    }
    
    .hero-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 40px !important;
    }
    
    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .hero-desc {
        font-size: 1rem !important;
        padding: 0 15px !important;
    }
    
    .image-placeholder {
        width: 220px !important;
        height: 220px !important;
        font-size: 5rem !important;
    }
    
    /* Кнопки */
    .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 25px !important;
    }
    
    /* Секции */
    section {
        padding: 70px 0 !important;
    }
    
    .section-title {
        font-size: 2rem !important;
        margin-bottom: 40px !important;
        padding: 0 15px !important;
    }
    
    /* Навыки на мобильных */
    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 0 15px !important;
        max-width: 100% !important;
    }
    
    .skill-card {
        padding: 25px 20px !important;
        min-height: 320px !important;
        height: 320px !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 420px !important;
    }
    
    .skill-icon {
        font-size: 3rem !important;
        margin-bottom: 15px !important;
    }
    
    .skill-card h3 {
        font-size: 1.5rem !important;
        min-height: 2.4em !important;
        padding: 0 5px !important;
    }
    
    .skill-card:nth-child(1) h3,
    .skill-card:nth-child(2) h3 {
        font-size: 1.45rem !important;
        line-height: 1.2 !important;
    }
    
    .skill-card p {
        font-size: 1rem !important;
        line-height: 1.65 !important;
        min-height: 130px !important;
        padding: 0 5px !important;
    }
    
    .skill-card:hover {
        transform: translateY(-12px) scale(1.03) !important;
    }
    
    /* Опыт работы на мобильных */
    .timeline::before {
        left: 25px !important;
    }
    
    .timeline-item {
        width: 100% !important;
        left: 0 !important;
        padding-left: 60px !important;
        margin-bottom: 40px !important;
    }
    
    .timeline-item::before {
        left: 12px !important;
        right: auto !important;
        width: 18px !important;
        height: 18px !important;
        top: 8px !important;
    }
    
    .timeline-content {
        padding: 25px 20px !important;
        min-height: auto !important;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem !important;
    }
    
    .timeline-date {
        font-size: 0.9rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        padding: 8px 12px !important;
    }
    
    .company {
        font-size: 0.95rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .timeline-content li {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    /* Контакты */
    .contacts {
        padding: 40px 20px !important;
        margin: 20px 10px !important;
        border-radius: 20px !important;
    }
    
    .section-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
        padding: 0 10px !important;
    }
    
    .contact-link {
        padding: 15px 20px !important;
        font-size: 1rem !important;
        gap: 15px !important;
    }
    
    /* Обо мне */
    .about {
        padding: 30px 20px !important;
        margin: 20px 10px !important;
        border-radius: 20px !important;
    }
    
    .about-content p {
        padding-left: 15px !important;
        font-size: 1rem !important;
    }
}

/* Для устройств без hover (тачскрины) */
@media (hover: none) and (pointer: coarse) {
    .skill-card:hover {
        transform: translateY(-15px) scale(1.03) !important;
    }
    
    .timeline-content:hover {
        transform: none !important;
    }
    
    .contact-link:hover {
        transform: none !important;
    }
    
    /* Увеличиваем тап-зоны */
    .nav-menu a,
    .btn,
    .contact-link,
    #themeToggle,
    .menu-toggle {
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Поддержка уменьшенного движения */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Герой секция ===== */
.hero {
    padding-top: 180px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-weight: 500;
    opacity: 0.9;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.85;
    line-height: 1.8;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.image-placeholder {
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8rem;
    box-shadow: 
        0 25px 50px rgba(59, 130, 246, 0.3),
        inset 0 10px 30px rgba(255, 255, 255, 0.2);
    animation: morphing 15s infinite;
    position: relative;
}

@keyframes morphing {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

.image-placeholder i {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== Секции ===== */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== Обо мне ===== */
.about {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.9;
}

.about-content p {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

/* ===== НАВЫКИ ===== */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.skill-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    display: flex;
    min-height: 130px;
    height: auto;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transition: all 0.4s ease;
    z-index: 1;
}

.skill-card:hover {
    transform: 
        translateY(-8px)
        translateZ(15px) 
        scale(1.02);
    
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(var(--primary-color-rgb), 0.1),
        0 0 45px rgba(var(--secondary-color-rgb), 0.08);
    
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

.skill-card:hover::before {
    height: 5px;
    background: linear-gradient(90deg, 
        var(--accent-color), 
        var(--primary-color), 
        var(--secondary-color),
        var(--accent-color));
    background-size: 300% 100%;
    animation: gradientFlow 2s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

.skill-card-left {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    position: relative;
}

.skill-card-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.05;
    z-index: -1;
}

.skill-icon {
    font-size: 2.8rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.skill-card:nth-child(1) .skill-icon {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card:nth-child(2) .skill-icon {
    background: linear-gradient(135deg, var(--secondary-color), #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card:nth-child(3) .skill-icon {
    background: linear-gradient(135deg, var(--accent-color), #0891b2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card:nth-child(4) .skill-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card:hover .skill-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.skill-card-content {
    flex: 1;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skill-card-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.skill-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
    line-height: 1.3;
    text-align: left;
    padding-left: 0;
}

.skill-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
    text-align: left;
    width: 100%;
    padding-left: 0;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.skill-card {
    animation: 
        cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        cardFloat 8s ease-in-out infinite;
}

.skill-card:nth-child(1) { animation-delay: 0.1s, 0s; }
.skill-card:nth-child(2) { animation-delay: 0.2s, -2s; }
.skill-card:nth-child(3) { animation-delay: 0.3s, -4s; }
.skill-card:nth-child(4) { animation-delay: 0.4s, -6s; }

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.skill-card:nth-child(1) .skill-card-left::before {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
}

.skill-card:nth-child(2) .skill-card-left::before {
    background: linear-gradient(135deg, var(--secondary-color), #7c3aed);
}

.skill-card:nth-child(3) .skill-card-left::before {
    background: linear-gradient(135deg, var(--accent-color), #0891b2);
}

.skill-card:nth-child(4) .skill-card-left::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ===== ОПЫТ РАБОТЫ ===== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 45%;
    animation: fadeIn 0.6s ease-out;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 55%;
}

.timeline-item.current .timeline-date {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-color);
    z-index: 1;
}

.timeline-item:nth-child(odd)::before {
    right: -60px;
}

.timeline-item:nth-child(even)::before {
    left: -60px;
}

.timeline-item.current::before {
    background: var(--secondary-color);
    animation: pulse 2s infinite;
}

.timeline-item:nth-child(1)::before {
    right: -59px !important;
    top: 8px !important;
}

.timeline-item:nth-child(2)::before {
    left: -59px !important;
    top: 5px !important;
}

.timeline-item:nth-child(3)::before {
    right: -59px !important;
    top: 6px !important;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: inline-block;
    padding: 5px 15px;
    background: var(--glass);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    word-break: keep-all;
    white-space: nowrap;
}

.timeline-content {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 35px 30px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.timeline-content h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 8px;
    font-size: 1.5rem;
    line-height: 1.3;
}

.company {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.company::before {
    content: '🏢';
    font-style: normal;
}

.timeline-content ul {
    padding-left: 20px;
    margin-top: 15px;
    flex-grow: 1;
}

.timeline-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    left: -15px;
    color: var(--primary-color);
}

/* ===== Контакты ===== */
.contacts {
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 80px 40px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.section-subtitle {
    font-size: 1.3rem;
    margin-bottom: 60px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.contacts-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 20px 40px;
    border-radius: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    width: 100%;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.contact-link:hover::before {
    width: 100%;
    opacity: 0.1;
}

.contact-link:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.contact-link i {
    font-size: 1.8rem;
    min-width: 40px;
    z-index: 1;
}

.contact-link:hover i {
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* ===== Футер ===== */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    opacity: 0.8;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.footer i.fa-heart {
    color: #ef4444;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 750px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .skill-card {
        height: 350px;
    }
}

/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}