/**
 * Components
 * Reusable UI components: Navbar, Buttons, Cards, Badges
 */

/* =============================================
   Navigation
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 26, 0.95);
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-links a.active {
    color: var(--primary-color);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* =============================================
   Theme Toggle Button
   ============================================= */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* =============================================
   Social Links
   ============================================= */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* =============================================
   Publication Badges
   ============================================= */
.pub-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.pub-badge.highlight {
    background: rgba(220, 38, 127, 0.1);
    color: #c2185b;
    border: 1px solid rgba(220, 38, 127, 0.2);
}

.pub-badge.oral {
    background: rgba(25, 118, 210, 0.1);
    color: #1565c0;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.pub-badge.best-paper {
    background: rgba(255, 160, 0, 0.1);
    color: #e65100;
    border: 1px solid rgba(255, 160, 0, 0.2);
}

/* =============================================
   Publication Links
   ============================================= */
.pub-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.pub-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    color: var(--text-secondary);
}

.pub-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* =============================================
   Back to Top Button
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* =============================================
   GitHub Stars Badge
   ============================================= */
.github-stars {
    display: block;
    margin-top: 0.75rem;
    height: 20px;
}

/* =============================================
   Scroll Animations
   ============================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
