/*
Theme Name: ChittimallaValueInsights theme
Theme URI: https://example.com/
Author: Antigravity
Author URI: https://example.com/
Description: A premium, modern dark-mode personal branding theme tailored for a high-authority professional.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chittimallavalueinsights
*/

:root {
    /* Color Palette */
    --bg-base: #0B192C;
    /* Dark Blue */
    --bg-surface: #162842;
    --bg-surface-elevated: #3A4D68;
    /* Steel Grey */

    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --accent-primary: #14b8a6;
    /* Digital Teal */
    --accent-secondary: #0ea5e9;
    /* Sky Blue */
    --accent-tertiary: #38bdf8;
    /* Tech Blue */

    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.1);

    --input-bg: rgba(255, 255, 255, 0.05);

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);

    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-12: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1050;
    --z-popover: 1060;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.glass-panel {
    background: rgba(19, 20, 23, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--bg-base);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
    color: var(--bg-base);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

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

.btn-chat {
    display: inline-flex;
    align-items: center;
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(20, 184, 166, 0.5);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    text-decoration: none;
}

.btn-chat:hover {
    background: var(--accent-primary);
    color: var(--bg-base);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.6);
    transform: translateY(-2px);
}

/* Structural Components */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--z-fixed);
    padding: var(--space-4) 0;
    transition: all var(--transition-base);
}

.site-header.scrolled {
    padding: var(--space-2) 0;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-decoration: none;
}

.site-branding span {
    color: var(--accent-primary);
}

.site-logo-img {
    /* Use the custom SVG filter (defined in header.php) to make pure white transparent while keeping all other colors exactly the same */
    filter: url('#remove-white-bg');
}

html.light-theme .site-logo-img {
    /* In light theme, the white background matches the header, so no filter is needed */
    filter: none;
}

.main-navigation ul {
    display: flex;
    gap: var(--space-4);
    list-style: none;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.main-navigation a:hover,
.main-navigation a.current-menu-item {
    color: var(--text-primary);
}

.site-footer {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-12);
    text-align: center;
}

.site-main {
    min-height: 80vh;
    padding-top: 100px;
}

/* Banner Sections */
.banner-section {
    position: relative;
    padding: var(--space-12) 0;
    min-height: 340px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 25, 44, 0.88) 0%, rgba(22, 40, 66, 0.75) 100%);
    z-index: 1;
}

.banner-boardroom-insights {
    background-image: url('assets/images/boardroom.png');
}

.banner-plant-insights {
    background-image: url('assets/images/smart-factory.png');
}

.banner-tools-apps {
    background-image: url('assets/images/tools-apps.png');
}

.banner-hero {
    min-height: 500px;
}

