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

:root {
    --primary-dark: #0a0a0a;
    --secondary-dark: #1a1a1a;
    --accent-gray: #2a2a2a;
    --light-gray: #888;
    --lighter-gray: #aaa;
    --white: #e0e0e0;
    --glow-color: #666;
    --card-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-dark);
    color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.05;
    animation: floatParticle 20s ease-in-out infinite;
}

.particles::before {
    background: radial-gradient(circle, #666 0%, transparent 70%);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.particles::after {
    background: radial-gradient(circle, #888 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(40px, 40px) scale(1.05); }
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(26, 26, 26, 0.3) 50%, transparent 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.01) 2px, rgba(255, 255, 255, 0.01) 4px);
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.title {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: titleFloat 6s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    filter: blur(30px);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--light-gray);
    font-weight: 300;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

/* Project Card */
.project-card {
    position: relative;
    background: var(--secondary-dark);
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: cardFadeIn 0.8s ease-out both;
    animation-delay: calc(var(--index, 0) * 0.1s);
}

.project-card[data-index="0"] { animation-delay: 0.1s; }
.project-card[data-index="1"] { animation-delay: 0.2s; }
.project-card[data-index="2"] { animation-delay: 0.3s; }
.project-card[data-index="3"] { animation-delay: 0.4s; }
.project-card[data-index="4"] { animation-delay: 0.5s; }
.project-card[data-index="5"] { animation-delay: 0.6s; }
.project-card[data-index="6"] { animation-delay: 0.7s; }

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--accent-gray) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

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

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.project-card:hover .card-glow {
    opacity: 1;
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.holographic-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover .holographic-layer {
    opacity: 1;
    animation: holographicShift 3s ease-in-out infinite;
}

@keyframes holographicShift {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* Neural Network Effect */
.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover .neural-network {
    opacity: 0.3;
}

.neural-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--lighter-gray);
    border-radius: 50%;
    animation: neuralPulse 2s ease-in-out infinite;
}

.neural-dot:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.neural-dot:nth-child(2) {
    top: 30%;
    right: 20%;
    animation-delay: 0.5s;
}

.neural-dot:nth-child(3) {
    bottom: 25%;
    left: 25%;
    animation-delay: 1s;
}

.neural-dot:nth-child(4) {
    bottom: 20%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes neuralPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.1));
}

.project-card:hover .icon {
    transform: scale(1.2) rotateY(360deg);
    filter: drop-shadow(0 10px 25px rgba(255, 255, 255, 0.3));
}

.project-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
    transition: color 0.3s ease;
}

.project-card:hover .project-name {
    color: #ffffff;
}

.project-description {
    font-size: 1rem;
    color: var(--light-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.project-card:hover .project-description {
    color: var(--lighter-gray);
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--light-gray);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.project-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
}

.footer p {
    color: var(--light-gray);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.footer-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: footerGlowPulse 4s ease-in-out infinite;
}

@keyframes footerGlowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        padding: 30px 25px;
    }
    
    .icon {
        font-size: 3rem;
    }
    
    .project-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 40px 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .header {
        margin-bottom: 50px;
    }
}