/* ------------------------------------------------------------------
   ШРИФТ Rousseau Deco
   Montserrat подключается через Google Fonts (см. index.html).
   Если Rousseau Deco в Google Fonts нет, он виден только на твоём
   компьютере, где установлен. Чтобы его видели все посетители, положи
   файл шрифта в папку fonts/ и раскомментируй блок ниже
   (проверь, что лицензия шрифта разрешает использование на сайте):

   @font-face {
       font-family: 'Rousseau Deco';
       src: url('fonts/RousseauDeco.woff2') format('woff2'),
            url('fonts/RousseauDeco.woff') format('woff');
       font-weight: 700;
       font-style: normal;
       font-display: swap;
   }
------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0b0710;
    color: #ffffff;
    font-family: 'Montserrat Alternates', 'Montserrat', sans-serif;
    overflow-x: hidden;
    width: 100%;
}

/* Когда открыто модальное окно, страница под ним не прокручивается */
body.modal-open {
    overflow: hidden;
}

/* Видимая рамка при навигации с клавиатуры */
a:focus-visible,
button:focus-visible,
.portfolio-card:focus-visible,
.all-work-item:focus-visible {
    outline: 2px solid #d8b4fe;
    outline-offset: 3px;
}

.site-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-image: radial-gradient(circle at 10% 90%, rgba(130, 45, 110, 0.22) 0%, transparent 45%);
}

/* Чтобы заголовок раздела не прятался под липкой шапкой после клика по меню */
.portfolio-section,
.about-section,
.skills-process-section,
.contact-section {
    scroll-margin-top: 60px;
}

/* Шапка сайта */
.header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 30px 60px;
    width: 100%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background-color: rgba(11, 7, 16, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo-container {
    justify-self: start;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Навигация строго по центру экрана */
.nav-menu {
    justify-self: center;
    position: relative;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: clamp(20px, 2.6vw, 40px);
    position: relative;
}

.nav-menu ul li a {
    text-decoration: none;
    color: #b5adc2;
    font-size: 14px;
    font-weight: 400;
    padding-bottom: 12px;
    display: block;
    transition: color 0.3s ease;
    font-family: 'Montserrat Alternates', sans-serif;
    white-space: nowrap;
}

.nav-menu ul li a:hover,
.nav-menu ul li a.active {
    color: #ffffff;
}

/* Линия меню и кружок */
.nav-indicator-bar {
    position: absolute;
    bottom: -2px;
    height: 1px;
    background: #d8b4fe;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.indicator-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #e879f9;
    border-radius: 50%;
    box-shadow: 0 0 10px #e879f9;
}

.header-right-placeholder {
    justify-self: end;
}

/* Первый экран (Hero) — ПК версия: текст слева, видео справа.
   Порядок задан в HTML: сначала .hero-content, потом .hero-visual */
.hero-section {
    width: 100%;
    height: calc(100vh - 120px);
    height: calc(100svh - 120px);
    min-height: 580px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 0 60px;
    position: relative;
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.hero-text-block {
    margin-top: -20px;
}

/* Шрифты заголовков */
.hero-content h1,
.portfolio-header h2,
.about-content h2,
.skills-column h2,
.process-column h2,
.contact-left h2,
#all-works-modal h2 {
    font-family: 'Rousseau Deco', 'Montserrat Alternates', sans-serif;
    letter-spacing: 1px;
}

.hero-content h1 {
    font-size: clamp(30px, 3.6vw, 46px);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 22px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #b3abc0;
    max-width: 470px;
    margin-bottom: 35px;
    font-weight: 300;
}

/* Кнопки */
.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn {
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background-color: #d8b4fe;
    color: #120c1f;
}

.btn-primary:hover {
    background-color: #c084fc;
    box-shadow: 0 0 20px rgba(216, 180, 254, 0.35);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.04);
}

/* Иконки соцсетей */
.social-icons {
    position: absolute;
    bottom: 40px;
    left: 0;
    display: flex;
    gap: 22px;
}

.social-icon img {
    width: 18px;
    height: 18px;
    opacity: 0.55;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon:hover img {
    opacity: 1;
    transform: translateY(-2px);
}

/* Правая визуальная часть (видео со звездой) */
.hero-visual {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.star-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.star-video {
    width: min(700px, 100%);
    height: auto;
    z-index: 1;
    object-fit: contain;
    display: block;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0) 75%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0) 75%);
}

