/* Aurora public site — layout v20 */

:root {
    --color-bg-deep: #050508;
    --color-bg-panel: #f5f5f0;
    --color-bg-panel-alt: #eef1f5;
    --color-text-primary: #1a1a2e;
    --color-text-muted: #5a6070;
    --color-text-on-dark: #e8eaed;
    --color-text-on-dark-muted: #b0b8c4;
    --color-accent: #0077aa;
    --color-accent-hover: #00a8cc;
    --color-accent-bright: #00d4ff;
    --color-border-light: rgba(26, 26, 46, 0.12);
    --color-border-dark: rgba(255, 255, 255, 0.12);
    --font-body: Arial, Helvetica, sans-serif;
    --space-page: clamp(16px, 4vw, 40px);
    --sidebar-width: 240px;
    --header-height-compact: 56px;
    --header-height-sticky: calc(8px + clamp(51px, 6.75vw, 66px) + 4px + clamp(16px, 2.5vw, 20px) * 1.2 + 2px + clamp(10px, 1.8vw, 12px) * 1.3 + 6px);
    --content-max-width: 960px;
    --shell-max-width: 1280px;
    --radius-panel: 12px;
    --radius-card: 10px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
}

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

html {
    height: 100%;
}

body.site-body {
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--color-text-on-dark);
    background: var(--color-bg-deep);
    overflow-x: hidden;
}

.site-body__bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--color-bg-deep);
}

.site-body--home .site-body__bg {
    background:
        linear-gradient(180deg, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.88) 100%),
        url('/projects/aurora/assets/images/bg.jpeg') center center / cover no-repeat;
}

/* Главная: фон-Солнце (перекрывает правило выше и inner). Откат — удалить блок ниже. */
.site-body--home.site-body--inner .site-body__bg {
    background:
        linear-gradient(180deg, rgba(5, 5, 8, 0.72) 0%, rgba(5, 5, 8, 0.8) 100%),
        url('/projects/aurora/assets/images/20240512_182658_1024_0171.jpg') center center / cover no-repeat;
}

.site-body--home-visual .site-body__bg {
    background:
        radial-gradient(ellipse at 50% 20%, rgba(0, 119, 170, 0.18) 0%, transparent 55%),
        #000 url('/projects/aurora/assets/images/bg.jpeg') center center / cover no-repeat;
}

.site-body--inner .site-body__bg {
    background:
        linear-gradient(180deg, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.88) 100%),
        url('/projects/aurora/assets/images/bg.jpeg') center center / cover no-repeat;
}

.site-body--theme-sun .site-body__bg {
    background:
        linear-gradient(180deg, rgba(5, 5, 8, 0.86) 0%, rgba(8, 6, 12, 0.92) 100%),
        url('/projects/aurora/assets/images/heroes/bg-sun-subtle.jpg') center center / cover no-repeat;
}

.site-body--theme-space .site-body__bg {
    background:
        linear-gradient(180deg, rgba(5, 5, 8, 0.9) 0%, rgba(5, 5, 8, 0.94) 100%),
        url('/projects/aurora/assets/images/heroes/bg-space-subtle.jpg') center center / cover no-repeat;
}

.site-body--theme-mixed .site-body__bg {
    background:
        linear-gradient(160deg, rgba(5, 5, 8, 0.9) 0%, rgba(12, 18, 32, 0.88) 100%),
        url('/projects/aurora/assets/images/heroes/bg-sun-subtle.jpg') center 15% / cover no-repeat;
}

.site-body--home .site-body__bg::after,
.site-body--inner .site-body__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 119, 170, 0.08) 0%, transparent 60%);
}

/* ---- Header: compact (inner pages) ---- */

.site-header {
    position: relative;
    z-index: 20;
}

.site-header--compact {
    position: sticky;
    top: 0;
    background: rgba(5, 5, 8, 0.92);
    border-bottom: 1px solid var(--color-border-dark);
    backdrop-filter: blur(8px);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    max-width: var(--shell-max-width);
    margin: 0 auto;
    padding: 8px var(--space-page) 6px;
    min-height: 0;
}

