/* CSS Custom Properties */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --bg-dark: #0a0a0a;
    --bg-darker: #000000;
    --text-light: #ffffff;
    --text-gray: #888888;
    --terminal-bg: #1a1a1a;
    --terminal-border: #333333;
    --glow-color: #00ff41;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}



/* Loading Screen Styles */
#loading-screen {
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    z-index: 100;
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

/* Start Prompt Styles */
.start-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-prompt:hover .prompt-text {
    transform: scale(1.1);
}

.prompt-text {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--text-light);
    opacity: 0.8;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    animation: breathe 2s ease-in-out infinite;
}

.prompt-pulse {
    display: none;
}

@keyframes breathe {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.typing-container {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

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

.typing-text {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.typing-text.final-word {
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: finalGlow 0.5s ease-out;
}

@keyframes finalGlow {
    0% { 
        filter: drop-shadow(0 0 0px rgba(99, 102, 241, 0));
        transform: scale(1);
    }
    100% { 
        filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8));
        transform: scale(1.05);
    }
}

.cursor {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-light);
    animation: blink 1s infinite;
    font-weight: 300;
}

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

/* Simple Elegant Transition Animation */
.screen-fill {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    z-index: 1000;
    pointer-events: none;
    animation: simpleTransition 1.5s ease-out forwards;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

@keyframes simpleTransition {
    0% {
        font-size: clamp(3rem, 8vw, 6rem);
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        font-size: clamp(5rem, 12vw, 10rem);
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
    100% {
        font-size: clamp(8rem, 20vw, 16rem);
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* Анимация полета текста к пользователю */


/* Main Screen Styles - Inside 3D Cube */
#main-screen {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    display: none;
    position: relative;
}

#main-screen.active {
    display: block;
    opacity: 1;
    visibility: visible;
    z-index: 10;
    animation: portalEntrance 2s ease-out forwards;
}

/* Эффект портала при входе в основной экран */
@keyframes portalEntrance {
    0% {
        transform: scale(0.1);
        opacity: 0;
        filter: brightness(8) blur(15px);
        border-radius: 50%;
    }
    20% {
        transform: scale(0.3);
        opacity: 0.5;
        filter: brightness(6) blur(12px);
        border-radius: 40%;
    }
    40% {
        transform: scale(0.6);
        opacity: 0.75;
        filter: brightness(4) blur(8px);
        border-radius: 25%;
    }
    65% {
        transform: scale(0.85);
        opacity: 0.9;
        filter: brightness(2.5) blur(4px);
        border-radius: 12%;
    }
    85% {
        transform: scale(0.95);
        opacity: 0.95;
        filter: brightness(1.5) blur(2px);
        border-radius: 5%;
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1) blur(0px);
        border-radius: 0%;
    }
}

/* Анимация расширяющихся световых колец */
@keyframes expandRing {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
        border-width: 3px;
    }
    50% {
        opacity: 0.8;
        border-width: 2px;
    }
    100% {
        transform: translate(-50%, -50%) scale(100);
        opacity: 0;
        border-width: 1px;
    }
}

/* Контейнер для движущихся элементов */
.starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Анимация полета звезд к пользователю */
@keyframes flyToUser {
    0% {
        left: calc(50% + var(--start-x, 0px));
        top: calc(50% + var(--start-y, 0px));
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: calc(50% + var(--end-x));
        top: calc(50% + var(--end-y));
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Анимация для текста при переходе */
@keyframes flyToUserText {
    0% {
        transform: translate(-50%, -50%) scale(6);
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: translate(-50%, -50%) scale(30);
        opacity: 1;
        text-shadow: 0 0 100px rgba(255, 255, 255, 1), 0 0 200px rgba(255, 255, 255, 0.8);
    }
}

/* Звезды летящие к пользователю */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    border-radius: 50%;
    animation: flyToUser 4s linear forwards; /* Убираем infinite, добавляем forwards */
    /* Устанавливаем начальную позицию по умолчанию */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 6px rgba(255, 255, 255, 0.8),
        0 0 12px rgba(255, 255, 255, 0.4);
}

/* Дополнительные звезды для плотности */
.shooting-star.dense {
    width: 1px;
    height: 1px;
    animation-duration: 6s;
}

.shooting-star.bright {
    width: 3px;
    height: 3px;
    animation-duration: 3s;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* Туманности */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.nebula.purple {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 100%);
}

.nebula.blue {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.1) 50%, transparent 100%);
}

.nebula.pink {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(236, 72, 153, 0.05) 50%, transparent 100%);
}

@keyframes float {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1);
    }
    25% {
        transform: translateX(50px) translateY(-30px) scale(1.1);
    }
    50% {
        transform: translateX(-30px) translateY(-50px) scale(0.9);
    }
    75% {
        transform: translateX(-50px) translateY(30px) scale(1.05);
    }
}

