:root {
    /* Ultra Modern Dark Theme */
    --bg-primary: #0a0a12;
    --bg-secondary: rgba(20, 20, 35, 0.8);
    --bg-gradient: linear-gradient(135deg, #0a0a12 0%, #15152b 100%);
    --glass-bg: rgba(30, 30, 50, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-gradient: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    --card-shadow: rgba(0, 0, 0, 0.5);
    --tag-bg: rgba(30, 30, 50, 0.9);
    --card-border: rgba(255, 255, 255, 0.05);
    --header-bg: rgba(15, 15, 25, 0.9);
}

.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #2563eb;
    --accent-secondary: #4f46e5;
    --accent-gradient: linear-gradient(90deg, #2563eb, #4f46e5);
    --card-shadow: rgba(0, 0, 0, 0.08);
    --tag-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.05);
    --header-bg: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.4s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animated Background Elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(60px);
}

.bg-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    left: -200px;
    animation: float 20s infinite ease-in-out;
}

.bg-2 {
    width: 700px;
    height: 700px;
    background: var(--accent-secondary);
    bottom: -300px;
    right: -200px;
    animation: float 25s infinite ease-in-out reverse;
}

.bg-3 {
    width: 500px;
    height: 500px;
    background: var(--accent-tertiary);
    top: 50%;
    left: 40%;
    animation: float 18s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-30px, 30px) rotate(5deg);
    }
    50% {
        transform: translate(15px, -25px) rotate(-5deg);
    }
   75% {
        transform: translate(20px, 15px) rotate(3deg);
    }
}

/* Header Styles */
header {
    padding: 18px 0;
    background-color: var(--header-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    background: var(--accent-gradient);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Hero Section - MODIFIED */
.hero {
    padding: 60px 0 40px; /* Reduced from 120px 0 80px */
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 30px 25px; /* Reduced from 60px 40px */
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-gradient);
}

.hero h2 {
    font-size: 2.8rem; /* Reduced from 3.5rem */
    margin-bottom: 15px; /* Reduced from 20px */
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem; /* Reduced from 1.4rem */
    color: var(--text-secondary);
    margin-bottom: 20px; /* Reduced from 40px */
    line-height: 1.8;
}

.typed-text {
    color: var(--accent-primary);
    font-weight: 700;
    position: relative;
}

/* Filter Section */
.filters-container {
    margin-bottom: 60px;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 10px;
}

.filter-btn {
    padding: 14px 26px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    padding: 20px 0 70px;
}

.project-card {
    background: var(--glass-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -10px var(--card-shadow);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.12);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
}

.tags {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 14px;
    background-color: var(--tag-bg);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
}

.card-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    flex-grow: 1;
    line-height: 1.7;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    padding: 14px 26px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    padding: 14px;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 90px 20px;
    display: none;
    background: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
}

.no-results i {
    font-size: 5.5rem;
    margin-bottom: 28px;
    color: var(--accent-secondary);
    opacity: 0.8;
}

.no-results h3 {
    font-size: 2.2rem;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.no-results p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: var(--glass-bg);
    padding: 60px 0;
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 35px;
}

.social-links a {
    color: var(--text-primary);
    font-size: 2rem;
    transition: all 0.3s ease;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    color: white;
    background: var(--accent-gradient);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 25px;
}

.footer-text span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 99;
    border: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 28px;
    }
    
    .hero {
        padding: 50px 0 30px;
    }
    
    .hero-content {
        padding: 25px 20px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .social-links a {
        width: 55px;
        height: 55px;
        font-size: 1.7rem;
    }

    .scroll-to-top {
        bottom: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        gap: 18px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }

    .card-content {
        padding: 22px;
    }
    
    .social-links {
        gap: 18px;
    }
    
    .social-links a {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .social-links {
        gap: 15px;
        flex-wrap: wrap;
        max-width: 90%;
        margin: 0 auto 30px;
    }
    
    .social-links a {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 12px;
    }
    
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .footer-text {
        font-size: 0.95rem;
        padding: 0 15px;
    }
}