.site-header__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
    color: var(--color-text-on-dark);
    flex-shrink: 0;
}

.site-header__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-header__brand-logo {
    display: block;
    width: auto;
    height: clamp(51px, 6.75vw, 66px);
    margin-bottom: 2px;
}

.site-header__brand:hover {
    color: var(--color-accent-bright);
}

.site-header__brand-title {
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.site-header__brand-sub {
    font-size: clamp(10px, 1.8vw, 12px);
    color: var(--color-text-on-dark-muted);
    line-height: 1.3;
}

/* ---- Header: hero (home) ---- */

.site-header--hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 16px 20px;
}

.site-panel {
    padding: 18px 28px;
    border-radius: var(--radius-panel);
    background: rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
}

.site-title-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    max-width: min(1320px, calc(100vw - 40px));
    margin-top: 14px;
}

.site-title {
    color: #fff;
    font-family: var(--font-body);
    font-size: clamp(18px, 2.4vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.9),
        0 0 24px rgba(0, 0, 0, 0.65),
        0 2px 6px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
}

.site-title-line {
    position: relative;
    width: 100%;
    height: 66px;
    margin-top: 6px;
}

.site-title-line-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    transform: translateY(-50%);
    -webkit-mask-image: radial-gradient(
        circle at center,
        #000 0,
        #000 7px,
        transparent 7px,
        transparent 9px,
        #000 9px,
        #000 100%
    );
    mask-image: radial-gradient(
        circle at center,
        #000 0,
        #000 7px,
        transparent 7px,
        transparent 9px,
        #000 9px,
        #000 100%
    );
}

.site-title-marker-group {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 66px;
    height: 66px;
    transform: translate(-50%, -50%);
    -webkit-mask-image: radial-gradient(
        circle at center,
        #000 0,
        #000 7px,
        transparent 7px,
        transparent 9px,
        #000 9px,
        #000 100%
    );
    mask-image: radial-gradient(
        circle at center,
        #000 0,
        #000 7px,
        transparent 7px,
        transparent 9px,
        #000 9px,
        #000 100%
    );
}

.site-title-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%);
}

.site-title-marker__cross {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.site-title-marker__cross::before,
.site-title-marker__cross::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
    transform: translate(-50%, -50%);
}

.site-title-marker__cross::before {
    width: 64px;
    height: 3px;
}

.site-title-marker__cross::after {
    width: 3px;
    height: 64px;
}

/* ---- Navigation ---- */

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px clamp(10px, 1.5vw, 24px);
    width: 100%;
}

.site-nav--hero {
    margin-top: 14px;
}

.site-nav--compact {
    flex: 1 1 280px;
    justify-content: flex-end;
}

.site-nav__label--mobile {
    display: none;
}

