:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --background: #0f0f1e;
    --surface: #1a1a2e;
    --surface-light: #25254a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --accent: #ec4899;
    --success: #10b981;
    --shadow: rgba(99, 102, 241, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1a3e 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out;
}

.glitch {
    position: relative;
    display: inline-block;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

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

/* Project Cards */
.project-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out backwards;
}

.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::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px var(--shadow);
}

.project-card:hover::before {
    opacity: 0.1;
}

.card-content {
    position: relative;
    padding: 2rem;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.card-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-icon {
    font-size: 3rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--surface-light);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--primary-color);
}

.project-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: auto;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
    position: relative;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-grow: 1;
    justify-content: center;
}

.project-link:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px var(--shadow);
}

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

.project-link:hover i {
    transform: translateX(5px);
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--surface-light);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.github-link:hover {
    background: var(--primary-color);
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 5px 20px var(--shadow);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--surface-light);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-content {
        padding: 1.5rem;
        min-height: 250px;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .project-link {
        width: 100%;
    }
    
    .github-link {
        position: absolute;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}
