* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}




.header {
    padding: 20px;
}

.logo {
    width: 200px;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
    text-align: center;
}

h1 {
    font-size: clamp(18px, 3vw, 26px);
    line-height: 1.5;
    min-height: 220px;
    white-space: pre-line;
}

.buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease forwards;
    animation-delay: 3s;
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.primary {
    background: #4c6fff;
    color: white;
}

.primary:hover {
    background: #3b57d0;
}

.secondary {
    border: 2px solid #4c6fff;
    color: #4c6fff;
}

.secondary:hover {
    background: #4c6fff;
    color: white;
}

.skills {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.skills img {
    width: 60px;
    opacity: 0;
    transform: scale(0.8);
    animation: pop 0.8s ease forwards;
}

.skills img:nth-child(1) { animation-delay: 3.5s; }
.skills img:nth-child(2) { animation-delay: 3.8s; }
.skills img:nth-child(3) { animation-delay: 4.1s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 📱 Адаптивность */
@media (max-width: 600px) {
    .skills {
        gap: 20px;
    }

    .skills img {
        width: 45px;
    }
}



/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.modal-content {
    background: linear-gradient(135deg, #0b1d4a, #050b2e);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;        /* 🔥 ограничение по высоте */
    padding: 25px;
    border-radius: 16px;
    color: white;
    position: relative;
    overflow-y: auto;        /* 🔥 скролл внутри */
    animation: scaleIn 0.4s ease;
}


.close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
    font-weight: 600;

    cursor: pointer;
    z-index: 10;

    border-radius: 50%;
    transition: 0.2s;
}

.close:hover {
    background: rgba(255, 255, 255, 0.1);
}


.filter-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn,
.level-btn {
    padding: 10px 20px;
    border-radius: 10px;
    background: transparent;
    border: 2px solid #4c6fff;
    color: #4c6fff;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.level-btn.active {
    background: #4c6fff;
    color: white;
}

.projects {
    margin-top: 20px;
}

.project-section {
    display: none;
    animation: fadeUp 0.4s ease;
}

.project-section.active {
    display: block;
}

.project-video {
    width: 100%;
    border-radius: 12px;
    margin: 15px 0;
    background: black;
}

.project-desc {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* Mobile */
@media (max-width: 600px) {
    .modal-content {
        padding: 15px;
    }

    .project-desc {
        font-size: 14px;
    }
}


.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #4c6fff;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.projects {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
}


.modal-top-text {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 10px;
    display: block;
    text-align: center;
}

.kwork-link {
    color: #2ecc71;
    font-weight: 600;
    text-decoration: none;
}

.kwork-link:hover {
    text-decoration: underline;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    font-size: 14px;
    opacity: 0.85;
}

select,
textarea,
input {
    background: #0a1438;
    border: 2px solid #4c6fff;
    border-radius: 10px;
    padding: 10px;
    color: white;
    resize: none;
}

textarea {
    min-height: 100px;
}

button[type="submit"] {
    margin-top: 15px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #4c6fff;
    color: white;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
}

button[type="submit"]:enabled {
    opacity: 1;
}

button[type="submit"]:hover:enabled {
    background: #3b57d0;
}


/* NOTIFICATIONS */
#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Base */
.notification {
    min-width: 280px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 14px;
    color: white;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    animation: slideIn 0.4s ease forwards;
    position: relative;
    overflow: hidden;
}

/* Success */
.notification.success {
    background: linear-gradient(135deg, #1e8f5a, #2ecc71);
}

/* Error */
.notification.error {
    background: linear-gradient(135deg, #8f1e1e, #e74c3c);
}

/* Progress bar */
.notification::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: rgba(255,255,255,0.5);
    animation: progress 4s linear forwards;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Mobile */
@media (max-width: 600px) {
    #notifications {
        right: 10px;
        left: 10px;
        top: 10px;
    }

    .notification {
        max-width: 100%;
    }
}


/* FOOTER */
.footer {
    padding-top: 80px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #050b2e, #0b1d4a);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-left h3 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-link {
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

/* Telegram */
.footer-link.telegram {
    background: linear-gradient(135deg, #1da1f2, #0d8ddb);
    color: white;
}

/* VK */
.footer-link.vk {
    background: linear-gradient(135deg, #4a76a8, #3b5f88);
    color: white;
}

.footer-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.footer-right {
    text-align: right;
    font-size: 14px;
    opacity: 0.9;
}

.footer-right span {
    color: #4c6fff;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }
}


.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 700;
}


.modal-top-text {
    text-align: center;
    display: block;
    margin-bottom: 12px;
}

.modal-content h2 {
    animation: fadeUp 0.4s ease;
}


body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

html {
    background: linear-gradient(135deg, #050b2e, #0b1d4a);
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;

    min-height: calc(var(--vh, 1vh) * 100);
    background: linear-gradient(135deg, #050b2e, #0b1d4a);

    color: #ffffff;
    overflow-x: hidden;

    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* RESET */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* ❗ body НЕ скроллится */
    background: #050b2e; /* запасной цвет */
}

/* ОСНОВНОЙ КОНТЕЙНЕР */
#app {
    position: fixed;
    inset: 0;

    display: flex;
    flex-direction: column;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    background: linear-gradient(135deg, #050b2e, #0b1d4a);
}


.page {
    flex: 1;

    display: flex;
    flex-direction: column;
}
