/*
Theme Name: SH Core Portfolio WP Theme
Author: Shahadat Hossen
Description: A highly secure, lightweight, and modern portfolio & blogging theme with Local Bengali Fonts and sticky menu.
Version: 1.3.0
Text Domain: sh-core-portfolio
*/

/* =========================================
   Local Custom Fonts Definition
   ========================================= */

/* Logo Font */
@font-face {
    font-family: 'Headline Bangla';
    src: url('./assets/fonts/Headline Bangla.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Body Text Font (Regular) */
@font-face {
    font-family: 'Noto Serif Bengali';
    src: url('./assets/fonts/NotoSerifBengali-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Sub-Heading/Bold Text Font (SemiBold) */
@font-face {
    font-family: 'Noto Serif Bengali';
    src: url('./assets/fonts/NotoSerifBengali-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Heading Font (Bold) */
@font-face {
    font-family: 'Noto Serif Bengali';
    src: url('./assets/fonts/NotoSerifBengali-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   CSS Variables for Light & Dark Mode
   ========================================= */
:root {
    --bg-color: #ffffff;
    --text-color: #334155; 
    --heading-color: #0f172a; 
    --primary-color: #2563eb; 
    --border-color: #e2e8f0;
    --card-bg: #f8fafc;
    --footer-bg: #f1f5f9;
}

[data-theme="dark"] {
    --bg-color: #0D1322; 
    --text-color: #cbd5e1; 
    --heading-color: #f8fafc; 
    --primary-color: #60a5fa; 
    --border-color: #1e293b;
    --card-bg: #111827; 
    --footer-bg: #0b1120;
}

/* =========================================
   Base Typography & Reset
   ========================================= */
* {
    box-sizing: border-box;
}

/* CRITICAL FIX FOR STICKY HEADER: Ensure no overflow hidden on html/body */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow-x: hidden; MUST NOT BE HERE FOR STICKY TO WORK PERFECTLY */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Serif Bengali', serif; /* Using Local Noto Serif */
    font-weight: 400;
    line-height: 1.8;
    font-size: 18px;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-family: 'Noto Serif Bengali', serif;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--heading-color);
}

/* =========================================
   Layout & Container (1200px)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header Styling 
   ========================================= */
.site-header {
    background: var(--bg-color);
    width: 100%;
}

.header-top {
    padding: 15px 0;
}

/* Flexbox to keep Logo Left & Actions Right */
.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Applying Custom Font to Site Title */
.site-title {
    margin: 0;
    font-size: 2.2em;
    font-family: 'Headline Bangla', sans-serif;
    font-weight: normal;
}
.site-title a {
    color: var(--heading-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Social Links styling for FontAwesome */
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    color: var(--text-color);
    font-size: 1.2em;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    transition: all 0.3s ease;
}
.theme-toggle-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* =========================================
   Bottom Header: Sticky Menu Setup
   ========================================= */
.header-bottom.sticky-menu {
    position: sticky;
    top: 0;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.main-navigation {
    padding: 12px 0;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-menu li a {
    color: var(--heading-color);
    font-weight: 600;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
}

.nav-menu li.current-menu-item a {
    color: var(--primary-color);
}

/* =========================================
   Responsive / Mobile Fixes
   ========================================= */
@media screen and (max-width: 768px) {
    
    /* Top Header: Logo Left, Actions Right */
    .header-top-inner {
        flex-direction: row; 
        gap: 10px;
    }
    
    .site-title {
        font-size: 1.6em; 
    }
    
    .header-actions {
        gap: 15px; 
    }

    .social-links {
        gap: 10px;
    }

    /* Mobile Scrolling Menu with VISIBLE Scrollbar */
    .main-navigation {
        width: 100%;
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        padding-bottom: 8px; /* Extra space for the visible scrollbar */
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: nowrap; 
        gap: 20px;
        padding-bottom: 5px; 
    }

    /* CUSTOM VISIBLE SCROLLBAR FOR MOBILE MENU */
    .main-navigation::-webkit-scrollbar {
        height: 4px; /* Height of the scrollbar */
    }
    .main-navigation::-webkit-scrollbar-track {
        background: var(--border-color); /* Track color */
        border-radius: 10px;
    }
    .main-navigation::-webkit-scrollbar-thumb {
        background: var(--primary-color); /* Thumb color */
        border-radius: 10px;
    }
}

