:root {
    --bg-dark: #0a0a0c;
    --bg-card: #131316;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --primary: #2196F3;
    /* Material Blue */
    --primary-glow: rgba(33, 150, 243, 0.15);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.15);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --card-shadow: rgba(0, 0, 0, 0.5);
    --btn-text: #ffffff;
    --sidebar-bg: #131316;
    --sidebar-hover: rgba(255, 255, 255, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Source Code Pro', monospace;
    --font-body: 'Inter', sans-serif;
    --font-serif: 'Inter', sans-serif;

    --max-w: 95%;
    --nav-height: 80px;

    /* GeeksforGeeks Inspired Tokens */
    --gfg-green: #2f8d46;
    --gfg-green-dark: #1e5f30;
    --gfg-green-light: #e8f5e9;
    --gfg-green-hover: #277a3d;

    /* Readability & Content */
    --content-font-size: 16px;
    --content-line-height: 1.8;
    --code-bg: #1e1e1e;
    --code-header: #2d2d2d;
    --code-accent: #4ec9b0;
}

/* Force Material Blue Theme for Tutorial Pages */
.tutorial-layout {
    --primary: #2196F3;
    --primary-glow: rgba(33, 150, 243, 0.15);
    --secondary: #06b6d4;
    --gradient: linear-gradient(135deg, #2196F3, #06b6d4);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.15);
    --card-shadow: rgba(0, 0, 0, 0.1);
    --btn-text: #1e293b;
    --sidebar-bg: #f1f5f9;
    --sidebar-hover: rgba(0, 0, 0, 0.05);
    --primary-glow: rgba(33, 150, 243, 0.1);
    --secondary: #0891b2;
    --secondary-glow: rgba(8, 145, 178, 0.1);
    /* Darker Cyan for Light Mode */
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay.hidden {
    display: none !important;
}

.search-container {
    width: 90%;
    max-width: 800px;
}

.search-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    outline: none;
}

#search-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

#search-close:hover {
    color: var(--primary);
}

.search-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.search-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.search-item:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.search-item h4 {
    color: var(--text-main);
    margin-bottom: 5px;
}

.search-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Theme Toggle Refinement */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--glass);
    transform: rotate(15deg);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.1;
}

.subtitle {
    color: var(--secondary);
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    text-align: left;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--gfg-green);
    border-radius: 2px;
    margin-top: 6px;
}

/* Article Content Readability */
.article-content {
    font-family: var(--font-body);
    font-size: var(--content-font-size);
    line-height: var(--content-line-height);
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 1.6rem;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--text-main);
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--text-main);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.6rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.6rem;
}

