Personalized learning remains a significant challenge in technology-enhanced education because student diversity in cognitive styles and attention regulation necessitates adaptive systems that can respond in real time. However, most existing adaptive learning technologies rely on predefined rules or limited behavioral datasets. This restricts their scalability and capacity to address heterogeneous learning needs. Although advances in artificial intelligence and computational modeling have enabled more dynamic forms of personalization, flexible frameworks that are technically validated and feasible for deployment in real-world educational environments are still needed. This study introduces an adaptive attention algorithm designed to enhance digital learning environments by dynamically adjusting content delivery based on indicators of student engagement. The proposed model integrates three components: a classification module that interprets interaction patterns and assigns difficulty levels, a real-time decision mechanism that selects instructional materials according to the classifications, and an adaptive feedback mechanism that adjusts the learning pace as engagement fluctuates. A Python-based prototype was developed and evaluated using simulated datasets that emulate diverse student interaction patterns. Preliminary validation focused on classification accuracy, system responsiveness, and scalability under controlled laboratory conditions. The results demonstrate the technical feasibility of the approach and its potential for integration into varied educational platforms, setting it apart from conventional, rule-based adaptive systems. Further empirical testing with higher education students is required, but the findings highlight the algorithm's potential as a computational foundation for bridging AI innovation with practical, scalable implementation in digital learning environments.