/* Modern Minimalist Aesthetic - Refined V2 */

/* --- 1. Typography & Global Reset --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --bg-secondary: #f9f9f9;
    --text-primary: #121212;
    --text-secondary: #555555;
    --accent-color: #000000;
    --border-color: #eeeeee;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
}


body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    margin-top: 0px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700 !important;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-top: 0;
}

/* Global Color Override - Kill the Green */
.teal,
.teal-text,
.green,
.green-text,
.light-blue,
.blue-grey,
.blue-grey-text {
    background-color: var(--accent-color) !important;
    color: #fff !important;
}

.teal-text,
.green-text,
.blue-grey-text {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}

/* Waves Effect Override */
.waves-effect.waves-teal .waves-ripple {
    background-color: rgba(0, 0, 0, 0.2);
}

/* --- 2. Enhanced Sidebar (UX Improvement) --- */
ul.side-nav.fixed {
    width: var(--sidebar-width) !important;
    background: #fff !important;
    border-right: 1px solid var(--border-color);
    box-shadow: none !important;
    padding-top: 50px !important;
    /* Increased from 40px to lower profile pic */
    z-index: 999;
}

ul.side-nav.fixed .logo {
    text-align: center;
    margin-top: 10px !important;
    margin-bottom: 20px;
    padding: 0 20px !important;
    background: transparent !important;
    border: none !important;
    height: auto !important;
}

.profile-pic {
    border: none !important;
    width: 120px !important;
    /* Slightly larger */
    height: 120px !important;
    border-radius: 50% !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px !important;


    transition: transform 0.3s ease;
    margin-top: 0 !important;
    /* Reset any negative margins */
}

.profile-pic:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Navigation Links */
/* Navigation Links - Unified for Desktop & Mobile */
/* Navigation Links - Unified for Desktop & Mobile */
/* Navigation Links - Unified for Desktop & Mobile */
ul.side-nav li a {
    position: relative;
    /* For indicator line */
    display: flex !important;
    /* Force Flex */
    align-items: center !important;
    /* Force Vertical Center */
    justify-content: flex-start !important;
    height: 50px !important;
    line-height: normal !important;
    /* Reset line-height */
    padding: 0 20px !important;
    border-radius: 12px;
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    border: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow: hidden;
    /* Clip indicator to rounded corners */
}

ul.side-nav li a i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    margin: 0 15px 0 0 !important;
    /* Only right margin */
    color: inherit !important;
    width: 24px;
    text-align: center;
    transition: color 0.2s ease;
    position: relative;
    z-index: 2;
    height: auto !important;
}

ul.side-nav li a span {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1.2 !important;
    /* Prevent text floating high */
    margin: 0 !important;
    padding-top: 2px;
    /* Slight optical adjustment for specific font */
    position: relative;
    z-index: 2;
}

/* Indicator Line (Pseudo-element) */
ul.side-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    /* Hidden by default */
    background-color: transparent;
    transition: all 0.2s ease;
    z-index: 1;
}

/* Hover & Active States */
ul.side-nav li a:hover {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    transform: translateX(4px);
    /* Interactive feedback */
    padding-left: 24px !important;
    /* Slight shift to make room for line/text move */
}

ul.side-nav li a:hover::before {
    width: 4px;
    /* Show line */
    background-color: #555;
    /* Dark Grey Line */
}

ul.side-nav li.active a {
    background-color: #000 !important;
    /* Black Active State */
    color: #fff !important;
    /* White Text */
    font-weight: 600;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

ul.side-nav li.active a::before {
    width: 6px;
    /* Thicker line for active */
    background-color: #fff;
    /* White Line */
}

ul.side-nav li.active a i {
    color: #fff !important;
    /* White Icon on Active */
}

ul.side-nav li {
    float: none;
    padding: 0 16px !important;
    margin-bottom: 4px;
}

/* --- 3. Main Content Layout --- */
main,
footer {
    padding-left: var(--sidebar-width) !important;
    transition: padding-left 0.3s ease;
}

.container {
    /* width: 92% !important; */
    max-width: 1200px !important;
    padding-top: 28px;
}

/* --- 4. Hero Section Refined --- */
#intro.section {
    min-height: 100vh;
    display: block !important;
    /* Changed from flex to block to allow padding to work simpler */
    /* padding-top: 250px !important; */
    /* Push content down significantly */
    background-color: #f8f9fa;
    opacity: 1;
    background-image: radial-gradient(#d4d4d4 1.5px, transparent 1.5px), radial-gradient(#d4d4d4 1.5px, #f8f9fa 1.5px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
}

#intro .intro-content {
    /* padding: 0 !important; */
    padding-left: 50px !important;
    /* Left alignment */
    margin-top: 20px;
}