/* БЛОК ПОРТФОЛИО: МОИ РАБОТЫ */
.portfolio-section {
    width: 100%;
    padding: 100px 60px;
    background-color: #0b0710;
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.portfolio-subtitle {
    font-size: 13px;
    color: #9a90aa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.portfolio-header h2 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.portfolio-description-group {
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.portfolio-description-group p {
    font-size: 14px;
    line-height: 1.6;
    color: #aba3b8;
    font-weight: 300;
}

.all-works-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    cursor: pointer;
}

.all-works-link:hover {
    color: #d8b4fe;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-card {
    background-color: #120c1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background-color: #181022;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.card-footer {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card-footer h3 {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
}

/* Короткое описание проекта; пока пустое, не занимает места */
.card-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #9a90aa;
    font-weight: 300;
    margin-top: 6px;
}

.card-desc:empty {
    display: none;
}

.card-arrow {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Эффекты наведения только там, где есть мышь: на телефоне они не «залипают» после касания */
@media (hover: hover) {
    .portfolio-card:hover {
        border-color: rgba(216, 180, 254, 0.3);
        transform: translateY(-4px);
    }

    .portfolio-card:hover .card-image img {
        transform: scale(1.04);
    }

    .portfolio-card:hover .card-arrow {
        background-color: #d8b4fe;
        color: #120c1f;
        border-color: #d8b4fe;
    }

    .all-work-item:hover {
        border-color: rgba(216, 180, 254, 0.4);
        transform: translateY(-3px);
    }

    .skill-card:hover .skill-icon-box {
        border-color: rgba(216, 180, 254, 0.4);
        transform: translateY(-4px);
        box-shadow: 0 0 15px rgba(216, 180, 254, 0.15);
    }

    .contact-item:hover {
        transform: translateX(4px);
    }
}

/* МОДАЛЬНЫЕ ОКНА */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(11, 7, 16, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #140d1f;
    border: 1px solid rgba(216, 180, 254, 0.2);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content-large {
    max-width: 1100px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    line-height: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #d8b4fe;
}

#modal-project-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-right: 40px;
    color: #ffffff;
    font-family: 'Rousseau Deco', 'Montserrat Alternates', sans-serif;
}

.modal-video-container {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #000000;
}

#modal-video-player {
    width: 100%;
    max-height: 70vh;
    max-height: 70dvh;
    display: block;
}

/* Сетка каталога «Все работы» */
#all-works-modal h2 {
    font-size: 32px;
    margin-bottom: 30px;
    padding-right: 40px;
    text-transform: uppercase;
}

.all-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.all-work-item {
    background-color: #1a1028;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.all-work-item video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background-color: #0b0710;
}

.all-work-title {
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
}

/* БЛОК: НЕМНОГО ОБО МНЕ */
.about-section {
    position: relative;
    width: 100%;
    padding: 100px 60px 140px 60px;
    background-color: #0b0710;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
}

.about-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 70px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-image-wrapper {
    width: 100%;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    background-color: #150f20;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.95);
}

.about-content h2 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.about-text {
    font-size: 15px;
    line-height: 1.65;
    color: #b3abc0;
    margin-bottom: 40px;
    font-weight: 300;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(216, 180, 254, 0.25);
    background: rgba(216, 180, 254, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.feature-desc h4 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 3px;
}

.feature-desc p {
    font-size: 13px;
    color: #9a90aa;
    font-weight: 300;
}

.about-bg-flower {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 380px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
}

.about-bg-flower img {
    width: 100%;
    height: auto;
    display: block;
}

/* БЛОК: СТЕК И ПРОЦЕСС */
.skills-process-section {
    position: relative;
    width: 100%;
    padding: 100px 60px;
    background-color: #0b0710;
}

.skills-process-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
}

.skills-process-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1px 1.1fr;
    gap: 60px;
    align-items: start;
}

.vertical-divider {
    width: 1px;
    height: 100%;
    min-height: 400px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
}

.section-subtitle {
    font-size: 13px;
    color: #9a90aa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.skills-column h2,
.process-column h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 45px;
    text-transform: uppercase;
}

/* Три иконки в ряд: 6 технологий ложатся ровно 3 + 3, на узком экране сжимаются */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 110px));
    justify-content: center;
    gap: 20px;
    max-width: 390px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.skill-icon-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #120c1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-icon-box img,
.skill-icon-box svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.skill-card span {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-steps.visible .process-step:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.process-steps.visible .process-step:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

.process-steps.visible .process-step:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.process-steps.visible .process-step:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.55s;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    color: #ffffff;
    flex-shrink: 0;
}

.step-content {
    padding-top: 4px;
}

.step-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.step-content p {
    font-size: 14px;
    line-height: 1.55;
    color: #b3abc0;
    font-weight: 300;
}

/* БЛОК: КОНТАКТЫ */
.contact-section {
    width: 100%;
    padding: 60px 60px 100px 60px;
    background-color: #0b0710;
}