/* Космические частицы летящие к пользователю */
.space-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: flyToUser 12s linear forwards; /* Убираем infinite, добавляем forwards */
    /* Устанавливаем начальную позицию по умолчанию */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 0;
}

.particle.fast {
    animation-duration: 8s;
    background: rgba(255, 255, 255, 0.6);
}

.particle.slow {
    animation-duration: 18s;
    background: rgba(255, 255, 255, 0.3);
}

/* Пролетающие астероиды */
.asteroids {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.asteroid {
    position: absolute;
    background: linear-gradient(45deg, #4a4a4a, #2a2a2a, #3a3a3a);
    border-radius: 30% 70% 60% 40%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: moveAsteroidLeft 12s linear infinite;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(74, 74, 74, 0.4));
}

.asteroid.small {
    width: 8px;
    height: 6px;
    animation-duration: 10s;
}

.asteroid.medium {
    width: 12px;
    height: 10px;
    animation-duration: 14s;
}

.asteroid.large {
    width: 16px;
    height: 12px;
    animation-duration: 16s;
    box-shadow: 
        0 0 4px rgba(74, 74, 74, 0.6),
        0 0 20px rgba(74, 74, 74, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}

/* Астероиды летят из центра влево */
@keyframes moveAsteroidLeft {
    0% {
        transform: translate(-50%, -50%) scale(0.05) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35% {
        transform: translate(calc(-50% - 20vw), calc(-50% + var(--offset-y, 0px))) scale(1.2) rotate(120deg);
        opacity: 0.9;
    }
    60% {
        transform: translate(calc(-50% - 35vw), calc(-50% + var(--offset-y, 0px))) scale(4) rotate(240deg);
        opacity: 1;
    }
    85% {
        transform: translate(calc(-50% - 55vw), calc(-50% + var(--offset-y, 0px))) scale(8) rotate(320deg);
        opacity: 1;
    }
    95% {
        transform: translate(calc(-50% - 70vw), calc(-50% + var(--offset-y, 0px))) scale(12) rotate(350deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(calc(-50% - 80vw), calc(-50% + var(--offset-y, 0px))) scale(15) rotate(360deg);
        opacity: 0;
    }
}

/* Астероиды летят из центра вправо */
.asteroid.right {
    animation-name: moveAsteroidRight;
}

@keyframes moveAsteroidRight {
    0% {
        transform: translate(-50%, -50%) scale(0.05) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    35% {
        transform: translate(calc(-50% + 20vw), calc(-50% + var(--offset-y, 0px))) scale(1.2) rotate(-120deg);
        opacity: 0.9;
    }
    60% {
        transform: translate(calc(-50% + 35vw), calc(-50% + var(--offset-y, 0px))) scale(4) rotate(-240deg);
        opacity: 1;
    }
    85% {
        transform: translate(calc(-50% + 55vw), calc(-50% + var(--offset-y, 0px))) scale(8) rotate(-320deg);
        opacity: 1;
    }
    95% {
        transform: translate(calc(-50% + 70vw), calc(-50% + var(--offset-y, 0px))) scale(12) rotate(-350deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(calc(-50% + 80vw), calc(-50% + var(--offset-y, 0px))) scale(15) rotate(-360deg);
        opacity: 0;
    }
}

.cube-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    position: relative;
    /* Принудительно включаем аппаратное ускорение */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.cube-scene {
    width: 100vw;
    height: 100vh;
    position: relative;
    transform-style: preserve-3d;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0.0, 0.2, 1);
    /* Принудительно включаем аппаратное ускорение */
    transform: translateZ(0);
    will-change: transform;
}

/* Грани параллелепипеда - инвертированные (внутрь) */
.cube-face {
    position: absolute;
    width: 100vw;
    height: 100vh;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    backface-visibility: hidden;
    z-index: 5;
}

.cube-face:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(10, 10, 10, 0.98);
}

/* Позиционирование граней - параллелепипед */
.cube-face--front {
    transform: translateZ(-50vh);
}

.cube-face--back {
    transform: translateZ(50vh) rotateY(180deg);
}

.cube-face--right {
    transform: rotateX(0deg) rotateY(-90deg) translateZ(-50vw);
}

.cube-face--left {
    transform: rotateX(0deg) rotateY(90deg) translateZ(-50vw);
}

.cube-face--top {
    transform: rotateX(-90deg) translateZ(-50vh);
}

.cube-face--bottom {
    transform: rotateX(90deg) translateZ(-50vh);
}

/* Контент граней */
.face-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 3.5rem 2rem 2rem 2rem;
    text-align: center;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Главная грань */
.main-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.main-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #cccccc;
    margin-bottom: 1rem;
}

.main-tagline {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #888888;
    font-style: italic;
}

/* Заголовки граней */
.face-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    margin-top: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* About грань - новый дизайн */
.about-content p {
    color: #cccccc;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.intro-section {
    margin-bottom: 2rem;
    text-align: center;
}

.intro-section h3 {
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

.education-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.education-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    min-width: 200px;
}

.education-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.education-card i {
    color: var(--primary-color);
    font-size: 1.8rem;
    min-width: 30px;
}

.education-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.degree {
    color: #ffffff;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.2;
}

.field {
    color: var(--primary-color);
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    line-height: 1.2;
}



.principles-section {
    margin-bottom: 2rem;
}

.principles-section h4 {
    color: #ffffff;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.principle-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.principle-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.principle-card i {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.principle-card h5 {
    color: #ffffff;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.principle-card p {
    color: #cccccc;
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    margin: 0;
    line-height: 1.3;
}

.motivation-section {
    margin-bottom: 2rem;
}

.motivation-text {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 154, 158, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    color: #ffffff;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    line-height: 1.4;
    margin: 0 !important;
}

.motivation-text i {
    color: #ff6b6b;
    margin-right: 0.5rem;
    font-size: 1.2em;
}



.stats {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.stat-label {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: #888888;
}

/* Skills грань */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    width: 100%;
    max-width: 600px;
}

/* Центрирование последнего элемента если он один в ряду */
.skill-item:nth-child(10) {
    grid-column: 2 / 3; /* Центрируем в средней колонке для сетки 3x3+1 */
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    min-height: 80px;
}

.skill-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.skill-item span {
    font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    color: #cccccc;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Experience грань */
.experience-content {
    width: 100%;
    max-width: 600px;
}

.experience-item {
    margin-bottom: 2rem;
    text-align: left;
    padding: 1.5rem;
    border-left: 3px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.experience-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.experience-item h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.company-period {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company {
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.period {
    color: var(--text-gray);
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    font-style: italic;
}

.achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.achievements li {
    color: #cccccc;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
    line-height: 1.4;
}

.achievements li::before {
    content: "▸";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.experience-item p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #cccccc;
    margin-bottom: 0.5rem;
}



/* Projects грань */
.projects-content {
    width: 100%;
    max-width: 600px;
}

.projects-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-gray);
}

.projects-loading i {
    font-size: 2rem;
    color: var(--primary-color);
}

.project-item {
    margin-bottom: 1.5rem;
    text-align: left;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-item:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.project-item h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-item h3 i {
    color: #ffffff;
}

.project-item p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #cccccc;
    margin-bottom: 0.8rem;
}

.project-stars {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.project-stars i {
    color: var(--accent-color);
}

.project-language {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.github-link {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #888888;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.github-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.projects-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--text-gray);
    text-align: center;
}

.projects-error i {
    font-size: 2rem;
    color: #ef4444;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Contact грань */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 400px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.contact-link:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.contact-link i {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #ffffff;
}

.contact-link span {
    font-size: 1rem;
}

.contact-cta {
    text-align: center;
    color: #888888;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-style: italic;
}

/* Навигация - индикаторы граней */
.cube-navigation {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem 1rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #888888;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
}

.nav-btn::before {
    content: attr(title);
    position: absolute;
    right: 100%;
    margin-right: 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.nav-btn.active {
    border-color: #ffffff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Состояния поворота куба - инвертированные */
.cube.show-front {
    transform: rotateX(0deg) rotateY(0deg);
}

.cube.show-right {
    transform: rotateX(0deg) rotateY(90deg);
}

.cube.show-back {
    transform: rotateX(0deg) rotateY(180deg);
}

.cube.show-left {
    transform: rotateX(0deg) rotateY(-90deg);
}

.cube.show-top {
    transform: rotateX(90deg) rotateY(0deg);
}

.cube.show-bottom {
    transform: rotateX(-90deg) rotateY(0deg);
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Предотвращаем скролл на мобильных */
    html, body {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ограничиваем космические элементы на мобильных */
    .starfield,
    .shooting-stars,
    .space-particles,
    .asteroids {
        overflow: hidden !important;
        clip-path: inset(0 0 0 0) !important; /* Обрезаем элементы по границам контейнера */
    }
    
    /* Дополнительные ограничения для звезд на мобильных */
    .shooting-star,
    .particle {
        max-width: 100vw !important;
        max-height: 100vh !important;
    }
    
    /* Скрываем 3D куб на мобильных */
    .cube-container {
        display: none !important;
    }
    
    /* Показываем мобильный слайдер */
    .mobile-slider-container {
        display: block !important;
        z-index: 100 !important;
    }
    
    /* Скрываем 3D куб на мобильных */
    .cube-container {
        display: none !important;
    }
    
    /* Ограничиваем все элементы размерами экрана */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    /* Разрешаем touch-скролл только по вертикали */
    body {
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: auto !important;
        overflow-x: hidden !important;
    }
    
    .mobile-slide .face-content {
        display: block !important; /* Ключевое исправление для скролла */
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        /* Принудительно включаем скролл */
        overflow-y: scroll !important;
        overflow-x: hidden !important;
    }
    
    /* Скрываем старую навигацию куба */
    .cube-navigation {
        display: none !important;
    }
    
    /* Основной экран на мобильных */
    #main-screen {
        width: 100vw !important;
        height: 100vh !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .cube-scene {
        width: 100vw;
        height: 100vh;
    }
    
    .cube {
        width: 100%;
        height: 100%;
        transform-style: preserve-3d; /* Принудительно сохраняем 3D */
    }
    
    /* Адаптация граней куба - увеличиваем глубину */
    .cube-face {
        border-width: 1px;
    }
    
    /* Исправляем позиционирование граней для мобильных */
    .cube-face--front {
        transform: translateZ(40vh); /* Выносим вперед */
    }

    .cube-face--back {
        transform: translateZ(-40vh) rotateY(180deg); /* Отодвигаем назад */
    }

    .cube-face--right {
        transform: rotateY(-90deg) translateZ(40vw); /* Правая сторона */
    }

    .cube-face--left {
        transform: rotateY(90deg) translateZ(40vw); /* Левая сторона */
    }

    .cube-face--top {
        transform: rotateX(-90deg) translateZ(40vh); /* Верх */
    }

    .cube-face--bottom {
        transform: rotateX(90deg) translateZ(40vh); /* Низ */
    }
    
    .cube-navigation {
        position: fixed !important;
        top: auto !important;
        right: auto !important;
        bottom: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 0.6rem !important;
        background: rgba(0, 0, 0, 0.9) !important;
        padding: 0.6rem 1rem !important;
        border-radius: 25px !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(15px) !important;
        z-index: 1000 !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Добавляем подсказку о свайп-управлении */
    .mobile-hint {
        display: none !important; /* Полностью скрываем мобильную подсказку */
    }
    
    .mobile-hint i {
        color: var(--primary-color);
        font-size: 1rem;
        /* Убираем margin, используем gap в родителе */
        margin: 0;
    }
    
    .mobile-hint span {
        line-height: 1;
    }
    
    .nav-btn {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        font-size: 0.85rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
    
    .nav-btn:hover,
    .nav-btn.active {
        background: rgba(99, 102, 241, 0.3) !important;
        border-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
        transform: scale(1.1) !important;
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.3) !important;
    }
    
    .nav-btn::before {
        display: none !important; /* Убираем подсказки на мобильных */
    }
    
    .face-content {
        padding: 1rem 1rem 5rem 1rem; /* Оптимизируем отступы для лучшего скролла */
        overflow-y: auto; /* Добавляем прокрутку для длинного контента */
    }
    
    /* Принудительно фиксируем мобильную навигацию */
    .mobile-navigation {
        position: fixed !important;
        bottom: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        max-width: calc(100vw - 2rem) !important;
        width: auto !important;
        height: auto !important;
        display: flex !important;
    }
    
    .mobile-navigation:hover {
        transform: translateX(-50%) translateY(-2px) !important;
    }
    
    /* Адаптация опыта работы */
    .experience-item {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .experience-item h3 {
        font-size: clamp(1rem, 2.2vw, 1.2rem);
        margin-bottom: 0.6rem;
        line-height: 1.2;
    }
    
    .company-period {
        margin-bottom: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .company {
        font-size: clamp(0.85rem, 1.8vw, 1rem);
    }
    
    .period {
        font-size: clamp(0.75rem, 1.6vw, 0.9rem);
    }
    
    .achievements li {
        font-size: clamp(0.8rem, 1.6vw, 0.9rem);
        margin-bottom: 0.4rem;
        line-height: 1.3;
        padding-left: 1rem;
    }
    
    /* Адаптация заголовков */
    .main-title {
        font-size: clamp(1.8rem, 5vw, 3rem); /* Оптимизируем для мобильных */
        margin-bottom: 1rem;
        line-height: 1.2;
        margin-top: 0 !important; /* Убираем вертикальное центрирование для мобильных */
        transform: none !important; /* Убираем transform для мобильных */
    }
    
    /* Центрирование главной страницы на мобильных */
    .mobile-slide[data-slide="0"] .face-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Дополнительный отступ снизу для слайда "О себе" */
    .mobile-slide[data-slide="1"] .face-content {
        padding-bottom: 8rem !important; /* Увеличиваем отступ снизу */
    }
    
    /* Центрирование слайда навыков на мобильных */
    .mobile-slide[data-slide="2"] .face-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Центрирование слайда проектов на мобильных */
    .mobile-slide[data-slide="4"] .face-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Центрирование слайда контактов на мобильных */
    .mobile-slide[data-slide="5"] .face-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .main-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
        margin-bottom: 0.8rem;
    }
    
    .main-tagline {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
        margin-bottom: 0;
    }
    
    .face-title {
        font-size: clamp(1.3rem, 3.5vw, 2rem); /* Адаптивные заголовки граней */
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    /* Адаптация сетки навыков */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Адаптация карточек образования */
    .education-cards {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .education-card {
        min-width: auto;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .education-card .degree {
        font-size: clamp(0.85rem, 1.8vw, 1rem);
    }
    
    .education-card .field {
        font-size: clamp(0.75rem, 1.6vw, 0.9rem);
    }
    
    /* Унификация размеров иконок образования в мобильной версии */
    .education-card .fa-graduation-cap,
    .education-card .fa-user-graduate {
        font-size: 1.5rem !important;
    }
    
    /* Адаптация сетки принципов */
    .principles-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        max-width: none;
    }
    
    .principle-card {
        min-height: 70px;
        padding: 0.6rem;
    }
    
    .principle-card h5 {
        font-size: clamp(0.8rem, 1.6vw, 0.95rem);
        margin-bottom: 0.2rem;
    }
    
    .principle-card p {
        font-size: clamp(0.7rem, 1.4vw, 0.8rem);
        line-height: 1.2;
    }
    
    /* Адаптация мотивационного текста */
    .motivation-text {
        padding: 1rem;
        font-size: clamp(1rem, 2.2vw, 1.2rem);
        line-height: 1.3;
    }
    
    .skill-item {
        padding: 0.6rem;
        min-height: 70px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .skill-item i {
        font-size: clamp(1rem, 2.2vw, 1.3rem);
        margin-bottom: 0.3rem;
    }
    
    .skill-item span {
        font-size: clamp(0.65rem, 1.4vw, 0.8rem);
        text-align: center;
        line-height: 1.1;
    }
}

/* Промежуточные размеры экранов */
@media (max-width: 640px) and (min-width: 481px) {
    .cube-container {
        perspective: 900px;
    }
    
    .cube {
        transform-style: preserve-3d;
    }
    
    /* Промежуточные значения глубины */
    .cube-face--front {
        transform: translateZ(35vh);
    }

    .cube-face--back {
        transform: translateZ(-35vh) rotateY(180deg);
    }

    .cube-face--right {
        transform: rotateY(-90deg) translateZ(35vw);
    }

    .cube-face--left {
        transform: rotateY(90deg) translateZ(35vw);
    }

    .cube-face--top {
        transform: rotateX(-90deg) translateZ(35vh);
    }

    .cube-face--bottom {
        transform: rotateX(90deg) translateZ(35vh);
    }
}

/* Адаптация навигации для средних мобильных экранов */
@media (max-width: 600px) and (min-width: 481px) {
    .cube-navigation {
        padding: 0.55rem 0.9rem !important;
        gap: 0.55rem !important;
    }
    
    .nav-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.8rem !important;
    }
    
    .nav-divider {
        height: 26px !important;
    }
}

@media (max-width: 480px) {
    /* Дополнительная оптимизация куба для очень маленьких экранов */
    .cube-container {
        perspective: 800px; /* Оптимальная perspective для маленьких экранов */
        padding: 0.5rem;
    }
    
    .cube {
        transform-style: preserve-3d;
    }
    
    .cube-face {
        border-width: 1px;
    }
    
    /* Оптимальные значения для маленьких экранов */
    .cube-face--front {
        transform: translateZ(30vh);
    }

    .cube-face--back {
        transform: translateZ(-30vh) rotateY(180deg);
    }

    .cube-face--right {
        transform: rotateY(-90deg) translateZ(30vw);
    }

    .cube-face--left {
        transform: rotateY(90deg) translateZ(30vw);
    }

    .cube-face--top {
        transform: rotateX(-90deg) translateZ(30vh);
    }

    .cube-face--bottom {
        transform: rotateX(90deg) translateZ(30vh);
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .face-content {
        padding: 1.5rem 1rem;
        overflow-y: auto;
    }
    
    /* Дополнительная адаптация заголовков для маленьких экранов */
    .main-title {
        font-size: clamp(1.5rem, 4.5vw, 2.5rem);
        margin-bottom: 0.8rem;
        line-height: 1.1;
    }
    
    .main-subtitle {
        font-size: clamp(0.9rem, 2.2vw, 1.3rem);
        margin-bottom: 0.6rem;
    }
    
    .main-tagline {
        font-size: clamp(0.8rem, 1.8vw, 1rem);
    }
    
    .face-title {
        font-size: clamp(1.1rem, 3vw, 1.8rem);
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }
    
    /* Еще более компактный контент */
    .face-content {
        padding: 1rem 0.8rem;
    }
    
    .education-card {
        padding: 0.6rem 0.8rem;
    }
    
    .principle-card {
        min-height: 60px;
        padding: 0.5rem;
    }
    
    .skill-item {
        padding: 0.5rem;
        min-height: 60px;
    }
    
    .experience-item {
        padding: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .project-item {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .contact-link {
        padding: 0.8rem 1.2rem;
    }
    
    /* Навыки в одну колонку на маленьких экранах */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .skill-item {
        padding: 0.5rem;
        min-height: 60px;
        font-size: 0.75rem;
    }
    
    .skill-item i {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .skill-item span {
        font-size: 0.65rem;
        line-height: 1;
    }
    
    /* Адаптация статистики */
    .stats {
        gap: 1rem;
        margin-top: 1.5rem;
        margin-bottom: 3rem; /* Добавляем отступ снизу для мобильной навигации */
    }
    
    .stat-number {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    /* Адаптация проектов */
    .project-item {
        margin-bottom: 1.2rem;
        padding: 1rem;
    }
    
    .project-item h3 {
        font-size: clamp(1rem, 2.2vw, 1.2rem);
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .project-item p {
        font-size: clamp(0.8rem, 1.8vw, 0.95rem);
        margin-bottom: 0.6rem;
        line-height: 1.3;
    }
    
    .project-language {
        padding: 0.2rem 0.5rem;
        font-size: clamp(0.6rem, 1.2vw, 0.7rem);
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .project-stars {
        font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    }
    
    .github-link {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
        padding: 0.8rem;
        margin-top: 1.5rem;
    }
    
    /* Адаптация контактных ссылок */
    .contact-links {
        gap: 0.6rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-link {
        padding: 0.7rem 0.8rem;
        font-size: clamp(0.85rem, 1.8vw, 0.95rem);
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }
    
    .contact-link i {
        font-size: clamp(1.1rem, 2.2vw, 1.3rem);
        margin-right: 0.8rem;
        min-width: 20px;
    }
    
    .contact-cta {
        font-size: clamp(0.85rem, 1.8vw, 0.95rem);
        margin-top: 1rem;
        padding: 0 0.5rem;
        text-align: center;
        line-height: 1.3;
    }
    
    /* Дополнительные исправления для маленьких экранов */
    .experience-item h3 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }
    
    .company {
        font-size: 0.85rem !important;
        color: var(--primary-color);
    }
    
    .period {
        font-size: 0.75rem !important;
        opacity: 0.8;
    }
    
    .achievements li {
        font-size: 0.8rem !important;
        margin-bottom: 0.3rem;
        line-height: 1.3;
        padding-left: 0.8rem;
    }
    
    /* Исправление принципов */
    .principle-card h5 {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem;
    }
    
    .principle-card p {
        font-size: 0.7rem !important;
        line-height: 1.2;
    }
    
    /* Исправление образования */
    .education-card .degree {
        font-size: 0.85rem !important;
    }
    
    .education-card .field {
        font-size: 0.75rem !important;
    }
    
    /* Специальные правила для мобильного слайдера на средних экранах */
    .mobile-slide .face-content {
        height: 100vh !important; /* Полная высота */
        max-height: none !important; /* Убираем ограничение */
        min-height: 100vh !important;
        padding: 0.8rem 0.8rem 5rem 0.8rem !important; /* Больше места снизу */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Плавная анимация затемнения фона */
@keyframes darkenBackground {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Подсказки навигации */
.navigation-hint {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    color: #ffffff;
    z-index: 2000;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.hint-content h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.hint-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #cccccc;
}

@media (max-width: 768px) {
    /* Скрываем подсказки ПК версии на мобильных */
    .navigation-hint {
        display: none;
    }
}

/* Разделитель в навигации */
.nav-divider {
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0.75rem 0;
    border-radius: 1px;
}

/* Кнопка управления музыкой */
.music-btn {
    position: relative;
}

.music-btn.playing {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background: rgba(99, 102, 241, 0.1) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3) !important;
}

.music-btn.playing::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .nav-divider {
        width: 1px !important;
        height: 30px !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 1px !important;
        flex-shrink: 0 !important;
    }
    
    /* Оптимизация космических анимаций для мобильных */
    .nebula {
        filter: blur(20px); /* Уменьшаем blur для производительности */
        animation-duration: 30s; /* Замедляем анимацию */
    }
    
    .shooting-star {
        animation-duration: 6s; /* Замедляем звезды */
    }
    
    .shooting-star.dense {
        animation-duration: 8s;
    }
    
    .shooting-star.bright {
        animation-duration: 5s;
    }
    
    .particle {
        animation-duration: 15s; /* Замедляем частицы */
    }
    
    .particle.fast {
        animation-duration: 12s;
    }
    
    .particle.slow {
        animation-duration: 20s;
    }
    
    .asteroid {
        animation-duration: 15s; /* Замедляем астероиды */
    }
    
    .asteroid.small {
        animation-duration: 13s;
    }
    
    .asteroid.medium {
        animation-duration: 17s;
    }
    
    .asteroid.large {
        animation-duration: 20s;
    }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 360px) {
    .cube-container {
        perspective: 700px;
        padding: 0.3rem;
    }
    
    .face-content {
        padding: 0.8rem 0.8rem 4rem 0.8rem; /* Оптимизируем отступы для маленьких экранов */
        font-size: 0.85rem;
    }
    
    .face-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.8rem;
    }
    
    /* Контакты для очень маленьких экранов */
    .contact-link {
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .contact-link i {
        font-size: 1rem;
        margin-right: 0.6rem;
    }
    
    /* Навыки для очень маленьких экранов */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 0.3rem;
    }
    
    .skill-item {
        padding: 0.4rem;
        min-height: 55px;
    }
    
    .skill-item i {
        font-size: 0.9rem;
    }
    
    .skill-item span {
        font-size: 0.6rem;
    }
    
    /* Проекты для очень маленьких экранов */
    .project-item {
        padding: 0.7rem;
    }
    
    .project-item h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .project-item p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .project-language {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    .project-stars {
        font-size: 0.7rem;
    }
    
    .github-link {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
    
    /* Опыт для очень маленьких экранов */
    .experience-item {
        padding: 0.7rem;
    }
    
    .experience-item h3 {
        font-size: 0.9rem !important;
    }
    
    .company {
        font-size: 0.8rem !important;
    }
    
    .period {
        font-size: 0.7rem !important;
    }
    
    .achievements li {
        font-size: 0.75rem !important;
    }
    
    /* Образование для очень маленьких экранов */
    .education-card {
        padding: 0.7rem 0.8rem;
    }
    
    .education-card .degree {
        font-size: 0.8rem !important;
    }
    
    .education-card .field {
        font-size: 0.7rem !important;
    }
    
    /* Унификация размеров иконок образования для маленьких экранов */
    .education-card .fa-graduation-cap,
    .education-card .fa-user-graduate {
        font-size: 1.3rem !important;
    }
    
    /* Принципы для очень маленьких экранов */
    .principle-card {
        padding: 0.5rem;
        min-height: 60px;
    }
    
    .principle-card h5 {
        font-size: 0.75rem !important;
    }
    
    .principle-card p {
        font-size: 0.65rem !important;
    }
    
    /* Адаптация навигации для очень маленьких экранов */
    .cube-navigation {
        bottom: 0.5rem !important;
        padding: 0.5rem 0.8rem !important;
        gap: 0.5rem !important;
        border-radius: 20px !important;
    }
    
    .nav-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
    }
    
    .nav-divider {
        height: 22px !important;
    }
    
    /* Дополнительная фиксация мобильной навигации для маленьких экранов */
    .mobile-navigation {
        position: fixed !important;
        bottom: 0.5rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        max-width: calc(100vw - 1rem) !important;
        padding: 0.6rem !important;
        gap: 0.8rem !important;
        border-radius: 14px !important;
    }
    
    .mobile-navigation:hover {
        transform: translateX(-50%) translateY(-1px) !important;
    }
    
    .mobile-nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
    }
    
    .mobile-slide-indicators {
        padding: 0.15rem 0.3rem !important;
        gap: 0.3rem !important;
        border-radius: 8px !important;
    }
    
    .mobile-slide-indicator {
        width: 6px !important;
        height: 6px !important;
        border-radius: 3px !important;
    }
    
    /* Специальные правила для мобильного слайдера на маленьких экранах */
    .mobile-slide .face-content {
        height: 100vh !important; /* Полная высота */
        max-height: none !important; /* Убираем ограничение */
        min-height: 100vh !important;
        padding: 0.6rem 0.8rem 5rem 0.8rem !important; /* Больше места снизу */
        font-size: 0.85rem;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Дополнительный отступ для слайда "О себе" на маленьких экранах */
    .mobile-slide[data-slide="1"] .face-content {
        padding-bottom: 7rem !important;
    }
}

/* Экстра маленькие экраны (iPhone SE и подобные) */
@media (max-width: 320px) {
    .mobile-slide .face-content {
        height: 100vh !important; /* Полная высота */
        max-height: none !important; /* Убираем ограничение */
        min-height: 100vh !important;
        padding: 0.5rem 0.6rem 4.5rem 0.6rem !important; /* Больше места снизу */
        font-size: 0.8rem;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Дополнительный отступ для слайда "О себе" на очень маленьких экранах */
    .mobile-slide[data-slide="1"] .face-content {
        padding-bottom: 6rem !important;
    }
    
    .face-title {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .mobile-navigation {
        bottom: 0.3rem !important;
        padding: 0.4rem !important;
        gap: 0.6rem !important;
        border-radius: 12px !important;
    }
    
    .mobile-nav-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }
}

/* Экраны с маленькой высотой (landscape режим) */
@media (max-height: 500px) and (max-width: 768px) {
    .mobile-slide .face-content {
        height: 100vh !important; /* Полная высота */
        max-height: none !important; /* Убираем ограничение */
        min-height: 100vh !important;
        padding: 0.5rem 1rem 4rem 1rem !important; /* Больше места снизу */
        font-size: 0.8rem;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .face-title {
        font-size: 1rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .mobile-navigation {
        bottom: 0.2rem !important;
        padding: 0.3rem !important;
        gap: 0.5rem !important;
    }
    
    .mobile-nav-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
    }
    
    /* Уменьшаем размеры элементов для экономии места */
    .skill-item {
        padding: 0.3rem !important;
        min-height: 45px !important;
    }
    
    .principle-card {
        padding: 0.4rem !important;
        min-height: 50px !important;
    }
    
    .experience-item, .project-item {
        padding: 0.5rem !important;
        margin-bottom: 0.8rem !important;
    }
}

/* Мобильный горизонтальный слайдер */
.mobile-slider-container {
    display: none;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    z-index: 10;
}

.mobile-slides-wrapper {
    display: flex;
    width: 600vw; /* 6 слайдов по 100vw каждый */
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.mobile-slide {
    width: 100vw; /* Каждый слайд занимает полную ширину экрана */
    height: 100vh; /* Полная высота экрана */
    flex-shrink: 0;
    display: flex;
    align-items: flex-start; /* Контент начинается сверху */
    justify-content: flex-start; /* Контент начинается слева */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden; /* Запрещаем горизонтальный скролл */
    overflow-y: hidden; /* Скролл только внутри face-content */
    position: relative;
}

.mobile-slide .face-content {
    width: 100%;
    height: 100vh; /* Полная высота экрана */
    max-height: none; /* Убираем ограничение max-height */
    min-height: 100vh; /* Минимальная высота - полный экран */
    overflow-y: auto !important; /* Автоматический скролл */
    overflow-x: hidden !important;
    padding: 1rem 1rem 6rem 1rem; /* Больше отступа снизу для навигации */
    margin: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    position: relative;
    
    /* Улучшаем скролл на мобильных */
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    
    /* Дополнительные свойства для надежного скролла */
    will-change: scroll-position;
    transform: translateZ(0); /* Включаем аппаратное ускорение */
    
    /* Оптимизация для iOS */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    
    /* Улучшенная поддержка momentum scrolling */
    -webkit-overflow-scrolling: touch !important;
    overflow-scrolling: touch !important;
}

/* Стилизация скроллбара для мобильных */
.mobile-slide .face-content::-webkit-scrollbar {
    width: 3px;
}

.mobile-slide .face-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.mobile-slide .face-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.6);
    border-radius: 2px;
}

.mobile-slide .face-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

/* Убеждаемся что контент начинается с самого верха */
.mobile-slide .face-content > * {
    margin-top: 0 !important;
}

.mobile-slide .face-content > *:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Мобильная навигация в стиле principle-card */
.mobile-navigation {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    
    /* Стиль principle-card со скруглениями */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.8rem;
    
    /* Эффекты как у principle-card */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    
    z-index: 1001;
    max-width: calc(100vw - 2rem);
}

.mobile-navigation:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateX(-50%) translateY(-2px);
}

.mobile-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px; /* Скругленные углы */
    
    /* Стиль мини principle-card */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    min-height: 40px;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.mobile-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Индикаторы слайдов в стиле principle-card */
.mobile-slide-indicators {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-slide-indicators:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.mobile-slide-indicator {
    width: 8px;
    height: 8px;
    border-radius: 4px; /* Скругленные индикаторы */
    
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-slide-indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.mobile-slide-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Safari Warning Styles */
.safari-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    transition: all var(--transition-medium);
    opacity: 1;
    visibility: visible;
}

.safari-warning.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-20px);
}

.safari-warning-content {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(251, 191, 36, 0.95));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.2);
    position: relative;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.safari-warning-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safari-warning-icon i {
    font-size: 20px;
    color: #92400e;
}

.safari-warning-text {
    flex: 1;
    color: #92400e;
}

.safari-warning-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #78350f;
}

.safari-warning-text p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    color: #92400e;
}

.safari-warning-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.safari-warning-close:hover {
    background: rgba(146, 64, 14, 0.1);
    color: #78350f;
    transform: scale(1.1);
}

.safari-warning-close i {
    font-size: 12px;
}

/* Mobile Safari Warning Styles */
@media (max-width: 768px) {
    .safari-warning {
        top: 10px;
        width: 95%;
        max-width: none;
    }
    
    .safari-warning-content {
        padding: 16px;
        gap: 12px;
    }
    
    .safari-warning-text h3 {
        font-size: 15px;
    }
    
    .safari-warning-text p {
        font-size: 13px;
    }
    
    .safari-warning-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .safari-warning {
        top: 5px;
        width: 98%;
    }
    
    .safari-warning-content {
        padding: 14px;
        gap: 10px;
    }
    
    .safari-warning-text h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .safari-warning-text p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .safari-warning-icon i {
        font-size: 18px;
    }
}

 