:root {
    --primary-color: #8A2BE2;
    --secondary-color: #FF6B6B;
    --text-color: #ffffff;
    --background-color: #0a0a0a;
    --card-background: rgba(255, 255, 255, 0.05);
    --accent-color: #00ff88;
    --glow-color: rgba(138, 43, 226, 0.3);
    --glass-background: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background: 
        radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        var(--background-color);
    background-attachment: fixed;
}

header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
    background: transparent;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(138, 43, 226, 0.1) 45%,
        rgba(255, 107, 107, 0.1) 55%,
        transparent 100%
    );
    animation: rotate 20s linear infinite;
}

h1 {
    font-size: 5em;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 1s ease, glow 2s ease-in-out infinite alternate;
}

h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 40px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

p {
    font-size: 1.2em;
    line-height: 1.8;
    margin: 20px auto;
    max-width: 800px;
    color: rgba(255, 255, 255, 0.9);
}

section {
    padding: 120px 20px;
    position: relative;
}

#about {
    backdrop-filter: blur(10px);
    background: var(--glass-background);
    margin: 40px auto;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    max-width: 1000px;
}

#portfolio {
    max-width: 1200px;
    margin: 0 auto;
}

#portfolio .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    perspective: 1000px;
    opacity: 1;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item {
    background: var(--glass-background);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.item h3 {
    color: var(--accent-color);
    font-size: 1.5em;
    margin: 15px 0;
}

.item p {
    margin: 10px 0;
    font-size: 1.1em;
    color: var(--text-color);
}

.item i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.item:hover i {
    transform: scale(1.1) translateZ(30px);
}

.item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.item:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.2),
        0 0 30px var(--glow-color);
    border-color: var(--accent-color);
}

.item:hover img {
    transform: scale(1.05) translateZ(20px);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #27ae60;
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.3),
        0 0 20px var(--accent-color);
    text-decoration: none;
    color: white;
}

#contact {
    background: var(--glass-background);
    border-radius: 30px;
    margin: 40px auto;
    padding: 60px;
    max-width: 800px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 30px var(--secondary-color);
    }
    to {
        text-shadow: 
            0 0 20px var(--primary-color),
            0 0 30px var(--primary-color),
            0 0 40px var(--secondary-color);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.5s;
}

@media (max-width: 768px) {
    h1 {
        font-size: 3em;
    }
    
    h2 {
        font-size: 2em;
    }
    
    .item {
        margin: 10px;
        padding: 20px;
    }
    
    section {
        padding: 60px 20px;
    }
    
    #contact {
        padding: 30px;
    }
}

.header-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 5px solid var(--accent-color);
    box-shadow: 0 0 20px var(--glow-color);
    animation: pulse 2s infinite alternate;
    object-fit: cover;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 20px var(--glow-color);
    }
    to {
        box-shadow: 0 0 30px var(--accent-color);
    }
}
