/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body, html {
    height: 100%;
    background: linear-gradient(135deg, #f8f9ff 0%, #8DBBFC 100%);
    background-attachment: fixed;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #4776E6 0%, #6F54E8 100%);
    color: white;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, transparent 20%, rgba(255, 255, 255, 0.15) 20%, rgba(255, 255, 255, 0.15) 22%, transparent 22%, transparent);
    background-size: 20px 20px;
    transform: rotate(30deg);
    animation: backgroundMove 120s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: rotate(30deg) translate(0, 0); }
    100% { transform: rotate(30deg) translate(-100px, -100px); }
}

header h1 {
    color: #ffffff;
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    font-weight: 800;
    position: relative;
}

header h3 {
    font-weight: 300;
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 1px;
    position: relative;
    font-size: 1.5rem;
}

/* Профиль */
.profile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(5px);
    position: relative;
}

.profile::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #4776E6, #8E54E9, #4776E6, #8E54E9);
    z-index: -1;
    border-radius: 28px;
    animation: borderAnimation 8s linear infinite;
    background-size: 300% 300%;
}

@keyframes borderAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.photo-frame {
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    padding: 12px;
    box-shadow: 0 15px 25px rgba(71, 118, 230, 0.3);
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.photo-frame::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4776E6, #8E54E9, #4776E6, #8E54E9);
    z-index: -1;
    animation: rotate 10s linear infinite;
    filter: blur(15px);
    opacity: 0.7;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.photo-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.profile-text {
    max-width: 500px;
}

.profile-text h3 {
    color: #4776E6;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.profile-text p {
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Сетка проектов */
#container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #4776E6, #8E54E9);
}

.project-card a {
    display: block;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.3rem;
    margin-top: 20px;
    transition: color 0.3s ease;
    padding: 10px 0;
    position: relative;
    z-index: 1;
}

.project-card a:hover {
    color: #4776E6;
}

.project-card:nth-child(2n)::before {
    background: linear-gradient(90deg, #FF416C, #FF4B2B);
}

.project-card:nth-child(3n)::before {
    background: linear-gradient(90deg, #38ef7d, #11998e);
}

.project-card:nth-child(4n)::before {
    background: linear-gradient(90deg, #a8ff78, #78ffd6);
}

.project-card:nth-child(5n)::before {
    background: linear-gradient(90deg, #ff9966, #ff5e62);
}

/* Адаптивность */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    #container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .profile {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .photo-frame {
        width: 180px;
        height: 180px;
    }
    
    .photo-frame::before {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 15px;
    }
    
    header {
        padding: 30px 0;
        border-radius: 0 0 20px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    #container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
        gap: 25px;
    }
    
    .photo-frame {
        width: 160px;
        height: 160px;
    }
    
    .photo-frame::before {
        width: 180px;
        height: 180px;
    }
    
    .profile-text h3 {
        font-size: 1.5rem;
    }
}

/* Футер */
footer {
    text-align: center;
    margin-top: 80px;
    padding: 30px;
    color: #5a67d8;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(5px);
}

footer p {
    opacity: 0.9;
    letter-spacing: 0.5px;
    font-weight: 500;
}