/* Premium Code Blocks */
.code-block {
    background: var(--code-bg);
    border-radius: 12px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header {
    background: var(--code-header);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--code-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a1a1aa;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-heading);
    font-weight: 600;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.code-body {
    padding: 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-body pre {
    margin: 0;
    background: transparent;
    padding: 0;
}

.code-body code {
    white-space: pre;
    color: #d4d4d4;
}

/* Alert Styling */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border-left: 4px solid;
}

.alert-important {
    background: rgba(47, 141, 70, 0.08);
    border-color: var(--gfg-green);
    color: var(--text-main);
}

.view-all {
    color: var(--gfg-green);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    text-decoration: underline;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    /* Match container max-width */
    margin: 0 auto 32px;
    padding: 0 24px;
    /* Align with container padding */
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.section {
    padding: 80px 0;
    position: relative;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 3-Column Layout System */
.layout-3-col {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 0;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

.layout-sidebar-left,
.layout-sidebar-right {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    height: calc(100vh - var(--nav-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    border-right: 1px solid var(--border);
    background: white;
    padding-bottom: 40px;
}

.layout-sidebar-left::-webkit-scrollbar,
.layout-sidebar-right::-webkit-scrollbar {
    width: 4px;
}

.layout-sidebar-left::-webkit-scrollbar-thumb,
.layout-sidebar-right::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.layout-main-content {
    min-width: 0;
    /* Prevent grid blowout */
    padding-bottom: 60px;
    padding: 30px 32px;
    /* Reduced from 40px for better fit */
    background: var(--bg-card);
    border-right: 1px solid var(--border);
}

/* Responsive Layout Adjustments */


/* Navbar */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: var(--bg-dark);
    /* Fixed: Was hardcoded rgba */
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.btn-small {
    padding: 8px 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.btn-small:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

/* Mobile Menu */
.burger {
    display: none;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: 0.4s;
    z-index: 999;
}

.mobile-menu.active {
    top: 0;
}

.mobile-menu a {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero .title {
    font-size: 4rem;
    margin-bottom: 24px;
}

.hero .description {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 32px;
}

.hero-visual {
    position: relative;
    height: 400px;
}

/* Shapes & Glass Cards */
.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -1;
    animation: float 10s infinite alternate;
}

.blob-1 {
    background: var(--primary);
    top: -50px;
    right: -50px;
}

.blob-2 {
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: fit-content;
    position: absolute;
    top: 20%;
    right: 10%;
    animation: floatCard 6s ease-in-out infinite;
}

.card-2 {
    top: 60%;
    right: 30%;
    animation-delay: 1s;
}

.glass-card i {
    font-size: 1.5rem;
    color: var(--secondary);
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    margin-right: 16px;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: #ffffff;
    /* Always white on gradient */
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
}

/* Sections (legacy override) */
.section {
    padding: 40px 0;
}

/* Ad Slot Styling for AdSense */
.ad-slot-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 24px;
    text-align: center;
    overflow: hidden;
}

.ad-placeholder {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    position: relative;
}

.ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.6;
}

/* Ad Unit Responsiveness */

/* Section Title Wrapper Compact */
.section-title-wrapper {
    margin-bottom: 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-photo img {
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 0 auto;
    border-radius: 20px;
    border: 2px solid var(--border);
    transition: 0.3s;
    box-shadow: 0 20px 40px -10px var(--card-shadow);
}

.about-photo img:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.skills-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.skills-list i {
    color: var(--primary);
}

.stat-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Portfolio & Blog Grids */
.projects-grid {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.projects-grid::-webkit-scrollbar {
    height: 6px;
}

.projects-grid::-webkit-scrollbar-track {
    background: transparent;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.projects-grid .project-card {
    min-width: min(320px, 90vw);
    width: min(320px, 90vw);
    flex-shrink: 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 60px;
    row-gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Adjust here for cards size of latest articles */
.home-latest-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}




.project-card,
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.project-card:hover,
.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px var(--card-shadow);
}

.card-img {
    height: 200px;
    width: 100%;
    background: #2a2a2a;
    object-fit: cover;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

/* ── GEEKSFORGEEKS INSPIRED CARDS ── */
.gfg-course-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.gfg-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--card-shadow);
    border-color: var(--primary);
}

.gfg-course-thumb {
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 4rem;
}

.gfg-rating {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #ffca28;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.gfg-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.gfg-course-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gfg-course-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gfg-course-level {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.gfg-course-level span {
    color: var(--secondary);
    font-weight: 700;
}

.gfg-course-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.gfg-interested {
    font-size: 12px;
    color: var(--text-muted);
}

.gfg-interested b {
    color: var(--text-main);
}

.gfg-btn-explore {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    transition: 0.2s;
}

.gfg-btn-explore:hover {
    letter-spacing: 0.5px;
    text-decoration: underline;
}

/* PREMIUM BLOG CARDS */
.blog-card {
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.home-latest-cards .blog-card {
    border: none !important;
    background: none !important;
    min-height: 0 !important;
}

.blog-card h3 {
    margin: 0 0 12px !important;
    font-size: 1.2rem !important;
    /* Slightly smaller for 300px */
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow: visible !important;
}

.blog-card .btn-small {
    margin-top: auto !important;
    font-size: 0.85rem !important;
    padding: 6px 14px !important;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Take up available space */
}

.card-content h3 {
    margin: 10px 0;
    line-height: 1.3;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.card-content .btn-small {
    margin-top: auto;
    /* Push to bottom */
    width: fit-content;
    text-align: center;
}

/* =========================================
   GFG STYLE COURSE CARDS (Latest Articles)
   ========================================= */
.gfg-course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gfg-course-card:hover {
    border-color: var(--gfg-green);
    box-shadow: 0 6px 24px rgba(47, 141, 70, 0.15);
    transform: translateY(-3px);
}

.gfg-course-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.gfg-course-thumb i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
}

.gfg-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #e65100;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.gfg-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gfg-green);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.gfg-course-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gfg-course-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-main);
    /* Restrict to exactly 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* 1.4 * 2 lines */
}

.gfg-course-level {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gfg-course-level span {
    color: var(--gfg-green);
    font-weight: 600;
}

.gfg-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.gfg-interested {
    font-size: 12px;
    color: var(--text-muted);
}

.gfg-interested b {
    color: var(--gfg-green);
}

.gfg-btn-explore {
    background: var(--gfg-green-light);
    color: var(--gfg-green);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.gfg-btn-explore:hover {
    background: var(--gfg-green);
    color: white;
}

.gfg-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
    gap: 48px;
    max-width: 1300px;
    margin: 0 auto;
}

.stats-section {
    background: var(--gfg-green);
    padding: 60px 24px;
    color: white;
}

.stats-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h2 {
    font-size: 40px;
    font-weight: 800;
    margin: 0;
}

.stat-item p {
    opacity: 0.9;
    font-size: 14px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive: Tablets */

/* Responsive: Mobile & Tablets (already handled in .home-latest-cards media query) */

/* Responsive: Small Mobile */

/* Blog Section Wrapper for Button Positioning */
#blog {
    position: relative;
}

#blog .section-title {
    margin-bottom: 8px;
    text-align: center;
}

#blog .section-desc {
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
}

#blog>.container>div:first-child {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

#blog-view-all-placeholder {
    display: flex;
    align-items: center;
}

/* "More Articles" Button (Top Right Position) */
.btn-more-articles {
    display: inline-block;
    padding: 11px 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
    white-space: nowrap;
}

.btn-more-articles:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

.btn-more-articles:active {
    transform: translateY(0);
}




.tag {
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Adsense Placeholders */
.ad-slot-container {
    margin: 40px auto;
    text-align: center;
}

.ad-placeholder {
    width: 100%;
    height: 100px;
    /* Leaderboard size */
    height: 100px;
    /* Leaderboard size */
    background: var(--bg-card);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Modal */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.blog-modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-dark);
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border);
    position: relative;
    height: fit-content;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.75rem;
    cursor: pointer;
}

/* Markdown-like styling for blog content */
#modal-body h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

#modal-body p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

#modal-body pre {
    background: #000;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-dark);
}

/* Footer — Simple Premium */
#site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
    gap: 40px;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-about-hero {
    background: var(--bg-card);
    padding: 22px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 3px;
}

.footer-about-hero img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.footer-about-hero .footer-about-text {
    flex: 1;
}

.footer-about-hero p {
    font-size: 12.5px;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.8px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-tagline {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 260px;
    font-weight: 400;
}

.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.footer-social-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-social-link:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.footer-nav-group {
    display: flex;
    gap: 64px;
}

.footer-nav-col h5 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.footer-nav-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav-col li a {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-body);
    transition: var(--transition);
}

.footer-nav-col li a:hover {
    color: var(--text-main);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--text-body);
}


/* Article Page Styling */
.article-page {
    padding-top: 50px;
    background-color: var(--bg-dark);
    min-height: 100vh;
}

.article-container {
    max-width: 900px;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.article-header {
    margin-bottom: 48px;
}

.article-header h1 {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 16px 0 24px;
    color: var(--text-main);
}

.article-content {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.125rem;
    /* ~18px for premium readability */
    line-height: 1.75;
    letter-spacing: -0.003em;
    color: var(--text-main);
    text-align: left;
}

.article-content p {
    margin-bottom: 1rem;
    color: var(--text-main);
    opacity: 0.95;
    /* Soft readability like GfG */
}

.article-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 3rem 0 1.5rem;
    color: var(--text-main);
}

.article-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin: 2.5rem 0 1rem;
    color: var(--text-main);
}

