:root {
    /* --- БАЗОВАЯ ПАЛИТРА (КОНСТАНТЫ) --- */
    --color-black: #040404;
    --color-white: #fbfbfb;
    --color-orange: #f9be12;
    --color-dark-gray: #0e0e0e;
    --color-light-gray: #e7e7e7;
    /* --- ТЕМНАЯ ТЕМА (ПО УМОЛЧАНИЮ) --- */
    --bg-page: var(--color-dark-gray);
    --bg-element: var(--color-black);
    --text-main: var(--color-white);
    --text-muted: var(--color-light-gray);
    --accent: var(--color-orange);
    --header-line: var(--color-white);
    --lang-color: var(--color-orange);
    --toggle-color: var(--color-orange);
    --toggle-hover: rgba(249, 190, 18, 0.1);
    --hero-bg-img: url('../images/bg/bg-home-dark.jpg');
    --hero-logo-img: url('../images/brand/logo-main-dark.svg');
    --card-title: var(--color-orange);
    --card-desc: var(--color-white);
    --card-glow: rgba(255, 255, 255, 0.1);
    --project-btn-bg: var(--color-dark-gray);
    --project-btn-border: var(--color-orange);
    --project-btn-text: var(--color-white);
    --incubation-bg: var(--color-black);
    --incubation-inner: #0a0a0a;
    --dot-pattern: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    /* --- IN TOUCH --- */
    --intouch-bg-img: url('../images/bg/bg-intouch-dark.jpg');
    --intouch-base-bg: var(--color-black);
    --intouch-in-bg: var(--color-dark-gray);
    --intouch-text: var(--color-white);
    --intouch-border: var(--color-white);
    --intouch-icon-filter: none;
}

[data-theme="light"] {
    --bg-page: var(--color-light-gray);
    --bg-element: var(--color-white);
    --text-main: var(--color-black);
    --text-muted: var(--color-dark-gray);
    --header-line: var(--color-black);
    --lang-color: var(--color-black);
    --toggle-color: var(--color-black);
    --toggle-hover: rgba(4, 4, 4, 0.1);
    --hero-bg-img: url('../images/bg/bg-home-light.jpg');
    --hero-logo-img: url('../images/brand/logo-main-light.svg');
    --card-title: var(--color-black);
    --card-desc: var(--color-black);
    --card-glow: rgba(0, 0, 0, 0.1);
    --project-btn-bg: var(--color-light-gray);
    --project-btn-border: var(--color-black);
    --project-btn-text: var(--color-black);
    --incubation-bg: var(--color-white);
    --incubation-inner: #f2f2f2;
    --dot-pattern: radial-gradient(circle, rgba(0,0,0,0.1) 1px, transparent 1px);
    /* --- IN TOUCH --- */
    --intouch-bg-img: url('../images/bg/bg-intouch-light.jpg');
    --intouch-base-bg: var(--color-white);
    --intouch-in-bg: var(--color-light-gray);
    --intouch-text: var(--color-black);
    --intouch-border: var(--color-black);
    --intouch-icon-filter: invert(1);
}

/* --- БАЗОВЫЕ НАСТРОЙКИ ДОКУМЕНТА --- */
html {
    scrollbar-gutter: stable; /* Резервируем место под скроллбар навсегда на всех страницах */
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: auto;
    position: relative;
}
/* Сброс системной рамки фокуса при кликах и нажатии Esc */
dialog:focus,
dialog:focus-visible,
button:focus,
button:focus-visible,
.gallery-viewport:focus,
.gallery-viewport:focus-visible {
    outline: none !important;
    box-shadow: none;
}
/* Жесткая блокировка ТОЛЬКО для главной страницы */
body.home-page { /* Без пробела между body и точкой */
    min-width: 1200px;
}

/* Адаптивная блокировка (до 2 карточек) для страницы Projects */
body.projects-page {
    min-width: 612px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo {
    color: var(--text-main);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    margin-left: 16px;
}

    .header-logo .accent-letter {
        color: var(--accent);
    }

/* --- SOCIAL ICONS & FAST CONTACTS --- */
.header-social-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 60px;
    margin-right: auto;
}

.social-icon-link {
    display: flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

    .social-icon-link:hover {
        opacity: 0.7;
    }

    .social-icon-link img {
        width: 22px;
        height: 22px;
        filter: invert(1);
    }

[data-theme="light"] .social-icon-link img {
    filter: none;
}

/* --- КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ --- */
.btn-theme {
    background: transparent;
    border: 1px solid var(--toggle-color);
    color: var(--toggle-color);
    padding: 6px 12px;
    min-width: 90px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    margin-right: 16px;
}

    .btn-theme:hover {
        background-color: var(--toggle-hover);
    }

.header-container {
    position: relative;
}

    /* Градиентная линия-разделитель внизу шапки */
    .header-container::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient( to right, transparent 0%, var(--header-line) 15%, var(--header-line) 85%, transparent 100% );
        pointer-events: none;
    }


