/* ============================================================
   СВЯТОСЛАВ ГАЛИУСОВ — СКЕВОМОРФИЗМ
   ============================================================ */

:root {
    --leather:        #4a3423;
    --leather-dark:   #33241a;
    --leather-light:  #5f4630;
    --stitch:         rgba(222, 190, 138, 0.55);
    --brass:          #c9a24b;
    --brass-light:    #e8c877;
    --brass-dark:     #8a6a25;
    --paper:          #f3ead8;
    --paper-dark:     #e4d7bc;
    --paper-edge:     #cfc0a0;
    --ink:            #2e2419;
    --ink-soft:       #5c4f3d;
    --wood:           #6b4a2f;
    --wood-dark:      #4c331f;
    --red-thread:     #a6402f;
    --radius:         14px;
    --radius-lg:      20px;
    --tr:             0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    color: var(--ink);
    line-height: 1.65;
    font-size: 16px;
    min-height: 100vh;
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.55), transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(120,90,50,0.10), transparent 50%),
        repeating-linear-gradient(0deg, rgba(120,95,60,0.028) 0 2px, transparent 2px 4px),
        repeating-linear-gradient(90deg, rgba(120,95,60,0.028) 0 2px, transparent 2px 4px);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ============================================================
   БОКОВОЕ МЕНЮ
   ============================================================ */
.aside {
    position: fixed;
    left: 0; top: 0;
    width: 270px;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 38px 22px 24px;
    border-right: 1px solid rgba(0,0,0,0.45);
    box-shadow:
        inset -1px 0 0 rgba(255,255,255,0.08),
        8px 0 30px rgba(50,30,10,0.35);
    background-color: var(--leather);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.09), transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(0,0,0,0.28), transparent 55%),
        repeating-linear-gradient(115deg, rgba(0,0,0,0.05) 0 3px, transparent 3px 7px),
        linear-gradient(160deg, var(--leather-light), var(--leather) 45%, var(--leather-dark));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aside::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 2px dashed var(--stitch);
    border-radius: 12px;
    pointer-events: none;
    opacity: 0.7;
}

.logo { position: relative; z-index: 1; }
.logo a {
    display: inline-block;
    padding: 12px 26px;
    font-family: 'PT Serif', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #3a2c10;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--brass-light), var(--brass) 55%, var(--brass-dark));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        inset 0 -2px 4px rgba(0,0,0,0.25),
        0 4px 10px rgba(0,0,0,0.45);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.logo a span { font-weight: 800; }
.logo a:hover { filter: brightness(1.06); }

.aside .nav {
    position: relative;
    z-index: 1;
    margin-top: 44px;
    width: 100%;
}
.aside .nav li { margin-bottom: 12px; }

.aside .nav li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    color: #e9dcc4;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.16));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -2px 4px rgba(0,0,0,0.3),
        0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: var(--tr);
}
.aside .nav li a i {
    width: 24px;
    text-align: center;
    color: var(--brass-light);
    font-size: 17px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}
.aside .nav li a:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -2px 4px rgba(0,0,0,0.3),
        0 4px 8px rgba(0,0,0,0.4);
    color: #fff;
}
.aside .nav li a.active {
    background: linear-gradient(180deg, var(--brass-dark), var(--brass) 50%, var(--brass-light));
    color: #2e2105;
    text-shadow: 0 1px 0 rgba(255,255,255,0.35);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,0.4),
        inset 0 -1px 0 rgba(255,255,255,0.35);
}
.aside .nav li a.active i { color: #3a2c10; filter: none; }

.aside-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    text-align: center;
    color: rgba(233,220,196,0.55);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   КНОПКА МОБИЛЬНОГО МЕНЮ (БУРГЕР)
   ============================================================ */
.nav-toggler {
    display: none; /* Скрыта на десктопе */
    position: fixed;
    right: 20px; top: 20px;
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 2px solid var(--brass-light);
    cursor: pointer;
    z-index: 9999; /* ПОВЕРХ ВСЕГО */
    background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass) 55%, var(--brass-dark));
    box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.7),
        inset 0 -4px 6px rgba(0,0,0,0.35),
        0 8px 20px rgba(50,30,5,0.6);
    transition: var(--tr);
    align-items: center;
    justify-content: center;
}
.nav-toggler:active { transform: scale(0.92); }
.nav-toggler span {
    display: block;
    width: 26px; height: 3px;
    border-radius: 3px;
    background: #3a2c10;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4);
    position: relative;
    transition: var(--tr);
}
.nav-toggler span::before,
.nav-toggler span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 26px; height: 3px;
    border-radius: 3px;
    background: #3a2c10;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4);
    transition: var(--tr);
}
.nav-toggler span::before { top: -8px; }
.nav-toggler span::after  { top:  8px; }
.nav-toggler.open span { background: transparent; box-shadow: none; }
.nav-toggler.open span::before { transform: rotate(45deg); top: 0; }
.nav-toggler.open span::after  { transform: rotate(-45deg); top: 0; }