.banner-cta {
    background-image: url('assets/images/refinery.png');
}

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

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

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

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Dynamic Background Glow */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--gradient-glow);
    filter: blur(100px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.bg-glow-top-right {
    top: -100px;
    right: -100px;
}

.bg-glow-bottom-left {
    bottom: -100px;
    left: -100px;
}

/* ============================================
   LIGHT THEME — Complete Override System
   ============================================ */
html.light-theme {
    --bg-base: #f0f4f8;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;

    --border-subtle: rgba(0, 0, 0, 0.10);
    --border-strong: rgba(0, 0, 0, 0.20);

    --input-bg: #ffffff;

    --gradient-glow: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
}

/* --- Glass Panels: stronger in light mode --- */
html.light-theme .glass-panel {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.10);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html.light-theme .glass-panel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

/* --- Header --- */
html.light-theme .site-header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .site-header.scrolled {
    background: rgba(255, 255, 255, 1) !important;
    border-bottom-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Fix unwanted white background behind navigation in light mode */
html.light-theme .main-navigation,
html.light-theme .main-navigation ul,
html.light-theme .menu {
    background: transparent !important;
    box-shadow: none !important;
}

html.light-theme .site-branding,
html.light-theme .site-branding a,
html.light-theme .site-title a {
    color: #0f172a !important;
}

html.light-theme .site-branding span {
    color: var(--accent-primary) !important;
}

/* --- Body-level text --- */
html.light-theme h1,
html.light-theme h2,
html.light-theme h3,
html.light-theme h4,
html.light-theme h5,
html.light-theme h6 {
    color: #0f172a;
}

html.light-theme p {
    color: #334155;
}

html.light-theme a {
    color: #0d9488;
}

html.light-theme a:hover {
    color: #0284c7;
}

/* --- Banner sections: ALWAYS white text on dark images --- */
html.light-theme .banner-section {
    color: #ffffff;
}

html.light-theme .banner-section::before {
    background: linear-gradient(135deg, rgba(11, 25, 44, 0.90) 0%, rgba(22, 40, 66, 0.80) 100%);
}

html.light-theme .banner-section h1,
html.light-theme .banner-section h2,
html.light-theme .banner-section h3,
html.light-theme .banner-section p,
html.light-theme .banner-section span,
html.light-theme .banner-section a,
html.light-theme .banner-section .category-badge {
    color: #ffffff !important;
}

html.light-theme .banner-section .btn-primary {
    color: #0f172a !important;
}

html.light-theme .banner-section .btn-outline {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Restore accent colors in banner */
html.light-theme .banner-hero p {
    color: #cbd5e1 !important;
}

html.light-theme .banner-section span[style*="accent-primary"] {
    color: var(--accent-primary) !important;
}

html.light-theme .banner-section span[style*="accent-secondary"] {
    color: var(--accent-secondary) !important;
}

html.light-theme .banner-section span[style*="accent-tertiary"] {
    color: var(--accent-tertiary) !important;
}

/* --- About Me page specifics --- */
html.light-theme .about-me-grid h1,
html.light-theme .about-me-grid h2,
html.light-theme .about-me-grid h3,
html.light-theme .about-me-grid h4 {
    color: #0f172a !important;
}

html.light-theme .about-me-grid p {
    color: #334155 !important;
}

html.light-theme .about-me-grid .glass-panel h2 {
    color: #0f172a !important;
}

html.light-theme .about-me-grid .glass-panel p {
    color: #334155 !important;
}

/* About Me: accent-colored spans should keep their accent */
html.light-theme .about-me-grid span[style*="accent-primary"] {
    color: var(--accent-primary) !important;
}

html.light-theme .about-me-grid span[style*="accent-tertiary"] {
    color: var(--accent-tertiary) !important;
}

html.light-theme .about-me-grid span[style*="accent-secondary"] {
    color: var(--accent-secondary) !important;
}

/* Tags/badges in About Me */
html.light-theme .about-me-grid span[style*="bg-surface-elevated"] {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Contact info items */
html.light-theme .about-me-grid a[style*="text-primary"],
html.light-theme .about-me-grid span[style*="text-primary"] {
    color: #0f172a !important;
}

/* Certification text */
html.light-theme .about-me-grid .glass-panel span[style*="text-primary"] {
    color: #0f172a !important;
}

/* Education text */
html.light-theme .about-me-grid h3[style*="text-primary"] {
    color: #0f172a !important;
}

/* --- Sidebar filters --- */
html.light-theme .glass-panel h3 {
    color: #0f172a !important;
}

html.light-theme .glass-panel select,
html.light-theme select {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

html.light-theme select option {
    background: #ffffff !important;
    color: #0f172a !important;
}

/* Filter buttons */
html.light-theme .br-filter-btn,
html.light-theme .tools-filter-btn,
html.light-theme .filter-btn {
    color: #334155 !important;
}

html.light-theme .br-filter-btn.active {
    color: var(--accent-primary) !important;
}

html.light-theme .tools-filter-btn.active {
    color: var(--accent-tertiary) !important;
}

html.light-theme .filter-btn.active {
    color: var(--accent-secondary) !important;
}

/* --- Input fields --- */
html.light-theme input[type="text"],
html.light-theme input[type="email"],
html.light-theme input[type="search"],
html.light-theme textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

html.light-theme input::placeholder {
    color: #94a3b8 !important;
}

/* --- Article cards --- */
html.light-theme .glass-panel h2,
html.light-theme .glass-panel h2 a {
    color: #0f172a !important;
}

html.light-theme .glass-panel p {
    color: #334155 !important;
}

html.light-theme .glass-panel a[style*="text-primary"] {
    color: #0f172a !important;
}

/* Category badges on article cards */
html.light-theme .category-badge {
    color: var(--accent-primary) !important;
}

/* --- Footer Light Mode Fixes --- */
html.light-theme .site-footer {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

html.light-theme .site-footer p,
html.light-theme .site-footer span,
html.light-theme .site-footer div.site-info {
    color: var(--text-secondary) !important;
}

html.light-theme .site-footer a {
    color: var(--text-secondary) !important;
}

html.light-theme .site-footer a:hover {
    color: #0a66c2 !important;
}

html.light-theme .site-footer svg {
    fill: currentColor !important;
    color: inherit !important;
}

/* --- About Me Sidebar Fixes --- */
html.light-theme .about-me-grid svg {
    stroke: currentColor !important;
}

/* --- Subscribe form button --- */
html.light-theme .subscribe-form button,
html.light-theme button[type="submit"] {
    color: #ffffff !important;
}

/* --- Footer --- */
html.light-theme .site-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
    background: #f0f4f8;
}

html.light-theme .site-footer,
html.light-theme .site-footer p,
html.light-theme .site-footer a,
html.light-theme .site-footer .site-info,
html.light-theme .site-footer .site-info p {
    color: #475569 !important;
}

/* --- Buttons --- */
html.light-theme .btn-primary {
    color: #0f172a;
}

html.light-theme .btn-outline {
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.2);
}

html.light-theme .btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

html.light-theme .btn-chat {
    color: var(--accent-primary);
    border-color: rgba(20, 184, 166, 0.4);
    background: rgba(20, 184, 166, 0.08);
}

html.light-theme .btn-chat:hover {
    background: var(--accent-primary);
    color: #ffffff;
}

/* --- Theme toggle icon --- */
html.light-theme #theme-toggle {
    color: #0f172a !important;
}

/* --- LinkedIn icon in header --- */
html.light-theme .header-inner a[aria-label="LinkedIn Profile"] {
    color: #475569 !important;
}

/* --- Mobile navigation --- */
html.light-theme .main-navigation {
    background: #ffffff !important;
}

html.light-theme .main-navigation a {
    color: #334155 !important;
}

html.light-theme .main-navigation a:hover {
    color: var(--accent-primary) !important;
}

html.light-theme .mobile-menu-toggle {
    color: #0f172a !important;
}

/* --- Single Post Page --- */
html.light-theme .entry-content h2 {
    background: var(--gradient-accent) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

html.light-theme .entry-content h3 {
    color: var(--accent-primary) !important;
    -webkit-text-fill-color: var(--accent-primary) !important;
}

html.light-theme .entry-content h4,
html.light-theme .entry-content h5,
html.light-theme .entry-content h6 {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

html.light-theme .entry-content p,
html.light-theme .entry-content li {
    color: #334155 !important;
}

html.light-theme .entry-title {
    color: #0f172a !important;
}

html.light-theme .comment-list li.comment {
    background: #f1f5f9 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light-theme .comment-author .fn {
    color: #0f172a !important;
}

html.light-theme .comment-content {
    color: #334155 !important;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .main-navigation ul {
        gap: var(--space-2);
    }

    .main-navigation a {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.75rem, 6vw, 2rem);
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .main-navigation {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: var(--space-4);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        border-bottom: 1px solid var(--border-subtle);
        z-index: var(--z-modal);
    }

    html.light-theme .main-navigation {
        background: #ffffff !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    .main-navigation.is-open {
        display: block !important;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
        padding: 0;
    }

    .main-navigation ul li {
        width: 100%;
        text-align: center;
    }

    .site-branding {
        font-size: 1.25rem;
    }

    .site-main {
        padding-top: 80px;
    }

    /* Banner sections on mobile */
    .banner-section {
        min-height: 220px;
        padding: var(--space-8) 0;
    }

    .banner-hero {
        min-height: 350px;
    }

    .hero-section {
        padding: var(--space-8) 0 !important;
        min-height: 80vh !important;
    }

    .hero-section h1 {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }

    .btn {
        padding: var(--space-2) var(--space-4);
        font-size: 0.9rem;
    }

    /* Fix mobile sidebar grids */
    .boardroom-grid,
    .tools-grid,
    .insights-grid {
        grid-template-columns: 1fr !important;
    }

    .boardroom-sidebar,
    .tools-sidebar,
    .insights-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-2);
    }
}