:root {
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --primary-light: #60a5fa;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --accent: #10b981;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #475569;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --white: #ffffff;
    --paper: #ffffff;
    --paper-lines: #e2e8f0;
    --notebook-margin: #fecaca;
    --gradient: var(--primary);
    --gradient-subtle: var(--light);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 50px rgba(26, 86, 219, 0.15);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input,
button,
textarea,
select {
    font: inherit;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: #faf9f6;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    /* Optimized for better readability */
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px 0;
    /* Reduced padding */
}

.navbar.scrolled {
    padding: 10px 0;
}

.navbar.scrolled .nav-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    max-width: 95%;
    margin: 0 auto;
    padding: 6px 20px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
    display: inline-block;
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    /* Reduced gap */
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-light);
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    padding: 4px 0;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

/* Common Section Styles */
section {
    padding: 32px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 24px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 86, 219, 0.06);
    color: var(--primary);
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 20px;
    border: 1px solid rgba(26, 86, 219, 0.25);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    box-shadow: 0 6px 16px rgba(26, 86, 219, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.section-badge::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.2), 0 0 12px var(--primary);
    animation: pulse-dot 2s infinite;
    --pulse-color: rgba(26, 86, 219, 0.6);
}

.section-badge:has(.material-icons)::before {
    display: none;
}

.section-badge .material-icons,
.section-badge .badge-icon {
    font-size: 0.95rem;
    color: var(--primary);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-badge:hover {
    background: rgba(26, 86, 219, 0.12);
    border-color: rgba(26, 86, 219, 0.4);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 28px rgba(26, 86, 219, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    letter-spacing: -0.01em;
}

.section-badge:hover .material-icons,
.section-badge:hover .badge-icon {
    transform: rotate(15deg) scale(1.1);
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 var(--pulse-color, rgba(26, 86, 219, 0.6)), 0 0 12px var(--primary);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(26, 86, 219, 0), 0 0 12px var(--primary);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(26, 86, 219, 0), 0 0 12px var(--primary);
    }
}

.section-header h2 {
    font-size: 2.5rem;
    /* Slightly reduced */
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--gray);
    font-size: 1.05rem;
}

/* Utility Classes */
.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-accent {
    color: var(--accent);
}

.text-gray {
    color: var(--gray);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 0.15em 0.25em;
    /* Add padding to prevent clipping of Devanagari characters (both vertical and horizontal) */
    margin: -0.15em -0.25em;
    /* Compensate for padding to maintain alignment */
    vertical-align: bottom;
}

.material-icons {
    font-family: 'Material Icons';
    vertical-align: middle;
}

/* Buttons */
.btn-primary {
    background: var(--gradient);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    box-shadow: 0 8px 16px -4px rgba(26, 86, 219, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(26, 86, 219, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--paper-lines);
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--light);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
    /* Reduced padding */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--gray-light);
    margin-top: 16px;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-light);
    font-size: 0.85rem;
}

/* Animations */
.animate-in {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        border-bottom: 1px solid var(--paper-lines);
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Variables & Styling */
[data-theme="dark"] {
    --dark: #f4f4f5;
    --dark-light: #e4e4e7;
    --gray: #a1a1aa;
    --gray-light: #71717a;
    --light: #18181b;
    --white: #242427;
    --paper: #242427;
    --paper-lines: #333338;
    --notebook-margin: #991b1b;
    --gradient-subtle: var(--white);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

[data-theme="dark"] body {
    background-color: #18181b;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

[data-theme="dark"] .navbar.scrolled .nav-container {
    background: rgba(28, 28, 31, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .footer {
    background: #0e0e10;
    color: #f4f4f5;
    border-top-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-bottom p,
[data-theme="dark"] .footer p,
[data-theme="dark"] .footer a {
    color: #a1a1aa !important;
}

[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer a:hover {
    color: #f4f4f5 !important;
}

[data-theme="dark"] .btn-primary {
    color: #ffffff;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* ==========================================
   THEME TOGGLE SWITCH BUTTON (FAB)
   ========================================== */
.theme-toggle-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--paper-lines);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(20deg);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.theme-toggle-btn .sun-icon {
    font-size: 1.5rem;
    color: var(--secondary);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.theme-toggle-btn .moon-icon {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Toggle icon display based on theme */
[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
    animation: rotateIn 0.4s ease forwards;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
    display: none;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
    display: block;
    animation: rotateIn 0.4s ease forwards;
}

@keyframes rotateIn {
    from {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

/* Section Pills Dark Theme Overrides */
[data-theme="dark"] .section-badge {
    background: rgba(96, 165, 250, 0.1);
    color: var(--primary-light);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .section-badge::before {
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2), 0 0 12px var(--primary-light);
    --pulse-color: rgba(96, 165, 250, 0.6);
}

[data-theme="dark"] .section-badge .material-icons,
[data-theme="dark"] .section-badge .badge-icon {
    color: var(--primary-light);
}

[data-theme="dark"] .section-badge:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--primary-light);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}