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

/* Тема: по умолчанию тёмная, переключается кнопкой */
:root,
body[data-theme="dark"] {
    --bg: #0d0d0d;
    --bg-soft: #141414;
    --bg-card: #1a1a1a;
    --text: #e8e8e8;
    --text-muted: #b0b0b0;
    --border: #2a2a2a;
    --divider: #4a4a4a;
    --nav-bg: rgba(13, 13, 13, 0.95);
    --loader-bg: #0d0d0d;
    --hover-bg: #fff;
    --hover-text: #0d0d0d;
}

body[data-theme="light"] {
    --bg: #f5f5f5;
    --bg-soft: #eee;
    --bg-card: #e8e8e8;
    --text: #000;
    --text-muted: #666;
    --border: #000;
    --divider: #000;
    --nav-bg: rgba(245, 245, 245, 0.95);
    --loader-bg: #f5f5f5;
    --hover-bg: #000;
    --hover-text: #fff;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Arial', 'Helvetica', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

/* Улучшения для сенсорных устройств */
a, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

/* Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-logo {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.6;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    font-weight: 300;
    position: relative;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Переключатель темы — ползунок с иконками */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.theme-toggle:hover {
    transform: scale(1.05);
}
.theme-toggle:active {
    transform: scale(0.98);
}

.theme-toggle-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 52px;
    height: 26px;
    padding: 0 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
}

.theme-toggle-thumb {
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--text);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

body[data-theme="light"] .theme-toggle-thumb {
    transform: translateY(-50%) translateX(26px);
}

.theme-toggle-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0.85;
}
.theme-toggle-icon svg {
    flex-shrink: 0;
}
.theme-toggle:hover .theme-toggle-icon {
    opacity: 1;
}

/* Выпадающее меню для SKILLS */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(245, 245, 245, 0.98);
    backdrop-filter: blur(10px);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    font-weight: 300;
    position: relative;
    transition: opacity 0.3s ease;
}

.nav-dropdown-link:hover {
    opacity: 0.6;
}

.nav-dropdown-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text);
    transition: width 0.3s ease;
}

.nav-dropdown-link:hover::after,
.nav-dropdown-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    color: var(--text);
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    display: block;
    background-color: currentColor;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 1px;
    transform-origin: center;
}

