/*
Theme Name: DevCard WP
Theme URI: https://github.com/nithinmohan/devcard-wp
Author: Nithin Mohan TK
Author URI: https://www.dataa.dev
Description: A modern portfolio theme for developers, inspired by DevCard. Features a sidebar profile layout and customizable color schemes.
Version: 1.0.0
Text Domain: devcard-wp
*/

:root {
    /* Core Dimensions */
    --sidebar-width: 280px;
    --content-max-width: 1000px;

    /* Font Stack */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Saira Extra Condensed', sans-serif;

    /* Default Scheme (Will be overridden by Customizer) */
    --primary-color: #54B689;
    /* Default Green reference, will change to blue/gray */
    --secondary-color: #292929;
    --text-color: #4f4f4f;
    --text-muted: #8a8a8a;
    --bg-color: #f5f5f5;
    --bg-card: #ffffff;
    --border-color: #e6e6e6;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
}

/* Color Schemes - Predefined Classes */
/* Color Schemes - Predefined Classes */
body.theme-blue {
    --primary-color: #4A90E2 !important;
    --primary-dark: #357ABD !important;
}

body.theme-light-gray {
    --primary-color: #7f8c8d !important;
    --primary-dark: #2c3e50 !important;
}

body.theme-dark-gray {
    --primary-color: #34495e !important;
    --primary-dark: #2c3e50 !important;
}

body.theme-navy {
    --primary-color: #001f3f !important;
    --primary-dark: #001830 !important;
}

body.theme-cloudy {
    --primary-color: #b0c4de !important;
    --primary-dark: #9bbbd4 !important;
}

body.theme-light-green {
    --primary-color: #2ecc71 !important;
    --primary-dark: #27ae60 !important;
}

body.theme-dark-blue {
    --primary-color: #1e3799 !important;
    --primary-dark: #0c2461 !important;
}

body.theme-army-blue {
    --primary-color: #4a69bd !important;
    --primary-dark: #1e3799 !important;
}

body.theme-light-blue {
    --primary-color: #48dbfb !important;
    --primary-dark: #0abde3 !important;
}

body.theme-army-green {
    --primary-color: #4b5320 !important;
    --primary-dark: #3a4216 !important;
}

body.theme-dark-green {
    --primary-color: #006400 !important;
    --primary-dark: #004d00 !important;
}

body.theme-black {
    --primary-color: #1a1a1a !important;
    --primary-dark: #000000 !important;
}

body.theme-teal {
    --primary-color: #008080 !important;
    --primary-dark: #006666 !important;
}

body.theme-purple {
    --primary-color: #8e44ad !important;
    --primary-dark: #6c3483 !important;
}

body.theme-circuit {
    --primary-color: #00F5D4 !important;
    /* Bright Cyan/Teal */
    --primary-dark: #00a896 !important;
    --secondary-color: #0D1B2A !important;
    /* Deep Navy overrides default gray text if needed, but mainly for headers */
    --bg-color: #0b162a !important;
    /* Deep Navy Background */
    --bg-card: #112240 !important;
    /* Slightly lighter navy for cards */
    --text-color: #e6f1ff !important;
    /* Light text for dark mode */
    --text-muted: #8892b0 !important;
    --border-color: #233554 !important;
}

/* Resets & Base */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Layout Grid */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Profile */
.profile-sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    text-align: center;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.profile-avatar img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    margin-bottom: var(--space-md);
}

.profile-name {
    font-size: 1.8rem;
    color: white;
    margin: 0;
    margin-bottom: var(--space-sm);
}

.profile-bio {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: var(--space-lg);
}

.profile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.profile-nav li {
    position: relative;
    width: 100%;
}

/* Links */
.profile-nav a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    display: block;
    padding: var(--space-sm) var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    border-radius: 4px;
    width: 100%;
}

.profile-nav a:hover,
.profile-nav li.current-menu-item>a,
.profile-nav li.current_page_item>a {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    padding-left: 20px;
    /* Slide effect */
}

/* =========================================
   MULTILEVEL MENU - FORCE HIDE/SHOW CHECKS
   ========================================= */

/* 1. Reset all ULs margin/padding */
.profile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* 2. Hide ALL sub-levels (ul inside li) by default - BRUTE FORCE */
.profile-nav ul ul,
.profile-nav li .children,
.profile-nav li .sub-menu {
    display: none !important;
    /* Force hide */
    background: rgba(0, 0, 0, 0.15);
    width: 100%;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* 3. Show submenu ONLY when parent LI is hovered */
.profile-nav li:hover>ul,
.profile-nav li:hover>.children,
.profile-nav li:hover>.sub-menu {
    display: block !important;
    /* Force show on hover */
    animation: slideDown 0.3s ease;
}

/* 4. Indentation for Hierarchy */
/* Level 2 */
.profile-nav ul ul a,
.profile-nav .children a,
.profile-nav .sub-menu a {
    padding-left: 2rem !important;
    font-size: 0.9em;
    opacity: 0.85;
    background: transparent;
}

/* Level 3 */
.profile-nav ul ul ul a,
.profile-nav .children .children a,
.profile-nav .sub-menu .sub-menu a {
    padding-left: 3.5rem !important;
}

/* Indicators */
.profile-nav .menu-item-has-children>a::after,
.profile-nav .page_item_has_children>a::after {
    content: '\f107';
    /* FA Angle Down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    transition: transform 0.3s;
}

.profile-nav .menu-item-has-children:hover>a::after,
.profile-nav .page_item_has_children:hover>a::after {
    transform: rotate(180deg);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    min-width: 0;
    /* Prevent overflow */
}

.content-section {
    background: var(--bg-card);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
}

/* Responsive */
@media (max-width: 991px) {
    .site-wrapper {
        flex-direction: column;
    }

    .profile-sidebar {
        width: 100%;
        position: relative;
        padding: var(--space-lg);
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-md);
    }

    .profile-avatar img {
        width: 120px;
        height: 120px;
    }
}