/* ============================================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================================ */
.main-content {
    margin-left: 270px;
    padding: 30px 40px 60px;
    min-height: 100vh;
}

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

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.container { max-width: 1080px; margin: 0 auto; }
.row { display: flex; flex-wrap: wrap; gap: 30px; }

.section-title { width: 100%; margin-bottom: 26px; }
.section-title h2 {
    display: inline-block;
    font-family: 'PT Serif', Georgia, serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--paper);
    letter-spacing: 1px;
    padding: 10px 28px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--leather-light), var(--leather) 60%, var(--leather-dark));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -3px 6px rgba(0,0,0,0.35),
        0 5px 14px rgba(60,40,15,0.35);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.12);
}

/* ... (остальные стили остаются прежними) ... */

.home-row { align-items: center; min-height: 72vh; }
.home-info { flex: 1 1 55%; min-width: 280px; }
.home-info .hello { font-size: 24px; font-weight: 500; color: var(--ink-soft); }
.home-info .hello .name { font-family: 'PT Serif', Georgia, serif; font-weight: 700; color: var(--brass-dark); }
.home-info .profession { font-size: 34px; font-weight: 800; margin: 10px 0 18px; line-height: 1.25; }
.home-info .profession .typing { color: var(--red-thread); border-bottom: 3px double var(--red-thread); padding-bottom: 2px; }
.home-info .lead { font-size: 18px; color: var(--ink-soft); max-width: 540px; margin: 0 0 30px; }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 40px; border: none; border-radius: 50px; cursor: pointer;
    font-family: inherit; font-size: 16px; font-weight: 700;
    color: #fdf6e3; text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    background: linear-gradient(180deg, #7fa05a, #5c7f3c 55%, #46652c);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -4px 6px rgba(0,0,0,0.3), 0 6px 0 #31471d, 0 10px 18px rgba(40,60,20,0.4);
    transition: var(--tr);
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -2px 4px rgba(0,0,0,0.3), 0 1px 0 #31471d, 0 3px 6px rgba(40,60,20,0.4); }

.photo-frame {
    display: inline-block; padding: 14px; border-radius: 6px;
    background: linear-gradient(135deg, #7a5a35, var(--wood) 40%, var(--wood-dark) 85%), var(--wood);
    box-shadow: inset 0 2px 3px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.4), 0 14px 34px rgba(50,30,10,0.45);
    border: 10px solid transparent; background-clip: padding-box;
}
.photo-frame img { display: block; border-radius: 3px; max-height: 460px; object-fit: cover; box-shadow: inset 0 0 12px rgba(0,0,0,0.35); }
.home-img { flex: 1 1 35%; text-align: center; }

