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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0f1e;
    background: linear-gradient(135deg, #0a0f1e 0%, #0f172a 100%);
    color: #f1f5f9;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a78bfa;
}

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

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links a.active { color: #a78bfa; font-weight: 600; }

/* Кнопка меню (исправленная "точка") */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: #a78bfa;
    border-radius: 10px;
    transition: 0.3s;
}

/* Hero & Cube */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.cube-icon {
    color: #a78bfa;
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.draw-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 2s forwards ease-out;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 3rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: #a78bfa;
    color: #fff;
    border-color: #a78bfa;
}

/* Grid & Cards */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 5%;
}

.work-card {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.work-card.show { opacity: 1; transform: translateY(0); }
.work-card:hover { transform: translateY(-8px); border-color: #a78bfa; }

.work-card img { width: 100%; height: 240px; object-fit: cover; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 80%; border-radius: 10px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        flex-direction: column;
        background: #0f172a;
        padding: 2rem;
        text-align: center;
    }
    .nav-links.active { display: flex; }
    /* Анимация гамбургера */
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

.footer { text-align: center; padding: 4rem 0; }
.btn-back { color: #94a3b8; text-decoration: none; border-bottom: 1px solid transparent; transition: 0.3s; }
.btn-back:hover { color: #a78bfa; border-color: #a78bfa; }
