Food security resilience has become an increasingly critical global concern due to the combined effects of climate change, population growth, and resource scarcity. Conventional agricultural practices are no longer sufficient to meet rising food demands, thereby necessitating the adoption of intelligent and adaptive technological solutions. Smart farming, enabled by the integration of the Internet of Things (IoT) and Artificial Intelligence (AI), has emerged as a promising approach to enhance agricultural productivity, efficiency, and sustainability. However, existing smart farming systems remain fragmented and lack adaptive and cognitive capabilities required to dynamically respond to environmental variability. This study proposes an adaptive-cognitive smart farming architecture that integrates IoT, AI, edge-fog-cloud computing, federated learning, and digital twin technologies into a unified framework. A Systematic Literature Review (SLR) is conducted to synthesize insights from 60 high-quality publications indexed in IEEE, Elsevier, and Scopus databases. The proposed architecture adopts a multi-layered design consisting of sensing, edge-fog, cloud, cognitive, and application layers, enabling real-time data processing, distributed intelligence, and adaptive decision-making. To validate the proposed model, experimental simulations are performed using key performance indicators, including accuracy, mean squared error (MSE), latency, and resource efficiency. The results indicate that the proposed approach achieves superior performance, with an accuracy of 89%, a substantial reduction in latency, and improved resource utilization. These findings demonstrate that incorporating adaptive and cognitive intelligence significantly enhances system responsiveness and decision-making capabilities. This study contributes to both theory and practice by introducing a comprehensive framework for next-generation smart farming systems, ultimately supporting food security resilience in an increasingly uncertain environment.