/* Общие стили для секций */
section {
    min-height: 100vh;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 70px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Главная секция */
.hero-section {
    position: relative;
    justify-content: space-between;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.header-line,
.footer-line {
    width: 100%;
    height: 1px;
    background-color: #000;
    margin: 20px 0;
}

.about-section .footer-line,
.terms-section .footer-line {
    margin: 20px 0 5px 0;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
    flex: 1;
    margin: 60px 0;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.main-title {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.hero-word {
    display: inline-block;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero-word-text {
    font-size: 120px;
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -2px;
    position: relative;
    display: inline-block;
}

.hero-word-swash {
    position: relative;
    display: inline-block;
    width: 0.95em;
    text-align: center;
    color: transparent; /* оставляем место под букву */
}

.hero-word-swash::after {
    content: 'О'; /* русская О курсивом */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%) rotate(-6deg);
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: 1.35em;
    line-height: 1;
    color: #000;
    letter-spacing: 0;
    pointer-events: none;
}

.title-bold {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.title-italic {
    font-size: 120px;
    font-style: italic;
    font-weight: 300;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-top: -20px;
}

.name {
    font-size: 24px;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-weight: 300;
    margin-bottom: 20px;
}

.typewriter-text {
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 300;
    min-height: 1.5em;
    height: 1.5em; /* Фиксированная высота, чтобы не сдвигать страницу */
    color: #333;
    display: block;
    overflow: hidden; /* Скрываем текст, который выходит за границы */
}

.typewriter-text::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.hero-image {
    flex: 0 0 650px;
    max-width: 650px;
}

.hero-image img,
.hero-image video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* показываем видео полностью без обрезки */
    background-color: transparent; /* убираем фон, чтобы не было видно рамок */
    max-width: 100%;
}

.hero-image video {
    object-fit: contain; /* показываем видео полностью без обрезки, используя нативные пропорции */
    /* убрали aspect-ratio и min-height - видео само определяет размер */
}

/* Адаптивные изображения */
img {
    max-width: 100%;
    height: auto;
}

.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
}

.about-section .page-footer,
.terms-section .page-footer {
    margin-top: 5px;
    margin-bottom: 0;
    padding: 0;
    min-height: 0;
    height: auto;
}

/* Полноценный footer */
.main-footer {
    padding: 60px 0 40px;
    background-color: var(--bg);
    margin-top: 60px;
    width: 100%;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 40px;
    padding: 0 60px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    gap: 16px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 12px;
    letter-spacing: 0.5px;
    line-height: 1.6;
    color: #666;
    text-transform: none;
    font-weight: 300;
}

.footer-title {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 24px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.footer-contact-item:hover {
    opacity: 0.7;
}

.footer-contact-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
    font-weight: 300;
}

.footer-contact-value {
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #000;
    text-transform: none;
    font-weight: 400;
}

.footer-social-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-social-item {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    transition: opacity 0.3s ease;
    position: relative;
    display: inline-block;
    width: fit-content;
}

.footer-social-item:hover {
    opacity: 0.6;
}

.footer-social-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s ease;
}

.footer-social-item:hover::after {
    width: 100%;
}

.footer-disclaimer {
    font-size: 9px;
    letter-spacing: 0.3px;
    color: #777;
    line-height: 1.5;
    text-transform: none;
    margin-top: 12px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid #ddd;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
}

.footer-copyright {
    font-weight: 300;
}

.footer-number {
    font-weight: 400;
    color: #000;
}

/* Адаптивность footer */
@media (max-width: 968px) {
    .main-footer {
        padding: 50px 40px 30px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .main-footer {
        padding: 40px 20px 30px;
    }

    .footer-container {
        gap: 30px;
    }

    .footer-title {
        margin-bottom: 20px;
    }

    .footer-contact-list {
        gap: 16px;
    }

    .footer-social-list {
        gap: 14px;
    }
}

/* Секция "ОБО МНЕ" */
.about-section {
    padding-top: 80px;
    padding-bottom: 20px;
    margin-bottom: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 60px;
    padding-right: 60px;
}

.about-section .section-title {
    margin-bottom: 50px;
}

/* Заголовок ABOUT ME: слева заголовок, справа шарики (как в бывшем skills-header) */
.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.about-header .section-title {
    margin-bottom: 0;
}

/* Заголовок «Обо мне» — без uppercase, слово «мне» жирным и подчёркнуто */
.about-section .section-title {
    text-transform: none;
    font-family: 'Great Vibes', cursive;
    font-style: normal;
    font-weight: 400;
    word-spacing: 0;
    letter-spacing: 0;
}

.terms-section .section-title {
    font-family: 'Great Vibes', cursive;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.section-title {
    font-size: 100px;
    font-style: italic;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 60px;
    line-height: 1;
    position: relative;
}

.section-title-swash {
    position: relative;
    display: inline-block;
    width: 0.95em;
    text-align: center;
    color: transparent; /* оставляем место под букву */
    margin-left: -0.05em;
    margin-right: 0.25em; /* увеличенный отступ справа для лучшей читаемости */
}

/* Отступ между M и E в ABOUT ME */
.section-title > .section-title-swash + *:not(.section-title-swash) {
    margin-left: 0.15em;
}

.section-title-swash:has(+ .section-title-swash) {
    margin-right: 0.15em; /* меньший отступ между двумя swash буквами */
}

.section-title-swash:not(:has(+ .section-title-swash)):not(:last-child) {
    margin-right: 0.4em; /* больший отступ перед обычным текстом */
}

/* Специальный отступ для M перед E в ABOUT ME */
.section-title > .section-title-swash:not(.section-title-swash-a):not(:has(+ .section-title-swash)) {
    margin-right: 0.45em; /* немного сокращенный отступ */
}

/* Отступ между M и Y в MY SKILLS */
.section-title > .section-title-swash-m {
    margin-right: 0.4em;
}

/* Уменьшенный отступ между S и KILLS в MY SKILLS */
.section-title > .section-title-swash-s {
    margin-right: 0.01em;
}

/* Отступ между H и OW в HOW IT WORKS */
.section-title > .section-title-swash-h {
    margin-right: 0.35em;
}

/* Уменьшенный отступ между P и ORTFOLIO в PORTFOLIO */
.section-title > .section-title-swash-p {
    margin-right: 0.15em;
}

/* Уменьшенный отступ между C и ONTACTS в CONTACTS */
.section-title > .section-title-swash-c {
    margin-right: 0;
    width: 0.85em; /* уменьшаем ширину контейнера */
    margin-left: -0.05em;
}

/* Отрицательный margin для текста после C */
.section-title > .section-title-swash-c + * {
    margin-left: -0.1em;
}

.section-title-swash::after {
    content: 'M';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%) rotate(-6deg);
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: 1.3em;
    line-height: 1;
    color: #000;
    letter-spacing: 0;
    pointer-events: none;
}

.section-title-swash-e::after {
    content: 'E';
}

.section-title-swash-p::after {
    content: 'P';
}

.section-title-swash-c::after {
    content: 'C';
}

.section-title-swash-s::after {
    content: 'S';
}

.section-title-swash-w::after {
    content: 'W';
}

.section-title-swash-m::after {
    content: 'M';
}

.section-title-swash-h::after {
    content: 'H';
}

.section-title-swash-a::after {
    content: 'A';
}

/* Русская В в «Вопросы» */
.section-title-swash-v::after {
    content: 'В';
}

.section-title-swash-v {
    margin-right: 0.2em;
}

.terms-section .section-title {
    text-transform: none;
}

.section-title-swash-w {
    margin-left: 0.2em; /* отступ слева для WORKS */
}

/* Отступ между ABOUT и ME */
.section-title > .section-title-swash:not(.section-title-swash-a) {
    margin-left: 0.3em;
}

.section-title-bold {
    font-weight: 900;
    font-style: normal;
    margin-right: 0;
    margin-left: 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    min-height: 400px;
    justify-content: flex-start;
}

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    align-items: center;
}

.column {
    font-size: 17px;
    line-height: 2;
    color: #333;
}

.column p {
    margin-bottom: 28px;
}

.column p:last-child {
    margin-bottom: 0;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-image img,
.skill-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    object-fit: cover;
    background-color: #e8e8e8;
}

/* Секция "НАВЫКИ" */
.skills-section {
    padding-top: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
}

.skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.skills-name {
    font-size: 20px;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 300;
}

.skills-icons-wrapper {
    display: contents; /* на десктопе не меняем вёрстку */
}

.skills-icons {
    display: flex;
    gap: 30px;
}

/* Подсказка «нажмите» — скрыта на десктопе */
.skills-tap-hint {
    display: none;
    margin: 0;
    padding: 0;
}

.skill-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: none;
    padding: 10px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    text-decoration: none;
    color: #000;
    -webkit-text-stroke: 0.4px currentColor;
    paint-order: stroke fill;
    background-color: transparent;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skill-icon:hover {
    background-color: #000;
    color: #fff;
    text-decoration: none;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.skill-icon:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.skill-icon:focus,
.skill-icon:active {
    text-decoration: none;
    outline: none;
}

.skills-section .section-title {
    margin-bottom: 50px;
}

.skills-content {
    display: flex;
    gap: 100px;
    align-items: flex-start;
    margin-top: 0;
}

.skills-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

.skills-text p {
    margin-bottom: 24px;
}

.skills-text p:last-child {
    margin-bottom: 0;
}

.skills-images {
    flex: 0 0 400px;
    width: 400px;
    max-width: 100%;
    display: flex;
    align-items: flex-start;
    margin-left: auto; /* выравниваем блок фото по правому краю — ровно под тремя кружками */
}

.skills-images img {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    filter: grayscale(100%);
    object-fit: cover;
    object-position: center;
}

/* Секция "Условия работы" */
.terms-section {
    padding-top: 80px;
    padding-bottom: 0;
    margin-bottom: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 60px;
    padding-right: 60px;
}

.terms-section .section-title {
    margin-bottom: 50px;
}

.terms-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.terms-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    object-fit: cover;
    background-color: #e8e8e8;
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.terms-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 30px;
    align-items: flex-start;
    font-size: 16px;
    line-height: 1.8;
    padding: 20px 0;
}

.terms-item:first-child {
    padding-top: 0;
}

.terms-item:last-child {
    padding-bottom: 0;
}

.terms-number {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.terms-divider {
    width: 100%;
    height: 1px;
    background-color: #000;
    opacity: 0.2;
}

/* Галерея работ */
.gallery-section {
    padding-top: 80px;
}

.reels-section {
    min-height: auto;
    padding: 30px 60px 10px;
}

.reels-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
}

.reels-title {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: none;
    font-weight: 300;
}

.reels-subtitle {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: none;
    color: #666;
}

/* Одно большое видео с ссылками */
.reels-single-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.reels-video-wrapper {
    width: 80vw;
    height: 80vh;
    max-width: 80vw;
    max-height: 80vh;
    margin: 0 auto;
    background: transparent;
    overflow: hidden;
    position: relative;
}

.reels-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* показываем видео полностью без обрезки, сохраняя оригинальные пропорции */
    object-position: center; /* центрируем видео в контейнере */
    display: block;
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    border: none;
    outline: none;
}

.reels-links-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 40px;
    pointer-events: none;
    animation: fadeInOverlay 0.8s ease-in-out;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.reels-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background-color: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    max-width: 90%;
    box-sizing: border-box;
}

