@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;600&family=Onest:wght@400;500;600;700&family=Unbounded:wght@500;600&display=swap');

:root {
    color-scheme: dark;
    --bg: #080713;
    --panel: #11101f;
    --panel-soft: #171526;
    --text: #f7f5ff;
    --text-soft: #e2ddf5;
    --muted: #c9c2df;
    --purple: #985bff;
    --pink: #f05cd8;
    --line: rgba(211, 194, 255, .14);
    --container: 1120px;
    --font-display: "Manrope", Arial, sans-serif;
    --font-ui: "Onest", "Manrope", Arial, sans-serif;
    --font-accent: "Unbounded", "Manrope", Arial, sans-serif;
}

/* === Светлая песочная тема === */
html[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f0e6;
    --panel: #efe5d5;
    --panel-soft: #fcf8f1;
    --text: #241b14;
    --text-soft: #4c3d30;
    --muted: #786655;
    --purple: #b86c33;
    --pink: #d89658;
    --line: rgba(138, 102, 66, .18);
}

/* === Плавное разлитие темы волной (View Transitions API) === */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 9999;
}

/* Плавный запасной переход для браузеров без View Transitions */
html.theme-fallback-transition *,
html.theme-fallback-transition *::before,
html.theme-fallback-transition *::after {
    transition:
        background 0.65s ease,
        background-color 0.65s ease,
        color 0.65s ease,
        border-color 0.65s ease,
        box-shadow 0.65s ease,
        filter 0.65s ease !important;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
}

/* === Шапка, логотип и переключатель темы === */
.site-header {
    height: 82px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(8, 7, 19, .8);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    padding: 4px 2px;
    flex-shrink: 0;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 12px rgba(185, 134, 255, .42));
    transition: transform .25s ease, filter .25s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.06);
    filter: drop-shadow(0 0 18px rgba(210, 155, 255, .7));
}

.navigation {
    display: flex;
    align-items: center;
    gap: 34px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
}

.navigation a {
    position: relative;
    padding: 4px 0;
    transition: color .25s ease, text-shadow .25s ease;
}

.navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, #c598ff, #f180d9);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.navigation a:hover {
    color: #ffffff;
    text-shadow: 0 0 16px rgba(183, 131, 255, .45);
}

.navigation a:hover::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(214, 194, 255, .24);
    background: rgba(255, 255, 255, .05);
    color: #e4d4ff;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .25s ease, background .25s ease, transform .25s ease, color .25s ease, box-shadow .25s ease;
}

.theme-toggle:hover {
    border-color: rgba(214, 194, 255, .52);
    background: rgba(183, 131, 255, .14);
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(183, 131, 255, .24);
}

.theme-toggle:active {
    transform: scale(.93);
}

.theme-icon {
    position: absolute;
    width: 19px;
    height: 19px;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
}

/* В тёмной теме показана луна, в светлой — солнышко */
.icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(.55);
}

html[data-theme="light"] .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(.55);
}

html[data-theme="light"] .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.nav-cta {
    border: 1px solid rgba(214, 194, 255, .24);
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    color: #f3effe;
    background: rgba(255, 255, 255, .05);
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.nav-cta:hover {
    border-color: rgba(214, 194, 255, .48);
    background: rgba(183, 131, 255, .12);
    transform: translateY(-1px);
}

.nav-cta span {
    color: #d19aff;
    margin-left: 7px;
}

/* === Главный экран === */
.hero {
    position: relative;
    min-height: 670px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}

.hero:before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        radial-gradient(ellipse at 76% 54%, rgba(100, 34, 190, .23), transparent 33%),
        radial-gradient(ellipse at 8% 92%, rgba(93, 17, 129, .19), transparent 42%),
        linear-gradient(115deg, #080713 20%, #0b0718 65%, #0b0717);
}

.hero-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(85px);
    pointer-events: none;
}

.hero-glow-one {
    width: 230px;
    height: 230px;
    right: 23%;
    top: 20%;
    background: rgba(134, 44, 242, .23);
}

.hero-glow-two {
    width: 200px;
    height: 200px;
    left: 28%;
    bottom: -18%;
    background: rgba(224, 46, 193, .12);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 32px;
    padding-bottom: 55px;
}

.eyebrow,
.section-kicker {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c7a6ff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    letter-spacing: .3px;
    text-transform: none;
    font-size: 13px;
    font-weight: 500;
    color: #e6dff9;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    background: #c078ff;
    border-radius: 50%;
    box-shadow: 0 0 12px #bd68ff;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(46px, 6.2vw, 78px);
    line-height: 1.08;
    letter-spacing: -4.2px;
    margin: 28px 0 22px;
    max-width: 770px;
    font-weight: 700;
}

