
.sidebar-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sidebar {
    position: fixed;
    left: var(--layout-offset);
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
    will-change: transform;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    height: 100%;
    padding-right: 1.5rem;
}

.profile-photo {
    width: 240px;
    height: 240px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #0047AB;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    align-self: flex-end;
}

.sidebar-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    text-align: right;
    width: 100%;
}

.affiliation-text {
    font-size: 0.99rem;
    font-weight: 600;
    font-style: italic;
    color: #0047AB;
    margin-top: 0;
    margin-bottom: 0.25rem;
    text-align: right;
    line-height: 1.4;
    width: 100%;
}

.sidebar-title {
    font-size: 0.99rem;
    font-weight: 600;
    font-style: italic;
    color: #0047AB;
    margin-bottom: 0.25rem;
    text-align: right;
    line-height: 1.4;
    width: 100%;
}

.sidebar-separator {
    width: 100%;
    height: 3px;
    background-color: #0047AB;
    margin: 1.5rem 0;
    border: none;
    display: block;
    align-self: flex-end;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sidebar-links li {
    margin-bottom: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 400;
    justify-content: flex-end;
    width: 240px;
}

.sidebar-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

.sidebar-link.email i { color: #0047AB; }
.sidebar-link.scholar i { color: #0047AB; }
.sidebar-link.linkedin i { color: #0047AB; }
.sidebar-link.twitter i { color: #0047AB; }
.sidebar-link.bluesky i { color: #0047AB; }
.sidebar-link.github i { color: #0047AB; }
.sidebar-link.cv i { color: #0047AB; }
    
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background-color: #0047AB;
    color: #fff;
    border: none;
    padding: 0.65rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.mobile-menu-toggle i {
    font-size: 1.1rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .sidebar {
        left: 0 !important;
        transform: translateX(-100%);
        width: 280px;
        padding: 1.5rem 1rem;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar-toggle:checked ~ .sidebar {
        transform: translateX(0) !important;
    }

    .sidebar-toggle:checked ~ .sidebar-overlay {
        display: block;
    }
    
    .sidebar-toggle:not(:checked) ~ .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar-toggle:not(:checked) ~ .sidebar {
        transform: translateX(-100%) !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.6rem 0.75rem;
        z-index: 1002;
    }

    .main-content {
        margin-left: 0;
        margin-right: 0;
    }
    
    .sidebar-content {
        padding-right: 1rem;
    }
    
    .profile-photo {
        width: 180px;
        height: 180px;
        align-self: flex-end;
    }
    
    .sidebar-name {
        font-size: 1.1rem;
    }
    
    .sidebar-title {
        font-size: 0.9375rem;
    }
    
    .affiliation-text {
        font-size: 0.875rem;
    }
    
    .sidebar-link {
        font-size: 0.9375rem;
        padding: 0.4rem 0;
        width: 180px;
    }
    
    .sidebar-separator {
        width: 70%;
    }
}

@media (min-width: 1201px) {
    .mobile-menu-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}
