:root {
    --primary-color: #1a237e;
    --primary-light: #3949ab;
    --secondary-color: #00bcd4;
    --accent-color: #ff6f00;
    --accent-light: #ffb74d;
    --text-color: #2c3e50;
    --light-text-color: #ffffff;
    --bg-color: #ffffff;
    --light-bg-color: #f8faff;
    --dark-bg-color: #0a0e27;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
}

/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Custom Navbar */
/* Enhanced Navbar Styles */
.custom-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 35, 126, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    min-height: 80px;
}

.custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    border-bottom-color: rgba(26, 35, 126, 0.15);
}

/* Navbar Container */
.custom-navbar .container {
    padding: 0 30px;
}

/* Enhanced Navbar Brand */
.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 20px 0;
    position: relative;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.navbar-brand span:first-child {
    color: var(--primary-color);
    position: relative;
}

.navbar-brand span:last-child {
    color: var(--accent-color);
    margin-left: 2px;
    position: relative;
}

/* Add subtle glow effect on hover */
.navbar-brand:hover span:first-child {
    text-shadow: 0 0 10px rgba(26, 35, 126, 0.3);
}

.navbar-brand:hover span:last-child {
    text-shadow: 0 0 10px rgba(255, 111, 0, 0.3);
}

/* Enhanced Navigation Menu */
.navbar-nav {
    align-items: center;
    gap: 10px;
}

.nav-item {
    position: relative;
}

/* Enhanced Nav Links */
.nav-link {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-color) !important;
    padding: 12px 20px !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

/* Hover effect with background */
.nav-link:hover {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08) 0%, rgba(26, 35, 126, 0.12) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.15);
}

/* Active state */
.nav-link.active {
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.1) 0%, rgba(26, 35, 126, 0.15) 100%);
    font-weight: 600;
}

/* Animated underline effect */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
}

/* Enhanced Contact Button */
.nav-link.btn.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--accent-color) 100%) !important;
    border: none !important;
    color: white !important;
    padding: 14px 28px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
    margin-left: 15px;
}

.nav-link.btn.btn-primary::before {
    display: none; /* Remove underline for button */
}

/* Button hover effect */
.nav-link.btn.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(26, 35, 126, 0.4) !important;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-color) 50%, var(--accent-light) 100%) !important;
    color: white !important;
}

/* Button active state */
.nav-link.btn.btn-primary:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.5) !important;
}

/* Enhanced Mobile Toggle Button */
.navbar-toggler {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(26, 35, 126, 0.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.2);
    outline: none;
}

.navbar-toggler:hover {
    background: rgba(26, 35, 126, 0.1);
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231a237e' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll hide/show effect */
.navbar-hidden {
    transform: translateY(-100%);
}

/* Focus states for accessibility */
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    color: var(--primary-color) !important;
}

.navbar-brand:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .custom-navbar {
        background: white;
        border-bottom: 2px solid var(--primary-color);
    }

    .nav-link {
        border: 1px solid transparent;
    }

    .nav-link:hover,
    .nav-link:focus {
        border-color: var(--primary-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .custom-navbar,
    .nav-link,
    .navbar-brand,
    .navbar-toggler {
        transition: none;
    }

    .nav-link::before {
        transition: none;
    }

    @keyframes slideInUp {
        from, to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}


/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    padding-top: 80px;
    z-index: 1; /* Base z-index for section */
}

.hero-section .container {
    position: relative;
    z-index: 10; /* Above background shapes */
}

.hero-content {
    position: relative;
    z-index: 15; /* Ensure content is above everything */
}

.profile-container {
    max-width: 300px;
}

.profile-image {
    width: 220px;
    height: 220px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(15px);
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-icon-wrapper {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 111, 0, 0.3);
}

.profile-icon {
    font-size: 3.5rem;
    color: var(--light-text-color);
}

.profile-ring {
    width: 260px;
    height: 260px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    border-top: 3px solid transparent;
    border-right: 3px solid transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    animation: rotate 15s linear infinite;
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 111, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 111, 0, 0); }
}

/* Background Shapes */
background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Keep background elements behind */
    pointer-events: none; /* Prevent interference with clicks */
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite linear;
    z-index: 1; /* Keep shapes in background */
    pointer-events: none; /* Prevent interference */
}


.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    top: 10%;
    left: 10%;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    top: 60%;
    right: 10%;
    animation-delay: -7s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-light);
    bottom: 20%;
    left: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(0px) rotate(180deg); }
    75% { transform: translateY(20px) rotate(270deg); }
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    left: 12px;
    top: 25px;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 0 4px var(--primary-color);
    z-index: 2;
}