/* =========================================
   ГЛОБАЛЬНЫЕ ХЛЕБНЫЕ КРОШКИ (BREADCRUMBS)
   ========================================= */
.breadcrumbs-container {
    width: 1168px;
    height: 40px;
    margin: 20px auto 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.breadcrumb-icon {
    width: 22px;
    height: 25px;
    display: block;
    flex-shrink: 0;
}

.breadcrumb-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

    .breadcrumb-link:hover {
        opacity: 0.8;
    }

.breadcrumb-current {
    color: inherit;
}

/* Светлая тема */
[data-theme="light"] .breadcrumb-text {
    color: #040404;
}


/* Фоновая картинка главная */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 1200px;
    height: 1080px;
    background-image: var(--hero-bg-img);
    background-size: 1440px 1080px;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    transition: background-image 0.3s ease;
}

/* Общий контейнер главной страницы */
.hero-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.home-hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 50px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    line-height: 1.1;
    margin: 0;
}

.hero-divider {
    width: 490px;
    height: 2px;
    background-color: var(--accent);
    margin: 10px 0;
    border: none;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.3;
    margin: 0;
}

.hero-left {
    max-width: 650px;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.hero-logo {
    width: 387px;
    height: 321px;
    background-image: var(--hero-logo-img);
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 0;
    margin-right: 16px;
}

.hero-bottom {
    margin-top: 300px;
    margin-bottom: 77px;
    display: flex;
    gap: 8px;
    padding: 0 16px;
}

.hub-card {
    width: 286px;
    height: 286px;
    background-color: var(--bg-element);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
    padding: 20px;
    transform-origin: bottom center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .hub-card:hover {
        transform: scale(1.03) translateY(-4px);
        box-shadow: 0 5px 15px var(--card-glow);
    }

.card-icon-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background-color: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

    .card-icon-wrapper img {
        max-width: 75px;
        max-height: 86.6025px;
    }

.card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 21px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--card-title);
    margin: 0 0 5px 0;
    text-align: center;
}

.card-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--card-desc);
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

@keyframes icon-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.075);
    }

    100% {
        transform: scale(1);
    }
}

.hub-card:hover .card-icon-wrapper img {
    animation: icon-pop 0.4s ease-out 0.15s 1 forwards;
}

/* ==========================================
   PAGE: PROJECTS 
   ========================================== */


/* Контейнер страницы Projects */
.page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
}

.projects-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* Карточка проекта с ховер-эффектом */
.project-card {
    width: 286px;
    height: 429px;
    flex: 0 0 286px;
    background-color: var(--bg-element);
    border-radius: 16px;
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .project-card:hover {
        transform: scale(1.02);
        box-shadow: 0 5px 15px var(--card-glow);
    }

@keyframes button-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.075);
    }

    100% {
        transform: scale(1);
    }
}

.project-card:hover .btn-details {
    animation: button-pop 0.4s ease-out 0.15s 1 forwards;
}

/* PROJECT POSTER */
.project-poster {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

    .project-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: opacity 0.5s ease;
    }

    .project-poster .poster-color {
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
    }

.project-card:hover .poster-color {
    opacity: 1;
}

/* PROJECT NAME */
.project-name {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 24px;
    color: var(--card-title);
    margin: 2px 0 18px 0;
    text-align: center;
}

/* PROJECT DETAILS BUTTON */
.btn-details {
    width: 105px;
    height: 30px;
    background-color: var(--project-btn-bg);
    border: 1px solid var(--project-btn-border);
    border-radius: 6px;
    color: var(--project-btn-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-details:hover {
        transform: scale(1.05);
        box-shadow: 0 0 8px var(--card-glow);
    }

/* --- INCUBATION DYNAMIC BLOCK --- */
.incubation-block {
    height: 429px;
    flex-grow: 1;
    flex-basis: 286px;
    min-width: 286px;
    background-color: var(--incubation-bg);
    border-radius: 16px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.incubation-inner {
    width: 100%;
    background-color: var(--incubation-inner);
    border-radius: 8px;
    padding: 40px 20px 20px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    /* ДОБАВИЛИ: Необходимо для абсолютного позиционирования Canvas */
    position: relative;
    overflow: hidden;
}

/* Стили самого холста */
#incubationCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; /* Чтобы холст не блокировал клики/выделение текста */
    /* Магия градиентной маски: холст полностью видим сверху, но плавно исчезает к низу */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 90%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 90%);
}

.incubation-text-wrap {
    width: 100%;
    max-width: 1128px;
    box-sizing: border-box;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.incubation-title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 28px;
    color: var(--accent);
    margin: 0 0 10px 0;
}

.incubation-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}


