/* Modern Sleek Design Enhancements */

/* CSS Variables for Modern Color Scheme - Dark Theme (Default) */
:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --secondary-color: #5D6D7E;
    --accent-gradient: linear-gradient(135deg, #4A90E2 0%, #50C9C3 100%);
    --text-dark: #E8E9ED;
    --text-light: #B8BFCC;
    --text-muted: #8892A6;
    --bg-dark: #0F1419;
    --bg-secondary: #1A1F2E;
    --bg-tertiary: #252C3D;
    --bg-light: #1A1F2E;
    --bg-white: #252C3D;
    --border-color: rgba(74, 144, 226, 0.1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.5);
    --glow-sm: 0 0 20px rgba(74, 144, 226, 0.2);
    --glow-md: 0 0 30px rgba(74, 144, 226, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-mode {
    --text-dark: #2C3E50;
    --text-light: #000000;
    --text-muted: #95a5a6;
    --bg-dark: #ffffff;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #E9ECEF;
    --bg-light: #F4F6F9;
    --bg-white: #ffffff;
    --border-color: rgba(74, 144, 226, 0.15);
    --shadow-sm: 0 2px 10px rgba(74, 144, 226, 0.08);
    --shadow-md: 0 8px 25px rgba(74, 144, 226, 0.15);
    --shadow-lg: 0 15px 40px rgba(74, 144, 226, 0.12);
    --glow-sm: 0 0 15px rgba(74, 144, 226, 0.1);
    --glow-md: 0 0 25px rgba(74, 144, 226, 0.15);
}

/* Modern Typography - Dark Theme */
body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--bg-dark);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
}

p {
    color: var(--text-light) !important;
}

.subtitle, .text-muted {
    color: var(--text-muted) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern Header with Gradient Overlay - Dark Theme */
.header {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.9) 0%, rgba(26, 31, 46, 0.95) 70%, rgba(74, 144, 226, 0.3) 100%), 
                url(../imgs/header.jpg) center/cover;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    border-bottom: 1px solid var(--border-color);
}

body.light-mode .header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(74, 144, 226, 0.6) 100%), 
                url(../imgs/header.jpg) center/cover;
    box-shadow: inset 0 0 100px rgba(74, 144, 226, 0.2);
}

.header-content {
    text-shadow: 0 2px 20px rgba(74, 144, 226, 0.5), 0 4px 30px rgba(0,0,0,0.8);
}