.hero h1 span,
.section-heading h2 span,
.about h2 span,
.projects-heading h2 span {
    background: linear-gradient(95deg, #fff 3%, #cf9bff 48%, #ee7bd8 100%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-copy {
    max-width: 560px;
    font-family: var(--font-ui);
    color: var(--text-soft);
    font-size: clamp(16px, 1.45vw, 19px);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.01em;
    margin: 0;
}

/* === Акцентный слоган "Идеи — в код, рост — по экспоненте." === */
.hero-copy.hero-motto {
    max-width: 640px;
    font-family: var(--font-accent);
    font-size: clamp(18px, 1.75vw, 23px);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.025em;
    color: #f4eeff;
    margin-top: 6px;
}

.hero-copy.hero-motto span {
    background: linear-gradient(95deg, #d7b2ff 0%, #f180d9 100%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 13px 22px;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #140d23;
    background: linear-gradient(105deg, #c598ff, #f180d9);
    box-shadow: 0 8px 30px rgba(180, 89, 255, .24);
}

.button-quiet {
    border: 1px solid rgba(211, 194, 255, .22);
    background: rgba(255, 255, 255, .05);
    color: #ece8fa;
}

.button-quiet:hover {
    border-color: rgba(211, 194, 255, .42);
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 58px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.note-line {
    width: 34px;
    height: 1px;
    background: #a96aff;
}

.hero-logo {
    position: absolute;
    width: min(35vw, 410px);
    right: max(calc((100vw - var(--container))/2 + 15px), 8%);
    top: 50%;
    transform: translateY(-48%);
    opacity: .55;
    filter: drop-shadow(0 14px 70px rgba(139, 58, 255, .28));
    mix-blend-mode: screen;
    pointer-events: none;
}

.hero-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.scroll-cue {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 34px;
    border: 1px solid rgba(222, 204, 255, .35);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-cue span {
    width: 3px;
    height: 7px;
    background: #d59bff;
    border-radius: 3px;
}

/* === Секции и О нас === */
.section {
    padding: 105px 0;
}

.about {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .012), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: 56px;
    align-items: start;
}

.section-kicker {
    margin: 0 0 16px;
    color: #c196ff;
}

.about h2,
.section-heading h2,
.projects-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -2px;
    margin: 0;
    font-weight: 700;
}

.about-copy > p {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--text-soft);
    font-size: 18px;
    max-width: 620px;
    line-height: 1.72;
}

.about-story {
    margin-top: 26px;
    padding: 22px 24px;
    border-radius: 16px;
    border: 1px solid rgba(203, 151, 255, .2);
    border-left: 3px solid #c598ff;
    background: linear-gradient(135deg, rgba(183, 131, 255, .09), rgba(240, 92, 216, .04) 55%, rgba(255, 255, 255, .02));
    box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
}

.about-story p {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.75;
    color: #efeafd;
}

/* === Кот, опирающийся сбоку на "Создаём вместе" === */
.about-head {
    position: relative;
}

.about-title-wrap {
    display: inline-flex;
    align-items: flex-start;
    position: relative;
}

.about-title-wrap h2 {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.about-cat {
    /* Подгонка позиции лапы относительно текста */
    --cat-x: -28px;
    --cat-y: -8px;

    width: clamp(135px, 14vw, 178px);
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    pointer-events: none;
    user-select: none;
    transform: translate(var(--cat-x), var(--cat-y));
    transform-origin: 18% 36%;

    /* Вживление в тёмную тему: приглушаем яркость и даём фиолетовый отсвет от надписи */
    filter:
        brightness(0.92)
        contrast(1.06)
        saturate(0.9)
        drop-shadow(-8px 4px 18px rgba(183, 131, 255, 0.34))
        drop-shadow(0 14px 20px rgba(0, 0, 0, 0.55));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.about-title-wrap:hover .about-cat {
    transform: translate(var(--cat-x), var(--cat-y)) rotate(-1.2deg);
    filter:
        brightness(0.96)
        contrast(1.07)
        saturate(0.95)
        drop-shadow(-10px 4px 22px rgba(210, 145, 255, 0.48))
        drop-shadow(0 16px 22px rgba(0, 0, 0, 0.6));
}

/* === Расшифровка названия (Почему ЕКубГУ?) === */
.about-decode {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(203, 151, 255, .18);
    background: linear-gradient(145deg, rgba(183, 131, 255, .07), rgba(240, 92, 216, .03) 58%, rgba(255, 255, 255, .015));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
}

.about-decode-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
}

.decode-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: "JetBrains Mono", var(--font-ui), monospace;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #f3e6ff;
    background: linear-gradient(120deg, rgba(152, 91, 255, .32), rgba(240, 92, 216, .24));
    border: 1px solid rgba(214, 184, 255, .36);
    box-shadow: 0 0 14px rgba(168, 85, 247, .24);
}

.decode-symbol sup {
    font-size: 0.72em;
    line-height: 0;
    margin-left: 1px;
}

.about-decode p:last-child {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 14.5px;
    line-height: 1.68;
    color: var(--text-soft);
}

/* === Команда и 3D-переворот карточек === */
.team {
    background: radial-gradient(ellipse at 50% 0%, rgba(104, 60, 157, .12), transparent 54%);
}

.section-heading {
    text-align: center;
    margin-bottom: 46px;
}

.section-heading .section-kicker {
    margin-bottom: 12px;
}

.section-description {
    margin: 14px 0 0;
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 16px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.team-card {
    position: relative;
    height: 365px;
    perspective: 1200px;
    -webkit-perspective: 1200px;
    cursor: pointer;
    --card-glow: #8344e9;
}

.card-violet { --card-glow: #8344e9; }
.card-pink   { --card-glow: #d74eaf; }
.card-blue   { --card-glow: #4c74e8; }
.card-indigo { --card-glow: #6555d9; }
.card-rose   { --card-glow: #c151a7; }

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
    transition: transform .72s cubic-bezier(.22, 1, .36, 1);
}

.team-card:not(.is-flipped):hover .card-inner {
    transform: translateY(-6px);
}

.team-card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 211, 255, .14);
    border-radius: 18px;
    padding: 16px 15px 18px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(155deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025) 48%, rgba(10, 8, 21, .95));
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.card-face::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(53px);
    opacity: .38;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    background: var(--card-glow);
    pointer-events: none;
}

.team-card:hover .card-face {
    border-color: rgba(203, 151, 255, .45);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.card-front {
    transform: rotateY(0deg);
    z-index: 2;
}

.card-back {
    transform: rotateY(180deg);
    cursor: default;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(25, 19, 46, .97), rgba(10, 8, 22, .99));
}

.card-back::before {
    top: -40px;
    opacity: .26;
}

.team-card.is-flipped .card-front {
    pointer-events: none;
}

.team-card.is-flipped .card-back {
    pointer-events: auto;
    border-color: rgba(203, 151, 255, .42);
}

.card-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* === Никнеймы участников вместо нумерации === */
.member-index {
    font-family: "JetBrains Mono", var(--font-ui), monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #eadcff;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(197, 152, 255, 0.1);
    border: 1px solid rgba(211, 194, 255, 0.22);
    max-width: calc(100% - 28px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover .member-index {
    color: #ffffff;
    background: rgba(197, 152, 255, 0.18);
    border-color: rgba(218, 178, 255, 0.45);
    box-shadow: 0 0 14px rgba(183, 131, 255, 0.28);
}

.member-symbol {
    font-size: 19px;
    color: #c58aff;
    flex-shrink: 0;
}

/* === Аватары с фотографиями и плавной окантовкой === */
.avatar {
    position: relative;
    z-index: 1;
    margin: 26px auto 22px;
    width: 140px;
    height: 140px;
    padding: 4px;
    border-radius: 50%;
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(196, 138, 255, .9), rgba(131, 68, 233, .28) 52%, rgba(12, 9, 26, .95));
    box-shadow:
        0 0 0 1px rgba(235, 218, 255, .18),
        0 12px 36px -6px rgba(152, 91, 255, .48);
    transition: transform .35s ease, box-shadow .35s ease;
}

.avatar::before {
    content: none;
}

.avatar::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(
        circle at 50% 48%,
        rgba(8, 7, 19, 0) 56%,
        rgba(10, 8, 22, 0.36) 80%,
        rgba(10, 8, 22, 0.82) 100%
    );
    box-shadow:
        inset 0 0 18px 5px rgba(8, 7, 19, .72),
        inset 0 0 0 1px rgba(255, 255, 255, .16);
    transition: opacity .35s ease;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    filter: contrast(1.03) saturate(.95);
    transition: transform .4s ease, filter .35s ease;
}

.avatar-one {
    background: linear-gradient(145deg, rgba(192, 132, 252, .95), rgba(131, 68, 233, .3) 55%, rgba(12, 9, 26, .95));
    box-shadow: 0 0 0 1px rgba(192, 132, 252, .24), 0 12px 36px -6px rgba(131, 68, 233, .52);
}

.avatar-two {
    background: linear-gradient(145deg, rgba(244, 114, 182, .95), rgba(215, 78, 175, .3) 55%, rgba(18, 9, 24, .95));
    box-shadow: 0 0 0 1px rgba(244, 114, 182, .24), 0 12px 36px -6px rgba(215, 78, 175, .52);
}

.avatar-three {
    background: linear-gradient(145deg, rgba(96, 165, 250, .95), rgba(76, 116, 232, .3) 55%, rgba(10, 13, 28, .95));
    box-shadow: 0 0 0 1px rgba(96, 165, 250, .24), 0 12px 36px -6px rgba(76, 116, 232, .52);
}

.avatar-four {
    background: linear-gradient(145deg, rgba(129, 140, 248, .95), rgba(101, 85, 217, .3) 55%, rgba(12, 10, 28, .95));
    box-shadow: 0 0 0 1px rgba(129, 140, 248, .24), 0 12px 36px -6px rgba(101, 85, 217, .52);
}

.avatar-five {
    background: linear-gradient(145deg, rgba(244, 114, 182, .92), rgba(193, 81, 167, .3) 55%, rgba(20, 9, 22, .95));
    box-shadow: 0 0 0 1px rgba(244, 114, 182, .24), 0 12px 36px -6px rgba(193, 81, 167, .52);
}

.avatar-one img, .avatar-egor       { object-position: 56% 24%; }
.avatar-two img, .avatar-violetta   { object-position: 50% 22%; }
.avatar-three img, .avatar-vera     { object-position: 50% 24%; }
.avatar-four img, .avatar-nikita    { object-position: 48% 18%; }
.avatar-five img, .avatar-nazar     { object-position: 68% 18%; }

.team-card:not(.is-flipped):hover .avatar {
    transform: scale(1.03);
}

.team-card:not(.is-flipped):hover .avatar::after {
    opacity: .72;
}

.team-card:not(.is-flipped):hover .avatar img {
    transform: scale(1.07);
    filter: contrast(1.05) saturate(1.04);
}

.member-info {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.member-info h3 {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 18px 5px 0;
    letter-spacing: -.2px;
    color: var(--text);
}

.member-info p {
    font-family: var(--font-ui);
    font-size: 12px;
    margin: 0;
    color: var(--muted);
}

.card-arrow {
    position: absolute;
    right: 15px;
    bottom: 18px;
    color: #c48bff;
    font-size: 14px;
    transition: transform .25s ease, color .25s ease;
}

.team-card:hover .card-arrow {
    transform: translate(2px, -2px);
    color: #f180d9;
}

/* === Обратная сторона карточки и красивый ползунок === */
.card-back-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 11px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(211, 194, 255, .15);
    cursor: pointer;
}

.back-identity h4 {
    margin: 0 0 3px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

.back-identity span {
    display: block;
    font-family: var(--font-ui);
    font-size: 11px;
    color: #c7a6ff;
}

.flip-back-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(211, 194, 255, .24);
    background: rgba(255, 255, 255, .06);
    color: #ece6ff;
    font-size: 13px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.flip-back-btn:hover {
    background: rgba(197, 152, 255, .22);
    border-color: rgba(211, 194, 255, .55);
    transform: rotate(-18deg);
}

.bio-scroll {
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 10px;
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.62;
    color: var(--text-soft);
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 152, 255, .8) rgba(255, 255, 255, .07);
    scrollbar-gutter: stable;
}

.bio-scroll p {
    margin: 0 0 10px;
}

.bio-scroll p:last-child {
    margin-bottom: 0;
}

.bio-link {
    color: #d7bcff;
    border-bottom: 1px solid rgba(215, 188, 255, 0.4);
    word-break: break-all;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.bio-link:hover {
    color: #ffffff;
    border-bottom-color: #f180d9;
}

.bio-scroll::-webkit-scrollbar {
    width: 6px;
}

.bio-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
}

.bio-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c598ff, #f180d9);
    border-radius: 999px;
}

.bio-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d7b7ff, #ff99e8);
}

/* === Проекты === */
.projects {
    padding-top: 20px;
}

.projects-panel {
    border: 1px solid rgba(198, 156, 255, .2);
    border-radius: 24px;
    padding: 48px;
    background:
        radial-gradient(ellipse at 88% 8%, rgba(104, 48, 147, .16), transparent 39%),
        linear-gradient(145deg, #12101f, #0d0b19);
    box-shadow: 0 20px 80px rgba(0, 0, 0, .15);
}

.projects-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 30px;
}

.projects-heading > p {
    max-width: 360px;
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 4px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 16px;
}

.project-card {
    overflow: hidden;
    border: 1px solid rgba(215, 194, 255, .13);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
}

.project-art,
.upcoming-art {
    height: 195px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 60%, rgba(119, 58, 187, .28), transparent 48%),
        linear-gradient(135deg, #151125, #0c0b16);
}

.project-art {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 16px;
}

.project-art:after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(207, 158, 255, .13);
    border-radius: 12px;
}

.orb {
    position: absolute;
    border: 1px solid rgba(190, 134, 255, .4);
    border-radius: 50%;
    transform: rotate(-25deg);
}

.orb-a {
    width: 245px;
    height: 115px;
    left: 27%;
    top: 35px;
    box-shadow: 0 0 40px rgba(173, 79, 255, .22), inset 0 0 25px rgba(173, 79, 255, .1);
}

.orb-b {
    width: 180px;
    height: 90px;
    left: 36%;
    top: 58px;
    border-color: rgba(237, 105, 220, .36);
    transform: rotate(32deg);
}

.project-logo {
    width: 112px;
    height: auto;
    display: block;
    position: relative;
    pointer-events: none;
    user-select: none;
    mix-blend-mode: screen;
    filter:
        brightness(1.02)
        drop-shadow(0 0 22px rgba(170, 87, 255, 0.55));
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.project-featured .orb {
    transition: transform 0.6s ease, border-color 0.4s ease;
}

@keyframes projectLogoShimmerDark {
    0% {
        transform: translateY(-4px) scale(1.08) rotate(-2.5deg);
        filter:
            hue-rotate(-14deg)
            saturate(1.3)
            brightness(1.12)
            drop-shadow(0 0 26px rgba(168, 85, 247, 0.85));
    }
    50% {
        transform: translateY(2px) scale(1.12) rotate(2.5deg);
        filter:
            hue-rotate(36deg)
            saturate(1.45)
            brightness(1.22)
            drop-shadow(0 0 34px rgba(241, 128, 217, 0.92));
    }
    100% {
        transform: translateY(-4px) scale(1.08) rotate(-2.5deg);
        filter:
            hue-rotate(-14deg)
            saturate(1.3)
            brightness(1.12)
            drop-shadow(0 0 26px rgba(168, 85, 247, 0.85));
    }
}

.project-featured:hover .project-logo {
    animation: projectLogoShimmerDark 2.6s ease-in-out infinite;
}

.project-featured:hover .orb-a {
    transform: rotate(-18deg) scale(1.05);
    border-color: rgba(215, 162, 255, 0.62);
}

.project-featured:hover .orb-b {
    transform: rotate(39deg) scale(1.05);
    border-color: rgba(241, 128, 217, 0.58);
}

.project-art-caption,
.upcoming-caption {
    position: absolute;
    z-index: 2;
    left: 26px;
    bottom: 20px;
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #d3bce5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 21px;
}

.project-label {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #c296f5;
}

.project-meta h3 {
    font-family: var(--font-ui);
    margin: 6px 0;
    font-size: 17px;
    font-weight: 600;
}

.project-meta p {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 13px;
}

.upcoming-art {
    background:
        radial-gradient(ellipse at 70% 30%, rgba(175, 70, 188, .2), transparent 42%),
        linear-gradient(135deg, #171323, #0e0c17);
}

.upcoming-plus {
    position: absolute;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 200;
    color: rgba(207, 157, 255, .72);
}

.upcoming-caption {
    color: #b5a3c8;
}

/* === Футер и контакты === */
.footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-brand .brand-logo {
    height: 28px;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.footer-copy {
    margin: 0;
}

.footer-inner p,
.back-top {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--muted);
}

.footer-contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--muted);
}

.contacts-label {
    opacity: 0.85;
}

.contacts-sep {
    opacity: 0.45;
}

.footer-contacts a {
    color: #d7bcff;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.footer-contacts a:hover {
    color: #ffffff;
    border-bottom-color: #f180d9;
    text-shadow: 0 0 12px rgba(197, 152, 255, 0.5);
}

.back-top:hover {
    color: #d8b2ff;
}

/* =========================================================
   СВЕТЛАЯ ПЕСОЧНАЯ ВАРИАЦИЯ (data-theme="light")
   ========================================================= */
html[data-theme="light"] .site-header {
    background: rgba(246, 240, 230, .84);
    border-bottom-color: var(--line);
}

/* Убираем чёрный фон logo.jpg и красим в тёплую бронзу на песочном фоне */
html[data-theme="light"] .brand-logo {
    mix-blend-mode: multiply;
    filter: invert(1) hue-rotate(290deg) saturate(1.3) contrast(1.16) brightness(1.04);
}

html[data-theme="light"] .brand:hover .brand-logo {
    transform: scale(1.06);
    filter: invert(1) hue-rotate(290deg) saturate(1.55) contrast(1.2) brightness(1.04);
}

html[data-theme="light"] .navigation a::after {
    background: linear-gradient(90deg, #b86c33, #d89658);
}

html[data-theme="light"] .navigation a:hover {
    color: #1f160f;
    text-shadow: none;
}

html[data-theme="light"] .theme-toggle {
    border-color: rgba(158, 114, 70, .28);
    background: rgba(255, 251, 244, .75);
    color: #b56a2f;
}

html[data-theme="light"] .theme-toggle:hover {
    border-color: rgba(184, 108, 51, .58);
    background: rgba(224, 168, 108, .22);
    box-shadow: 0 4px 16px rgba(184, 108, 51, .18);
}

html[data-theme="light"] .nav-cta {
    border-color: rgba(158, 114, 70, .28);
    color: #2c2118;
    background: rgba(255, 251, 244, .75);
}

html[data-theme="light"] .nav-cta:hover {
    border-color: rgba(184, 108, 51, .55);
    background: rgba(224, 168, 108, .2);
}

html[data-theme="light"] .nav-cta span {
    color: #b86c33;
}

html[data-theme="light"] .hero:before {
    background:
        radial-gradient(ellipse at 76% 52%, rgba(224, 164, 96, .28), transparent 38%),
        radial-gradient(ellipse at 10% 90%, rgba(206, 134, 76, .2), transparent 45%),
        linear-gradient(120deg, #faf5ec 18%, #f3eadb 65%, #efe3cf);
}

html[data-theme="light"] .hero-glow-one {
    background: rgba(226, 160, 88, .28);
}

html[data-theme="light"] .hero-glow-two {
    background: rgba(204, 128, 74, .18);
}

html[data-theme="light"] .eyebrow {
    background: rgba(255, 251, 244, .78);
    border-color: rgba(158, 114, 70, .24);
    color: #5c4634;
}

html[data-theme="light"] .eyebrow-dot {
    background: #c67a3c;
    box-shadow: 0 0 10px rgba(198, 122, 60, .55);
}

html[data-theme="light"] .section-kicker {
    color: #a9622d;
}

html[data-theme="light"] .hero h1 span,
html[data-theme="light"] .section-heading h2 span,
html[data-theme="light"] .about h2 span,
html[data-theme="light"] .projects-heading h2 span {
    background: linear-gradient(95deg, #2c2016 0%, #a85c27 48%, #d28a48 100%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

html[data-theme="light"] .hero-copy.hero-motto {
    color: #2b2017;
}

html[data-theme="light"] .hero-copy.hero-motto span {
    background: linear-gradient(95deg, #9d521f 0%, #cf823e 100%);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

html[data-theme="light"] .button-primary {
    color: #fffaf3;
    background: linear-gradient(105deg, #b6682f, #d69050);
    box-shadow: 0 10px 28px rgba(182, 104, 47, .26);
}

html[data-theme="light"] .button-quiet {
    border-color: rgba(145, 104, 64, .28);
    background: rgba(255, 251, 245, .75);
    color: #2f2319;
}

html[data-theme="light"] .button-quiet:hover {
    border-color: rgba(182, 104, 47, .52);
    background: #fffdf9;
}

html[data-theme="light"] .note-line {
    background: #c2783e;
}

html[data-theme="light"] .hero-logo {
    mix-blend-mode: multiply;
    opacity: .22;
    filter: invert(1) hue-rotate(290deg) saturate(1.25) contrast(1.16) brightness(1.04);
}

html[data-theme="light"] .scroll-cue {
    border-color: rgba(152, 108, 66, .4);
}

html[data-theme="light"] .scroll-cue span {
    background: #b86c33;
}

html[data-theme="light"] .about {
    background: linear-gradient(180deg, rgba(255, 251, 244, .5), transparent);
}

html[data-theme="light"] .about-story {
    border-color: rgba(176, 128, 82, .26);
    border-left-color: #c2783e;
    background: linear-gradient(135deg, rgba(255, 253, 248, .92), rgba(240, 229, 211, .72));
    box-shadow: 0 14px 36px rgba(112, 80, 46, .08);
}

html[data-theme="light"] .about-story p {
    color: #36291e;
}

html[data-theme="light"] .about-cat {
    filter:
        brightness(1.01)
        contrast(1.04)
        sepia(0.1)
        drop-shadow(-6px 10px 14px rgba(122, 86, 52, 0.28));
}

html[data-theme="light"] .about-title-wrap:hover .about-cat {
    filter:
        brightness(1.03)
        contrast(1.05)
        sepia(0.08)
        drop-shadow(-8px 12px 18px rgba(122, 86, 52, 0.36));
}

html[data-theme="light"] .about-decode {
    border-color: rgba(176, 128, 82, .24);
    background: linear-gradient(145deg, rgba(255, 253, 249, .86), rgba(242, 232, 216, .62));
    box-shadow: 0 12px 30px rgba(112, 80, 46, .07);
}

html[data-theme="light"] .decode-symbol {
    color: #7c4218;
    background: linear-gradient(120deg, rgba(214, 144, 80, .24), rgba(184, 108, 51, .16));
    border-color: rgba(184, 108, 51, .34);
    box-shadow: none;
}

html[data-theme="light"] .about-decode p:last-child {
    color: #46372a;
}

html[data-theme="light"] .team {
    background: radial-gradient(ellipse at 50% 0%, rgba(214, 158, 98, .18), transparent 55%);
}

html[data-theme="light"] .card-violet { --card-glow: #d49658; }
html[data-theme="light"] .card-pink   { --card-glow: #d68572; }
html[data-theme="light"] .card-blue   { --card-glow: #85a4b8; }
html[data-theme="light"] .card-indigo { --card-glow: #b58d67; }
html[data-theme="light"] .card-rose   { --card-glow: #cc8880; }

html[data-theme="light"] .card-face {
    border-color: rgba(158, 118, 78, .22);
    background: linear-gradient(155deg, rgba(255, 253, 249, .96), rgba(244, 235, 221, .92));
    box-shadow: 0 10px 30px rgba(108, 76, 44, .07);
}

html[data-theme="light"] .card-face::before {
    opacity: .24;
}

html[data-theme="light"] .team-card:hover .card-face {
    border-color: rgba(184, 108, 51, .5);
    box-shadow: 0 18px 42px rgba(108, 76, 44, .14);
}

html[data-theme="light"] .card-back {
    background: linear-gradient(160deg, #fdfaf4, #f0e4d2);
}

html[data-theme="light"] .team-card.is-flipped .card-back {
    border-color: rgba(184, 108, 51, .45);
}

html[data-theme="light"] .member-index {
    color: #7c441c;
    background: rgba(214, 144, 80, 0.14);
    border-color: rgba(184, 108, 51, 0.26);
}

html[data-theme="light"] .team-card:hover .member-index {
    color: #592e10;
    background: rgba(214, 144, 80, 0.24);
    border-color: rgba(184, 108, 51, 0.5);
    box-shadow: 0 4px 12px rgba(184, 108, 51, 0.16);
}

html[data-theme="light"] .member-symbol {
    color: #b86c33;
}

html[data-theme="light"] .avatar::after {
    background: radial-gradient(
        circle at 50% 48%,
        rgba(246, 240, 230, 0) 58%,
        rgba(246, 240, 230, .28) 84%,
        rgba(240, 229, 212, .68) 100%
    );
    box-shadow:
        inset 0 0 14px 3px rgba(120, 86, 52, .22),
        inset 0 0 0 1px rgba(255, 253, 248, .65);
}

html[data-theme="light"] .avatar-one {
    background: linear-gradient(145deg, #d89658, rgba(216, 150, 88, .35) 55%, #e8d8c2);
    box-shadow: 0 0 0 1px rgba(184, 108, 51, .28), 0 12px 30px -8px rgba(184, 108, 51, .35);
}

html[data-theme="light"] .avatar-two {
    background: linear-gradient(145deg, #d48272, rgba(212, 130, 114, .35) 55%, #ead8cc);
    box-shadow: 0 0 0 1px rgba(196, 108, 92, .28), 0 12px 30px -8px rgba(196, 108, 92, .35);
}

html[data-theme="light"] .avatar-three {
    background: linear-gradient(145deg, #7e9eb2, rgba(126, 158, 178, .35) 55%, #dfd9ce);
    box-shadow: 0 0 0 1px rgba(108, 138, 158, .3), 0 12px 30px -8px rgba(108, 138, 158, .32);
}

html[data-theme="light"] .avatar-four {
    background: linear-gradient(145deg, #b88856, rgba(184, 136, 86, .35) 55%, #e6d8c5);
    box-shadow: 0 0 0 1px rgba(164, 114, 64, .3), 0 12px 30px -8px rgba(164, 114, 64, .35);
}

html[data-theme="light"] .avatar-five {
    background: linear-gradient(145deg, #c97f82, rgba(201, 127, 130, .35) 55%, #e8d7ce);
    box-shadow: 0 0 0 1px rgba(182, 104, 108, .28), 0 12px 30px -8px rgba(182, 104, 108, .35);
}

html[data-theme="light"] .card-arrow {
    color: #b86c33;
}

html[data-theme="light"] .team-card:hover .card-arrow {
    color: #8f4d1d;
}

html[data-theme="light"] .card-back-header {
    border-bottom-color: rgba(158, 118, 78, .2);
}

html[data-theme="light"] .back-identity span {
    color: #b0652e;
}

html[data-theme="light"] .flip-back-btn {
    border-color: rgba(158, 118, 78, .3);
    background: rgba(255, 252, 246, .85);
    color: #3d2d20;
}

html[data-theme="light"] .flip-back-btn:hover {
    background: rgba(216, 150, 88, .25);
    border-color: rgba(184, 108, 51, .6);
}

html[data-theme="light"] .bio-scroll {
    color: #46372a;
    scrollbar-color: rgba(184, 108, 51, .75) rgba(158, 118, 78, .12);
}

html[data-theme="light"] .bio-link {
    color: #a85c27;
    border-bottom-color: rgba(168, 92, 39, 0.4);
}

html[data-theme="light"] .bio-link:hover {
    color: #6b3612;
    border-bottom-color: #6b3612;
}

html[data-theme="light"] .bio-scroll::-webkit-scrollbar-track {
    background: rgba(158, 118, 78, .12);
}

html[data-theme="light"] .bio-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d69050, #a85d28);
}

html[data-theme="light"] .bio-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c2783e, #8f4b1d);
}

html[data-theme="light"] .projects-panel {
    border-color: rgba(168, 124, 80, .24);
    background:
        radial-gradient(ellipse at 88% 8%, rgba(224, 168, 106, .22), transparent 42%),
        linear-gradient(145deg, #fcf8f1, #efe4d2);
    box-shadow: 0 20px 70px rgba(110, 78, 44, .09);
}

html[data-theme="light"] .project-card {
    border-color: rgba(160, 118, 76, .2);
    background: rgba(255, 253, 249, .8);
}

html[data-theme="light"] .project-art,
html[data-theme="light"] .upcoming-art {
    background:
        radial-gradient(ellipse at 50% 60%, rgba(214, 152, 86, .28), transparent 52%),
        linear-gradient(135deg, #f2e6d3, #e6d5bc);
}

html[data-theme="light"] .project-art:after {
    border-color: rgba(176, 122, 68, .22);
}

html[data-theme="light"] .orb {
    border-color: rgba(184, 112, 52, .45);
}

html[data-theme="light"] .orb-a {
    box-shadow: 0 0 36px rgba(206, 134, 68, .2), inset 0 0 22px rgba(206, 134, 68, .12);
}

html[data-theme="light"] .orb-b {
    border-color: rgba(208, 138, 74, .48);
}

html[data-theme="light"] .project-logo {
    mix-blend-mode: multiply;
    filter:
        invert(1)
        hue-rotate(290deg)
        saturate(1.35)
        contrast(1.16)
        brightness(1.04)
        drop-shadow(0 6px 18px rgba(184, 108, 51, 0.25));
}

@keyframes projectLogoShimmerLight {
    0% {
        transform: translateY(-4px) scale(1.08) rotate(-2.5deg);
        filter:
            invert(1)
            hue-rotate(278deg)
            saturate(1.5)
            contrast(1.18)
            brightness(1.06)
            drop-shadow(0 8px 22px rgba(184, 108, 51, 0.42));
    }
    50% {
        transform: translateY(2px) scale(1.12) rotate(2.5deg);
        filter:
            invert(1)
            hue-rotate(306deg)
            saturate(1.65)
            contrast(1.2)
            brightness(1.02)
            drop-shadow(0 10px 26px rgba(214, 144, 80, 0.52));
    }
    100% {
        transform: translateY(-4px) scale(1.08) rotate(-2.5deg);
        filter:
            invert(1)
            hue-rotate(278deg)
            saturate(1.5)
            contrast(1.18)
            brightness(1.06)
            drop-shadow(0 8px 22px rgba(184, 108, 51, 0.42));
    }
}

html[data-theme="light"] .project-featured:hover .project-logo {
    animation: projectLogoShimmerLight 2.6s ease-in-out infinite;
}

html[data-theme="light"] .project-art-caption,
html[data-theme="light"] .upcoming-caption {
    color: #825b38;
}

html[data-theme="light"] .project-label {
    color: #b0652e;
}

html[data-theme="light"] .upcoming-art {
    background:
        radial-gradient(ellipse at 70% 30%, rgba(212, 150, 88, .22), transparent 45%),
        linear-gradient(135deg, #f4e9d8, #e9dac3);
}

html[data-theme="light"] .upcoming-plus {
    color: rgba(164, 102, 48, .72);
}

html[data-theme="light"] .footer-contacts a {
    color: #9e5624;
}

html[data-theme="light"] .footer-contacts a:hover {
    color: #6b3612;
    border-bottom-color: #c2783e;
    text-shadow: none;
}

html[data-theme="light"] .back-top:hover {
    color: #a85c27;
}

/* === Адаптив === */
@media (max-width: 900px) {
    .about-cat {
        --cat-x: -22px;
        --cat-y: -6px;
        width: 145px;
    }

    .team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-card {
        height: 350px;
    }

    .about-grid {
        gap: 36px;
    }

    .projects-panel {
        padding: 35px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 34px, var(--container));
    }

    .site-header {
        height: 70px;
    }

    .brand-logo {
        height: 28px;
    }

    .navigation {
        display: none;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .nav-cta {
        padding: 9px 13px;
        font-size: 11px;
    }

    .hero-copy {
        font-size: 15px;
        max-width: 440px;
    }

    .hero-copy.hero-motto {
        font-size: clamp(16px, 4.5vw, 20px);
        max-width: 100%;
    }

    .section {
        padding: 75px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .about h2,
    .section-heading h2,
    .projects-heading h2 {
        font-size: 37px;
    }

    .about-cat {
        --cat-x: -18px;
        --cat-y: -4px;
        width: 118px;
    }

    .about-decode {
        margin-top: 18px;
        padding: 16px;
    }

    .about-decode p:last-child {
        font-size: 14px;
    }

    .about-copy > p {
        font-size: 16px;
    }

    .about-story {
        padding: 18px;
    }

    .about-story p {
        font-size: 15px;
    }

    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .team-card {
        height: 315px;
    }

    .card-face {
        padding: 13px;
    }

    .member-index {
        font-size: 11px;
        padding: 3px 8px;
    }

    .avatar {
        width: 112px;
        height: 112px;
        margin: 18px auto 16px;
        padding: 3px;
    }

    .avatar::after {
        inset: 3px;
    }

    .member-info h3 {
        font-size: 13px;
    }

    .member-info p {
        font-size: 11px;
    }

    .back-identity h4 {
        font-size: 13px;
    }

    .bio-scroll {
        font-size: 12px;
        padding-right: 7px;
    }

    .projects {
        padding-top: 0;
    }

    .projects-panel {
        padding: 27px 18px;
        border-radius: 19px;
    }

    .projects-heading {
        display: block;
    }

    .projects-heading > p {
        margin-top: 14px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-art,
    .upcoming-art {
        height: 170px;
    }

    .project-logo {
        width: 92px;
    }

    .footer-inner {
        flex-wrap: wrap;
    }

    .footer-center {
        order: 3;
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .footer-contacts {
        justify-content: flex-start;
    }

    .back-top {
        margin-left: auto;
    }
}

/* === Плавное появление блоков === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOnly {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-content,
.project-card {
    animation: fadeUp 0.75s ease-out both;
}

/* Для 3D-карточек анимируем только opacity, чтобы не конфликтовать с rotateY */
.team-card {
    animation: fadeInOnly 0.7s ease-out both;
}

.team-card:nth-child(2) { animation-delay: 0.08s; }
.team-card:nth-child(3) { animation-delay: 0.16s; }
.team-card:nth-child(4) { animation-delay: 0.24s; }
.team-card:nth-child(5) { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *:before, *:after {
        transition: none !important;
    }

    .hero-content,
    .team-card,
    .project-card,
    .project-featured:hover .project-logo {
        animation: none !important;
    }
}

/* === Фикс масштаба и центрирования главного лого (big-logo) === */
.hero {
    padding: 48px 0 76px;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
}

.hero-grid .hero-content {
    padding: 0;
}

.hero-grid .hero-content h1 {
    font-size: clamp(36px, 4.6vw, 72px);
    letter-spacing: -0.04em;
    max-width: 100%;
}

.hero-grid .hero-logo {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: 400px;
    justify-self: center;
    align-self: center;
    margin-inline: auto;
    opacity: .68;
}

.hero-grid .hero-logo img {
    width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
}

html[data-theme="light"] .hero-grid .hero-logo {
    opacity: .45;
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding: 44px 0 82px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .hero-grid .hero-logo {
        width: min(72vw, 310px);
        max-width: 310px;
        opacity: .75;
    }

    html[data-theme="light"] .hero-grid .hero-logo {
        opacity: .55;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: auto;
        align-items: center;
        padding: 36px 0 78px;
    }

    .hero-grid {
        gap: 28px;
    }

    .hero-grid .hero-content {
        padding-top: 0;
    }

    .hero-grid .hero-content h1 {
        font-size: clamp(34px, 9.5vw, 48px);
        letter-spacing: -0.035em;
        margin-top: 22px;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .hero-note {
        margin-top: 32px;
    }

    .hero-grid .hero-logo {
        width: min(76vw, 260px);
        max-width: 260px;
        margin: 0 auto;
        opacity: .8;
    }

    html[data-theme="light"] .hero-grid .hero-logo {
        opacity: .6;
    }
}

/* === ЕКубГУ: круг и big-logo всегда имеют один центр === */
.hero::after {
    content: none;
}

.hero-grid .hero-logo {
    position: relative;
    inset: auto;
    transform: none;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    isolation: isolate;
    flex-shrink: 0;
}

.hero-grid .hero-logo::before {
    content: "";
    position: absolute;
    width: 140%;
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(179, 100, 255, .13);
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(111, 48, 195, .1),
                inset 0 0 80px rgba(151, 65, 225, .07);
    pointer-events: none;
    z-index: -1;
}

.hero-grid .hero-logo > img {
    position: static;
    transform: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    object-fit: contain;
}

html[data-theme="light"] .hero-grid .hero-logo::before {
    border-color: rgba(184, 124, 68, .2);
    box-shadow: 0 0 80px rgba(206, 146, 82, .12),
                inset 0 0 80px rgba(214, 158, 96, .09);
}