:root {
    color-scheme: dark;
    --bg-1: #09090f;
    --bg-2: #121225;
    --panel: rgba(20, 24, 34, 0.72);
    --panel-border: rgba(166, 179, 255, 0.2);
    --text-main: #f2f5ff;
    --text-subtle: #9da7c2;
    --accent-a: #8e6bff;
    --accent-b: #44b8ff;
    --accent-c: #69ffc7;
}

* {
    box-sizing: border-box;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
    min-height: 100vh;
    background: #000;
    color: var(--text-main);
    overflow-x: hidden;
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(166, 179, 255, 0.35) rgba(255, 255, 255, 0.04);
}
html::-webkit-scrollbar {
    width: 10px;
}
html::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}
html::-webkit-scrollbar-thumb {
    background: rgba(166, 179, 255, 0.35);
    border-radius: 10px;
}
html::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 179, 255, 0.5);
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -4;
    pointer-events: none;
}

body::before,
body::after {
    display: none;
}

.glass-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), inset 0 -10px 20px rgba(255, 255, 255, 0.015), 0 10px 20px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    position: relative;
    overflow: hidden;
    transition: backdrop-filter 220ms ease, -webkit-backdrop-filter 220ms ease,
        background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, 0.24), transparent 35%),
        radial-gradient(circle at 92% 120%, rgba(130, 160, 255, 0.1), transparent 40%);
    pointer-events: none;
}

.idle-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: none;
}

.idle-overlay.idle-overlay--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.idle-overlay[hidden] {
    display: none !important;
}

.idle-overlay__dvd-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.idle-overlay__dvd {
    position: absolute;
    width: 200px;
    height: 120px;
    object-fit: contain;
    left: 0;
    top: 0;
}

.idle-overlay__text {
    position: relative;
    z-index: 2;
    margin: 0 0 24px;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    text-shadow: 0 0 32px rgba(142, 107, 255, 0.35);
}

.idle-overlay__btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 16px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.idle-overlay__btn:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.22);
}

.glass-card::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 180%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.25);
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.082) 0%, transparent 76%);
    transition: transform 0.45s ease, opacity 0.45s ease;
    pointer-events: none;
}

.glass-card:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.56), inset 0 -16px 30px rgba(255, 255, 255, 0.03),
        0 16px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(30px) saturate(185%);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
}

.glass-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.page-wrapper {
    min-height: 100vh;
}

.discord-profile-wrap {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.discord-profile-wrap__link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tg-collectible {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    width: 300px;
    max-width: calc(100vw - 48px);
    color: inherit;
    text-decoration: none;
    border-radius: 24px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tg-collectible:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.28);
}

.tg-collectible__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #0d0d12;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tg-collectible__icon svg {
    width: 22px;
    height: 22px;
}

.tg-collectible__label {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
}

.tg-collectible__arrow {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--text-subtle);
    transition: transform 0.2s ease;
}

.tg-collectible:hover .tg-collectible__arrow {
    transform: translateX(4px);
    color: var(--text-main);
}

.page-layout {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px;
}

.center {
    min-width: 0;
}

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

.intro__title {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: 0.02em;
    text-shadow: 0 0 28px rgba(142, 107, 255, 0.45);
}

.intro__subtitle {
    margin: 12px 0 0;
    color: var(--text-subtle);
    font-size: clamp(14px, 2vw, 18px);
}

.section {
    margin-bottom: 36px;
}

.section__title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.project-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.project-card__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.project-card__desc {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--text-subtle);
    line-height: 1.5;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-card__tags span {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-subtle);
}

/* Портфолио видео монтажа — медиаплеер */
.video-portfolio-section {
    margin-bottom: 36px;
}

.video-portfolio {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-portfolio__player-wrap {
    padding: 16px 16px 12px;
    background: #000;
    border-radius: 14px;
}

.video-portfolio__video-wrap {
    position: relative;
    background: #000;
    border-radius: 14px;
}

.video-portfolio__video {
    width: 100%;
    max-height: 360px;
    border-radius: 14px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.video-portfolio__video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.video-portfolio__in-player-controls {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 160px;
    pointer-events: none;
}

.video-portfolio__in-player-controls .video-portfolio__nav-btn {
    pointer-events: auto;
}

.video-portfolio__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.video-portfolio__video-wrap:hover .video-portfolio__nav-btn {
    opacity: 0.7;
}

.video-portfolio__nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.video-portfolio__video-wrap:hover .video-portfolio__nav-btn:disabled {
    opacity: 0.35;
}

.video-portfolio__nav-btn:disabled {
    cursor: not-allowed;
}

.video-portfolio__playlist--hidden {
    display: none !important;
}

.video-portfolio__playlist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    list-style: none;
    margin: 0;
}

.video-portfolio__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    cursor: pointer;
    font: inherit;
    color: var(--text-main);
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.video-portfolio__item:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.24);
}

.video-portfolio__item:focus {
    outline: none;
    border-color: var(--accent-a);
    box-shadow: 0 0 0 2px rgba(142, 107, 255, 0.35);
}

.video-portfolio__item.video-portfolio__item--active {
    background: linear-gradient(160deg, rgba(142, 107, 255, 0.2), rgba(68, 184, 255, 0.1));
    border-color: rgba(142, 107, 255, 0.4);
}

.video-portfolio__item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-c);
    flex-shrink: 0;
}

.video-portfolio__item--active .video-portfolio__item-icon {
    background: rgba(142, 107, 255, 0.35);
    color: #fff;
}

