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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f1f5f9;
    --text-gray: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated background */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

.bg-animated::before,
.bg-animated::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.bg-animated::before {
    background: var(--primary);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.bg-animated::after {
    background: var(--secondary);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

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

/* Header */
header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    color: var(--text-light);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5%;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Section */
section {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Filter Buttons */
.filter-buttons {
    display: none;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-gray);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Projects Grid (Mobile) */
.projects-grid {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Columns (Desktop) */
.projects-columns {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.column-header {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Column-specific styling */
.category-column:nth-child(1) .column-header {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary);
}

.category-column:nth-child(2) .column-header {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--secondary);
}

.category-column:nth-child(3) .column-header {
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.3);
    color: var(--accent);
}

.projects-columns .project-card {
    display: flex;
    flex-direction: column;
    height: 320px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.projects-grid .project-card {
    display: none;
}

.projects-grid .project-card.show {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
}

.project-link.disabled {
    pointer-events: none;
    opacity: 0.6;
}

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

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

/* Card Header (program-style) */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--gradient-1);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.card-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.project-card[data-category="games"] .card-header,
.category-column:nth-child(2) .card-header {
    background: var(--gradient-2);
}

.project-card[data-category="apps"] .card-header,
.category-column:nth-child(3) .card-header {
    background: var(--gradient-3);
}

.project-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}


.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.2);
}

.project-category {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
}

.project-card[data-category="games"] .project-category {
    background: rgba(236, 72, 153, 0.2);
    color: var(--secondary);
}

.project-card[data-category="apps"] .project-category {
    background: rgba(20, 184, 166, 0.2);
    color: var(--accent);
}

.project-card[data-category="software"] .project-category {
    background: rgba(20, 184, 166, 0.2);
    color: var(--accent);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.project-content p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 0.95rem;
    height: 4.8rem;
    overflow: hidden;
}

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

.tag {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    width: fit-content;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-link:hover {
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(5px);
}

/* About Section */
.about {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.skills {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.skill {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 5%;
    color: var(--text-gray);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.5rem;
}

.social-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    /* Switch to mobile layout */
    .projects-columns {
        display: none;
    }

    .projects-grid {
        display: flex;
    }

    .filter-buttons {
        display: flex;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        gap: 1rem;
    }

    .hero {
        min-height: 70vh;
    }

    section {
        padding: 3rem 5%;
    }

    .project-image {
        height: 200px;
    }

    .project-content h3 {
        font-size: 1.5rem;
    }

    .project-content p {
        font-size: 1rem;
    }

    .about {
        padding: 2rem;
    }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav.active {
        left: 0;
    }
}
