* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #061214;
    background-image: radial-gradient(rgba(0, 180, 216, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}
:root {
    --accent: #00b4d8;
    --accent-hover: #0096b0;
    --card-bg: #131820;
    --border: #1e2530;
    --shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding: 70px 0;
    flex-wrap: nowrap;
}

.logo-area {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    padding: 0;
}

.logo-img {
    width: 190px !important;
    height: auto !important;
    max-width: 190px !important;
}

.lang-switch {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.burger {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.lang-switch a.active {
    color: var(--accent);
    font-weight: 600;
}


.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 90;
}
.overlay.active {
    display: block;
}

.nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: #131820;
    padding: 80px 30px 30px;
    gap: 20px;
    transition: right 0.3s ease;
    z-index: 95;
    display: flex;
}
.nav.active {
    right: 0;
}
.nav a {
    font-size: 18px;
}
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 80px 0 60px;
}
.hero-text {
    flex: 1 1 500px;
}
.hero-text h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #fff;
}
.hero-text h1 span {
    color: var(--accent);
}
.hero-text .subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #b0b8c1;
    margin-bottom: 8px;
}
.hero-text .location {
    font-size: 16px;
    color: #7c848d;
    margin-bottom: 24px;
}
.hero-photo {
    flex: 0 0 240px;
    width: 240px;
    height: 240px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: -20px;
    margin-right: 20px;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопка */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #0a0c10;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(0,180,216,0.3);
}
.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}


    .section {
    padding: 100px 0;
    opacity: 0;                   
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}
#about {
    border-top: none;
}
.section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 32px;
    color: #fff;
    position: relative;
}
.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 8px;
    border-radius: 4px;
}

/* Таймлайн */
.timeline .item {
    margin-bottom: 32px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
    position: relative;
}
.timeline .item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0,180,216,0.5);
}
.item .period {
    font-size: 14px;
    color: #7c848d;
    font-weight: 500;
}
.item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 4px 0 6px;
}
.item p {
    color: #b0b8c1;
    white-space: pre-line;
}

/* Навыки */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.skill-category {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
}
.skill-category:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.skill-category h4 {
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 600;
}
.skill-category ul {
    list-style: none;
    padding: 0;
    color: #b0b8c1;
}
.skill-category li {
    padding: 4px 0;
    border-bottom: 1px solid #1e2530;
}

.portfolio-sel {
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 10px 4px 16px 4px;   
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--card-bg);
}
.portfolio-sel::-webkit-scrollbar {
    height: 6px;
}
.portfolio-sel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

.game-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
    aspect-ratio: 2 / 3;
}
.game-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.15);
}
.game-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.game-info {
    text-align: left;
    flex: 1;
}
.game-info h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 4px;
}
.game-info .game-desc {
    color: #7c848d;
    font-size: 13px;
    margin: 0;
}
.game-icon {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-desc {
    color: #b0b8c1;
    font-size: 14px;
    margin-bottom: 12px;
}

.game-slider {
    width: 100%;
    height: 355px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #0a0c10;
}
.slider-track {
    width: 100%;
    height: 100%;
    position: relative;
}
.slider-track img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.slider-track img.active {
    opacity: 1;
    transform: scale(1);
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    z-index: 3;
    transition: background 0.2s;
}
.slider-btn:hover {
    background: var(--accent);
}
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }

.game-slider-placeholder {
    width: 100%;
    height: 355px;
    border-radius: 12px;
    background: #0f1418;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    border: 2px dashed var(--border);
    color: #5a6370;
}
.game-slider-placeholder i {
    font-size: 36px;
}
.game-slider-placeholder span {
    font-size: 14px;
    color: #7c848d;
}

/* Неактивная карточка */
.game-card-inactive {
    opacity: 0.85;
    border-style: dashed;
}
.game-card-inactive:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}

/* Ссылка на игру */
.game-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
}
.game-link:hover {
    text-decoration: underline;
}

/* Контакты */
.contact-block {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.contact-block h3 {
    color: #fff;
    margin-bottom: 12px;
}
.contact-methods p {
    margin-bottom: 8px;
}
.contact-methods i {
    color: var(--accent);
    margin-right: 8px;
    width: 20px;
    text-align: center;
}
.contact-methods a {
    position: relative;
    text-decoration: none;
}
.contact-methods a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}
.contact-methods a:hover::after {
    width: 100%;
}

.footer {
    text-align: center;
    padding: 32px 0;
    color: #5a6370;
    font-size: 14px;
    border-top: 1px solid var(--border);
}

.about-video {
    width: 100%;
    max-width: 400px;
    height: 200px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.about-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Кнопка наверх */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0c10;
    border: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 4px 14px rgba(0,180,216,0.3);
}
.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.scroll-top:hover {
    transform: translateY(-3px);
}

/* Плавная смена языка */
[data-i18n] {
    transition: opacity 0.3s ease;
}

/* Общие ссылки */
a {
    color: var(--accent);
}

@media (max-width: 768px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 0;
        position: relative;
    }
    .logo-area {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .logo-img {
        height: 40px !important;
        width: auto !important;
    }
    .lang-switch {
        position: absolute;
        left: 4px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        margin: 0;
        order: unset;
    }
    .burger {
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 100;
        display: flex;
        order: unset;
        margin: 0;
    }
    .nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: #131820;
        padding: 80px 30px 30px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 95;
        margin: 0;
    }
    .nav.active { right: 0; }
    .nav a { font-size: 18px; }
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 20px 0 40px;
    }
    .hero-text h1 { font-size: 32px; }
    .hero-photo {
        width: 160px;
        height: 160px;
        margin: 0 auto 20px;
    }
    .game-card { flex: 0 0 85vw; }
    .slider-btn {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }
    .section { padding: 60px 0; }
    .game-slider { height: 300px; }
    .game-slider-placeholder { height: 300px; }
}
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0c10;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hide {
    opacity: 0;
    visibility: hidden;
}
.preloader-content {
    text-align: center;
}
.preloader-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    animation: catBounce 0.6s ease-in-out infinite;
}
.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@keyframes catBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.preloader-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.preloader-dots span {
    width: 10px;
    height: 10px;
    background: #00b4d8;
    border-radius: 50%;
    animation: dotBounce 1.2s ease-in-out infinite;
}
.preloader-dots span:nth-child(2) { animation-delay: 0.2s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.3); }
}
.preloader-content p {
    color: #7c848d;
    margin-top: 16px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    animation: textPulse 2s ease-in-out infinite;
}
@keyframes textPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}