/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --bg-main: #f0f5fe;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-dark: #0b1e3a;
    --text-muted: #2d4059;
    --skin-color: #1a5bc7;
    --shadow: 0 8px 30px rgba(0, 20, 60, 0.08);
    --border-radius: 16px;
    --transition: 0.3s ease;
}

body {
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    font-weight: 400;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- ASIDE (боковое меню) --- */
.aside {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100%;
    background: var(--bg-sidebar);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.04);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    transition: all var(--transition);
    border-right: 1px solid rgba(26, 91, 199, 0.08);
}

.aside .logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 2px;
    display: inline-block;
    padding: 8px 0;
    border-bottom: 3px solid var(--skin-color);
}

.aside .logo a span {
    color: var(--skin-color);
    font-weight: 800;
}

.aside .nav {
    margin-top: 50px;
    width: 100%;
}

.aside .nav li {
    margin-bottom: 12px;
}

.aside .nav li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 40px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    background: transparent;
}

.aside .nav li a i {
    width: 24px;
    font-size: 18px;
    color: var(--skin-color);
    transition: var(--transition);
}

.aside .nav li a.active,
.aside .nav li a:hover {
    background: rgba(26, 91, 199, 0.08);
    color: var(--skin-color);
}

.aside .nav li a.active i,
.aside .nav li a:hover i {
    color: var(--skin-color);
}

/* кнопка бургер - ИЗМЕНЕНО для правой стороны */
.nav-toggler {
    display: none;
    position: fixed;
    right: 20px;
    top: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid rgba(26, 91, 199, 0.15);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 101;
    transition: var(--transition);
}

.nav-toggler:hover {
    border-color: var(--skin-color);
    box-shadow: 0 4px 25px rgba(26, 91, 199, 0.2);
}

.nav-toggler span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--skin-color);
    position: relative;
    transition: var(--transition);
}

.nav-toggler span::before,
.nav-toggler span::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2.5px;
    background: var(--skin-color);
    left: 0;
    transition: var(--transition);
}

.nav-toggler span::before {
    top: -8px;
}
.nav-toggler span::after {
    top: 8px;
}

.nav-toggler.open span {
    background: transparent;
}
.nav-toggler.open span::before {
    transform: rotate(45deg);
    top: 0;
}
.nav-toggler.open span::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 260px;
    padding: 20px 30px 40px;
    min-height: 100vh;
}

.section {
    display: none;
    animation: fadeUp 0.5s ease;
}
.section.active {
    display: block;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.section-title {
    width: 100%;
    margin-bottom: 20px;
}
.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 4px;
    background: var(--skin-color);
    border-radius: 4px;
}

/* --- HOME --- */
.home-row {
    align-items: center;
    min-height: 70vh;
}

.home-info {
    flex: 1 1 55%;
}
.home-info .hello {
    font-size: 28px;
    font-weight: 500;
    color: var(--text-muted);
}
.home-info .hello .name {
    font-weight: 700;
    color: var(--skin-color);
}
.home-info .profession {
    font-size: 32px;
    font-weight: 600;
    margin: 8px 0 16px;
}
.home-info .profession .typing {
    color: var(--skin-color);
    border-bottom: 3px solid var(--skin-color);
    padding-bottom: 2px;
}
.home-info p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 540px;
    margin: 16px 0 28px;
}
.btn {
    display: inline-block;
    padding: 14px 42px;
    background: var(--skin-color);
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(26, 91, 199, 0.25);
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(26, 91, 199, 0.35);
}

.home-img {
    flex: 1 1 35%;
    text-align: center;
}
.home-img img {
    max-width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 4px solid #fff;
    background: #fff;
    max-height: 480px;
    object-fit: cover;
}

/* --- ABOUT (Биография) --- */
.about-text {
    flex: 1 1 100%;
}
.about-text h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--skin-color);
    margin-bottom: 12px;
}
.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 800px;
}

.info-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    width: 100%;
}
.info-card {
    background: var(--bg-card);
    padding: 22px 18px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--skin-color);
}
.info-card i {
    font-size: 28px;
    color: var(--skin-color);
    margin-bottom: 8px;
}
.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.info-card p {
    font-size: 15px;
    color: var(--text-muted);
}

/* --- STORY (История) --- */
.story-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}
.story-text {
    flex: 1 1 50%;
}
.story-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.story-quote {
    font-size: 22px;
    font-weight: 600;
    color: var(--skin-color);
    padding: 20px 24px;
    border-left: 6px solid var(--skin-color);
    background: rgba(26, 91, 199, 0.04);
    border-radius: 12px;
    margin: 20px 0;
}
.story-video {
    flex: 1 1 40%;
    min-width: 280px;
}
.story-video video {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: #000;
    display: block;
}

/* --- GALLERY --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    width: 100%;
}
.gallery-grid .gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition);
    background: #fff;
}
.gallery-grid .gallery-item:hover {
    transform: scale(1.02);
}
.gallery-grid .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}
.gallery-grid .gallery-item:hover img {
    filter: brightness(1.02);
}

/* Popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 30px;
}
.popup-overlay.open {
    display: flex;
}
.popup-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}
.popup-close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    font-weight: 300;
    transition: var(--transition);
}
.popup-close:hover {
    transform: rotate(90deg);
    color: var(--skin-color);
}

/* --- CONTACT --- */
.contact-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    margin-top: 20px;
}
.contact-item {
    flex: 1 1 200px;
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--skin-color);
}
.contact-item i {
    font-size: 32px;
    color: var(--skin-color);
    margin-bottom: 10px;
}
.contact-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}
.contact-item p,
.contact-item a {
    font-size: 16px;
    color: var(--text-muted);
    word-break: break-word;
}
.contact-item a:hover {
    color: var(--skin-color);
}

/* --- Адаптивность - ИЗМЕНЕНО для правого меню --- */
@media (max-width: 992px) {
    .aside {
        left: auto;
        right: -300px;
        border-right: none;
        border-left: 1px solid rgba(26, 91, 199, 0.08);
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.04);
    }
    .aside.open {
        right: 0;
        left: auto;
    }
    .nav-toggler {
        display: flex;
        right: 20px;
        top: 20px;
    }
    .nav-toggler.open {
        right: 10px;
        top: 10px;
    }
    .main-content {
        margin-left: 0;
        padding: 20px 16px 40px;
    }
    .home-row {
        flex-direction: column;
        text-align: center;
    }
    .home-info p {
        margin-left: auto;
        margin-right: auto;
    }
    .home-img img {
        max-height: 340px;
    }
    .story-row {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .section-title h2 {
        font-size: 28px;
    }
    .home-info .profession {
        font-size: 26px;
    }
    .home-info .hello {
        font-size: 22px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid .gallery-item img {
        height: 160px;
    }
    .popup-close {
        top: 20px;
        right: 24px;
        font-size: 36px;
    }
    .contact-info-row {
        flex-direction: column;
    }
    .nav-toggler {
        width: 44px;
        height: 44px;
        right: 10px;
        top: 10px;
    }
    .nav-toggler span,
    .nav-toggler span::before,
    .nav-toggler span::after {
        width: 20px;
    }
    .nav-toggler span::before {
        top: -7px;
    }
    .nav-toggler span::after {
        top: 7px;
    }
}