/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --text-light: #1e293b;
    --text-dark: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --text-light: #f8fafc;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

[data-theme="dark"] #particles-js {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Glassmorphism Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 20px 40px 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    z-index: 2;
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-card {
    flex: 1;
    max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-card img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

.social-icons-hero {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

.social-btn:hover {
    transform: translateY(-5px);
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* Sections General */
.section-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Publication Cards */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.pub-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.pub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.pub-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pub-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.pub-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.pub-journal {
    font-style: italic;
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Gallery Masonry */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.gallery-item img {
    width: 100%;
    border-radius: 12px;
    display: block;
    transition: transform 0.5s ease;
}

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

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: -10px;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

/* Software Card - Terminal Style */
.terminal-card {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
}

.terminal-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-red {
    background: #ff5f56;
}

.btn-yellow {
    background: #ffbd2e;
}

.btn-green {
    background: #27c93f;
}

.terminal-body {
    padding: 25px;
}

.cmd-line {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.cmd-prompt {
    color: #27c93f;
}

.cmd-text {
    color: #fff;
}

.output {
    color: #d4d4d4;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        margin-top: 80px;
    }

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

    .nav-links {
        display: none;
    }

    /* Mobile Menu would need JS */

    .gallery-grid {
        column-count: 1;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: 21px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }

    .timeline-dot {
        left: 21px;
        right: auto;
    }
}