/* --- МОДАЛЬНОЕ ОКНО HIDDEN BLOCK (ПАСПОРТ ПРОЕКТА) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Ключевые кадры для эффекта зума с отскоком */
@keyframes passport-pop-in {
    0% {
        transform: scale(0.96); /* Начинаем чуть ближе к финалу, чтобы не было сильного рывка */
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hidden-passport-modal {
    width: 580px;
    height: 429px;
    background-color: rgba(14, 14, 14, 0.8);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 16px;
    box-sizing: border-box;
    padding: 10px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    transform: scale(0.96);
    opacity: 0;
    will-change: transform, opacity;
}

/* Запуск анимации с плавной кривой ease-out за 0.4 секунды */
.modal-overlay.active .hidden-passport-modal {
    animation: passport-pop-in 0.4s ease-out forwards;
}

/* Автоматическое переключение на светлую тему для модалки */
[data-theme="light"] .hidden-passport-modal {
    background-color: rgba(231, 231, 231, 0.8);
}

.passport-inner-frame {
    width: 560px;
    height: 409px;
    border: 1px solid var(--accent); /* Желтая по умолчанию (в темной теме) */
    border-radius: 8px;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

[data-theme="light"] .passport-inner-frame {
    border-color: #040404;
}


.passport-icon {
    width: 100px;
    height: 100px;
    background-image: url('../images/icons/ui/ic-hidden-passport.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 30px;
    margin-bottom: auto;
}

/* Текстовый блок (ширина 520px, мелкий шрифт) */
.passport-text-content {
    width: 520px;
    box-sizing: border-box;
    text-align: left;
}

    .passport-text-content p {
        font-family: 'Inter', sans-serif;
        font-weight: 300;
        font-size: 15px;
        color: var(--text-main);
        margin: 0 0 5px 0;
        line-height: 1.3;
    }

        .passport-text-content p strong {
            font-weight: 500;
            color: var(--accent);
        }

/* Кнопка закрытия (крестик) */
.passport-close-bezier,
.passport-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    z-index: 10;
}

    .passport-close-btn:hover {
        color: var(--accent);
    }


.project-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================================
   PROJECT DETAILS PAGE (ШАБЛОН)
   ========================================= */

:root {
    --proj-bg-outer: #090909;
    --proj-bg-inner: #0e0e0e;
    --proj-text-main: #fbfbfb;
    --proj-divider: #ffffff;
}

[data-theme="light"] {
    --proj-bg-outer: #fbfbfb;
    --proj-bg-inner: #e7e7e7;
    --proj-text-main: #000000;
    --proj-divider: #000000;
}

.project-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
}

/* --- HERO BLOCK --- */
.project-hero-block {
    width: 1168px;
    height: 342px;
    background-color: var(--proj-bg-outer);
    border-radius: 16px;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.hero-image-frame {
    width: 1148px;
    height: 322px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-text-wrap {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 2;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 60px;
    line-height: 1;
    color: #fbfbfb;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.hero-slogan {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 32px;
    line-height: 1;
    color: #f9be12;
    margin: 5px 0 0 0;
}

/* --- GALLERY CARD --- */
.gallery-card {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 266px;
    height: 302px;
    border-radius: 4px;
    box-sizing: border-box;
    border: 2px solid #ffffff;
    cursor: pointer;
    overflow: hidden;
    z-index: 2;
    background-color: #0e0e0e; /* Наш Dark gray как плотная подложка */
    /* Добавляем плавность трансформации и тени, как у project-card */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    /* Ховер-эффект всей карточки (скейл + мягкое свечение/тень) */
    .gallery-card:hover {
        transform: scale(1.02);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5); /* Можно заменить на твою переменную свечения, если она есть */
    }

    .gallery-card img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.3s ease;
    }

.gallery-base {
    z-index: 1;
    opacity: 1;
}

.gallery-color {
    z-index: 2;
    opacity: 0;
}

.gallery-card:hover .gallery-color {
    opacity: 1;
}

.gallery-card:hover .gallery-base {
    opacity: 0;
}

/* --- INFO & LINKS BLOCK --- */
.project-info-links-block {
    width: 1168px;
    background-color: var(--proj-bg-outer);
    border-radius: 16px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
}

/* Левая часть (Info) */
.info-section {
    width: 862px;
    background-color: var(--proj-bg-inner);
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    min-height: 300px;
}

.info-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.project-logo {
    width: 64px;
    height: 64px;
}

.short-desc {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--proj-text-main);
    margin: 0;
    line-height: 1.4;
    padding-right: 10px;
}

.info-divider {
    width: 842px;
    height: 1px;
    background-color: var(--proj-divider);
    margin-bottom: 20px;
}

/* Применяем правила к абзацам внутри блока */
.full-desc p {
    text-align: justify;
    text-indent: 20px;
    margin: 0;
}

.full-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--proj-text-main);
    line-height: 1.5;
    padding-bottom: 0;
}

