/* ===================================
    MODERN PORTFOLIO CSS
    =================================== */

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

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f1f5f9;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --ai-color: #10b981;
    --fullstack-color: #3b82f6;
    --backend-color: #f59e0b;
    --mobile-color: #a855f7;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===================================
    ANIMATED BACKGROUND
    =================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

.bg-animation canvas {
    width: 100%;
    height: 100%;
}

/* ===================================
    NAVIGATION
    =================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===================================
    HERO SECTION
    =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 5%;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease 0.2s backwards;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient 3s linear infinite;
}

@keyframes gradient {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-dim);
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.typing-text {
    color: var(--accent);
    border-right: 2px solid var(--accent);
    padding-right: 5px;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.6s backwards;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* ===================================
    STATS SECTION
    =================================== */
.stats {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: rgba(99, 102, 241, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-dim);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ===================================
    SECTION STYLING
    =================================== */
section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-top: 1rem;
    font-weight: 800;
}

/* ===================================
    SKILLS SECTION
    =================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(99, 102, 241, 0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

/* ===================================
    CATEGORIZED PROJECTS SECTION
    =================================== */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.filter-btn[data-category="ai"].active {
    background: var(--ai-color);
}

.filter-btn[data-category="fullstack"].active {
    background: var(--fullstack-color);
}

.filter-btn[data-category="backend"].active {
    background: var(--backend-color);
}

.filter-btn[data-category="mobile"].active {
    background: var(--mobile-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    transition: all 0.5s ease;
}

.project-card {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.6s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.project-card[data-category="ai"]::before {
    background: var(--ai-color);
}

.project-card[data-category="fullstack"]::before {
    background: var(--fullstack-color);
}

.project-card[data-category="backend-python"]::before,
.project-card[data-category="backend-java"]::before {
    background: var(--backend-color);
}

.project-card[data-category="mobile"]::before {
    background: var(--mobile-color);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.project-card.hidden {
    display: none;
}

.project-header {
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.03);
}

.project-category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.badge-ai {
    background: rgba(16, 185, 129, 0.2);
    color: var(--ai-color);
}

.badge-fullstack {
    background: rgba(59, 130, 246, 0.2);
    color: var(--fullstack-color);
}

.badge-backend {
    background: rgba(245, 158, 11, 0.2);
    color: var(--backend-color);
}

.badge-mobile {
    background: rgba(168, 85, 247, 0.2);
    color: var(--mobile-color);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.project-description {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.3rem 0.6rem;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent);
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.project-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Project Count */
.project-count {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* ===================================
    EXPERIENCE SECTION
    =================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--darker);
}

.timeline-content {
    background: rgba(99, 102, 241, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: rgba(99, 102, 241, 0.3);
}

.timeline-date {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--primary);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-dim);
    line-height: 1.8;
}

/* ===================================
    CONTACT SECTION
    =================================== */
.contact {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.contact-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.contact-link svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: white;
}

/* ===================================
    FOOTER
    =================================== */
footer {
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--text-dim);
}

/* ===================================
    ANIMATIONS
    =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* ===================================
    SCROLL PROGRESS BAR
    =================================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===================================
    MOBILE MENU
    =================================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===================================
    RESPONSIVE DESIGN
    =================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

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

    .cta-buttons {
        flex-direction: column;
    }

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

    section {
        padding: 4rem 5%;
    }

    .hero {
        padding: 6rem 5%;
    }

    .project-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
}

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

    .section-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-links {
        gap: 1rem;
    }

    .contact-link {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}