/* Premium Light Theme with Advanced Animations */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --light-100: #ffffff;
    --light-200: #f8fafc;
    --light-300: #f1f5f9;
    --light-400: #e2e8f0;
    --light-500: #cbd5e1;
    --purple: #a855f7;
    --blue: #3b82f6;
    --pink: #ec4899;
    --cyan: #06b6d4;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(20, 184, 166, 0.06) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 40px rgba(236, 72, 153, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* Premium Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::before {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.bar {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section - Premium Design */
.hero {
    min-height: 90vh;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 243, 255, 0.9) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102,241, 0.15), transparent);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
    z-index: 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.btn {
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    backdrop-filter: blur(10px);
    border: 2px solid var(--light-400);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--light-200);
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.hero-image {
    animation: fadeInUp 1s ease 0.4s backwards;
    position: relative;
}

.hero-image img {
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: translateY(-10px);
}

.about-stats {
    background: white;
    backdrop-filter: blur(20px) saturate(180%);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--light-400);
    box-shadow: var(--shadow-xl);
}

.stat {
    text-align: center;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: scale(1.05);
}

.stat h3 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.stat p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Team Section - Card Design */
.team {
    padding: 8rem 2rem;
    position: relative;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.team-member {
    background: white;
    backdrop-filter: blur(20px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--light-400);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    transition: left 0.6s ease;
}

.team-member:hover::before {
    left: 100%;
}

.team-member:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

.member-avatar {
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: all 0.4s ease;
    position: relative;
}

.member-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: glow 3s ease-in-out infinite;
    z-index: -1;
}

.team-member:hover .member-avatar {
    transform: scale(1.1);
}

.team-member:hover .member-avatar::after {
    opacity: 0.5;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
}

.team-member h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.member-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-300);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.member-social a:hover {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    transform: translateY(-3px);
}

/* Projects Section */
.projects {
    padding: 8rem 2rem;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--light-400);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

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

.project-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border-radius: 20px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(-5deg);
}

.project-card h3 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Citation Section */
.citation {
    padding: 8rem 2rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, white 100%);
}

.citation-content {
    background: white;
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--light-400);
    position: relative;
    box-shadow: var(--shadow-lg);
}

.citation-content button {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.citation-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.citation-content pre {
    background: var(--light-200);
    padding: 2.5rem;
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid var(--light-400);
}

.citation-content code {
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Resources Section */
.contact {
    padding: 8rem 2rem;
    background: white;
}

.contact-info h3 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 3rem;
    background: white;
    backdrop-filter: blur(20px);
    border: 2px solid var(--light-400);
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    transition: left 0.4s ease;
    z-index: -1;
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Footer */
.footer {
    background: var(--light-200);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--light-400);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo p {
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    border: 1px solid var(--light-400);
}

.social-icons a:hover {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    transform: translateY(-5px);
    border-color: transparent;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--light-400);
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        padding: 3rem 0;
        transition: left 0.4s ease;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

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

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

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

    .social-link {
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }
}

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

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

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

/* Page Loading Animation */
body.loading {
    overflow: hidden;
}

body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    animation: fadeOut 0.5s ease 0.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Pulse animation for stats */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat:hover h3 {
    animation: pulse 0.5s ease;
}

.hero-content,
.hero-image,
.project-card,
.team-member {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}