.site-nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-on-dark);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.site-nav-toggle__icon {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.site-nav-panel {
    min-width: 0;
}

.site-body--nav-open {
    overflow: hidden;
}

.site-nav__link {
    color: var(--color-text-on-dark);
    font-family: var(--font-body);
    font-size: clamp(11px, 1.1vw, 14px);
    line-height: 1.35;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: center;
    transition: color 0.2s ease;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.site-nav--hero .site-nav__link {
    font-size: clamp(12px, 1.15vw, 17px);
}

.site-nav__link:hover {
    color: var(--color-accent-bright);
}

.site-nav__link--active {
    color: var(--color-accent-bright);
    text-decoration: none;
    font-weight: 700;
}

/* ---- Shell: sidebar + main ---- */

.site-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: var(--shell-max-width);
    margin: 0 auto;
    padding: 0 var(--space-page) 32px;
    min-height: calc(100vh - var(--header-height-compact));
}

.site-shell--with-sidebar {
    grid-template-columns: 1fr;
}

.site-sidebar {
    display: none;
}

.site-sidebar--desktop {
    display: none;
}

.site-secondary-bar {
    display: block;
    position: relative;
    margin-bottom: 8px;
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.site-secondary-bar__scroller {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.site-secondary-bar__scroller::-webkit-scrollbar {
    display: none;
}

.site-secondary-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(90deg, rgba(5, 5, 8, 0), rgba(5, 5, 8, 0.96));
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.site-secondary-bar--end::after,
.site-secondary-bar:not(.site-secondary-bar--scrollable)::after {
    opacity: 0;
}

.secondary-nav__label--short {
    display: none;
}

.site-main {
    min-width: 0;
}

.site-main--home {
    position: relative;
    z-index: 1;
}

.home-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 4vw, 36px);
    width: min(920px, 100%);
}

.home-tiles {
    display: grid;
    gap: 12px;
    width: 100%;
    grid-template-columns: 1fr;
}

.home-tile {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-card);
    background: rgba(8, 12, 24, 0.62);
    color: var(--color-text-on-dark);
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-tile:hover {
    border-color: rgba(0, 168, 204, 0.55);
    background: rgba(10, 18, 36, 0.78);
    transform: translateY(-1px);
}

.home-tile__thumb {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
}

.home-tile__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.home-tile__title {
    color: #fff;
    font-size: clamp(14px, 2.2vw, 16px);
    font-weight: 700;
    line-height: 1.3;
}

.home-tile__hint {
    color: var(--color-text-on-dark-muted);
    font-size: 13px;
    line-height: 1.4;
}

/* ---- Page hero strip ---- */

.page-hero {
    position: relative;
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto 16px;
    border-radius: var(--radius-panel);
    overflow: hidden;
    aspect-ratio: 21 / 6;
    max-height: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.page-hero__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

.page-hero--video .page-hero__video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero--video .page-hero__image--poster {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-hero--home {
    max-height: 280px;
}

@media (prefers-reduced-motion: reduce) {
    .page-hero--video .page-hero__video {
        display: none;
    }

    .page-hero--video .page-hero__image--poster {
        display: block;
    }

    .content-panel--enter {
        animation: none;
    }
}

/* ---- Home landing (content panel) ---- */

.content-panel--enter {
    animation: home-panel-enter 0.35s ease-out both;
}

@keyframes home-panel-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-intro {
    text-align: center;
    margin-bottom: 8px;
}

.home-intro .content-panel__title {
    display: inline-block;
    margin-bottom: 12px;
}

.home-intro .breadcrumbs {
    justify-content: center;
    margin-bottom: 16px;
}

.home-intro__tagline {
    margin: 0 0 28px;
    color: var(--color-accent);
    font-size: clamp(16px, 2.5vw, 20px);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-transform: none;
}

.content-panel--home .home-intro__body {
    width: 100%;
    text-align: center;
}

.content-panel--home .home-intro__body .content-panel__text {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    font-size: clamp(15px, 2.4vw, 17px);
    line-height: 1.7;
}

.home-intro__body .content-panel__text:last-child {
    margin-bottom: 0;
}

.home-highlights {
    display: grid;
    gap: 16px;
    margin: 28px 0 8px;
    grid-template-columns: 1fr;
}

.home-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(128px, 20vw, 168px);
    padding: 20px 22px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: var(--color-bg-panel-alt);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.home-highlight:hover,
.home-highlight:focus-visible {
    border-color: rgba(255, 190, 80, 0.75);
    background: linear-gradient(180deg, rgba(255, 248, 230, 0.98) 0%, rgba(255, 240, 210, 0.92) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 190, 80, 0.35),
        0 8px 28px rgba(255, 180, 60, 0.28),
        inset 0 0 24px rgba(255, 200, 90, 0.12);
    transform: translateY(-2px);
}

.home-highlight:focus-visible {
    outline: 2px solid rgba(255, 190, 80, 0.85);
    outline-offset: 3px;
}

.home-highlight__title {
    margin-bottom: 8px;
    color: var(--color-text-primary);
    font-size: clamp(16px, 2.6vw, 19px);
    font-weight: 700;
    line-height: 1.3;
}

.home-highlight__text {
    color: var(--color-text-primary);
    font-size: clamp(14px, 2.1vw, 15px);
    line-height: 1.5;
    max-width: 36ch;
}

.home-dev-diary {
    margin: 32px 0 4px;
    text-align: center;
}

.home-dev-diary__link {
    color: var(--color-accent);
    font-size: clamp(19px, 3.2vw, 24px);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.15s ease;
}

.home-dev-diary__link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.home-news {
    margin-top: 32px;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-light);
}

.home-news__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 4px;
}

.home-news__all {
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.home-news__all:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.home-news__list {
    margin-top: 8px;
}

.home-news__list .news-card__title {
    font-size: clamp(16px, 2.5vw, 17px);
}

/* ---- Home decorative visuals (legacy, unused) ---- */

.home-decor {
    position: relative;
    width: min(920px, 100%);
    height: min(52vh, 420px);
    margin: 0 auto;
}

.home-decor__sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(52vw, 340px);
    height: min(52vw, 340px);
    transform: translate(-50%, -50%);
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.82;
    filter: saturate(1.15) drop-shadow(0 0 40px rgba(255, 180, 60, 0.35));
    animation: home-sun-pulse 8s ease-in-out infinite;
}

.home-decor__satellite {
    position: absolute;
    right: clamp(0px, 4vw, 40px);
    bottom: 0;
    width: min(36vw, 240px);
    height: auto;
    object-fit: contain;
    opacity: 0.92;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

.home-tagline {
    margin-top: 24px;
    color: var(--color-text-on-dark);
    font-size: clamp(14px, 2.5vw, 18px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    opacity: 0.85;
}

@keyframes home-sun-pulse {
    0%,
    100% {
        filter: saturate(1.1) drop-shadow(0 0 36px rgba(255, 180, 60, 0.28));
    }

    50% {
        filter: saturate(1.25) drop-shadow(0 0 52px rgba(255, 200, 80, 0.42));
    }
}

/* ---- Content images ---- */

.content-figure {
    margin: 20px 0;
    max-width: 100%;
}

.content-figure__image {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--color-border-light);
    background: #fff;
}

.content-figure__caption {
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.45;
}

/* ---- Content panel (light reading zone) ---- */

.content-panel {
    background: var(--color-bg-panel);
    color: var(--color-text-primary);
    border-radius: var(--radius-panel);
    border: 1px solid var(--color-border-light);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    padding: clamp(20px, 4vw, 40px);
    max-width: var(--content-max-width);
    margin: 0 auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.content-panel__title {
    margin-bottom: 20px;
    color: var(--color-text-primary);
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    line-height: 1.25;
}

.content-panel__title--section {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-accent);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em;
    margin: 0 0 20px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.breadcrumbs__link {
    color: var(--color-accent);
    text-decoration: none;
}

.breadcrumbs__current {
    color: var(--color-text-muted);
}

.breadcrumbs__link:hover {
    text-decoration: underline;
}

.breadcrumbs__sep {
    color: var(--color-accent);
    font-weight: 700;
}

.content-panel__section-title {
    margin: 28px 0 12px;
    color: var(--color-text-primary);
    font-size: clamp(18px, 3vw, 20px);
    font-weight: 700;
    line-height: 1.35;
}

.content-panel__section-title:first-child {
    margin-top: 0;
}

.content-panel__subsection-title {
    margin: 18px 0 10px;
    color: #2a2a42;
    font-size: clamp(16px, 2.5vw, 17px);
    font-weight: 700;
    line-height: 1.35;
}

.content-panel__text {
    color: var(--color-text-primary);
    font-size: clamp(15px, 2.5vw, 16px);
    line-height: 1.65;
    margin-bottom: 12px;
    max-width: 70ch;
}

.content-panel__section-title--current {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-accent);
}

.site-body--theme-mixed .content-panel__section-title {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-accent);
}

.education-curriculum__stage-title {
    margin-top: 32px;
}

.education-curriculum__stage-title:first-child {
    margin-top: 0;
}

.education-curriculum__stage-note {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.education-module-list {
    display: grid;
    gap: 16px;
    margin: 20px 0 8px;
}

.education-module {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: #fff;
}

.education-module__body {
    padding: 16px 18px;
}

.education-module__title {
    margin: 0 0 14px;
    color: var(--color-text-primary);
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    line-height: 1.35;
}

.education-module__item {
    margin: 0 0 12px;
    color: var(--color-text-primary);
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
}

.education-module__entry {
    margin: 0 0 14px;
}

.education-module__item-title {
    margin: 0 0 4px;
    color: var(--color-text-primary);
    font-size: 15px;
    line-height: 1.5;
    max-width: none;
}

.education-module__item-meta {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.education-module__entry:last-child,
.education-module__item:last-child {
    margin-bottom: 0;
}

.content-panel__text--lead {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

/* ---- Cards ---- */

.card-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.card {
    padding: 16px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: #fff;
}

.card__title {
    margin-bottom: 8px;
    color: var(--color-text-primary);
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__meta,
.card__date {
    margin-bottom: 8px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__image {
    display: block;
    width: 100%;
    max-height: 360px;
    margin-bottom: 12px;
    border-radius: 8px;
    object-fit: cover;
}

.card__video {
    position: relative;
    width: 100%;
    margin-top: 12px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.card__video-frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.card__video-native {
    display: block;
    width: 100%;
    margin-top: 12px;
    border-radius: 8px;
    background: #000;
}

.card__meta--role {
    color: var(--color-accent);
    font-weight: 600;
}

.org-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.card--organization .card__body .content-panel__text:last-child {
    margin-bottom: 0;
}

.card-list--participants {
    grid-template-columns: 1fr;
}

/* ---- News list & detail ---- */

.content-back-link {
    margin: 0 0 16px;
    font-size: 14px;
}

.content-back-link a {
    color: var(--color-accent);
    text-decoration: none;
}

.content-back-link a:hover {
    text-decoration: underline;
}

.news-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.news-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
    border-color: rgba(0, 119, 170, 0.35);
    box-shadow: 0 4px 16px rgba(15, 35, 65, 0.08);
}

.news-card__link {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    color: inherit;
    text-decoration: none;
}

.news-card__thumb {
    display: block;
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.news-card__body {
    padding: 16px 18px;
}

.news-card__title {
    margin: 0 0 8px;
    color: var(--color-text-primary);
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    line-height: 1.35;
}

.news-card__date {
    display: block;
    margin-bottom: 10px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.news-card__excerpt {
    margin: 0 0 12px;
    color: var(--color-text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.news-card__more {
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 600;
}

.news-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    margin-top: 28px;
    padding-top: 8px;
}

.news-pagination__pages {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.news-pagination__page,
.news-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: #fff;
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.news-pagination__page:hover,
.news-pagination__link:hover {
    border-color: rgba(0, 119, 170, 0.45);
    background: var(--color-bg-panel-alt);
    color: var(--color-accent-hover);
}

.news-pagination__page--current {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
    cursor: default;
}

.news-pagination__link--prev,
.news-pagination__link--next {
    min-width: 0;
}

.news-detail__date {
    display: block;
    margin: 0 0 16px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.news-detail__image-link {
    display: block;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.news-detail__image-link:hover {
    box-shadow: 0 4px 16px rgba(0, 119, 170, 0.12);
}

.news-detail__image {
    display: block;
    width: 100%;
    max-height: 360px;
    margin-bottom: 0;
    border-radius: 0;
    object-fit: cover;
    cursor: zoom-in;
}

.news-detail__video {
    margin-bottom: 16px;
}

/* ---- Facts tiles (playful grid) ---- */

.facts-tiles {
    display: grid;
    gap: 18px;
    margin-top: 24px;
    grid-template-columns: 1fr;
}

.fact-tile {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    min-height: 200px;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 28px rgba(12, 24, 48, 0.18);
    text-decoration: none;
    color: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fact-tile--tilt-left {
    transform: rotate(-0.6deg);
}

.fact-tile--tilt-right {
    transform: rotate(0.6deg);
}

.fact-tile:hover {
    transform: rotate(0deg) translateY(-4px) scale(1.01);
    box-shadow: 0 16px 36px rgba(12, 24, 48, 0.28);
}

.fact-tile--no-image {
    background: linear-gradient(135deg, #5b3fd6 0%, #d94f8b 55%, #f6a623 100%);
}

.fact-tile__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.35s ease;
}

.fact-tile--mono .fact-tile__image {
    filter: grayscale(100%) contrast(1.1);
}

.fact-tile:hover .fact-tile__image {
    transform: scale(1.06);
}

.fact-tile__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 16, 36, 0.15) 0%,
        rgba(8, 16, 36, 0.45) 45%,
        rgba(8, 16, 36, 0.88) 100%
    );
}

.fact-tile__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    height: 100%;
    min-height: 200px;
    padding: 18px 18px 16px;
}

.fact-tile__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 214, 102, 0.92);
    color: #2a1d00;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
}

.fact-tile__teaser {
    font-size: clamp(17px, 3.2vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.fact-tile__teaser::before {
    content: '… ';
}

.fact-tile__cta {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.92;
}

/* ---- Fact detail ---- */

.fact-detail__badge {
    margin: 0 0 8px;
    color: #8a4b00;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fact-detail__teaser {
    margin: 0 0 18px;
    color: var(--color-text-primary);
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    line-height: 1.4;
}

.fact-detail__teaser::before {
    content: '… ';
}

.fact-detail__hero {
    margin: 0 0 20px;
    overflow: hidden;
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border-light);
}

.fact-detail__image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

/* Legacy fact cards (admin preview fallback) */

.facts-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    grid-template-columns: 1fr;
}

.fact-card {
    padding: 16px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: #fff;
}

.fact-card__title {
    margin: 0 0 10px;
    color: var(--color-text-primary);
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    line-height: 1.35;
}

.fact-card__content .content-panel__text {
    margin-bottom: 0;
}

.fact-card__content .content-panel__text:last-child {
    margin-bottom: 0;
}

/* ---- Forms ---- */

.form-panel {
    padding: 20px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    background: var(--color-bg-panel-alt);
}

.application-form-section.form-panel {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 0;
}

.application-form-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.application-form-section__title {
    margin-bottom: 20px;
    color: var(--color-text-primary);
    font-size: clamp(18px, 3vw, 22px);
    font-weight: 700;
}

.application-form {
    display: grid;
    gap: 16px;
}

.form-field--grid-spacer {
    display: none;
}

.form-field__label {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
}

.form-field__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.4;
}

select.form-field__input {
    cursor: pointer;
}

.form-field__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 119, 170, 0.15);
}

.form-field--error .form-field__input {
    border-color: #c0392b;
}

.form-field__error {
    margin-top: 6px;
    color: #c0392b;
    font-size: 13px;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 1.5;
}

.form-checkbox input {
    margin-top: 3px;
    flex-shrink: 0;
}

.form-message {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: var(--radius-card);
    font-size: 15px;
    line-height: 1.5;
}

.form-message--success {
    border: 1px solid rgba(0, 119, 170, 0.35);
    background: rgba(0, 119, 170, 0.08);
    color: #0d4a66;
}

.form-message--error {
    border: 1px solid rgba(192, 57, 43, 0.35);
    background: rgba(192, 57, 43, 0.08);
    color: #7b241c;
}

.application-view-intro {
    margin-bottom: 8px;
}

.application-view-note {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

.application-view-note--editable {
    color: #0d4a66;
}

.application-view-section {
    margin-top: 8px;
}

.application-view-list {
    margin: 0;
}

.application-view-list__row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 12px 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.application-view-list__row:first-child {
    padding-top: 0;
}

.application-view-list__row dt {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
}

.application-view-list__row dd {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .application-view-list__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.application-form__actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.application-form__submit {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: var(--color-accent-hover);
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.application-form__submit:hover {
    background: var(--color-accent-bright);
}

.application-form__submit--contact {
    background: #e8a55c;
}

.application-form__submit--contact:hover {
    background: #d9924a;
}

/* ---- Footer ---- */

.site-footer {
    position: relative;
    z-index: 10;
    margin-top: auto;
    padding: 24px var(--space-page) 32px;
    border-top: 1px solid var(--color-border-dark);
    background: rgba(5, 5, 8, 0.85);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 168, 204, 0.45) 20%,
        rgba(255, 200, 80, 0.35) 50%,
        rgba(0, 168, 204, 0.45) 80%,
        transparent 100%
    );
    pointer-events: none;
}

.site-body--home .site-footer {
    margin-top: 0;
}

.site-footer__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 32px;
    max-width: var(--shell-max-width);
    margin: 0 auto;
}

.site-footer__logo-link {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__logo-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.site-footer__logo-link:focus-visible {
    outline: 2px solid var(--color-accent-bright);
    outline-offset: 4px;
    border-radius: 4px;
}

.site-footer__logo {
    display: block;
    width: auto;
    object-fit: contain;
}

.site-footer__logo--iki {
    height: clamp(56px, 10vw, 80px);
    max-width: 220px;
}

.site-footer__logo--geoscan {
    height: clamp(44px, 8vw, 64px);
    max-width: 160px;
}

.site-footer__logo--minobr {
    height: clamp(52px, 9vw, 72px);
    max-width: 72px;
}

.site-footer__logo--leti {
    height: clamp(52px, 9vw, 72px);
    max-width: 72px;
}

.site-footer__logo--kadry-dlya-kosmosa {
    height: clamp(40px, 7vw, 56px);
    max-width: min(240px, 42vw);
}

.site-footer__logo-link--static {
    cursor: default;
}

/* ---- Secondary nav ---- */

.secondary-nav--vertical {
    flex-direction: column;
    gap: 4px;
}

.secondary-nav--horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 2px;
}

.secondary-nav--horizontal .secondary-nav__link {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 14px;
    border: 1px solid var(--color-border-dark);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    scroll-snap-align: start;
    text-decoration: none;
}

.secondary-nav {
    display: flex;
}

.secondary-nav__link {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--color-text-on-dark-muted);
    font-size: 14px;
    text-decoration: none;
    line-height: 1.35;
}

.secondary-nav--vertical .secondary-nav__link {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.secondary-nav__link:hover {
    color: var(--color-accent-bright);
    background: rgba(255, 255, 255, 0.06);
}

.secondary-nav__link--active {
    color: var(--color-accent-bright);
    background: rgba(0, 212, 255, 0.1);
    font-weight: 600;
}

.site-body--has-secondary .site-shell {
    /* marker class optional */
}

/* ---- Responsive ---- */

@media (max-width: 767px) {
    .site-title {
        white-space: normal;
    }

    .site-header--hero {
        padding: 12px 12px;
    }

    .site-panel {
        padding: 14px 16px;
    }

    .site-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 10px;
        row-gap: 0;
    }

    .site-header__brand {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .site-header__brand-logo {
        height: clamp(38px, 10vw, 46px);
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .site-header__brand-text {
        min-width: 0;
    }

    .site-header__brand-sub {
        font-size: 10px;
    }

    .site-nav-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
    }

    .site-nav-panel {
        grid-column: 1 / -1;
        grid-row: 2;
        display: none;
        width: 100%;
    }

    .site-nav-panel--open {
        display: block;
        padding-top: 10px;
    }

    .site-nav-panel .site-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .site-nav-panel .site-nav__link {
        text-align: left;
        text-decoration: none;
        padding: 12px 14px;
        border: 1px solid var(--color-border-dark);
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.35);
    }

    .site-nav-panel .site-nav__link--active {
        background: rgba(0, 212, 255, 0.12);
        border-color: rgba(0, 168, 204, 0.45);
        font-weight: 600;
    }

    .site-nav__label--desktop {
        display: none;
    }

    .site-nav__label--mobile {
        display: inline;
    }

    .secondary-nav__label--long {
        display: none;
    }

    .secondary-nav__label--short {
        display: inline;
    }

    .site-header--hero .site-title-block {
        width: 100%;
        max-width: none;
        align-items: stretch;
    }

    .site-header--hero .site-nav-toggle {
        display: inline-flex;
        align-self: flex-end;
        margin-top: 8px;
    }

    .site-header--hero .site-nav-panel {
        display: none;
        width: 100%;
    }

    .site-header--hero .site-nav-panel--open {
        display: block;
        padding-top: 8px;
    }

    .site-nav-panel--hero .site-nav--hero {
        margin-top: 0;
    }

    .site-shell {
        padding: 0 16px 24px;
    }

    .content-panel {
        padding: 16px;
    }

    .page-hero {
        aspect-ratio: 16 / 9;
        max-height: 180px;
        margin-bottom: 16px;
    }

    .home-decor {
        height: min(44vh, 320px);
    }

    .home-decor__satellite {
        width: min(44vw, 180px);
        right: 0;
    }

    .site-title-line {
        height: 48px;
    }

    .site-title-marker-group {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 768px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 20px;
        row-gap: 4px;
    }

    .site-header__brand {
        display: contents;
    }

    .site-header__brand-logo {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
    }

    .site-header__brand-text {
        grid-column: 1;
        grid-row: 2;
    }

    .site-nav-toggle {
        display: none;
    }

    .site-nav-panel {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        display: block;
    }

    .site-nav--compact {
        grid-column: auto;
        grid-row: auto;
        align-self: auto;
        flex: initial;
        justify-content: flex-end;
    }

    .card-list--participants,
    .facts-grid,
    .facts-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-card__link:has(.news-card__thumb) {
        grid-template-columns: 180px minmax(0, 1fr);
        align-items: stretch;
    }

    .news-card__thumb {
        max-height: none;
        height: 100%;
        min-height: 120px;
    }

    .home-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .home-highlights {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .home-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-tile:nth-child(4),
    .home-tile:nth-child(5) {
        grid-column: span 1;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .site-nav--compact {
        justify-content: center;
    }
}

@media (min-width: 1024px) {
    .site-shell {
        grid-template-columns: var(--sidebar-width) 1fr;
        gap: 24px;
        align-items: start;
    }

    .site-body--home .site-shell {
        grid-template-columns: 1fr;
    }

    .site-sidebar--desktop {
        display: block;
        position: sticky;
        top: var(--header-height-sticky);
        padding-top: 24px;
        box-sizing: border-box;
    }

    .site-sidebar--desktop[aria-hidden="true"] {
        visibility: hidden;
    }

    .site-secondary-bar {
        display: none;
    }
}

@media (min-width: 1024px) {
    .application-form {
        grid-template-columns: 1fr 1fr;
    }

    .application-form .form-field:has(textarea),
    .application-form .form-field--full,
    .application-form .form-field:has([name="work_and_position"]),
    .application-form .form-field:has([name="consent_personal_data"]),
    .application-form .form-field:has(.form-checkbox),
    .application-form__actions {
        grid-column: 1 / -1;
    }

    .application-form .form-field--grid-spacer {
        display: block;
        padding: 0;
        margin: 0;
        min-height: 0;
        visibility: hidden;
    }
}

/* :has() fallback — full-width fields without :has support */
@supports not selector(:has(*)) {
    .application-form {
        grid-template-columns: 1fr;
    }
}