.contact-banner {
    max-width: 1300px;
    margin: 0 auto;
    background: linear-gradient(135deg, #181026 0%, #120c1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 60px 70px;
    display: grid;
    grid-template-columns: 1.2fr 1px 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.contact-glass-img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
}

.contact-bg-glow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    background: radial-gradient(circle at 100% 50%, rgba(130, 45, 110, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.contact-left {
    position: relative;
    z-index: 2;
}

.contact-subtitle {
    font-size: 13px;
    color: #9a90aa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 12px;
}

.contact-left h2 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.contact-left p {
    font-size: 15px;
    line-height: 1.6;
    color: #b3abc0;
    margin-bottom: 35px;
    font-weight: 300;
    max-width: 480px;
}

.contact-divider {
    width: 1px;
    height: 200px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
    position: relative;
    z-index: 2;
}

.contact-right {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.contact-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(216, 180, 254, 0.2);
    background: rgba(216, 180, 254, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-box img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.contact-label {
    font-size: 13px;
    color: #9a90aa;
    font-weight: 400;
}

.contact-val {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    overflow-wrap: anywhere;
}

/* АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 1200px) {
    .portfolio-grid, .all-works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-container {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .feature-item {
        justify-content: flex-start;
        text-align: left;
    }
    .about-bg-flower {
        display: none;
    }
}

@media (max-width: 1024px) {
    .portfolio-section,
    .about-section,
    .skills-process-section,
    .contact-section {
        scroll-margin-top: 10px;
    }

    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 15px;
        width: 100%;
    }
    .logo-img {
        height: 32px;
        flex-shrink: 0;
    }
    .nav-menu {
        justify-self: auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    .nav-menu ul {
        gap: 16px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    .nav-menu ul li a {
        font-size: 12px;
        padding-bottom: 4px;
    }
    /* Линия и кружок внутри области меню, иначе они создают лишнюю прокрутку */
    .nav-indicator-bar {
        bottom: 3px;
    }
    .header-right-placeholder {
        display: none;
    }

    /* Мобильная версия первого экрана: видео сверху, текст снизу.
       На ПК порядок другой (текст слева), поэтому тут видео поднимается наверх через order */
    .hero-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 20px 40px 20px;
        height: auto;
        min-height: 0;
        width: 100%;
    }
    .hero-visual {
        order: -1;
        height: 280px;
        width: 100%;
        margin-bottom: 20px;
    }
    .star-video {
        width: min(260px, 70vw);
        height: min(260px, 70vw);
    }
    .hero-content {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-text-block {
        margin-top: 0;
        width: 100%;
    }
    .hero-content h1 {
        font-size: clamp(22px, 7vw, 32px);
        line-height: 1.2;
        margin-bottom: 16px;
    }
    .hero-content p {
        font-size: 13px;
        max-width: 100%;
        margin-bottom: 24px;
    }
    .hero-buttons {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    .btn {
        padding: 12px 22px;
        font-size: 13px;
    }
    .social-icons {
        position: relative;
        bottom: auto;
        left: auto;
        justify-content: center;
        margin-top: 30px;
    }
    .social-icon {
        padding: 6px;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .portfolio-header h2,
    .about-content h2,
    .skills-column h2,
    .process-column h2 {
        font-size: clamp(26px, 7vw, 36px);
    }
    .portfolio-section, .about-section, .skills-process-section {
        padding: 60px 20px;
    }
    .portfolio-section::before, .about-section::before, .skills-process-section::before {
        left: 20px;
        right: 20px;
    }
    .about-image-wrapper {
        height: 360px;
        max-width: 360px;
    }
    .skills-process-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .skills-grid {
        justify-content: start;
        gap: 16px;
    }
    .skills-column h2,
    .process-column h2 {
        margin-bottom: 30px;
    }
    .vertical-divider {
        display: none;
    }
    .contact-banner {
        grid-template-columns: 1fr;
        padding: 40px 30px;
        gap: 40px;
    }
    .contact-divider {
        display: none;
    }
    .contact-section {
        padding: 40px 20px 80px 20px;
    }
    .contact-left h2 {
        font-size: clamp(24px, 7vw, 30px);
    }
    .contact-glass-img {
        opacity: 0.4;
    }
}

@media (max-width: 768px) {
    .portfolio-grid, .all-works-grid {
        grid-template-columns: 1fr;
    }
    .card-image {
        height: 210px;
    }
    .card-footer {
        padding: 18px 20px;
    }

    .modal-content {
        width: calc(100% - 24px);
        padding: 56px 16px 18px;
        border-radius: 18px;
    }
    .modal-close {
        top: 6px;
        right: 8px;
    }
    #modal-project-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
    #all-works-modal h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    .all-work-item video {
        height: 190px;
    }
}

@media (max-width: 420px) {
    .contact-banner {
        padding: 32px 22px;
    }
    .about-image-wrapper {
        height: 320px;
    }
}

/* Для тех, у кого в системе отключены анимации */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .process-step {
        opacity: 1;
        transform: none;
        transition: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}
