/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background animations */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #4facfe, transparent),
        radial-gradient(2px 2px at 40px 70px, #00f2fe, transparent),
        radial-gradient(1px 1px at 90px 40px, #667eea, transparent),
        radial-gradient(1px 1px at 130px 80px, #764ba2, transparent),
        radial-gradient(2px 2px at 160px 30px, #f093fb, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(79, 172, 254, 0.1) 100%),
        linear-gradient(0deg, transparent 98%, rgba(0, 242, 254, 0.1) 100%);
    background-size: 50px 50px;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}

/* Header styles */
.header {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.title-text {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

.title-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate-reverse;
}

.title-underline {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #667eea, #764ba2);
    border-radius: 2px;
    animation: slide 3s ease-in-out infinite;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(79, 172, 254, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(79, 172, 254, 0.8)); }
}

@keyframes slide {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.1); }
}

.subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    font-weight: 300;
    animation: fadeInUp 1s ease-out 0.5s both;
    margin-bottom: 0.5rem;
}

.hostname {
    font-size: 0.9rem;
    color: #667eea;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.7s both;
}

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

/* Main content */
.main {
    padding: 40px 0 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Project cards */
.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(79, 172, 254, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.1));
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

.card-content {
    position: relative;
    z-index: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.project-card:hover .card-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.card-description {
    color: #a0a0a0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tech-tag {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4facfe;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transition: width 0.3s ease;
}

.card-link:hover {
    color: #00f2fe;
    transform: translateX(5px);
}

.card-link:hover::after {
    width: 100%;
}

.card-link i {
    transition: transform 0.3s ease;
}

.card-link:hover i {
    transform: translateX(3px);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: #666;
    font-size: 0.9rem;
}

.footer-text i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.footer-separator {
    margin: 0 10px;
    color: #444;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #4facfe;
}

/* Responsive design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        padding: 25px;
    }
    
    .header {
        padding: 60px 0 40px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .project-card {
        padding: 20px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Selection styles */
::selection {
    background: rgba(79, 172, 254, 0.3);
    color: #ffffff;
}

/* Focus styles for accessibility */
.project-card:focus-within {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

.card-link:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
    border-radius: 4px;
}
