/* Navigation bar */
.nav {
    background-color: var(--nav-bg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    opacity: 0.9;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
    text-decoration: none;
}

/* Theme toggle button */
.theme-toggle {
    background-color: transparent;
    color: var(--nav-text);
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--button-bg);
    color: var(--nav-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--button-hover);
    text-decoration: none;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 10px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav a {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 5px;
    }

    .nav a {
        padding: 4px 6px;
        font-size: 0.85rem;
    }
}

.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    opacity: 0.9;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background-color: var(--nav-text);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after {
    transform: scaleX(0.7);
}

.nav-links a.active {
    opacity: 1;
}

.nav-links a.active::after {
    transform: scaleX(1);
}

/* Publications dropdown arrow */
.nav-links a.has-subnav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-links a.has-subnav::before {
    content: '▾';
    display: inline-block;
    font-size: 0.8em;
    transition: transform 0.3s ease;
    margin-right: 2px;
}

.nav-links a.has-subnav:hover::before {
    transform: translateY(2px);
}

/* Sub Navigation Links */
.sub-nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 5px 0;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
}

.sub-nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--nav-text);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.sub-nav-links a:hover {
    opacity: 1;
}

.sub-nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.sub-nav-links a.active {
    opacity: 1;
}

.sub-nav-links a.active::after {
    transform: scaleX(1);
} 