:root {
    --primary-color: #00cc99;
    --bg-color: #000;
    --text-color: #fff;
    --border-color: rgba(255,255,255,0.2);
    --hover-bg: rgba(255,255,255,0.1);
    --shadow-color: rgba(0,204,153,0.2);
    --header-opacity: 0.5;
    --header-opacity-mobile: 0.3;
    --animation-duration: 36s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
    align-items: center;
    padding: 80px;
    position: relative;
    /* Создаем контекст наложения для работы mix-blend-mode */
    isolation: isolate;
}

.image-block {
    width: 60%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.image-content {
    width: 100%;
    height: 100%;
    background: var(--bg-color) url('img/noroot.webp') no-repeat left center;
    background-size: contain;
    transition: background-image 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-header {
    position: absolute;
    top: 15%;
    left: -80px; /* Компенсируем padding контейнера */
    width: 100vw;
    transform: translateY(-50%);
    font-size: 12vw;
    white-space: nowrap;
    overflow: visible;
    z-index: 10;
    opacity: 1;
    pointer-events: none;
    font-weight: 900;
    letter-spacing: -0.05em;
    /* Инверсия цвета для эффектного вида - теперь работает с изображением! */
    mix-blend-mode: difference;
    color: var(--text-color);
}

.animated-header .header-text {
    display: inline-block;
    animation: slideLeftContinuous var(--animation-duration) linear infinite;
    padding-right: 2em; /* Отступ между повторениями */
}

/* Дублируем текст для бесшовной анимации */
.animated-header .header-text::after {
    content: attr(data-text);
    position: absolute;
    left: 100%;
    padding-left: 2em;
}

/* Улучшенная анимация с бесшовным движением */
@keyframes slideLeftContinuous {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(-100%);
    }
}

.content {
    width: 40%;
    padding: 0 0 0 50px;
    z-index: 2;
    margin-left: 20px;
}

.bio p {
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 16px;
    line-height: 1.8;
}

.links {
    margin-top: 30px;
}

.links a {
    display: block;
    font-size: 18px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
    max-width: 400px;
}

.links a:hover,
.links a:focus {
    color: var(--primary-color);
    padding-right: 10px;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.links a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.3s ease;
}

.links a:hover::after,
.links a:focus::after {
    opacity: 1;
    right: 20px;
    border-color: var(--primary-color);
}

.links a.disabled {
    color: #666;
    cursor: not-allowed;
    text-decoration: line-through;
}

.links a.disabled:hover,
.links a.disabled:focus {
    color: #666;
    padding-right: 0;
    outline: none;
    transform: none;
}

.links a.disabled::after {
    display: none;
}

.social {
    margin-top: 40px;
    display: flex;
    gap: 15px;
}

.social a {
    width: 44px;
    height: 44px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.social a:hover,
.social a:focus {
    transform: scale(1.15) translateY(-3px);
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--shadow-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.social a img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social a:hover img,
.social a:focus img {
    transform: scale(1.1) rotate(5deg);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (min-width: 769px) {
    .image-content {
        position: fixed;
        top: 0;
        left: 0;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 60px 40px;
    }
    .animated-header {
        font-size: 14vw;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 20px;
        height: auto;
    }

    .image-block {
        width: 100%;
        height: 40vh;
    }

    .image-content {
        background-position: center;
        background-size: cover;
        position: relative !important;
    }

    .content {
        width: 100%;
        margin-top: 20px;
        padding: 40px 0 0 0;
    }

    .animated-header {
        font-size: 14vw;
        top: 10%;
        left: -20px; /* Компенсируем padding контейнера для мобильных */
        opacity: 1;
    }

    .social {
        gap: 12px;
    }

    .social a {
        width: 40px;
        height: 40px;
    }
}