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

:root {
    --primary-color: #61baf9;
    --secondary-color: #8cdbf4;
    --accent-color: #80ecff;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: cosmicShift 20s ease-in-out infinite;
}

@keyframes cosmicShift {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Animated Stars Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 60px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 50px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 10px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Nebula Particles */
.nebula-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle var(--anim-duration, 12s) linear var(--anim-delay, 0s) infinite;
    width: var(--size, 6px);
    height: var(--size, 6px);
    filter: blur(3px);
}

.particle.blue {
    background: radial-gradient(circle, rgba(0, 217, 255, 0.25), rgba(0, 217, 255, 0.25));
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.15);
}

.particle.purple {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.25), rgba(167, 139, 250, 0.25));
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.15);
}

@keyframes floatCurved {
    0% {
        transform: translate(0, 100vh) scale(0.2);
        opacity: 0.4;
    }
    10% { opacity: 0.8; }
    50% { transform: translate(20px, 0) scale(0.6); }
    90% { opacity: 0.8; }
    100% {
        transform: translate(-20px, -100vh) scale(0.8);
        opacity: 0.4;
    }
}

.curved {
    animation: floatCurved var(--anim-duration, 18s) linear var(--anim-delay, 0s) infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0.4;
        transform: translateY(100vh) scale(0.2);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.4;
        transform: translateY(-100vh) scale(0.8);
    }
}

body > * {
    position: relative;
    z-index: 3;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.mobile-menu-btn {
    display: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

/* Mobile Navigation */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1002;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
}

.mobile-nav.active {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.mobile-nav-header {
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.mobile-lang-toggle {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: var(--gradient);
    color: white;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Sections */
section {
    padding: 5rem 0;
}

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

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

/* Research Areas */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.research-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.research-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.research-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.research-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Papers Section */
.papers-grid {
    display: grid;
    gap: 2rem;
}

.paper-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.paper-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.paper-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.paper-authors {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.paper-venue {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.paper-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.paper-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.paper-link {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.paper-link:hover {
    background: var(--secondary-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.project-header {
    padding: 2rem 2rem 1rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.tech-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
    padding: 0 2rem 2rem;
    flex-wrap: wrap;
}

.project-link {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 30px;
}

.contact-text {
    color: var(--text-secondary);
}

.contact-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    font-size: 1.2rem;
}

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

/* Footer */
footer {
    background: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-secondary);
}

/* Language specific content visibility */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Mobile Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

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

    .mobile-overlay {
        display: block;
    }

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

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

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding-top: 6rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

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

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

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

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

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

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

    .paper-card,
    .project-card,
    .research-card {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin-bottom: 0.5rem;
    }

    .language-toggle {
        gap: 0.3rem;
    }

    .lang-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}

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

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

    .section-header h2 {
        font-size: 1.6rem;
    }

    .paper-title,
    .project-title {
        font-size: 1.1rem;
    }

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

    .research-icon {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-content {
        padding: 0 1rem;
    }
}