.article-content h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 2rem 0 0.8rem;
    color: var(--secondary);
}

.article-content h5 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    /* Consistent with paragraph spacing */
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.4rem;
    /* Tighter list spacing */
    line-height: 1.4;
}

.article-content strong {
    font-weight: 700;
    color: var(--text-main);
}

.article-content blockquote {
    padding: 20px 24px;
    background: var(--glass);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.25rem;
}

/* Enhanced Alerts */
.alert {
    padding: 1.2rem 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    border-left: 5px solid #ccc;
    background: var(--glass);
    font-size: 1rem;
}

.alert-note {
    border-left-color: var(--secondary);
    background: rgba(6, 182, 212, 0.05);
}

.alert-tip {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.alert-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.alert-important {
    border-left-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.article-content img {
    display: block;
    margin: 2.5rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.img-center {
    text-align: center;
    margin: 2.5rem auto;
}

.article-footer {
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

/* Responsive */


.article-content h3 {
    font-size: 1.25rem;
}

/* Premium TOC Component */
.toc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: 0 15px 35px -10px var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: var(--gradient);
    filter: blur(100px);
    opacity: 0.1;
    z-index: 0;
}

.toc-card h2 {
    margin-top: 0 !important;
    font-size: 1.75rem !important;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.toc-item {
    display: block;
    padding: 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.toc-item:hover {
    color: var(--primary) !important;
    line-height: 1.2 !important;
}

.toc-item p {
    font-size: 0.9rem !important;
    margin: 0 !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
}

/* =========================================
   PREMIUM CATEGORY PAGE STYLES
   ========================================= */

/* Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
    padding-bottom: 50px;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.filter-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px -10px var(--card-shadow);
}

.filter-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 10px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.cat-item:hover {
    background: var(--bg-alt);
    color: var(--text-main);
    padding-left: 20px;
}

.cat-item.active {
    background: var(--bg-alt);
    /* Gradient background injected via JS */
}

.cat-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.cat-count {
    font-size: 0.75rem;
    background: var(--bg-body);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Premium Header in Main Panel */
.cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.cat-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.cat-title {
    font-size: 2rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.cat-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Premium Horizontal Pads */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-pad {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.article-pad:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 20px 40px -10px var(--card-shadow);
    border-color: var(--primary);
}

.pad-body {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.pad-main {
    flex: 1;
}

.pad-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.article-pad:hover .pad-title {
    color: var(--primary);
}

.pad-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 15px 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.pad-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mini-tag {
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 5px;
    border: 1px solid var(--border);
}

.pad-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.3s;
}

.article-pad:hover .pad-arrow {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* Responsive */

/* =========================================
   PREMIUM CONTACT PAGE STYLES
   ========================================= */

.contact-section {
    padding: 120px 0 80px;
    background: radial-gradient(circle at top right, var(--primary-glow), transparent 40%),
        radial-gradient(circle at bottom left, var(--secondary-glow), transparent 40%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.premium-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 450px;
}

.contact-info-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

.info-item h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0;
}

.info-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 4px 0 0 0;
}

.social-links-contact {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-circle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

/* Form Styling */
.contact-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 30px 60px -15px var(--card-shadow);
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    padding: 15px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.submit-btn {
    margin-top: 10px;
    padding: 18px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px var(--primary);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Mobile Adjustments */


/* Code Block Styles (GfG Style Alignment) */
.code-ide {
    background-color: #f8f9fa;
    border: 1px solid #e1e4e8;
    color: #24292e;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow: auto;
}

[data-theme="dark"] .code-ide {
    background-color: #24292e;
    border: 1px solid #444;
    color: #e1e4e8;
}

.line-num {
    color: var(--text-muted);
    display: inline-block;
    width: 2rem;
    user-select: none;
    border-right: 1px solid var(--border);
    margin-right: 1rem;
}

.keyword {
    color: #d73a49;
    font-weight: bold;
}

[data-theme="dark"] .keyword {
    color: #ff7b72;
}

/* Article Sidebar Layout (GfG Style) */
.article-layout {
    display: flex;
    max-width: var(--max-w);
    margin: 0 auto;
    gap: 0;
    padding: 0 24px;
    position: relative;
    justify-content: flex-start;
}

.article-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 15px;
    border-right: 1px solid var(--border);
    margin-top: 50px;
    text-align: left;
    transition: width 0.3s ease, padding 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

.article-container {
    flex: 1;
    min-width: 0;
    max-width: 900px;
    padding: 40px 0 40px 40px;
    background: transparent;
}

.article-sidebar.collapsed {
    width: 0;
    padding: 0;
    opacity: 0;
    border: none;
    overflow: hidden;
    margin: 0;
}



.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 12px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 2px;
}

.sidebar-list a {
    display: block;
    padding: 8px 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-list a:hover {
    background: var(--glass);
    color: var(--primary);
}

.sidebar-list a.active {
    background: rgba(139, 92, 246, 0.08);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* =========================================
   COURSE SIDEBAR (Tree View)
   ========================================= */
.course-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.course-section {
    border-bottom: 1px solid var(--border);
}

.course-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.course-section-header:hover {
    background: var(--sidebar-hover);
}

.course-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.toggle-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.course-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.course-section.active .course-article-list {
    max-height: 1000px;
}

.course-section.active .toggle-icon {
    transform: rotate(90deg);
}

.course-article-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px 8px 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.course-article-link i {
    font-size: 0.6rem;
}

.course-article-link:hover {
    color: var(--text-main);
    background: var(--sidebar-hover);
}

.course-article-link.active {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
    font-weight: 600;
}

.course-article-link.active i {
    color: var(--primary);
}

.sidebar-title {
    color: #000000 !important;
}


/* Table of Contents Specifics */
.sidebar-list .toc-h3 {
    padding-left: 24px;
    font-size: 0.85rem;
}

.sidebar-list .toc-h4 {
    padding-left: 36px;
    font-size: 0.8rem;
    display: none;
    /* Keep it clean, hide h4 by default */
}


/* Scrollbar for sidebar */
.article-sidebar::-webkit-scrollbar {
    width: 4px;
}

.article-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.article-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* Responsive sidebar */

/* =========================================
   RIGHT TOC SIDEBAR (toc-right.js)
   ========================================= */
.toc-right-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    margin-top: 80px;
    text-align: left;
    display: none;
    /* Default hidden on smaller screens */
}


.rtoc-header {
    margin-bottom: 1.5rem;
}

.rtoc-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

[data-theme="dark"] .rtoc-title {
    color: var(--text-main);
}

.rtoc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rtoc-item {
    margin-bottom: 0.5rem;
}

.rtoc-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rtoc-link {
    display: block;
    padding: 4px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.rtoc-link.rtoc-active {
    color: var(--primary);
    font-weight: 600;
}

.rtoc-link:hover {
    color: var(--text-main);
}

.rtoc-sub {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
    display: block;
}

.rtoc-sub.collapsed {
    display: none;
}

.rtoc-toggle {
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

#toc-progress-bar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 2000;
    transition: width 0.1s ease;
}

.heading-copy-btn {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
    font-size: 1rem;
}

h2:hover .heading-copy-btn,
h3:hover .heading-copy-btn {
    opacity: 1;
}

.heading-copy-btn.copied {
    color: #10b981;
    opacity: 1;
}

/* =========================================
   EXPLORE SECTION (SaaS Style)
   ========================================= */
.explore-section {
    background: var(--bg-dark);
    padding: 40px 0;
}

.explore-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 95%;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1300px;
    margin: 0 auto;
}


.explore-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.explore-card:hover {
    border-color: var(--gfg-green);
    box-shadow: 0 8px 25px rgba(47, 141, 70, 0.12);
    transform: translateY(-3px);
}

.explore-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

.explore-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.explore-card-text h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.explore-card-text p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 600;
    transition: color 0.3s;
}

.explore-card:hover .explore-card-text p {
    color: var(--gfg-green);
}

/* Specific Card Theme Backgrounds */
.ec-1 {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.ec-2 {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.ec-3 {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.ec-4 {
    background: rgba(139, 92, 246, 0.1);
    color: #4c1d95;
}



/* =========================================
   AUTHOR SIMPLE STRIP (About Me - Flat)
   ========================================= */
.author-simple-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}


.author-simple {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
}

.author-simple .author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.author-simple-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-simple-info .author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-badge {
    font-size: 0.65rem;
    padding: 3px 10px;
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.author-simple-info .author-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.author-simple-info .author-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.5;
}

.author-simple-stats {
    display: flex;
    gap: 32px;
    flex-shrink: 0;
    padding-left: 28px;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
}

.author-simple-stats .author-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.author-simple-stats .author-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.author-simple-stats .author-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.author-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 48px;
    max-width: 980px;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

.author-card:hover {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

.author-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.author-name {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1;
}

.author-title {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.author-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 480px;
}

.author-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.author-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.author-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.author-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding-left: 24px;
    border-left: 1px solid var(--border);
    flex-shrink: 0;
}

.author-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.author-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* =========================================
   WORKS LIST (Modern List Design)
   ========================================= */
.works-list-section {
    background: var(--bg-dark);
}

.works-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1300px;
    margin: 0 auto;
}

.work-list-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-list-item:last-child {
    border-bottom: 1px solid var(--border);
}

.work-list-item:hover {
    border-color: var(--gfg-green);
    box-shadow: 0 8px 32px rgba(47, 141, 70, 0.1);
    transform: translateX(10px);
    background: var(--glass);
}

.work-list-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-mono);
    min-width: 28px;
    opacity: 0.5;
}

.work-list-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.work-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.work-list-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-list-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.work-list-tags .tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
}

.work-list-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.work-list-item:hover .work-list-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ── EXPLORE PAGE 3-COLUMN LAYOUT (GFG INSPIRED) ── */
.explore-page-body {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 0;
    align-items: start;
}



.left-sidebar {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg-card);
    padding-bottom: 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    padding: 24px 20px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-section-title:first-child {
    border-top: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 13.5px;
    color: var(--text-muted);
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--text-main);
}

.sidebar-link.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.main-content-area {
    padding: 40px 40px 80px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    min-height: 100vh;
}

.content-roadmap-title {
    font-size: 24px;
    font-weight: 800;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-glow);
}

.right-sidebar {
    position: sticky;
    top: var(--nav-height);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.widget-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-link {
    display: block;
    padding: 8px 0;
    font-size: 13px;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
    transition: 0.2s;
}

.widget-link:last-child {
    border-bottom: none;
}

.widget-link:hover {
    padding-left: 5px;
    color: var(--primary);
}

.topic-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.topic-nav::-webkit-scrollbar {
    display: none;
}

.topic-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
}

.tnav-link {
    padding: 15px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.tnav-link:hover {
    color: var(--text-main);
}

.tnav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.explore-article-header {
    margin-bottom: 30px;
}

.explore-article-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.explore-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.explore-badge {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
}

/* ============================================
   CONSOLIDATED RESPONSIVENESS & FLUID UI
   ============================================ */

/* Global Fix for Horizontal Scroll */
html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* FLUID TYPOGRAPHY */
.hero .title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.premium-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem) !important;
}

/* 1400px Breakpoint (Desktop Max) */
@media (max-width: 1400px) {
    .home-latest-cards {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 20px;
    }
}

/* 1200px Breakpoint (Landscape Tablet / Small Desktop) */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }

    .layout-3-col {
        grid-template-columns: 260px 1fr;
    }

    .layout-sidebar-right,
    .rightbar,
    .article-sidebar,
    .right-sidebar {
        display: none !important;
    }

    .explore-page-body {
        grid-template-columns: 240px 1fr;
    }

    .article-layout {
        gap: 0;
        padding: 0;
    }
}

