:root {
    --primary-color: #ff6b00;
    --primary-light: #ff9500;
    --bg-dark: #0f0f0f;
    --bg-light: #f5f5f7;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-light: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
}

body {
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.theme-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
    --overlay-color: var(--overlay-dark);
}

body.theme-light {
    background-color: var(--bg-light);
    color: var(--text-dark);
    --overlay-color: var(--overlay-light);
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px; 
    z-index: 1005; /* Было 1000, поэтому крестик прятался */
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: all 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: block;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 80px; 
    width: auto;
    object-fit: contain;
    display: block;
}

.footer-logo-img {
    height: 50px; 
}

body.theme-dark .logo-img,
body.theme-dark .footer-logo-img {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9; 
}

body.theme-light .logo-img,
body.theme-light .footer-logo-img {
    filter: brightness(0) !important;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

body.theme-light .nav-menu a {
    color: #000;
    text-shadow: none;
}

.nav-menu a:hover {
    color: var(--primary-color) !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle, .lang-toggle {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

body.theme-light .theme-toggle, 
body.theme-light .lang-toggle {
    background: rgba(0,0,0,0.2);
    color: #000;
    border-color: rgba(0,0,0,0.2);
}

.lang-toggle {
    width: auto;
    padding: 0 14px;
    border-radius: 20px;
}

.theme-toggle:hover, .lang-toggle:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.lang-code {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 1001; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    padding-top: 70px; 
}

body.theme-light .mobile-nav-menu {
    background: #fff;
}

.mobile-nav-menu.active {
    right: 0;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
}

.mobile-nav-list li {
    margin: 25px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-nav-menu.active .mobile-nav-list li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-list a {
    text-decoration: none;
    color: inherit;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.main-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transform: scale(1);
    transition: transform 10s ease-out;
}

.slide.active .slide-bg {
    transform: scale(1.1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px;
    overflow-y: auto;
}

.content-wrapper {
    max-width: 1000px;
    width: 100%;
}

.dev-icon {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    filter: drop-shadow(0 0 10px rgba(255,107,0,0.5));
}

.project-tag {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 10px 35px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 30px;
    letter-spacing: 3px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-tag:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
}

.project-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.1;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.project-description {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.6;
    color: inherit;
    opacity: 0.8;
    font-weight: 400;
}

.animate-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.slide.active .animate-text {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: 1px solid rgba(128,128,128,0.3);
    padding: 15px 30px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.contact-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.slide-nav {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(128,128,128, 0.4);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-arrow:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 25px 50px;
    background: transparent;
    color: inherit;
    pointer-events: none;
}
.site-footer * {
    pointer-events: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-logo {
    display: block;
    cursor: pointer;
    text-decoration: none;
}

.footer-info {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(128,128,128,0.2);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.scroll-top-btn {
    position: fixed;
    bottom: 90px;
    right: 50px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 992px) {
    .project-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .site-header { 
        padding: 0 15px; 
        height: 70px;
        background: var(--bg-dark); 
    }
    body.theme-light .site-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
    
    .logo-img { height: 45px; } 

    .main-nav { display: none; }
    
    .header-actions {
        gap: 12px;
    }
    .theme-toggle, .lang-toggle {
        width: 35px;
        height: 35px;
    }
    .lang-toggle {
        padding: 0 10px;
    }
    .lang-code {
        font-size: 0.8rem;
    }

    .mobile-menu-btn { display: flex; width: 30px; }
    
    .slide-nav { display: none; }
    .slide-content { padding: 80px 20px; }
    
    .project-title { font-size: 2rem; }
    
    .site-footer {
        position: relative;
        background: var(--bg-dark);
        padding: 40px 20px;
    }
    body.theme-light .site-footer { background: #f0f0f0; }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}