.paper-card {
    flex: 1 1 100%; position: relative;
    background: radial-gradient(ellipse at 15% 0%, rgba(255,255,255,0.75), transparent 55%), linear-gradient(180deg, #f7efdd, var(--paper) 70%, var(--paper-dark));
    border-radius: var(--radius-lg); padding: 34px 36px;
    box-shadow: 0 12px 30px rgba(80,55,25,0.22), 0 2px 6px rgba(80,55,25,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
}
.paper-card::before { content: ''; position: absolute; inset: 9px; border: 2px dashed rgba(166,64,47,0.35); border-radius: 12px; pointer-events: none; }

.about-text h3 { font-family: 'PT Serif', Georgia, serif; font-size: 25px; color: var(--brass-dark); margin-bottom: 12px; }
.about-text p { font-size: 17px; color: var(--ink-soft); max-width: 820px; }

.info-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; width: 100%; }
.info-card { position: relative; text-align: center; padding: 26px 18px 22px; border-radius: var(--radius); background: linear-gradient(180deg, #faf3e3, var(--paper) 60%, var(--paper-dark)); box-shadow: 0 8px 20px rgba(80,55,25,0.2), inset 0 1px 0 rgba(255,255,255,0.85); transition: transform var(--tr), box-shadow var(--tr); }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(80,55,25,0.28), inset 0 1px 0 rgba(255,255,255,0.85); }
.info-card i { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; font-size: 22px; color: #3a2c10; background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass) 55%, var(--brass-dark)); box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), inset 0 -3px 5px rgba(0,0,0,0.3), 0 4px 8px rgba(60,40,10,0.35); }
.info-card h4 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink); margin-bottom: 5px; }
.info-card p { font-size: 15px; color: var(--ink-soft); }

.story-row { align-items: flex-start; }
.story-text { flex: 1 1 52%; min-width: 300px; }
.story-text p { font-size: 17px; color: var(--ink-soft); margin-bottom: 18px; }
.story-quote { font-family: 'PT Serif', Georgia, serif; font-style: italic; font-size: 21px; color: var(--red-thread); margin: 22px 0; padding: 18px 22px; border-left: 6px solid var(--red-thread); border-radius: 0 12px 12px 0; background: rgba(166,64,47,0.06); box-shadow: inset 0 1px 4px rgba(166,64,47,0.1); }
.article-meta { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed rgba(90,70,40,0.35); }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper-edge); box-shadow: 0 3px 8px rgba(80,55,25,0.3); }
.author-name { font-weight: 700; font-size: 15px; }
.author-note { font-size: 13px; color: var(--ink-soft); }
.story-video { flex: 1 1 40%; min-width: 280px; }
.tv-frame { padding: 16px; border-radius: 18px; background: repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 9px), linear-gradient(160deg, #7d5a38, var(--wood) 45%, var(--wood-dark)); box-shadow: inset 0 2px 3px rgba(255,255,255,0.2), inset 0 -4px 8px rgba(0,0,0,0.45), 0 14px 34px rgba(50,30,10,0.45); }
.tv-frame video { display: block; width: 100%; border-radius: 8px; background: #000; box-shadow: inset 0 0 20px rgba(0,0,0,0.6); }
.video-caption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.video-caption i { color: var(--brass-dark); margin-right: 6px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px; width: 100%; }
.gallery-item { position: relative; padding: 10px 10px 30px; border-radius: 5px; cursor: pointer; background: linear-gradient(180deg, #fdfaf1, #efe6d0); box-shadow: 0 8px 20px rgba(80,55,25,0.22), inset 0 1px 0 rgba(255,255,255,0.9); transition: transform var(--tr), box-shadow var(--tr); }
.gallery-item::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 74px; height: 22px; background: rgba(232,220,180,0.75); box-shadow: 0 2px 4px rgba(80,55,25,0.2); border-left: 1px dashed rgba(120,95,60,0.3); border-right: 1px dashed rgba(120,95,60,0.3); }
.gallery-item:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: 0 16px 32px rgba(80,55,25,0.32), inset 0 1px 0 rgba(255,255,255,0.9); }
.gallery-item img { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: 2px; box-shadow: inset 0 0 10px rgba(0,0,0,0.28); }

.popup-overlay { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(28,18,8,0.88); justify-content: center; align-items: center; padding: 30px; }
.popup-overlay.open { display: flex; animation: fadeUp 0.25s ease; }
.popup-img { max-width: 90%; max-height: 88%; object-fit: contain; border: 12px solid #f3ead8; border-radius: 4px; box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.popup-close { position: absolute; top: 26px; right: 40px; width: 52px; height: 52px; border: none; border-radius: 50%; cursor: pointer; font-size: 30px; line-height: 1; color: #3a2c10; background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass) 55%, var(--brass-dark)); box-shadow: inset 0 2px 2px rgba(255,255,255,0.55), inset 0 -3px 5px rgba(0,0,0,0.3), 0 5px 12px rgba(0,0,0,0.5); transition: var(--tr); z-index: 1000; }
.popup-close:hover { transform: rotate(90deg); }

.contact-info-row { width: 100%; margin-top: 10px; }
.contact-item { flex: 1 1 220px; text-align: center; padding: 30px 20px 26px; border-radius: var(--radius); background: linear-gradient(180deg, #faf3e3, var(--paper) 60%, var(--paper-dark)); box-shadow: 0 8px 20px rgba(80,55,25,0.2), inset 0 1px 0 rgba(255,255,255,0.85); transition: transform var(--tr), box-shadow var(--tr); }
.contact-item:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(80,55,25,0.28), inset 0 1px 0 rgba(255,255,255,0.85); }
.contact-item i { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 12px; border-radius: 50%; font-size: 23px; color: #3a2c10; background: radial-gradient(circle at 35% 30%, var(--brass-light), var(--brass) 55%, var(--brass-dark)); box-shadow: inset 0 2px 3px rgba(255,255,255,0.6), inset 0 -3px 5px rgba(0,0,0,0.3), 0 4px 8px rgba(60,40,10,0.35); }
.contact-item h4 { font-size: 18px; margin-bottom: 6px; }
.contact-item p, .contact-item a { font-size: 16px; color: var(--ink-soft); word-break: break-word; }
.contact-item a { font-weight: 600; border-bottom: 1px dashed var(--brass-dark); }
.contact-item a:hover { color: var(--brass-dark); }

/* ============================================================
   АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ)
   ============================================================ */
@media (max-width: 992px) {
    /* Показываем кнопку */
    .nav-toggler {
        display: flex !important;
    }

    /* Меню выезжает справа */
    .aside {
        left: auto;
        right: 0;
        transform: translateX(105%);
        border-right: none;
        border-left: 1px solid rgba(0,0,0,0.45);
        box-shadow: inset 1px 0 0 rgba(255,255,255,0.08), -8px 0 30px rgba(50,30,10,0.35);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .aside.open {
        transform: translateX(0);
    }

    /* Контент */
    .main-content {
        margin-left: 0;
        padding: 90px 18px 50px;
    }

    /* ====== ИСПРАВЛЕНИЕ: Опускаем крестик ниже кнопки меню ====== */
    .popup-close {
        top: 90px; /* Кнопка меню находится на top: 20px + высота 56px = 76px. Опускаем крестик на 90px, чтобы был зазор */
        right: 20px; /* Выравниваем по правому краю с кнопкой меню */
    }
    
    /* ... (остальные стили для мобильных остаются) ... */
    .home-row { flex-direction: column-reverse; text-align: center; min-height: auto; }
    .home-info p { margin-left: auto; margin-right: auto; }
    .photo-frame img { max-height: 360px; }
    .story-row { flex-direction: column; }
    .story-text { flex: 1 1 100%; }
    .section-title h2 { font-size: 27px; }
}

@media (max-width: 600px) {
    body { font-size: 15px; }
    .home-info .profession { font-size: 26px; }
    .home-info .hello { font-size: 20px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .gallery-item img { height: 150px; }
    .paper-card { padding: 26px 20px; }
    .contact-info-row { flex-direction: column; }
    
    /* Кнопка чуть меньше */
    .nav-toggler { width: 50px; height: 50px; right: 15px; top: 15px; }
    .main-content { padding: 80px 14px 40px; }

    /* ====== ИСПРАВЛЕНИЕ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ ====== */
    .popup-close {
        top: 80px; /* Кнопка меню на top: 15px + высота 50px = 65px. Ставим на 80px, чтобы был зазор */
        right: 18px; /* Выравниваем по правому краю */
        width: 44px; height: 44px; font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}