.timeline-content {
    border-left: 4px solid var(--accent-color) !important;
}

.timeline-content:hover {
    transform: translateX(10px);
    transition: transform 0.3s ease;
}

/* Pulse ring animation for current position */
.pulse-ring {
    width: 48px;
    height: 48px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse-ring 2s infinite ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Project Cards */
.project-card {
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-15px);
}

/* Skill Cards */
.skill-link {
    display: block;
    transition: all 0.3s ease;
}

.skill-link:hover {
    text-decoration: none;
    transform: translateY(-5px);
}

.skill-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 0;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.skill-icon {
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

.skill-card:hover .skill-icon i {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Progress bar animations */
.progress {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    transition: width 1.5s ease-in-out;
    border-radius: 3px;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Category headers */
.skills-category {
    position: relative;
    margin-bottom: 3rem;
}

.skills-category h4 {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background: white;
    z-index: 2;
}

.skills-category h4::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100vw;
    right: -100vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    z-index: -1;
}

/* Skill level indicators */
.text-muted {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* External link indicator */
.skill-link::after {
    content: '\f35d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.skill-link:hover::after {
    opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .skill-card {
        margin-bottom: 20px;
    }

    .skill-icon {
        margin-bottom: 15px;
    }

    .skill-icon i {
        font-size: 2.5rem !important;
    }

    h4 {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
}

/* Intersection Observer Animation */
.skill-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays */
.skill-card:nth-child(1) { transition-delay: 0.1s; }
.skill-card:nth-child(2) { transition-delay: 0.2s; }
.skill-card:nth-child(3) { transition-delay: 0.3s; }
.skill-card:nth-child(4) { transition-delay: 0.4s; }


/* Recommendations Section */
#recommendations {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

#recommendations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.recommendation-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.recommendation-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: rgba(102, 126, 234, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 1;
}

.recommendation-card .card-body {
    position: relative;
    z-index: 2;
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: -70px;
}

.carousel-control-next {
    right: -70px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Auto-play indicator */
.carousel-indicators {
    bottom: -50px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    margin: 0 5px;
}

.carousel-indicators .active {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Contact Form Styles */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 111, 0, 0.25);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {

    .profile-container {
        margin-top: 50px; /* Add bottom margin */
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-image {
        width: 160px;
        height: 160px;
        margin: 0 auto 20px auto; /* Center and add margin */
    }

    .profile-ring {
        width: 200px;
        height: 200px;
    }

    .profile-icon-wrapper {
        width: 90px;
        height: 90px;
    }

    .profile-icon {
        font-size: 2.5rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-dot {
        left: 7px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-content {
        margin-left: 0 !important;
        margin-left: 45px;
    }

    .pulse-ring {
        width: 40px;
        height: 40px;
    }

    .recommendation-card {
        margin: 0 10px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: -60px;
        transform: none;
    }

    .carousel-control-prev {
        left: 50%;
        transform: translateX(-60px);
    }

    .carousel-control-next {
        right: 50%;
        transform: translateX(60px);
    }

    .recommendation-card .d-flex {
        flex-direction: column;
        text-align: center;
    }

    .recommendation-card .d-flex > div:first-child {
        margin-bottom: 15px;
        margin-right: 0 !important;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 0 20px; /* Add horizontal padding */
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 200px; /* Prevent buttons from being too wide */
        padding: 15px 20px;
        margin-bottom: 15px;
        font-size: 1rem;
        white-space: nowrap; /* Prevent text wrapping */
    }
}

@media (max-width: 480px) {

    .profile-container {
        margin-top: 50px; /* Add bottom margin */
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .profile-ring {
        width: 180px;
        height: 180px;
    }

    .display-3 {
        font-size: 2rem;
    }

    .cta-buttons {
        padding: 0 15px;
    }

    .cta-buttons .btn {
        max-width: 200px;
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-dot {
        left: 4px;
        width: 16px;
        height: 16px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-content {
        margin-left: 35px !important;
        padding: 20px !important;
    }

    .pulse-ring {
        width: 32px;
        height: 32px;
    }

    .timeline-date {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .skill-card .card-body {
        padding: 20px 15px;
    }

    .skill-icon i {
        font-size: 2rem !important;
    }

    h6 {
        font-size: 0.9rem;
    }
    .recommendation-card {
        margin: 0 5px;
    }

    .recommendation-card .card-body {
        padding: 20px !important;
    }

    .recommendation-card .d-flex > div:first-child {
        width: 60px !important;
        height: 60px !important;
    }

    .recommendation-card .d-flex > div:first-child span {
        font-size: 1.2rem !important;
    }
}