/* Description Text Styling */
#intro .intro-content h5:not(.intro-text) {
    color: #333 !important;
    /* Darker grey */
    font-weight: 500 !important;
    line-height: 1.6;
    margin-top: 15px;
}

/* Typing text */
.typing {
    background: linear-gradient(90deg, #111, #555);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800 !important;
    font-size: inherit;
}


/* --- 5. Button & Icon Precision --- */
/* --- 5. Button & Icon Precision --- */
.btn,
.readme,
.contactme {
    height: 48px !important;
    line-height: normal !important;
    /* Allow flex centering */
    padding: 0 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: capitalize !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 10px !important;
    margin-right: 10px !important;
}

/* Primary Button (Read More) - Black */
.readme {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #000 !important;
}

.readme:hover {
    background-color: #333 !important;
    border-color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Secondary Button (Contact Me) - Outline/White */
.contactme {
    background-color: transparent !important;
    color: #000 !important;
    /* Black text */
    border: 2px solid #000 !important;
    /* Black border */
}

.contactme:hover {
    background-color: #000 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.btn:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
    background-color: #222 !important;
}

/* Social Icons */
.icon-btn {
    width: 48px !important;
    height: 48px !important;
    line-height: 46px !important;
    /* Precision centering */
    font-size: 20px !important;
    border-radius: 50% !important;
    color: var(--text-primary) !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    margin: 0 8px 10px 0 !important;
    transition: all 0.3s ease;
}

.icon-btn i {
    line-height: 1 !important;
}

.icon-btn:hover {
    border-color: var(--accent-color) !important;
    background: var(--accent-color) !important;
    color: #fff !important;
    transform: translateY(-3px);
}

/* --- 6. Card Perfection --- */
.card {
    background: #fff;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}

.card .card-image {
    max-height: 280px !important;
    /* Consistent height */
    overflow: hidden;
}

.card .card-image img {
    border-radius: 16px 16px 0 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    /* Ensure no stretching */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-image img {
    transform: scale(1.05);
    /* Zoom effect */
}

.card .card-content {
    padding: 24px !important;
}

.card .card-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

/* Section Headings */
.section h3.page-title {
    font-weight: 800 !important;
    font-size: 2.5rem !important;
    margin-bottom: 60px !important;
    text-align: left;
    position: relative;
    padding-left: 20px !important;
    border-left: 6px solid var(--accent-color);
}

.section h3.page-title::after {
    display: none;
}

/* Responsive */
@media only screen and (max-width: 992px) {

    main,
    footer {
        padding-left: 0 !important;
    }


    .caption {
        padding-top: 30px;
    }

    /* Fixed Mobile Header */
    nav.hide-on-large-only {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: #fff !important;
        box-shadow: 0 2px 1px rgba(0, 0, 0, 0.05) !important;
        height: 64px !important;
        line-height: 64px !important;
    }

    /* Fix Title in Navbar */
    nav.hide-on-large-only .name-title {
        height: 64px;
        line-height: 64px;
        position: absolute;
        left: 60px;
        /* Space for hamburger */
        right: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    nav.hide-on-large-only .name-title a#name {
        font-family: 'Space Grotesk', sans-serif !important;
        font-weight: 700 !important;
        font-size: 1.2rem !important;
        color: #000 !important;
        /* Black text */
    }

    nav.hide-on-large-only .name-title span {
        display: none;
        /* Hide subtitle on mobile to save space */
    }

    /* FIX: Hide the Desktop Sidebar completely on mobile to prevent conflict */
    ul.side-nav.fixed {
        display: none !important;
    }

    /* Style ONLY the Mobile Sidebar (#slide-out) */
    ul#slide-out {
        display: block !important;
        /* Always valid element for JS */
        width: 200px !important;
        box-sizing: border-box !important;
        /* Ensure padding doesn't expand width */
        background-color: #fff !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 10005 !important;
        /* Super High Z-Index to stay on top */
        top: 0 !important;
        padding-top: 0px !important;
        /* Move content way up */
        height: 100% !important;
        position: fixed !important;

        /* Correct Hiding Mechanism for Materialize 0.95 */
        /* We use 'left' instead of 'transform' so JS inline styles can override it */
        left: -340px;
        /* Increased from -300px to ensure total hiding */
        transition: left 0.3s ease;
        /* Smooth animation if JS doesn't animate */
    }

    /* REMOVE transform rule that caused conflict */
    /* ul#slide-out:not(.active) rule deleted */

    ul#slide-out .logo {
        margin-top: 15px !important;
        /* Small top margin */
        padding-top: 0 !important;
        margin-bottom: 10px !important;
        /* Reduce space below logo */
        height: auto !important;
        display: block !important;
    }

    ul#slide-out .profile-pic {
        margin: 0 auto !important;
        display: block !important;
        width: 120px !important;
        height: 120px !important;
    }

    /* Hamburger Menu Restyling - Integrated in Navbar */
    .button-collapse {
        display: block !important;
        float: left;
        position: relative;
        /* Reset fixed */
        left: 0;
        top: 0;
        z-index: 300;
        background: transparent !important;
        padding: 0 15px;
        margin: 0;
        border-radius: 0;
        box-shadow: none !important;
        border: none;
        color: #000 !important;
        height: 64px !important;
        line-height: 64px !important;
    }

    .button-collapse i {
        color: #000 !important;
        font-size: 28px;
        /* Standard size */
        line-height: 64px !important;
        margin: 0 !important;
    }

    /* Fix Width Issue - Reduce Gaps */
    .container {
        width: 100% !important;
        /* Full width */
        max-width: 100% !important;
        padding: 48px 24px !important;
        /* Precise edge padding (std 24px mobile) */
        margin: 0 !important;
    }

    /* Reset row margins that might cause overflow */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    h2 {
        font-size: 2.2rem !important;
    }
}

/* Specific Mobile Portrait Fixes */
@media only screen and (max-width: 600px) {
    #intro.section {
        /* padding-top: 10px !important; */
        /* SIGNIFICANTLY INCREASED to push content down */
        text-align: left !important;
        /* padding-top: -10px !important; */
        /* Force Left Alignment */
    }

    #intro .intro-content {
        padding-left: 0 !important;
        /* Remove left padding */
        margin-top: 0;
        display: block !important;
        /* Remove Flex/Center */
    }

    .profile-pic {
        width: 100px !important;
        height: 100px !important;
        margin: 0 0 20px 0 !important;
        /* Left align: 0 margin left/right */
        display: block;
        float: none;
    }

    h1 {
        font-size: 2.5rem !important;
        line-height: 1.1;
        margin-bottom: 12px;
    }

    .social {
        justify-content: flex-start !important;
        /* Left Align Social Icons */
        margin-top: 20px;
        margin-left: -5px;
        /* Alignment correction */
        display: flex;
        flex-wrap: wrap;
    }

    .icon-btn {
        width: 40px !important;
        height: 40px !important;
        line-height: 38px !important;
        font-size: 18px !important;
        margin: 0 8px 8px 0 !important;
        /* Spacing */
    }

    /* Buttons stacking - Left Aligned */
    .btn,
    .contactme,
    .readme {
        width: auto !important;
        /* Fit content, not full width */
        min-width: 140px;
        margin-bottom: 12px;
        margin-right: 10px;
        display: inline-block;
        text-align: center;
    }

    /* Fix card padding */
    .card .card-content {
        padding: 20px !important;
    }

    .section h3.page-title {
        font-size: 1.8rem !important;
        padding-left: 15px !important;
        border-width: 4px;
        margin-bottom: 30px !important;
    }
}

/* --- Code Snippet Decoration --- */
.code-snippet-container {
    position: absolute;
    right: 5%;
    top: 116%;
    transform: translateY(-50%);
    width: 400px;
    background: #111;
    /* Darker Monochrome background */
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    z-index: 0;
    opacity: 0.95;
    border: 1px solid #333;
    display: none;
    /* Hidden by default on mobile */
}

@media only screen and (min-width: 993px) {
    .code-snippet-container {
        display: block;
        /* Show only on desktop */
    }
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background-color: #333;
    /* Dark Grey */
}

.dot-yellow {
    background-color: #777;
    /* Medium Grey */
}

.dot-green {
    background-color: #bbb;
    /* Light Grey */
}

.code-content {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.6;
}

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

/* White Bold */
.string {
    color: #aaa;
    font-style: italic;
}

/* Light Grey Italic */
.function {
    color: #ccc;
}

/* Light Grey */
.comment {
    color: #666;
    font-style: italic;
}

/* Dark Grey Italic */
.bracket {
    color: #fff;
}


/* White */