/* Кнопка перехода к Dev Log со страницы проекта */
.devlog-details-link {
    display: block;
    width: 193px;
    height: 57px;
    margin-top: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .devlog-details-link:hover {
        transform: scale(1.02);
        box-shadow: 0 0 10px var(--card-glow);
    }

/* Тех-стек */
.tech-stack-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-bottom: 10px;
}

    .tech-stack-icons img {
        height: 40px;
        width: auto;
        filter: invert(1);
    }

[data-theme="light"] .tech-stack-icons img {
    filter: none;
}

/* Правая часть (Links) */
.links-section {
    width: 276px;
    background-color: var(--proj-bg-inner);
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.store-link {
    display: block;
    width: 193px;
    height: 57px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .store-link:hover {
        transform: scale(1.02);
        box-shadow: 0 0 10px var(--card-glow);
    }

.store-icon {
    width: 100%;
    height: 100%;
}

/* Логика иконок магазинов для темной/светлой темы */
.light-theme-icon {
    display: none;
}

[data-theme="light"] .dark-theme-icon {
    display: none;
}

[data-theme="light"] .light-theme-icon {
    display: block;
}




/* --- GALLERY MODAL --- */
dialog.gallery-modal {
    position: fixed !important;
    top: 165px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    width: 1168px;
    max-width: 95vw;
    height: fit-content;
    max-height: calc(100vh - 180px);
    border-radius: 16px;
    padding: 10px;
    border: none;
    box-sizing: border-box;
    z-index: 9999;
    background-color: rgba(14, 14, 14, 0.8);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

    dialog.gallery-modal::backdrop {
        background: rgba(0, 0, 0, 0.0);
    }

/* Светлая тема для фона модалки */
[data-theme="light"] dialog.gallery-modal {
    background-color: rgba(231, 231, 231, 0.8);
}

/* Внутренняя область с рамкой — теперь она диктует размеры модалке */
.gallery-viewport {
    width: 100%;
    min-height: 380px; /* Минимальная высота пустой рамки */
    height: auto; /* Растет по контенту */
    max-height: calc(100vh - 200px); /* Ограничение, чтобы скроллился внутренний контент, а не весь экран */

    border: 1px solid var(--accent);
    border-radius: 8px; /* Внутренние углы 8px */
    position: relative;
    box-sizing: border-box;
    overflow-y: auto; /* Скролл внутри рамки, если контента много */
}

/* Светлая тема для внутренней рамки */
[data-theme="light"] .gallery-viewport {
    border-color: #040404;
}

/* Крестик закрытия главной галереи */
.modal-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 11;
    outline: none;
    /* Подключаем наш SVG-крестик */
    background-image: url('/images/icons/ui/ic-close.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Плавный эффект */
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    .modal-close:hover {
        transform: scale(0.9);
        opacity: 0.8;
    }

/* Инверсия для светлой темы (если иконка белая, а тема светлая) */
[data-theme="light"] .modal-close {
    filter: invert(1);
}


/* =========================================
   ВНУТРЕННЯЯ СЕТКА И КАТЕГОРИИ ГАЛЕРЕИ 
   ========================================= */

/* Контейнер скролла внутри модалки */
.gallery-viewport {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

    .gallery-viewport::-webkit-scrollbar {
        width: 6px;
    }

    .gallery-viewport::-webkit-scrollbar-thumb {
        background-color: var(--accent);
        border-radius: 4px;
    }

/* Секция категории (отступы) */
.gallery-section {
    padding: 30px 20px;
}

/* Заголовок категории (Screenshots, Mockups, Ads и т.д.) */
.gallery-title {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16pt;
    color: #fbfbfb;
    margin: 0 0 16px 0;
    line-height: 1;
}

[data-theme="light"] .gallery-title {
    color: #040404;
}

/* Базовый контейнер сетки */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

    /* --- СЕТКА 9:16 (Строго 8 в ряд) --- */
    .gallery-grid.format-vertical .grid-item {
        width: calc((100% - (16px * 7)) / 8);
        aspect-ratio: 9 / 16;
        height: auto;
    }

    /* --- СЕТКА 16:9 (Строго 4 в ряд) --- */
    .gallery-grid.format-horizontal .grid-item {
        width: calc((100% - (16px * 3)) / 4);
        aspect-ratio: 16 / 9;
        height: auto;
    }

/* Сама карточка (превью) */
.grid-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s;
    z-index: 1;
    box-sizing: border-box;
}

[data-theme="light"] .grid-item {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Ховер-эффект */
.grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 15px var(--card-glow);
    z-index: 2;
}

[data-theme="light"] .grid-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Картинка и видео внутри превью */
.grid-item img,
.grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Оверлей для видео */
.video-item {
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3) url('/images/icons/ui/ic-play.svg') center / 32px no-repeat;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.grid-item:hover .video-play-overlay {
    opacity: 0.8;
}


/* =========================================
   LIGHTBOX (ПОЛНОЭКРАННЫЙ ПРОСМОТР)
   ========================================= */

/* Нативный диалог */
dialog.lightbox-modal {
    padding: 0;
    border: none;
    background: transparent;
    margin: auto;
    overflow: visible;
}

    dialog.lightbox-modal::backdrop {
        background: rgba(0, 0, 0, 0.7);
    }

/* Подложка (Рамка) */
.lightbox-frame {
    position: relative;
    padding: 4px;
    border-radius: 8px;
    background-color: rgba(4, 4, 4, 0.9);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .lightbox-frame {
    background-color: rgba(251, 251, 251, 0.9); /* #fbfbfb */
}

/* Обертка для медиа-контента */
.lightbox-content-wrapper {
    position: relative;
    display: flex;
    border-radius: 4px; /* Скругление самого скриншота 8px */
    overflow: hidden;
}

    /* Сама картинка / Видео внутри рамки */
    .lightbox-content-wrapper img,
    .lightbox-content-wrapper video {
        display: block;
        width: auto;
        height: auto;
        /* Ограничение: картинка не может быть выше экрана */
        max-height: calc(100vh - 80px);
        object-fit: contain;
    }

/* Вертикальный формат 9:16 (до 500px) */
.lightbox-frame.format-vertical .lightbox-content-wrapper img,
.lightbox-frame.format-vertical .lightbox-content-wrapper video {
    max-width: min(500px, calc(100vw - 80px));
}

/* Горизонтальный формат 16:9 (до 1000px) */
.lightbox-frame.format-horizontal .lightbox-content-wrapper img,
.lightbox-frame.format-horizontal .lightbox-content-wrapper video {
    max-width: min(1000px, calc(100vw - 80px));
}

/* =========================================
   ЭЛЕМЕНТЫ УПРАВЛЕНИЯ ЛАЙТБОКСОМ (SVG-ИКОНКИ)
   ========================================= */

/* Общие стили для всех кнопок */
.lightbox-close,
.lightbox-nav {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    /* Подключаем SVG как фоновое изображение */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Плавный эффект нажатия */
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    /* Ховер-эффект "утопания" (кнопка слегка сжимается) */
    .lightbox-close:hover,
    .lightbox-nav:hover {
        transform: scale(0.9);
        opacity: 0.8;
    }

/* Для стрелок нужно сохранить центровку по вертикали вместе с scale */
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

    .lightbox-nav:hover {
        transform: translateY(-50%) scale(0.9);
    }

/* --- КОНКРЕТНЫЕ ИКОНКИ --- */

/* Крестик: 10px от верха и 10px от правого края */
.lightbox-close {
    top: 10px;
    right: 10px;
    background-image: url('/images/icons/ui/ic-close.svg');
}

/* Стрелка влево: 10px от левого края */
.lightbox-prev {
    left: 10px;
    background-image: url('/images/icons/ui/ic-arrow-left.svg');
}

/* Стрелка вправо: 10px от правого края */
.lightbox-next {
    right: 10px;
    background-image: url('/images/icons/ui/ic-arrow-right.svg');
}

/* --- СВЕТЛАЯ ТЕМА (Инверсия иконки) --- */
/* Если основные иконки белые под темную тему, то в светлой теме инвертируем их в черные */
[data-theme="light"] .lightbox-close,
[data-theme="light"] .lightbox-nav {
    filter: invert(1);
}



/* =========================================
   СТРАНИЦА IN TOUCH — КАРКАС И ФОН
   ========================================= */

.intouch-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 1200px;
    height: 1080px;
    background-image: var(--intouch-bg-img);
    background-size: 1440px 1080px;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    transition: background-image 0.3s ease;
}

.intouch-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* --- ОСНОВНАЯ КАРТОЧКА --- */
.intouch-base-card {
    width: 1168px;
    min-height: 500px;
    background-color: var(--intouch-base-bg);
    border-radius: 16px;
    /* Убираем 10px сверху (ставим 0), чтобы четко контролировать высоту шапки */
    padding: 0 10px 10px 10px;
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
}

/* --- ВЕРХНЯЯ ЗОНА --- */
.intouch-header-area {
    height: 136px; /* 20px (верх) + 96px (иконка) + 20px (низ) */
    display: flex;
    justify-content: space-between;
    align-items: center; /* Центрирует 96px контент ровно посередине 136px блока */
    padding: 0 20px; /* Отступы по бокам */
    box-sizing: border-box;
}

.intouch-header-info {
    height: 96px; /* Жестко приравниваем высоту к иконке */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Раскидывает Имя к верху, а Роль к низу */
}

.intouch-name {
    font-family: 'Inter', sans-serif;
    font-weight: 350; /* Inter Regular */
    font-size: 36pt;
    line-height: 1; /* Единичка убирает лишнее "воздушное" пространство у шрифта */
    color: var(--intouch-text);
    margin: 0; /* Убираем margin, всю работу делает space-between */
}

.intouch-role {
    font-family: 'Inter', sans-serif;
    font-weight: 100; /* Inter Light */
    font-size: 16pt;
    line-height: 1; /* Тоже единичка для точности */
    color: var(--intouch-text);
    margin: 0;
}

.intouch-chapter-icon {
    width: 84px;
    height: 96px;
    flex-shrink: 0;
}

/* --- ВНУТРЕННЯЯ КАРТОЧКА --- */
.intouch-in-card {
    width: 100%;
    flex-grow: 1; /* Занимает оставшуюся высоту */
    background-color: var(--intouch-in-bg);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- СЛОГАН И КОНТАКТЫ --- */
.intouch-slogan {
    font-family: 'Inter', sans-serif;
    font-weight: 300; /* Inter Light */
    font-size: 18pt;
    line-height: 1.2;
    color: var(--accent);
    text-transform: uppercase;
    margin: 0; /* Отступы теперь контролируются паддингом in-card */
}
    [data-theme="light"] .intouch-slogan {
    color: var(--intouch-text);
}

.intouch-action-links {
    display: flex;
    flex-direction: row; /* Выстраиваем кнопки в ряд */
    gap: 10px; /* Отступ между кнопками */
    margin-top: 20px; /* Отступ сверху от слогана */
    justify-content: flex-start; /* Прижимаем к левому краю */
}



/* =========================================
   ЮРИДИЧЕСКИЕ СТРАНИЦЫ (LEGAL PAGES)
   ========================================= */

.legal-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.legal-base-card {
    width: 1168px;
    min-height: 400px;
    height: auto;
    background-color: var(--bg-element);
    border-radius: 16px;
    padding: 10px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.legal-in-card {
    width: 1148px;
    min-height: 380px;
    height: auto;
    background-color: var(--bg-page);
    border-radius: 8px;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.legal-title {
    font-family: 'Inter', sans-serif;
    font-size: 32pt;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.legal-updated {
    font-family: 'Inter', sans-serif;
    font-size: 14pt;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0 0 24px 0;
}

.legal-divider {
    width: 100%;
    height: 1px;
    background-color: var(--header-line);
    opacity: 0.3;
    margin-bottom: 32px;
}

.legal-content {
    font-family: 'Inter', sans-serif;
    font-size: 16pt;
    line-height: 1.6;
    color: var(--text-main);
}

    .legal-content h2 {
        font-size: 20pt;
        font-weight: 500;
        color: var(--text-main);
        margin: 32px 0 12px 0;
    }

    .legal-content p {
        margin: 0 0 16px 0;
    }

    .legal-content ul,
    .legal-content ol {
        margin: 0 0 16px 24px;
        padding: 0;
    }

    .legal-content li {
        margin-bottom: 8px;
    }

    .legal-content a,
    .legal-content a:visited {
        color: var(--color-orange);
        text-decoration: underline;
        transition: opacity 0.2s ease;
    }

        .legal-content a:hover,
        .legal-content a:active {
            color: var(--color-orange);
            opacity: 0.8;
        }


/* =========================================
   СТРАНИЦА ОШИБОК (404 / 500 ERROR PAGE)
   ========================================= */

.error-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 16px 80px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Код ошибки 75pt, Inter Black, #f9be12 */
.error-code {
    font-family: 'Inter', sans-serif;
    font-size: 75pt;
    font-weight: 900;
    color: var(--yellow-accent, #f9be12);
    line-height: 1;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Заголовок 36pt, Inter Regular, UPPERCASE */
.error-title {
    font-family: 'Inter', sans-serif;
    font-size: 36pt;
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Арт 465х362 с автопереключением под тему */
.error-art {
    width: 465px;
    height: 362px;
    position: relative;
    margin-bottom: 24px;
}

.error-art-dark,
.error-art-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease;
}

.error-art-dark {
    background-image: url('../images/bg/bg-error-dark.png');
}

.error-art-light {
    background-image: url('../images/bg/bg-error-light.png');
    opacity: 0;
}

/* Светлая тема */
[data-theme="light"] .error-art-dark {
    opacity: 0;
}

[data-theme="light"] .error-art-light {
    opacity: 1;
}

/* Описание 24pt, Inter ExtraLight */
.error-desc {
    font-family: 'Inter', sans-serif;
    font-size: 24pt;
    font-weight: 200;
    color: var(--text-main);
    line-height: 1.4;
    max-width: 900px;
}



/* =========================================
   DEV LOG PAGE
   ========================================= */

.devlog-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Единый базовый контейнер */
.devlog-base-card {
    width: 1168px;
    height: auto;
    background-color: var(--bg-element);
    border-radius: 16px;
    padding: 20px 10px 10px 10px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

/* Кнопка возврата к проекту из фильтрованного Dev Log */
.devlog-project-back-bar {
    margin-bottom: 15px;
    padding: 0 20px;
}

.btn-back-to-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

    .btn-back-to-project:hover {
        opacity: 1;
        transform: translateX(-4px);
    }

/* Шапка с заглавием и иконкой */
.devlog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.devlog-main-title {
    font-family: 'Inter', sans-serif;
    font-size: 24pt;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.devlog-chapter-icon {
    width: 84px;
    height: 96px;
    object-fit: contain;
}

/* Лента постов */
.devlog-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Карточка одиночного поста (блочный режим для работы float) */
.devlog-post-card {
    width: 100%;
    background-color: var(--bg-page);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    display: block;
    text-align: justify;
}

    /* Клиринг потока, чтобы карточка не схлопывалась из-за float */
    .devlog-post-card::after {
        content: "";
        display: table;
        clear: both;
    }

/* Блок с превью скриншотов (прижат вправо, текст обтекает слева и снизу) */
.devlog-post-gallery {
    float: right;
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 60px;
    margin-left: 20px;
    margin-bottom: 8px;
}

.devlog-thumb-wrapper {
    width: 192px;
    height: 192px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .devlog-thumb-wrapper:hover {
        transform: scale(1.02);
        border-color: var(--yellow-accent, #f9be12);
    }

.devlog-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Контентная часть */
.devlog-post-content {
    /* Оставляем обычным потоком */
}

/* Мета-заголовок [YYYY.MM.DD - Project] */
.devlog-post-meta {
    font-family: 'Inter', sans-serif;
    font-size: 12pt;
    font-weight: 600;
    color: var(--yellow-accent, #f9be12);
    margin-bottom: 10px;
}

[data-theme="light"] .devlog-post-meta {
    color: #040404;
}

/* Основной текст поста */
.devlog-post-body {
    font-family: 'Inter', sans-serif;
    font-size: 12pt;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-main, #fbfbfb);
}

    /* Управляем отступами заголовка h3 внутри поста */
    .devlog-post-body h3 {
        font-weight: 600;
        margin-top: 10px;
        margin-bottom: 0px;
    }


[data-theme="light"] .devlog-post-body {
    color: #040404;
}

/* Абзацы и переносы строк внутри Markdown */
.devlog-post-body p {
    margin: 0 0 6px 0;
}

    .devlog-post-body p:last-child {
        margin-bottom: 0;
    }

/* Состояние пустой ленты */
.devlog-empty {
    font-family: 'Inter', sans-serif;
    font-size: 16pt;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

/* =========================================
   DEV LOG LIGHTBOX (По образу модалки проектов)
   ========================================= */

.devlog-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

    .devlog-lightbox-modal.active {
        display: flex;
    }

/* Подложка-рамка (4px) */
.devlog-lightbox-frame {
    position: relative;
    padding: 4px;
    border-radius: 8px;
    background-color: rgba(4, 4, 4, 0.9);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .devlog-lightbox-frame {
    background-color: rgba(251, 251, 251, 0.9);
}

/* Обертка для скриншота */
.devlog-lightbox-content-wrapper {
    position: relative;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

    .devlog-lightbox-content-wrapper img {
        display: block;
        width: 512px;
        height: 512px;
        object-fit: contain;
    }

/* Крестик внутри скриншота */
.devlog-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    background-image: url('/images/icons/ui/ic-close.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    .devlog-lightbox-close:hover {
        transform: scale(0.9);
        opacity: 0.8;
    }

/* Инверсия иконки в светлой теме */
[data-theme="light"] .devlog-lightbox-close {
    filter: invert(1);
}



/* =========================================
   ONE MAN ARMY PAGE
   ========================================= */

.oma-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 16px 80px 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Единый базовый контейнер */
.oma-base-card {
    width: 1168px;
    height: auto;
    background-color: var(--bg-element);
    border-radius: 16px;
    padding: 20px 10px 10px 10px;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

/* Шапка */
.oma-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.oma-main-title {
    font-family: 'Inter', sans-serif;
    font-size: 24pt;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.oma-chapter-icon {
    width: 84px;
    height: 96px;
    object-fit: contain;
}

/* Лента постов */
.oma-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Карточка поста (блочный режим под float) */
.oma-post-card {
    width: 100%;
    background-color: var(--bg-page);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    display: block;
}

    /* Клиринг потока float для карточки */
    .oma-post-card::after {
        content: "";
        display: table;
        clear: both;
    }

    /* Арт справа (нечетные посты) */
    .oma-post-card.img-right .oma-art-wrapper {
        float: right;
        margin-left: 20px;
        margin-bottom: 12px;
    }

    /* Арт слева (четные посты) */
    .oma-post-card.img-left .oma-art-wrapper {
        float: left;
        margin-right: 20px;
        margin-bottom: 12px;
    }

/* Фиксация арта 300x300 */
.oma-art-wrapper {
    width: 300px;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-element);
}

.oma-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Основной заголовок статьи */
.oma-post-title {
    font-family: 'Inter', sans-serif;
    font-size: 18pt;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 2px 0;
}

[data-theme="light"] .oma-post-title {
    color: #040404;
}

/* --- Подзаголовок статьи --- */
.oma-post-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14pt;
    font-weight: 400; /* Regular, чтобы визуально отделить от жирного Title */
    color: var(--text-main);
    margin: 0 0 6px 0; /* Отступ от подзаголовка до даты */
}

[data-theme="light"] .oma-post-subtitle {
    color: #040404;
}

/* Мета-заголовок с датой [YYYY.MM.DD] строго под заголовком */
.oma-post-meta {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    font-weight: 400;
    color: var(--yellow-accent, #f9be12);
    margin-bottom: 12px;
}

[data-theme="light"] .oma-post-meta {
    color: #040404;
}

/* Основной текст и элементы Markdown внутри поста */
.oma-post-body {
    font-family: 'Inter', sans-serif;
    font-size: 12pt;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-main);
}

[data-theme="light"] .oma-post-body {
    color: #040404;
}

/* Стилизация подзаголовков внутри тела поста (### TITLE) */
.oma-post-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 16pt;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

[data-theme="light"] .oma-post-body h3 {
    color: #040404;
}

.oma-post-body p {
    margin: 0 0 12px 0;
    text-align: justify;
}

    .oma-post-body p:last-child {
        margin-bottom: 0;
    }

.oma-empty {
    font-family: 'Inter', sans-serif;
    font-size: 16pt;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

/* =========================================
   COMING SOON MODAL
   ========================================= */
dialog.cs-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 800px;
    max-width: 92vw;
    height: 400px;
    max-height: 90vh;
    border-radius: 16px;
    padding: 10px;
    border: none;
    box-sizing: border-box;
    z-index: 9999;
    background-color: rgba(14, 14, 14, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
    overflow: hidden;
}

    dialog.cs-modal::backdrop {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(2px);
    }

[data-theme="light"] dialog.cs-modal {
    background-color: rgba(231, 231, 231, 0.85);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.cs-viewport {
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent);
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

[data-theme="light"] .cs-viewport {
    border-color: #040404;
}

.cs-title {
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    font-size: 48pt;
    letter-spacing: 0.02em;
    color: #fbfbfb;
    margin: 0 0 12px 0;
    line-height: 1.1;
    text-transform: uppercase;
}

[data-theme="light"] .cs-title {
    color: #040404;
}

.cs-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12pt;
    color: #a0a0a0;
    margin: 0;
    max-width: 750px;
    line-height: 1.35;
}

[data-theme="light"] .cs-subtitle {
    color: #555555;
}