/* 1024px Breakpoint (Tablet Portrait) */
@media (max-width: 1024px) {
    .hero-content {
        gap: 30px;
    }

    .home-latest-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 650px;
        margin: 0 auto;
    }

    .card-header {
        height: 130px;
    }

    .card-body {
        padding: 16px 14px;
        gap: 8px;
    }

    .card-title {
        font-size: 1rem;
    }
}

/* 992px Breakpoint (Large Mobile / Small Tablet) */
@media (max-width: 992px) {

    .layout-3-col,
    .blog-layout,
    .contact-wrapper,
    .explore-page-body {
        grid-template-columns: 1fr !important;
    }

    .layout-sidebar-left,
    .blog-sidebar,
    .left-sidebar {
        display: none !important;
    }

    .cat-item {
        display: inline-flex;
        width: auto;
        margin-right: 10px;
    }

    .filter-list {
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
    }
}

/* burger base styles */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.burger .line1,
.burger .line2,
.burger .line3 {
    width: 22px;
    height: 2px;
    background: var(--text-body);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    gap: 4px;
    z-index: 999;
}

.mobile-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

/* 768px Breakpoint (Mobile Standard) */
@media (max-width: 768px) {
    .navbar {
        height: 60px;
    }

    .nav-links {
        display: none !important;
    }

    .burger {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
    }

    /* burger animation */
    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Menu visibility handled by JS setting display: flex */

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        display: none;
    }

    .hero .description {
        margin: 0 auto 32px;
        font-size: 1rem;
        text-align: center;
    }

    .home-latest-cards,
    .gfg-courses-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 32px !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .home-latest-cards>*,
    .gfg-courses-grid>* {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        display: block !important;
    }

    .gfg-course-card {
        width: 100% !important;
    }

    /*
    .home-latest-cards,
    .gfg-courses-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 32px;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .home-latest-cards>*,
    .gfg-courses-grid>* {
        width: 100%;
        max-width: 380px;
        margin: 0 auto !important;
        float: none !important;
    } */

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-photo {
        max-width: 280px;
        margin: 0 auto 20px;
    }

    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-nav-group {
        width: 100%;
        justify-content: space-between;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .ad-placeholder {
        max-width: 100%;
        min-height: 100px;
    }

    .ad-slot-container {
        padding: 16px;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    /* Fix problematic fixed widths */
    .projects-grid .project-card,
    .blog-card {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* 640px Breakpoint (Mobile Small) */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .explore-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 16px;
    }

    .author-simple {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    #blog-view-all-placeholder,
    .btn-more-articles {
        width: 100% !important;
    }
}

/* 480px Breakpoint (X-Small Mobile) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .btn {
        width: 100%;
        margin: 0 0 12px 0;
    }

    .section {
        padding: 60px 0;
    }

    /* Contact form */
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-panel {
        padding: 24px 16px;
    }

    /* Article content */
    .article-container {
        padding: 60px 12px 30px;
    }

    .article-header h1 {
        font-size: 1.6rem;
    }
}