:root {
    --bg-color: #fcfcff;
    --content-bg: #ffffff;
    --accent-color: #7b61ff;
    --accent-color-hover: #6a50e0;
    --text-color: #1a1a2e;
    --text-light: #6a6a78;
    --border-color: #ebeaef;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --footer-height: 65px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-container {
    display: flex;
    min-height: 100vh;
}

.left-panel {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--footer-height));
    position: sticky;
    top: 0;
    border-right: 1px solid var(--border-color);
}
.left-panel-content { padding: 50px 40px; }
.logo-nav { margin-bottom: 40px; }

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 15px;
    margin-left: -15px;
    border-radius: 8px;
    display: inline-block;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.logo-nav .nav-link { font-size: 1.5rem; font-weight: 700; }
.main-nav .nav-link { font-size: 1.1rem; }
.main-nav ul { list-style: none; padding: 0; margin: 0; }
.main-nav li { margin-bottom: 8px; }

.nav-link:hover { background-color: #f5f4f7; }
.nav-link.active { color: var(--accent-color); font-weight: 700; background-color: transparent; }
.nav-link.active:hover { background-color: transparent; }

.projects-btn {
    flex-grow: 1;
    display: flex; justify-content: center; align-items: center;
    background-color: var(--accent-color); color: white;
    text-decoration: none; font-size: 1.5rem; font-weight: 600;
    transition: background-color 0.2s ease;
}
.projects-btn:hover { background-color: var(--accent-color-hover); }

.right-panel {
    flex-grow: 1; display: flex; justify-content: center; align-items: center;
    padding: 60px;
    padding-bottom: calc(60px + var(--footer-height));
    width: 100%;
}
.content-wrapper { width: 100%; max-width: 720px; }
.content-section { display: none; animation: fadeIn 0.5s ease-out; }
.content-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

#logo-display img { max-width: 350px; width: 100%; height: auto; margin: 0 auto; display: block; }

.text-content {
    background: var(--content-bg); border: 1px solid var(--border-color);
    padding: 3rem; border-radius: 24px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
}
.text-content h1, .text-content h2 { font-size: 2.5rem; margin-top: 0; margin-bottom: 2rem; color: var(--text-color); }
.text-content p, .text-content li { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; color: var(--text-light); }
.text-content li { margin-bottom: 1rem; }
.text-content code { background-color: #f5f4f7; padding: 3px 8px; border-radius: 6px; font-size: 0.9em; color: var(--accent-color); }
.text-content a { color: var(--accent-color); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.text-content a:hover { border-color: var(--accent-color-light); }
.text-content strong { color: var(--text-color); font-weight: 600; }
.text-content ol, .text-content ul { padding-left: 25px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; align-items: center; }
.contact-list span { min-width: 130px; }

.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--content-bg);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}
.footer-content {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; height: var(--footer-height);
    font-size: 0.9rem; color: #9a9aab;
}
.lang-switcher .lang-btn {
    background: none; border: 1px solid var(--border-color); padding: 6px 12px;
    margin: 0 4px; cursor: pointer; border-radius: 8px; color: var(--text-light);
    transition: all 0.2s ease; font-weight: 500; font-family: var(--font-family);
}
.lang-switcher .lang-btn.active, .lang-switcher .lang-btn:hover {
    background: var(--accent-color); color: white; border-color: var(--accent-color);
}

.mobile-header { display: none; }
.mobile-nav { display: none; }

#projects-header, #projects-footer {
    position: fixed; width: 100%; z-index: 100; padding: 25px 50px; box-sizing: border-box;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-color); font-weight: 600;
}
#projects-header { top: 0; }
#projects-footer { bottom: 0; justify-content: center; }
#projects-header .back-link { color: var(--text-color); text-decoration: none; font-size: 1.1rem; }
.project-section { text-align: center; }
.project-section:nth-child(1) { background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); }
.project-section:nth-child(2) { background: linear-gradient(135deg, #f6f4ff 0%, #e9e6ff 100%); }
.project-section:nth-child(3) { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
.project-content { max-width: 800px; margin: 0 auto; padding: 20px; }
.project-content h2 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1rem; }
.project-content p { font-size: 1.3rem; line-height: 1.7; color: var(--text-light); }

@media (max-width: 992px) {
    .left-panel { display: none; }
    .right-panel {
        padding: 100px 20px 40px 20px;
    }
    .text-content { padding: 2rem 1.5rem; }
    .text-content h1, .text-content h2 { font-size: 1.8rem; }
    .text-content p, .text-content li { font-size: 1rem; }
    #logo-display img { max-width: 200px; }

    .mobile-header {
        display: flex; justify-content: space-between; align-items: center;
        position: fixed; top: 0; left: 0; width: 100%;
        padding: 15px 20px; background: rgba(252, 252, 255, 0.85);
        backdrop-filter: blur(10px); z-index: 200;
        border-bottom: 1px solid var(--border-color);
    }
    .mobile-logo { font-weight: 700; font-size: 1.2rem; }
    .burger-menu {
        width: 24px; height: 24px; border: none; background: transparent;
        display: flex; flex-direction: column; justify-content: space-around;
        padding: 0; cursor: pointer; z-index: 201; /* Выше чем .mobile-nav */
    }
    .burger-menu span {
        width: 100%; height: 2px; background: var(--text-color);
        border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
    }
    .burger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger-menu.active span:nth-child(2) { opacity: 0; }
    .burger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .mobile-nav {
        display: flex; flex-direction: column;
        position: fixed; top: 0; left: 0;
        width: 100%; height: 100%;
        background: var(--bg-color);
        z-index: 199;
        padding: 100px 30px 30px 30px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s;
        opacity: 0;
    }
    .mobile-nav.active { transform: translateY(0); opacity: 1; }
    .mobile-nav .nav-link { font-size: 1.8rem; padding: 15px; }
    .projects-btn-mobile {
        display: block; width: 100%; text-align: center;
        padding: 18px; margin-top: auto;
        background: var(--accent-color); color: white;
        text-decoration: none; border-radius: 12px;
        font-size: 1.2rem; font-weight: 600;
    }
    .main-footer { display: none; }
    .project-content h2 { font-size: 2rem; }
    .project-content p { font-size: 1.1rem; }
    #projects-header, #projects-footer { padding: 15px 20px; }
}