/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(90deg, #d645d6, #902cb8, #730099);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Шапка */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    text-align: center;
}


.rounded-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    transform: perspective(500px) rotateX(10deg) rotateY(10deg);
    transition: transform 0.5s ease;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.rounded-image:hover {
    transform: perspective(500px) rotateX(0) rotateY(0);
}

h1 {
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.1em;
    animation: typing 2s steps(17, end), blink 0.5s step-end infinite alternate;
    background-color: white;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    margin: 0;
}

/* Проекты */
.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin: 50px 20px;
    max-width: 1200px;
}

.card {
    background-color: rgba(12, 12, 12, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 260px;
    transform: rotateY(10deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: rotateY(0);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
}

.card h2 {
    font-size: 1.4em;
    margin: 16px 16px 10px;
    color: white;
}

.card p {
    font-size: 1em;
    margin: 0 16px 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.button {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to right, #007BFF, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin: 0 16px 16px;
    transition: background 0.3s;
    font-weight: bold;
}

.button:hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 1.2s forwards;
}

@keyframes shine {
    to { left: 100%; }
}

/* Соцсети */
.social-buttons {
    display: flex;
    gap: 16px;
    margin: 30px 0 50px;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-button:hover {
    background-color: rgba(100, 100, 100, 0.5);
    transform: scale(1.15) rotate(8deg);
    opacity: 1;
}

/* Анимации */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-right-color: transparent; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .projects-container {
        gap: 16px;
    }

    .card {
        width: 100%;
        max-width: 320px;
    }

    h1 {
        font-size: 2rem;
    }

    .rounded-image {
        width: 80px;
        height: 80px;
    }
}
