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

:root {
    --dark-bg: #000000;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: rgba(255, 255, 255, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.page-transitioning {
    opacity: 0;
}

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

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: floatSmooth 25s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(120, 119, 198, 0.4), transparent);
    top: -150px;
    left: -150px;
}

.circle-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 118, 163, 0.3), transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: 8s;
}

.circle-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.35), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

@keyframes floatSmooth {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.2;
    }
    33% { 
        transform: translate(50px, -40px) scale(1.1); 
        opacity: 0.25;
    }
    66% { 
        transform: translate(-40px, 50px) scale(0.95); 
        opacity: 0.15;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(25px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    cursor: pointer;
}

.nav-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.3);
}

.hamburger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 13px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.hamburger span {
    width: 26px;
    height: 2.5px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger to X Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu Overlay - Full Width Dropdown */
.menu-overlay {
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: height 0.35s ease, opacity 0.35s ease, visibility 0s linear 0.35s;
}

.menu-overlay.active {
    height: auto;
    padding: 1.5rem 0;
    opacity: 1;
    visibility: visible;
    transition: height 0.35s ease, opacity 0.35s ease, visibility 0s linear 0s;
}

.menu-content {
    width: 100%;
    max-width: 600px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s;
}

.menu-overlay.active .menu-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.9rem 1.3rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.menu-item:active {
    transform: translateX(3px) scale(0.98);
}

.menu-item .menu-icon {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.9;
}

.menu-item:hover .menu-icon {
    transform: rotate(5deg) scale(1.1);
    opacity: 1;
}

/* Container */
.container {
    min-height: 100vh;
    padding: 2rem;
    padding-top: 120px;
    position: relative;
    z-index: 1;
    transform: translateY(0);
    transition: transform 0.35s ease;
}

.container.menu-open {
    transform: translateY(180px);
}

.projects-section {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease;
}

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

.header-text {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #808080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.github-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.stat-badge svg {
    width: 1.3rem;
    height: 1.3rem;
    opacity: 0.7;
}

.stat-badge span {
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-badge .label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    align-items: center;
    animation: fadeIn 1s ease 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-container {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.4;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.1rem 1.1rem 3.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.4rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    gap: 1.5rem;
}

.loading-state.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.project-card.clicked::after {
    width: 500px;
    height: 500px;
}

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

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-card:active {
    transform: translateY(-6px) scale(0.98);
}

.project-header {
    margin-bottom: 1.2rem;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.project-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lang-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    min-height: 48px;
}

.project-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-item svg {
    width: 1.1rem;
    height: 1.1rem;
}

.project-actions {
    display: flex;
    gap: 0.8rem;
}

.project-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.project-link:active::after {
    width: 300px;
    height: 300px;
}

.project-link:hover::before {
    opacity: 1;
}

.project-link svg {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-link span {
    position: relative;
    z-index: 1;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.project-link:hover svg {
    transform: scale(1.15) rotate(5deg);
}

.project-link:active {
    transform: translateY(0) scale(0.95);
}

/* Empty State */
.empty-state {
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 2rem;
    opacity: 0.2;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.8rem;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-content {
        padding: 1rem 1.5rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .github-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat-badge {
        width: 100%;
        justify-content: center;
    }

    .controls-bar {
        flex-direction: column;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding-top: 100px;
    }

    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .stat-badge {
        padding: 0.8rem 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }
}