.video-portfolio__item-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.intro,
.intro__title,
.intro__subtitle,
.section__title,
.projects-section,
.project-card,
.project-card__title,
.project-card__desc,
.project-card__tags,
.video-portfolio-section,
.video-portfolio__item,
.reviews-section .section__title,
.cmd-window {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.cmd-window {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

.cmd-window__titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.cmd-window__title {
    flex: 1;
    text-align: center;
}

.cmd-window__buttons {
    display: flex;
    gap: 8px;
}

.cmd-window__btn {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.cmd-window__content {
    flex: 0 0 auto;
    height: 400px;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    background: rgba(0, 8, 12, 0.6);
    color: #a8e6cf;
    overflow-y: auto;
    padding: 16px 18px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 230, 207, 0.4) rgba(0, 20, 28, 0.6);
}

.cmd-window__content::-webkit-scrollbar {
    width: 8px;
}

.cmd-window__content::-webkit-scrollbar-track {
    background: rgba(0, 20, 28, 0.6);
}

.cmd-window__content::-webkit-scrollbar-thumb {
    background: rgba(168, 230, 207, 0.4);
    border-radius: 8px;
}

.cmd-window__content::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 230, 207, 0.55);
}

.cmd-window__pane {
    margin: 0;
}

.cmd-window__pane[hidden] {
    display: none;
}

.cmd-window__line {
    margin: 0;
}

.cmd-window__line--head {
    color: #ffd93d;
    margin-bottom: 10px;
}

.cmd-window__line--cmd {
    color: #b8e6d5;
    margin-top: 6px;
}

.cmd-window__line--desc {
    color: #7eb8a8;
    font-size: 0.85em;
    margin: 2px 0 0 1em;
}

.cmd-window__line--output,
.cmd-window__output {
    color: #b8e6d5;
    margin: 4px 0 0 1em;
}

.cmd-window__line--meta {
    color: #7eb8a8;
    font-size: 0.85em;
    margin: 2px 0 0 1em;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(168, 230, 207, 0.2);
}

.cmd-window__line--meta:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cmd-window__input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px 16px;
    background: rgba(0, 8, 12, 0.8);
    border-top: 1px solid rgba(168, 230, 207, 0.15);
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
}

.cmd-window__prompt {
    color: #ffd93d;
    flex-shrink: 0;
}

.cmd-window__input {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: #b8e6d5;
    font: inherit;
    outline: none;
}

.cmd-window__input::placeholder {
    color: rgba(168, 230, 207, 0.35);
}

.cmd-window__send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(168, 230, 207, 0.25);
    border-radius: 8px;
    background: rgba(168, 230, 207, 0.08);
    color: #b8e6d5;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cmd-window__send:hover {
    background: rgba(168, 230, 207, 0.18);
    border-color: rgba(168, 230, 207, 0.4);
}

.cmd-window__send:focus {
    outline: none;
    border-color: #7eb8a8;
    box-shadow: 0 0 0 2px rgba(126, 184, 168, 0.3);
}

@keyframes cmd-blink {
    50% { opacity: 0; }
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0.01em;
    text-shadow: 0 0 22px rgba(142, 107, 255, 0.4);
}

.subtitle {
    margin-top: 8px;
    color: var(--text-subtle);
}

.discord-profile {
    width: 300px;
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
}

.discord-profile__avatar1 {
    height: 105px;
    min-height: 105px;
    width: 100%;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background-color: #1a1b1e;
}

.discord-profile__avatar1-img {
    display: block;
    width: 100%;
    height: 105px;
    object-fit: cover;
}

.discord-profile__body {
    padding: 0 16px 16px;
    position: relative;
}

.discord-profile__avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin-top: -46px;
    margin-left: 0;
    flex-shrink: 0;
}

.discord-profile__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.discord-profile__avatar-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    pointer-events: none;
}

.discord-profile__status {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
}

.discord-profile__status--online {
    background: #23a559;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.discord-profile__status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #b5bac1;
    font-size: 14px;
}

.discord-profile__status-emoji {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.discord-profile__display-name {
    margin: 6px 0 2px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #f2f3f5;
}

.discord-profile__username {
    margin: 0;
    font-size: 14px;
    color: #b5bac1;
}

.discord-profile__about {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.discord-profile__about-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b5bac1;
    margin-bottom: 4px;
}

.discord-profile__about-text {
    margin: 0;
    font-size: 14px;
    color: #f2f3f5;
}

.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .page-layout {
        padding: 16px;
    }
}

@media (max-width: 700px) {
    .page-wrapper {
        display: flex;
        flex-direction: column;
    }

    .page-layout {
        order: 0;
        padding: 12px;
    }

    .discord-profile-wrap {
        position: static;
        order: 1;
        padding: 12px 12px 24px;
        margin: 0 auto;
        width: 100%;
        max-width: 340px;
        display: flex;
        justify-content: center;
    }

    .discord-profile-wrap .discord-profile {
        width: 100%;
        max-width: 340px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .video-portfolio__playlist {
        padding: 10px 12px 14px;
        gap: 8px;
    }

    .video-portfolio__item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.72);
        opacity: 0.6;
    }
}

@keyframes blobMoveA {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(10vmax, 8vmax, 0);
    }
}

@keyframes blobMoveB {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-8vmax, -10vmax, 0);
    }
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

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

.loader__logo {
    display: block;
    max-width: min(280px, 60vw);
    width: auto;
    height: auto;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.loader.loader--logo-visible .loader__logo {
    opacity: 1;
}

