/* Navbar Active Tab Styling */
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    background: var(--gradient-primary);
    margin: 0.25rem auto 0 auto;
    border-radius: 2px;
    transition: width 0.3s;
}
/* Navbar Toggler Custom Styles for Dark Mode */
:root[data-theme="dark"] .navbar-toggler {
        background-color: rgba(255,255,255,0.08);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        transition: var(--transition);
}

:root[data-theme="dark"] .navbar-toggler:focus,
:root[data-theme="dark"] .navbar-toggler:hover {
        background-color: rgba(255,255,255,0.18);
        border-color: var(--border-hover);
        outline: none;
}

/* Ensure toggler icon is visible in dark mode */
:root[data-theme="dark"] .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,0.85%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Sticky header (scrolled) toggler in dark mode */
:root[data-theme="dark"] .navbar.scrolled .navbar-toggler {
        background-color: rgba(30,30,30,0.95);
        border-color: var(--border-hover);
}

@media (max-width: 991.98px) {
    :root[data-theme="dark"] .navbar-toggler {
        margin-right: 0.5rem;
    }
}
/* Root Variables for Dark Theme */
:root[data-theme="dark"] {
    --primary-color: #00D4FF;
    --secondary-color: #8B5DFF;
    --accent-color: #FF6B9D;
    --success-color: #00F5A0;
    --warning-color: #FFD23F;
    --danger-color: #FF3B30;
    
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    
    --shadow-sm: 0 2px 10px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 212, 255, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 212, 255, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Root Variables for Light Theme */
:root[data-theme="light"] {
    --primary-color: #0066CC;
    --secondary-color: #6B46C1;
    --accent-color: #EC4899;
    --success-color: #059669;
    --warning-color: #D97706;
    --danger-color: #DC2626;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: rgba(0, 0, 0, 0.2);
    --border-hover: rgba(0, 0, 0, 0.2);
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

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

/* Utility Classes */
.z-index-2 {
    z-index: 2;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.brand-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
}

.section-padding {
    padding: 100px 0;

}
section.projects-hero.py-5.section-padding {
    margin: 100px 0 0 0;
}

.section-bg {
    background-color: var(--bg-secondary);
}

/* Navigation */
.custom-navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition);
}

[data-theme="light"] .custom-navbar {
    background: rgba(255, 255, 255, 0.95);
}


.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95) !important; /* Default: dark */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}
.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: rotate(180deg);
}

/* Hero Section */
.hero-section {
    background: var(--bg-primary);
    position: relative;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: 1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
}

.hero-buttons {
    margin-bottom: 2rem;
}

.custom-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.custom-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.custom-btn:hover::before {
    left: 100%;
}

.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.custom-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 50px;
    transition: var(--transition);
}

.custom-btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.25rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Profile Card */
.profile-card {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.profile-img-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gradient-primary);
    padding: 8px;
    animation: rotate 20s linear infinite;
}

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

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-primary);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: float-icon 6s ease-in-out infinite;
    animation-delay: var(--delay);
    backdrop-filter: blur(10px);
}

.floating-icon:nth-child(1) {
    top: 20%;
    right: 10%;
}

.floating-icon:nth-child(2) {
    bottom: 30%;
    left: 10%;
}

.floating-icon:nth-child(3) {
    top: 60%;
    right: -10%;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    height: 100%;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Skills Section */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 2s ease-in-out;
    width: 0%;
}

.soft-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

/* Project Cards */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-content span {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-top: 0.75rem;
    line-height: 1.6;
}

/* Contact Section */
.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.contact-info:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    color: white;
}

.contact-info h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--secondary-color);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
}

.contact-form .form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    color: var(--text-primary);
}

.contact-form .form-control::placeholder {
    color: var(--text-muted);
}

/* Footer */
.footer-bg {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

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

/* Projects Page Specific Styles */
.projects-hero {
    padding-top: 140px; /* Increased padding to prevent header overlap */
    background: var(--bg-primary);
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .profile-img-container {
        width: 250px;
        height: 250px;
    }
    
    .floating-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;

        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 0 5px;
    }
    
    .social-links {
        justify-content: center;
        margin: 2rem 0;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .theme-toggle {
        order: -1;
        margin-right: 1rem !important;
    }
    
    /* Fix projects hero padding for mobile */
    .projects-hero {
        padding-top: 120px;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .feature-card,
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background: var(--bg-card);
        border-radius: 15px;
        border: 1px solid var(--border-color);
        backdrop-filter: blur(10px);
    }
    
    /* Further adjust projects hero for small screens */
    .projects-hero {
        padding-top: 100px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

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

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
.timeline-dot {
    left: -22.5px;
}

/* Add to the end of style.css */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.25rem;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    /* Ensure the button doesn't cause overflow */
    overflow: hidden;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Responsive adjustments for back-to-top button */
@media (max-width: 576px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Ensure body and html don't cause unnecessary scrollbars */
html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}