.reels-video-wrapper:hover .reels-links {
    transform: scale(1.02);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.5);
}

.reels-link {
    font-size: 16px;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 14px 28px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(0, 0, 0, 0.7);
    display: inline-block;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
    box-sizing: border-box;
}

.reels-link:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-shadow: none;
}

.reels-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.reels-link::after {
    display: none;
}

/* Мобильные ссылки - скрыты на десктопе */
.reels-links-mobile {
    display: none;
}

.reels-note-mobile {
    display: none;
}

.work-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.work-media {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #e8e8e8;
    overflow: hidden;
}

.work-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
}

.work-meta {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-top: 14px;
}

.work-num {
    font-size: 12px;
    letter-spacing: 1px;
    color: #777;
    min-width: 18px;
}

.work-name {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}

.work-line {
    margin-top: 10px;
    height: 1px;
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
}

.work-card:hover .work-name {
    opacity: 0.7;
}

.reels-note {
    display: none;
}

.reels-note-desktop {
    margin-top: 20px;
    font-size: 11px;
    color: #777;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 0 20px;
    line-height: 1.5;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.social-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
}

.social-label {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.social-list {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-link {
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #000;
    position: relative;
    padding-bottom: 4px;
    transition: opacity 0.3s ease;
}

.social-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.social-link:hover {
    opacity: 0.6;
}

.social-link:hover::after {
    transform: scaleX(1);
}

.gallery-item {
    overflow: hidden;
    aspect-ratio: 3/4;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Контакты */
.contact-section {
    padding-top: 80px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
    align-items: flex-start;
    margin-top: 60px;
    max-width: 100%;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 80px;
    width: 100%;
    max-width: 800px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-label {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
    color: #666;
}

.contact-value {
    font-size: 20px;
    letter-spacing: 1px;
    color: #000;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-value:hover {
    opacity: 0.6;
}

.contact-image {
    width: 100%;
}

.contact-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    object-fit: cover;
}

/* Адаптивность */
@media (max-width: 1340px) {
    .title-bold,
    .title-italic {
        font-size: 80px;
    }

    .hero-word-plain {
        font-size: 80px;
    }

    .hero-word-special {
        font-size: 92px;
        margin-left: -8px;
        margin-right: -8px;
        transform: translateY(8px);
    }

    .section-title {
        font-size: 70px;
    }

    .section-title-swash::after {
        font-size: 1.3em;
        transform: translate(-50%, -54%) rotate(-6deg);
    }

    .hero-image {
        flex: 0 0 400px;
    }
    
    .hero-image video {
        min-height: 500px;
    }
}

@media (max-width: 968px) {
    body {
        padding-top: 60px;
    }

    section {
        padding: 30px 40px;
        min-height: auto;
    }

    .main-nav {
        height: 60px;
    }

    .nav-container {
        padding: 12px 40px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(245, 245, 245, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 30px 40px;
        gap: 20px;
        border-bottom: 1px solid #000;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        font-size: 14px;
        padding: 10px 0;
        display: block;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-left: 20px;
        margin-top: 10px;
        background-color: transparent;
    }

    .nav-dropdown-link {
        padding: 8px 0;
        font-size: 12px;
    }

    .nav-dropdown-link::after {
        left: 0;
    }

    .nav-dropdown-link:hover::after,
    .nav-dropdown-link.active::after {
        width: 100%;
    }

    /* Состояние крестика для бургера */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero-content {
        flex-direction: column;
        gap: 40px;
        margin: 40px 0;
        align-items: center;
    }

    .hero-text {
        width: 100%;
        text-align: left;
    }

    .main-title {
        margin-bottom: 25px;
    }

    .hero-image {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }

    .title-bold,
    .title-italic {
        font-size: 60px;
        line-height: 1.1;
        letter-spacing: -1px;
    }

    .hero-word {
        letter-spacing: -1px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .hero-word-plain {
        font-size: 60px;
        line-height: 1.05;
    }

    .hero-word-special {
        font-size: 70px;
        margin-left: -6px;
        margin-right: -6px;
        transform: translateY(6px);
    }

    .title-italic {
        margin-top: -12px;
    }

    .name {
        font-size: 18px;
        letter-spacing: 5px;
        line-height: 1.5;
    }

    .section-title {
        font-size: 50px;
    }

    .section-title-swash::after {
        font-size: 1.3em;
        transform: translate(-50%, -54%) rotate(-6deg);
    }

    .about-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    .about-columns {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 100%;
        align-items: start;
    }

    .about-section .section-title {
        margin-bottom: 30px;
    }
    
    .skills-images {
        flex: 1;
        width: 100%;
        max-width: 100%;
    }

    .skills-section {
        padding-top: 30px;
        padding-left: 40px;
        padding-right: 40px;
        display: flex;
        flex-direction: column;
    }

    .skills-header {
        display: contents;
    }

    .skills-content {
        flex-direction: column;
        gap: 40px;
        align-items: stretch;
    }

    .skills-images {
        flex: 1;
        width: 100%;
        max-width: 100%;
    }

    .skills-images img {
        max-height: none;
    }

    .skills-text {
        max-width: 100%;
    }

    .skills-section .section-title {
        order: 1;
        margin-bottom: 30px;
    }

    .skills-name {
        order: 2;
        margin-bottom: 30px;
    }

    .skills-icons-wrapper {
        order: 3;
    }

    .skills-icons {
        flex-wrap: wrap;
        gap: 20px;
        width: 100%;
        margin-bottom: 0;
    }

    /* Планшет/тач: кружки выглядят кликабельными и без hover */
    .skill-icon {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
    }

    .skill-icon:active {
        transform: scale(0.94);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .skills-content {
        order: 4;
    }

    .terms-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    .terms-section .section-title {
        margin-bottom: 30px;
    }

    .terms-content {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .terms-item {
        grid-template-columns: 50px 1fr;
        gap: 20px;
        padding: 15px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .social-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .social-list {
        gap: 14px;
        flex-wrap: wrap;
    }

    .reels-section {
        padding: 24px 40px 10px;
    }

    .reels-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .reels-single-container {
        gap: 30px;
    }

    .reels-video-wrapper {
        width: 80vw;
        height: 80vh;
        max-width: 80vw;
        max-height: 80vh;
    }

    .reels-links-overlay {
        padding: 15px 10px;
    }

    .reels-links {
        gap: 10px 12px;
        padding: 15px 12px;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }

    .reels-link {
        font-size: 13px;
        letter-spacing: 2px;
        padding: 10px 14px;
        min-width: 110px;
        flex: 1 1 auto;
        max-width: calc(50% - 6px);
    }

    .reels-note-desktop {
        display: none;
    }

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

    .contact-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    .contact-content {
        gap: 40px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .skills-section {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        display: flex;
        flex-direction: column;
    }

    .skills-header {
        display: contents;
    }

    .skills-name {
        order: 1;
        margin-bottom: 20px;
    }

    .skills-section .section-title {
        order: 1;
        margin-bottom: 20px;
    }

    .skills-name {
        order: 2;
        margin-bottom: 20px;
    }

    .skills-icons {
        order: 3;
        margin-bottom: 20px;
    }

    .skills-content {
        gap: 30px;
        align-items: stretch;
    }

    .skills-images {
        width: 100%;
        max-width: 100%;
        flex: 1;
    }

    .skills-images img {
        max-height: none;
    }

    /* Подгоняем бургер для ровного крестика */
    .nav-toggle {
        gap: 4px;
        padding: 8px;
    }

    .nav-toggle span {
        width: 24px;
        height: 2px;
    }

    body {
        padding-top: 55px;
    }

    .main-nav {
        height: 55px;
    }

    .nav-container {
        padding: 12px 20px;
    }

    .nav-logo {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .typewriter-text {
        height: 3em; /* Фиксированная высота для мобильных (текст может быть в 2-3 строки) */
        min-height: 3em;
    }

    .nav-menu {
        top: 55px;
        padding: 20px;
    }

    /* Изменяем порядок секций на мобилке: ABOUT ME перед MY SOCIALS */
    body {
        display: flex;
        flex-direction: column;
    }

    section {
        padding: 25px 20px;
        scroll-margin-top: 55px;
        overflow-x: hidden;
    }

    /* Порядок секций на мобилке */
    #home {
        order: 1;
    }

    #about {
        order: 2;
    }

    .reels-section {
        order: 3;
    }

    #terms {
        order: 5;
    }

    #gallery {
        order: 6;
    }

    #footer {
        order: 7;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-title {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-header {
        font-size: 10px;
        letter-spacing: 1px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hero-content {
        margin: 30px 0;
        gap: 30px;
        align-items: center;
    }

    .hero-text {
        width: 100%;
        text-align: left;
    }

    .main-title {
        margin-bottom: 20px;
    }

    .hero-word {
        letter-spacing: 0px;
        line-height: 1.05;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .hero-word-plain {
        font-size: 36px;
        line-height: 1.05;
    }

    .hero-word-special {
        font-size: 44px;
        margin-left: -4px;
        margin-right: -4px;
        transform: translateY(4px);
        letter-spacing: -3px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
        word-spacing: 0.3em;
    }

    /* «Обо мне» и «Вопросы» — крупнее на мобилке (Great Vibes лучше читается) */
    .about-section .section-title,
    .terms-section .section-title {
        font-size: 48px;
    }

    .section-title-swash::after {
        font-size: 1.45em;
        transform: translate(-50%, -56%) rotate(-6deg);
    }

    /* Увеличиваем отступы между словами в ABOUT ME на мобильных */
    .about-section .section-title > .section-title-swash:not(.section-title-swash-a):not(:has(+ .section-title-swash)) {
        margin-right: 0.8em !important;
    }

    /* Увеличиваем отступы между словами в HOW IT WORKS на мобильных */
    .terms-section .section-title > .section-title-swash-h {
        margin-right: 0.6em !important;
    }

    .terms-section .section-title > .section-title-swash:not(.section-title-swash-h):not(.section-title-swash-w) {
        margin-right: 0.6em !important;
    }

    .name {
        font-size: 14px;
        letter-spacing: 4px;
        line-height: 1.5;
        word-break: break-word;
    }

    .about-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .about-content {
        min-height: auto;
    }

    .about-columns {
        gap: 40px;
    }

    .about-section .section-title {
        margin-bottom: 30px;
    }

    .about-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        margin-bottom: 30px;
    }

    .about-section .footer-line {
        margin: 30px 0 10px 0;
    }

    .column,
    .skills-text {
        font-size: 14px;
        line-height: 1.7;
    }

    .skill-icon {
        width: 90px;
        height: 90px;
        font-size: 13px;
        letter-spacing: 0.08em;
        padding: 8px;
        /* На мобилке без hover — подчёркиваем кликабельность тенью и отзывчивым нажатием */
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
    }

    .skill-icon:active {
        transform: scale(0.92);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    .skills-icons {
        gap: 15px;
        overflow: visible; /* чтобы волны от кружков были видны */
    }

    /* Обёртка на мобилке: волна + подсказка */
    .skills-icons-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        gap: 0;
        order: 3;
    }

    /* Эффект волны от каждого кружка */
    .skill-icon {
        position: relative;
        overflow: visible;
    }

    .skill-icon::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 90px;
        height: 90px;
        margin: -45px 0 0 -45px;
        border: 2px solid rgba(0, 0, 0, 0.15);
        border-radius: 50%;
        animation: skills-wave 2.5s ease-out infinite;
        pointer-events: none;
        z-index: -1;
    }

    .skill-icon::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 90px;
        height: 90px;
        margin: -45px 0 0 -45px;
        border: 2px solid rgba(0, 0, 0, 0.12);
        border-radius: 50%;
        animation: skills-wave 2.5s ease-out 0.8s infinite;
        pointer-events: none;
        z-index: -1;
    }

    /* Задержки для каждого кружка, чтобы волны шли не синхронно */
    .skill-icon:nth-child(1)::before {
        animation-delay: 0s;
    }
    .skill-icon:nth-child(1)::after {
        animation-delay: 0.8s;
    }
    .skill-icon:nth-child(2)::before {
        animation-delay: 0.3s;
    }
    .skill-icon:nth-child(2)::after {
        animation-delay: 1.1s;
    }
    .skill-icon:nth-child(3)::before {
        animation-delay: 0.6s;
    }
    .skill-icon:nth-child(3)::after {
        animation-delay: 1.4s;
    }

    /* Подсказка скрыта */
    .skills-tap-hint {
        display: none;
    }

    .skills-tap-hint-arrow {
        display: inline-block;
        font-size: 18px;
        line-height: 1;
        color: #000;
        animation: skills-arrow-bounce 1.5s ease-in-out infinite;
    }

    .terms-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .terms-section .section-title {
        margin-bottom: 30px;
    }

    .terms-section .footer-line {
        margin: 30px 0 10px 0;
    }

    .terms-item {
        grid-template-columns: 1fr;
        gap: 8px;
        font-size: 14px;
        padding: 12px 0;
    }

    .terms-number {
        font-size: 14px;
        display: block;
        margin-bottom: 5px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .social-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .social-list {
        gap: 10px;
    }

    .social-link {
        font-size: 12px;
    }

    .reels-section {
        padding: 20px 20px 8px;
        order: 3; /* после ABOUT ME на мобилке */
    }

    .reels-single-container {
        gap: 20px;
    }

    .reels-video-wrapper {
        display: block; /* показываем видео на мобилке после ABOUT ME */
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: none;
        aspect-ratio: auto; /* позволим видео определять пропорции */
    }

    .reels-video-wrapper video {
        width: 100%;
        height: auto;
        max-height: 60vh; /* ограничиваем максимальную высоту */
        object-fit: contain;
    }

    /* Скрываем overlay на мобильных */
    .reels-links-overlay {
        display: none !important;
    }

    /* Мобильные ссылки под видео */
    .reels-links-mobile {
        display: flex;
        flex-direction: column;
        gap: 24px;
        margin-top: 30px;
        padding: 0 20px;
    }

    .reels-link-mobile {
        font-size: 14px;
        letter-spacing: 2px;
        text-transform: uppercase;
        text-decoration: none;
        color: #000;
        font-weight: 300;
        position: relative;
        padding-bottom: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: opacity 0.3s ease;
        width: 100%;
    }

    .reels-link-mobile:hover {
        opacity: 0.6;
    }

    .reels-link-mobile::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background-color: #000;
        transition: width 0.3s ease;
    }

    .reels-link-mobile:hover::after {
        width: 100%;
    }

    .reels-link-mobile .arrow {
        display: inline-block;
        transition: transform 0.3s ease;
        margin-left: 8px;
    }

    .reels-link-mobile:hover .arrow {
        transform: translateX(8px);
    }

    .reels-note-mobile {
        display: block;
        margin-top: 24px;
        font-size: 10px;
        color: #777;
        letter-spacing: 0.3px;
        padding: 0 20px;
        line-height: 1.5;
    }

    .work-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .work-meta {
        gap: 10px;
    }

    .work-name {
        font-size: 13px;
    }

    .contact-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .contact-content {
        gap: 30px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-label {
        font-size: 11px;
    }

    .contact-value {
        font-size: 16px;
    }

    .page-footer {
        font-size: 11px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 400px) {
    .section-title {
        font-size: 26px;
        word-spacing: 0.4em;
    }

    .about-section .section-title,
    .terms-section .section-title {
        font-size: 36px;
    }

    .section-title-swash::after {
        font-size: 1.5em;
        transform: translate(-50%, -58%) rotate(-6deg);
    }

    /* Еще больше увеличиваем отступы на очень маленьких экранах */
    .about-section .section-title > .section-title-swash:not(.section-title-swash-a):not(:has(+ .section-title-swash)) {
        margin-right: 1em !important;
    }

    .terms-section .section-title > .section-title-swash-h {
        margin-right: 0.8em !important;
    }

    .terms-section .section-title > .section-title-swash:not(.section-title-swash-h):not(.section-title-swash-w) {
        margin-right: 0.8em !important;
    }

    .hero-word-plain {
        font-size: 30px;
    }

    .hero-word-special {
        font-size: 38px;
        transform: translateY(3px);
    }

    .nav-toggle {
        padding: 6px;
        gap: 3px;
    }

    .nav-toggle span {
        width: 22px;
        height: 2px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-3px) rotate(-45deg);
    }

    .typewriter-text {
        height: 3.5em; /* Еще больше места для очень маленьких экранов */
        min-height: 3.5em;
        font-size: 16px; /* Немного меньше шрифт */
    }

    .title-bold,
    .title-italic {
        font-size: 28px;
        letter-spacing: 0px;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .title-italic {
        margin-top: -6px;
    }

    .name {
        font-size: 12px;
        letter-spacing: 3px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-title-swash::after {
        font-size: 1.6em;
        transform: translate(-50%, -58%) rotate(-6deg);
    }

    .nav-logo {
        font-size: 10px;
    }

    section {
        padding: 20px 15px;
    }

    .hero-content {
        margin: 20px 0;
        gap: 25px;
    }

    .main-title {
        margin-bottom: 15px;
    }

    .reels-links-overlay {
        padding: 10px 8px;
    }

    .reels-links {
        gap: 8px;
        padding: 12px 10px;
        max-width: calc(100% - 16px);
        width: calc(100% - 16px);
    }

    .reels-link {
        font-size: 11px;
        letter-spacing: 1px;
        padding: 8px 12px;
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }

    .reels-note-desktop {
        display: none;
    }
}

/* Hero word (VIDEOGRAPHER) — стабильный "особенный" символ через web-font */
@media (max-width: 1340px) {
    .hero-word-text {
        font-size: 80px;
        letter-spacing: -1.5px;
        line-height: 0.95;
    }

    .hero-word-swash::after {
        font-size: 1.35em;
        transform: translate(-50%, -54%) rotate(-6deg);
    }
}

@media (max-width: 968px) {
    .hero-word-text {
        font-size: 60px;
        letter-spacing: -1px;
        line-height: 1.02;
    }
}

@media (max-width: 600px) {
    .hero-word-text {
        font-size: 38px;
        letter-spacing: -0.5px;
        line-height: 1.05;
    }

    .hero-word-swash::after {
        font-size: 1.55em;
        transform: translate(-50%, -56%) rotate(-6deg);
    }
}

@media (max-width: 400px) {
    .hero-word-text {
        font-size: 32px;
        letter-spacing: 0px;
    }
}

/* Страницы навыков с бегущей строкой */
.skill-hero-section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 60px;
    overflow: hidden;
}

.skill-marquee-wrapper {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    margin: 40px 0 30px;
    min-height: auto;
}

.skill-marquee {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 15s linear infinite;
    width: max-content;
    will-change: transform;
}

.skill-marquee-text {
    font-size: 100px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #000;
    margin-right: 140px;
    display: inline-block;
    line-height: 1;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 60px));
    }
}

/* Адаптивность для бегущей строки */
@media (max-width: 1340px) {
    .skill-marquee-text {
        font-size: 75px;
        letter-spacing: 0.06em;
    }
}

@media (max-width: 968px) {
    .skill-hero-section {
        padding: 30px 40px;
        min-height: auto;
    }
    
    .skill-marquee-wrapper {
        margin: 40px 0;
    }
    
    .skill-marquee-text {
        font-size: 50px;
        margin-right: 80px;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 600px) {
    .skill-hero-section {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .skill-marquee-wrapper {
        flex: 0 1 auto;
        margin: 30px 0;
        min-height: auto;
    }
    
    .skill-marquee-text {
        font-size: 30px;
        margin-right: 50px;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 400px) {
    .skill-marquee-wrapper {
        margin: 20px 0;
    }
    
    .skill-marquee-text {
        font-size: 24px;
        margin-right: 36px;
        letter-spacing: 0.03em;
    }
}

/* Навигация по страницам портфолио */
.portfolio-nav {
    padding: 30px 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.portfolio-nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.portfolio-nav-link {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
    padding: 10px 0;
}

.portfolio-nav-link:hover {
    color: #666;
}

.portfolio-nav-link.active {
    color: #000;
    font-weight: 600;
}

body[data-theme="dark"] .portfolio-nav-link.active {
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

/* Адаптивность для навигации портфолио */
@media (max-width: 968px) {
    .portfolio-nav {
        padding: 25px 40px;
    }

    .portfolio-nav-menu {
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .portfolio-nav {
        padding: 20px 20px;
    }

    .portfolio-nav-menu {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .portfolio-nav-link {
        font-size: 11px;
    }
}

/* Секция с видео портфолио */
.portfolio-videos-section {
    padding: 40px 0;
    min-height: auto;
}

/* Обычный grid для видео портфолио */
.portfolio-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

.portfolio-videos-grid .portfolio-video-item {
    height: 600px;
    width: 100%;
}

/* Шахматный порядок для видео портфолио */
.portfolio-videos-masonry {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 60px;
    align-items: start;
}

.portfolio-video-item {
    position: relative;
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
    width: 100%;
}

/* Шахматный порядок - первое видео большое слева */
.portfolio-video-item-1 {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 500px;
}

/* Второе видео среднее справа вверху */
.portfolio-video-item-2 {
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 300px;
}

/* Третье видео среднее справа внизу */
.portfolio-video-item-3 {
    grid-column: 2;
    grid-row: 2;
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 300px;
}

.portfolio-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background-color: #000;
}

.portfolio-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    transition: filter 0.3s ease;
}

/* Для полноэкранного режима на мобильных используем contain для вертикальных видео */
.portfolio-video-wrapper video:-webkit-full-screen {
    object-fit: contain !important;
    background-color: #000;
}

/* Лоадер */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loader-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.loading .page-loader {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-text {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.loader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 48px;
    font-weight: 100;
    letter-spacing: 2px;
    color: var(--text);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.loader-line {
    width: 200px;
    height: 1px;
    background-color: var(--border);
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--text);
    transition: width 0.3s ease;
}

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

@keyframes loadingProgress {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Волна у кружков и подсказка на мобилке */
@keyframes skills-wave {
    0% {
        transform: scale(1);
        opacity: 0.5;
        border-color: rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
        border-color: rgba(0, 0, 0, 0);
    }
}

@keyframes skills-hint-blink {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes skills-arrow-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@media (max-width: 600px) {
    .loader-text {
        font-size: 18px;
        letter-spacing: 3px;
    }

    .loader-percent {
        font-size: 36px;
    }

    .loader-line {
        width: 150px;
    }
}

/* Временно скрываем все фото на главной странице кроме skills */
.about-images,
.terms-image,
.gallery-grid,
.contact-image {
    display: none !important;
}

/* Скрываем секцию PORTFOLIO */
.gallery-section {
    display: none !important;
}

/* Стили для полноэкранного режима */
.portfolio-video-wrapper video:-webkit-full-screen {
    object-fit: cover !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #000;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
}

.portfolio-video-wrapper video:-moz-full-screen {
    object-fit: cover !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #000;
}

.portfolio-video-wrapper video:-ms-fullscreen {
    object-fit: cover !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #000;
}

.portfolio-video-wrapper video:fullscreen {
    object-fit: cover !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #000;
}

.portfolio-video-item:hover .portfolio-video-wrapper video {
    filter: grayscale(0%);
}

.portfolio-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.portfolio-video-item:hover .portfolio-video-play {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.1);
}

.portfolio-video-item.playing .portfolio-video-play {
    opacity: 0;
    pointer-events: none;
}

.portfolio-video-item.playing .portfolio-video-wrapper video {
    filter: grayscale(0%);
}

/* Скрываем стандартные controls когда видео не играет */
.portfolio-video-wrapper video:not([controls])::-webkit-media-controls {
    display: none !important;
}

.portfolio-video-wrapper video:not([controls])::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Адаптивность для видео портфолио */
@media (max-width: 968px) {
    .portfolio-videos-section {
        padding: 40px 40px;
    }

    .portfolio-videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 40px;
    }

    .portfolio-videos-grid .portfolio-video-item {
        height: 450px;
    }

    .portfolio-videos-masonry {
        grid-template-columns: 1.6fr 1fr;
        gap: 10px;
        padding: 0 40px;
    }

    .portfolio-video-item-1 {
        grid-column: 1;
        grid-row: 1 / 3;
        aspect-ratio: 9 / 16;
    }

    .portfolio-video-item-2 {
        grid-column: 2;
        grid-row: 1;
        aspect-ratio: 9 / 16;
    }

    .portfolio-video-item-3 {
        grid-column: 2;
        grid-row: 2;
        aspect-ratio: 9 / 16;
    }
}

@media (max-width: 600px) {
    .portfolio-videos-section {
        padding: 30px 20px;
    }

    .portfolio-videos-grid {
        padding: 0 20px;
    }

    .portfolio-videos-grid .portfolio-video-item {
        height: 400px;
    }

    .portfolio-videos-masonry {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 20px;
    }

    .portfolio-video-item-1,
    .portfolio-video-item-2,
    .portfolio-video-item-3 {
        grid-column: 1;
        grid-row: auto;
        aspect-ratio: 9 / 16;
    }

    .portfolio-video-play {
        width: 50px;
        height: 50px;
    }

    .portfolio-video-play svg {
        width: 50px;
        height: 50px;
    }
}

/* Тёмная тема — переопределение цветов текста и фонов */
body .hero-word-text,
body .name,
body .typewriter-text,
body .main-title { color: var(--text); }
body .header-left,
body .header-right { color: var(--text); }
body .section-title { color: var(--text); }
body .section-title-swash::after { color: var(--text); }
body .section-title-cursive,
body .about-section .section-title,
body .terms-section .section-title { color: var(--text); }
body .column,
body .column p { color: var(--text-muted); }
body .column strong { color: var(--text); }
body .skill-icon { color: var(--text); border-color: var(--border); }
body .skill-icon:hover { background-color: var(--hover-bg); color: var(--hover-text); }
body .reels-title,
body .reels-subtitle { color: var(--text); }
body .reels-note-desktop,
body .reels-note-mobile { color: var(--text-muted); }
body .footer-left,
body .page-footer span { color: var(--text-muted); }
body .footer-line,
body .header-line { background-color: var(--divider); }
body .main-footer .footer-logo,
body .main-footer .footer-title,
body .main-footer a { color: var(--text); }
body .main-footer .footer-tagline,
body .main-footer .footer-desc { color: var(--text-muted); }
body[data-theme="dark"] .footer-contact-label,
body[data-theme="dark"] .footer-contact-value { color: var(--text); }
body[data-theme="dark"] .footer-disclaimer,
body[data-theme="dark"] .footer-copyright { color: var(--text-muted); }
body[data-theme="dark"] .footer-bottom { border-top-color: var(--divider); }
body .terms-item p,
body .terms-number { color: var(--text); }
body .terms-divider { background-color: var(--divider); }
body .portfolio-nav-link { color: var(--text); }
body .portfolio-nav { border-color: var(--border); }
body .skill-marquee-text { color: var(--text); }
body .nav-dropdown { background-color: var(--bg-soft); border-color: var(--border); }
body .nav-dropdown-link { color: var(--text); }

/* Открытое бургер-меню в тёмной теме */
@media (max-width: 968px) {
    body[data-theme="dark"] .nav-menu {
        background-color: rgba(13, 13, 13, 0.98);
        border-bottom-color: var(--border);
    }
    body[data-theme="dark"] .nav-menu .nav-link {
        color: var(--text);
    }
    /* Выпадающий блок портфолио — тот же фон, что и меню */
    body[data-theme="dark"] .nav-menu .nav-dropdown {
        background-color: transparent;
        border: none;
    }
}

/* Мобильные ссылки reels в тёмной теме */
body[data-theme="dark"] .reels-link-mobile {
    color: var(--text);
}
body[data-theme="dark"] .reels-link-mobile::after {
    background-color: var(--text);
}
body[data-theme="dark"] .reels-note-mobile {
    color: var(--text-muted);
}

body .terms-content,
body .about-content { color: var(--text); }
body .page-footer { border-color: var(--divider); }
body .hero-word-swash::after { color: var(--text); }
body section { background-color: transparent; }
