:root {
    --primary: #4361ee;
    --secondary: #3a0ca3; 
    --accent: #4cc9f0;     
    --accent2: #f72585;   
    --background: #f8f9fa;
    --text: #2b2d42;
    --light: #e9ecef;
}

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

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

.nav-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

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

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

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

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 80px;
}

header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(74, 107, 238, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(58, 12, 163, 0.3) 0%, transparent 40%);
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

header p {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 2;
    opacity: 0.9;
}

.badges {
    margin: 1.5rem 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.03);
    border: 1px solid var(--light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(67, 97, 238, 0.1);
}

h2 {
    color: var(--secondary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    position: relative;
    font-size: 2.2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
}

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

.feature-card {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--light);
    position: relative;
    overflow: hidden;
}

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

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(67, 97, 238, 0.15);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

footer {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-radius: 30px 30px 0 0;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s;
}

footer a:hover {
    text-decoration: underline;
    color: white;
}

#gallery .section-description {
    text-align: center;
    margin-bottom: 3rem;
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 3rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.2);
}

.image-container {
    position: relative;
    overflow: hidden;
    background: #f0f4ff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: fixed;
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%); 
    width: 90%; 
    max-width: 600px; 
    background: rgba(58, 12, 163, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none; 
}

.overlay-content {
    color: white;
    padding: 0.5rem;
}

.overlay-content h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.overlay-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 1.2rem;
}

.tech-tags {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.tech-tags span {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 500;
}

@media (max-width: 768px) {
    nav ul {
        gap: 1.2rem;
        justify-content: center;
    }
    
    header {
        padding: 6rem 0 4rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 2rem 1.5rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .image-overlay {
        width: calc(100% - 40px);
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

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

.section {
    animation: fadeIn 0.6s ease-out forwards;
}

@media (max-width: 768px) {
    .image-overlay {
        width: calc(100% - 40px);
        max-width: none;
        left: 20px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .image-overlay {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-item {
        cursor: pointer; 
    }
    
    .image-overlay {
        bottom: 10px;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        transform: none;
        max-width: none;
    }
}

#features { animation-delay: 0.1s; }
#how-it-works { animation-delay: 0.2s; }
#gallery { animation-delay: 0.3s; }
#tech-stack { animation-delay: 0.4s; }