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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
}

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: inline;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
}

/* ========== ИСПРАВЛЕНИЕ ЛОГОТИПА НА МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo-img {
        height: 32px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Главная секция */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    will-change: transform;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    will-change: transform;
    transform: translateZ(0);
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--gradient-3);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========== ИСПРАВЛЕНИЕ КНОПОК НА МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        text-align: center;
    }
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.hero-image {
    position: relative;
    height: 500px;
    animation: fadeInRight 1s ease-out;
}

.app-cube {
    position: absolute;
    width: 120px;
    height: 120px;
    transform-style: preserve-3d;
    animation: floatCube 6s infinite ease-in-out;
}

.cube-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.cube-2 {
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.cube-3 {
    bottom: 15%;
    left: 35%;
    animation-delay: 4s;
}

.cube-4 {
    top: 20%;
    right: 25%;
    animation-delay: 1s;
    z-index: 10;
}

.cube-face {
    width: 100%;
    height: 100%;
    position: absolute;
    background: var(--dark-surface);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.app-cube:hover .cube-face {
    transform: translateZ(20px);
    border-color: var(--primary-color);
    box-shadow: 
        0 15px 40px rgba(99, 102, 241, 0.4),
        inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.cube-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 16px;
}

.cube-face.fallback::after {
    content: attr(data-fallback);
    font-size: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cube-face.fallback {
    font-size: 3.5rem;
}


@keyframes floatCube {
    0%, 100% {
        transform: translateY(0) rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: translateY(-15px) rotateY(5deg) rotateX(2deg);
    }
    50% {
        transform: translateY(-25px) rotateY(0deg) rotateX(0deg);
    }
    75% {
        transform: translateY(-15px) rotateY(-5deg) rotateX(-2deg);
    }
}

/* Секции */
section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Проекты */
.projects {
    background: var(--dark-surface);
}

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

.project-card {
    background: var(--dark-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image.app-store-style {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem;
    position: relative;
}

.project-image.app-store-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.project-image.app-store-style.fallback-icon::after {
    content: attr(data-fallback);
    font-size: 4rem;
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.app-icon {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-card:hover .app-icon {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* ========== УБИРАЕМ OVERLAY НА МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    .project-overlay {
        display: none !important;
    }
}

.project-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--dark-surface);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* О себе */
.about {
    padding: 5rem 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills {
    margin-top: 3rem;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--dark-surface);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.skill-item:hover {
    background: var(--dark-surface-hover);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Контакты */
.contact {
    background: var(--dark-surface);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Футер */
.footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    /* ========== ИСПРАВЛЕНИЕ НАВИГАЦИИ ========== */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        flex-direction: column;
        background: var(--dark-surface);
        width: 100%;
        padding-top: 64px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 1.5rem;
        margin: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        height: 100vh;
        overflow-y: auto;
        z-index: 999;
        display: flex;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li:first-of-type {
        margin-top: 0;
    }
    
    .nav-menu li:last-of-type {
        margin-bottom: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* ========== ИСПРАВЛЕНИЕ ГЛАВНОЙ СЕКЦИИ ========== */
    .hero {
        padding-top: 70px;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }

    .hero-image {
        height: 280px;
        margin-top: 1rem;
    }

    .app-cube {
        width: 80px;
        height: 80px;
    }

    .cube-icon {
        width: 55px;
        height: 55px;
    }
    
    .cube-face.fallback {
        font-size: 2.5rem;
    }

    .cube-1 {
        top: 10%;
        left: 5%;
    }

    .cube-2 {
        top: 45%;
        right: 5%;
    }

    .cube-3 {
        bottom: 10%;
        left: 30%;
    }

    .cube-4 {
        top: 15%;
        right: 20%;
    }

    /* ========== ИСПРАВЛЕНИЕ СЕКЦИЙ ========== */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }

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

    .app-icon {
        width: 100px;
        height: 100px;
    }

    .project-image.app-store-style {
        padding: 2rem;
    }
    
    .project-content {
        padding: 1.25rem;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .project-description {
        font-size: 0.95rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .contact-item {
        gap: 1rem;
    }
    
    .contact-icon {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    /* ========== ИСПРАВЛЕНИЕ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ ========== */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-menu {
        padding-top: 52px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-img {
        height: 28px;
    }

    .hero {
        padding-top: 60px;
        padding-bottom: 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
        line-height: 1.6;
    }

    .hero-buttons {
        gap: 0.6rem;
    }
    
    .hero-buttons .btn {
        max-width: 100%;
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
    }

    .hero-image {
        height: 250px;
    }

    .app-cube {
        width: 70px;
        height: 70px;
    }

    .cube-icon {
        width: 50px;
        height: 50px;
    }
    
    .cube-face.fallback {
        font-size: 2rem;
    }
    
    .cube-1 {
        top: 8%;
        left: 3%;
    }

    .cube-2 {
        top: 42%;
        right: 3%;
    }

    .cube-3 {
        bottom: 8%;
        left: 25%;
    }

    .cube-4 {
        top: 12%;
        right: 15%;
    }

    section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }

    .app-icon {
        width: 85px;
        height: 85px;
    }

    .project-image.app-store-style {
        padding: 1.5rem;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    .contact-icon {
        font-size: 1.3rem;
        width: 45px;
        height: 45px;
    }
    
    .contact-item h3 {
        font-size: 1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .skill-item {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
}