body.light-mode .header-content {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-title, .header-subtitle, .header-mono {
    color: var(--text-dark);
}

body.light-mode .header-title,
body.light-mode .header-subtitle,
body.light-mode .header-mono {
    color: #2C3E50;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* Theme Toggle Switch */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.theme-toggle-checkbox {
    display: none;
}

.theme-toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 60px;
    height: 30px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.theme-toggle-label:hover {
    border-color: var(--primary-color);
    box-shadow: var(--glow-sm);
}

.theme-toggle-label i {
    font-size: 14px;
    z-index: 1;
    transition: var(--transition);
}

.theme-toggle-label .ti-moon {
    color: var(--primary-color);
}

.theme-toggle-label .ti-sun {
    color: var(--text-muted);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .ti-moon {
    color: var(--text-muted);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .ti-sun {
    color: #FDB813;
}

.theme-toggle-ball {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-ball {
    transform: translateX(30px);
}

/* Modern Navbar with Glassmorphism - Dark Theme */
.navbar {
    background: rgba(26, 31, 46, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-light {
    background: rgba(26, 31, 46, 0.95) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-dark) !important;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-light .navbar-toggler {
    border-color: var(--border-color);
}

.navbar-light .navbar-toggler-icon {
    filter: invert(1);
}

.navbar .nav-link {
    position: relative;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 70%;
}

/* Modern Card Design - Dark Theme */
.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    background: var(--bg-secondary);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--glow-sm);
    border-color: rgba(74, 144, 226, 0.3);
}

.card-header {
    border: none;
    background: transparent;
    padding: 1.5rem 1.5rem 0;
}

.card-body {
    padding: 1.5rem;
}

/* Modern About Section - Dark Theme */
.about-section {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color) !important;
}

.about-card {
    transition: var(--transition);
    position: relative;
    border-right: 1px solid var(--border-color) !important;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(74, 144, 226, 0.08) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.about-card:hover::before {
    opacity: 1;
}

/* Modern Section Styling - Dark Theme */
.section {
    position: relative;
    background-color: var(--bg-dark);
}

.section.bg-custom-gray {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
}

.bs-custom-gray {
    background: var(--bg-secondary) !important;
}

/* Modern Button Styles */
.btn {
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-outline-danger {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

/* Modern Progress Bars */
.progress {
    height: 8px;
    border-radius: 50px;
    background: rgba(74, 144, 226, 0.1);
    overflow: visible;
}

.progress-bar {
    border-radius: 50px;
    background: var(--accent-gradient);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

/* Portfolio Items Enhancement */
.portfolio-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.portfolio-item img {
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item .content-holder {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.95) 0%, rgba(80, 201, 195, 0.95) 100%);
    backdrop-filter: blur(10px);
}

/* Modern Social Icons - Dark Theme */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-item {
    transition: var(--transition);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-dark) !important;
}

.social-link:hover {
    background: var(--accent-gradient);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.5), var(--glow-md);
    border-color: transparent;
    color: white !important;
}

/* Modern Line Accent */
.line {
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Typing Cursor */
.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Modern Contact Section - Dark Theme */
.contact {
    background-color: var(--bg-dark);
}

.contact-info-card {
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--glow-sm);
    border-color: rgba(74, 144, 226, 0.3);
}

.contact-title {
    color: var(--text-dark);
}

/* Brand Avatar Enhancement */
.brand-img {
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.brand-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.3);
}

/* Modern Filter Buttons */
.filters a {
    border-radius: 25px;
    transition: var(--transition);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.filters a.active {
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

/* Expertise Icons Enhancement */
.about-card .ti {
    transition: var(--transition);
}

.about-card:hover .ti {
    color: var(--primary-color);
    transform: scale(1.15);
}

/* Modern Footer - Dark Theme */
.footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    box-shadow: var(--glow-sm);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .about-card {
        border-right: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .card {
        margin-bottom: 20px;
    }
}

/* Smooth Page Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Modern Scrollbar - Dark Theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 50px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    box-shadow: var(--glow-sm);
}

/* Additional Dark Theme Styles */
.info span {
    color: var(--text-dark) !important;
}

.info {
    color: var(--text-light) !important;
}

.brand-title {
    color: var(--text-dark) !important;
}

.brand-subtitle {
    color: var(--text-light) !important;
}

hr {
    border-color: var(--border-color) !important;
}

.text-danger {
    color: var(--primary-color) !important;
}

/* Input and form elements */
input, textarea, select {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-dark) !important;
    border-color: var(--border-color) !important;
}

input:focus, textarea:focus, select:focus {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25) !important;
}

/* Light Mode Typography Overrides */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: #1a1f2e !important;
    font-weight: 600;
}

body.light-mode p {
    color: #495057 !important;
}

body.light-mode .subtitle,
body.light-mode .text-muted {
    color: #6c757d !important;
}

body.light-mode .info span {
    color: #1a1f2e !important;
}

body.light-mode .info {
    color: #495057 !important;
}

body.light-mode .brand-title {
    color: #1a1f2e !important;
}

body.light-mode .brand-subtitle {
    color: #2c3e50 !important;
}

/* Light Mode Navbar Overrides */
body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar-light .navbar-nav .nav-link {
    color: #1a1f2e !important;
}

body.light-mode .navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

body.light-mode .navbar-light .navbar-toggler-icon {
    filter: invert(0);
}

body.light-mode .card-body {
    color: #495057;
}

body.light-mode .about-card h3,
body.light-mode .about-card h5,
body.light-mode .about-card h6 {
    color: #1a1f2e !important;
}

body.light-mode .about-card p {
    color: #495057 !important;
}

/* Contact Section Icons */
.contact-info-card i,
.ti-envelope,
.icon-md {
    color: #E8E9ED !important;
}

/* Contact Social Icons - Lighter in Dark Mode */
.contact-social-icons .social-link i {
    color: #FFFFFF !important;
    opacity: 0.95;
}

.contact-social-icons .social-link:hover i {
    color: #4A90E2 !important;
}

/* Light Mode Contact Section Icons */
body.light-mode .contact-info-card i,
body.light-mode .ti-envelope {
    color: #1a1f2e !important;
}

body.light-mode .contact-social-icons .social-link i {
    color: #2C3E50 !important;
    opacity: 1;
}

body.light-mode .contact-social-icons .social-link:hover i {
    color: #4A90E2 !important;
}
