
        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --primary-light: #818cf8;
            --secondary: #a5b4fc;
            --accent: #4f46e5;
            --light: #f8fafc;
            --dark: #1e293b;
            --text-light: #f1f5f9;
            --text-dark: #334155;
            --text-muted-light: #cbd5e1;
            --text-muted-dark: #64748b;
            --bg-card-light: #ffffff;
            --bg-card-dark: #2d3748;
            --bg-section-light: #f1f5f9;
            --bg-section-dark: #1a202c;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --transition: all 0.3s ease;
            --navbar-height: 80px;
            --scroll-margin: 100px;
        }        

        html{
            scroll-behavior: smooth;
            scroll-padding-top: 70px;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--light);
            color: var(--text-dark);
            transition: var(--transition);
            overflow-x: hidden;
            padding-top: var(--navbar-height);
        }

        body.dark-mode {
            background-color: var(--dark);
            color: var(--text-light);
        }

        .text-muted {
            color: var(--text-muted-dark) !important;
        }

        .dark-mode .text-muted {
            color: var(--text-muted-light) !important;
        }

        .bg-light {
            background-color: var(--bg-section-light) !important;
        }

        .dark-mode .bg-light {
            background-color: var(--bg-section-dark) !important;
            color: var(--text-light);
        }

        .section-title {
            color: var(--text-dark);
        }

        .dark-mode .section-title {
            color: var(--text-light);
        }

        .navbar {
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            background-color: rgba(255, 255, 255, 0.9);
            box-shadow: var(--shadow);
            transition: var(--transition);
            padding: 15px 0;
        }

        .dark-mode .navbar {
            background-color: rgba(30, 41, 59, 0.95);
        }

        .navbar-toggler {
            border-color: var(--text-dark);
            color: var(--text-dark);
        }
        
        .navbar-toggler:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
        }

        .dark-mode .navbar-toggler {
            border-color: var(--text-light);
            color: var(--text-light);
        }

        .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='rgba(51, 65, 85, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

        .dark-mode .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='rgba(241, 245, 249, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

        .navbar-brand {
            font-weight: 700;
            color: var(--primary);
            font-size: 1.5rem;
            position: relative;
            overflow: hidden;
        }
        .navbar-brand img{
            height: 40px;
            width: auto;
        }

        .navbar-brand::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

        .navbar-brand:hover::after {
            transform: translateX(0);
        }

        /* Fixed nav link styling */
        .nav-link {
            color: var(--text-dark);
            margin: 0 10px;
            position: relative;
            transition: var(--transition);
            font-weight: 500;
            padding: 8px 15px;
            border-radius: 30px;
            text-decoration: none;
        }

        .dark-mode .nav-link {
            color: var(--text-light);
        }

        .nav-link:hover {
            background-color: rgba(99, 102, 241, 0.1);
            color: var(--primary);
        }

        .nav-link.active {
            background-color: var(--primary);
            color: white !important;
        }

        .hero {
            min-height: calc(100vh - 80px);
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
            padding: 80px 0;
        }

        .hero-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }

        .hero-content {
            z-index: 1;
        }

        .hero-title {
            font-size: 4rem;
            font-weight: 800;
            margin-bottom: 1rem;
            background: linear-gradient(45deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
        }

        .hero-subtitle {
            font-size: 1.5rem;
            margin-bottom: 2rem;
            color: var(--text-dark);
            position: relative;
            display: inline-block;
        }

        .dark-mode .hero-subtitle {
            color: var(--text-light);
        }

        .typing-text {
            position: relative;
            display: inline-block;
            color: var(--primary);
            font-weight: 600;
        }

        .dark-mode .typing-text {
            color: var(--primary-light);
        }

        .typing-text::after {
            content: '|';
            position: absolute;
            right: -8px;
            animation: blink 1s infinite;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .btn-custom {
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border: none;
            color: white;
            padding: 12px 30px;
            border-radius: 50px;
            font-weight: 600;
            box-shadow: var(--shadow);
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .btn-custom::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 0%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            transition: all 0.5s ease;
            z-index: -1;
        }

        .btn-custom:hover::before {
            width: 100%;
        }

        .btn-custom:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
        }

        .dark-mode .btn-outline {
            border-color: var(--secondary);
            color: var(--secondary);
        }

        .btn-outline:hover {
            background: var(--primary);
            color: white;
        }

        .dark-mode .btn-outline:hover {
            background: var(--secondary);
        }

        .section {
            padding: 50px 0 100px 0;
            position: relative;
            scroll-margin-top: var(--scroll-margin);
        }

        .section-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 3rem;
            text-align: center;
            position: relative;
            display: inline-block;
        }

        .section-title:after {
            content: '';
            position: absolute;
            width: 50%;
            height: 4px;
            bottom: -10px;
            left: 25%;
            background: linear-gradient(45deg, var(--primary), var(--accent));
            border-radius: 2px;
        }

        .card {
            border-radius: 15px;
            border: none;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            background-color: var(--bg-card-light);
        }

        .dark-mode .card {
            background-color: var(--bg-card-dark);
        }

        .card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
        }

        .card-icon {
            font-size: 3rem;
            margin-bottom: 1.5rem;
            color: var(--primary);
            transition: all 0.5s ease;
        }

        .dark-mode .card-icon {
            color: var(--primary-light);
        }

        .card:hover .card-icon {
            transform: rotateY(360deg);
        }

        .skill-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
            color: var(--primary);
            transition: all 0.5s ease;
        }

        .dark-mode .skill-icon {
            color: var(--primary-light);
        }

        .skill-card:hover .skill-icon {
            animation: bounce 1s ease infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        /* Fixed project card styling */
        .project-card {
            position: relative;
            height: 100%;
            min-height: 250px;
            border-radius: 15px;
            overflow: hidden;
            transition: all 0.5s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }


        .project-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 20px;
            opacity: 0;
            transition: var(--transition);
            border-radius: 15px; /* Maintain border radius for overlay */
            z-index: 2;
        }

        .project-card:hover .project-overlay {
            opacity: 1;
        }

        .project-title {
            color: white;
            font-weight: 600;
            margin-bottom: 5px;
        }

        .project-tags {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
            margin-bottom: 15px;
        }

        .project-tag {
            background-color: var(--primary);
            color: white;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.8rem;
        }

        /* Added view project button */
        .view-project-btn {
            background-color: white;
            color: var(--primary);
            border: none;
            padding: 8px 20px;
            border-radius: 30px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: var(--transition);
            text-decoration: none;
            display: inline-block;
            text-align: center;
            margin-top: 10px;
            
        }

        .view-project-btn:hover {
            background-color: var(--primary);
            color: white;
            transform: translateY(-3px);
        }

        .project-icon {
            font-size: 5rem;
            color: white;
            opacity: 0.5;
            transition: var(--transition);
            z-index: 1;
        }

        .project-card:hover .project-icon {
            opacity: 0.2;
            transform: scale(1.2);
        }

        .timeline {
            position: relative;
            padding-left: 30px;
        }

        .timeline:before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 2px;
            height: 100%;
            background: linear-gradient(to bottom, var(--primary), var(--secondary));
        }

        .timeline-item {
            position: relative;
            padding-bottom: 30px;
        }

        .timeline-item:before {
            content: '';
            position: absolute;
            left: -39px;
            top: 0;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: var(--primary);
            border: 4px solid white;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }

        .dark-mode .timeline-item:before {
            border-color: var(--dark);
            background-color: var(--primary-light);
        }

        .timeline-item:hover:before {
            transform: scale(1.3);
            background-color: var(--accent);
        }

        .timeline-date {
            font-size: 0.9rem;
            color: var(--primary);
            font-weight: 600;
        }

        .dark-mode .timeline-date {
            color: var(--primary-light);
        }

        .timeline-title {
            font-weight: 600;
            margin: 5px 0;
            color: var(--text-dark);
        }

        .dark-mode .timeline-title {
            color: var(--text-light);
        }

        .timeline-subtitle {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .contact-icon {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 1rem;
            transition: var(--transition);
        }

        .dark-mode .contact-icon {
            color: var(--primary-light);
        }

        .contact-card:hover .contact-icon {
            transform: scale(1.2);
        }

        /* Fixed form control colors in dark mode */
        .form-control {
            border-radius: 10px;
            padding: 12px;
            border: 1px solid #e2e8f0;
            background-color: #f8fafc;
            color: var(--text-dark);
            transition: var(--transition);
        }

        .dark-mode .form-control {
            background-color: #2d3748;
            border-color: #4a5568;
            color: var(--text-light);
        }

        .dark-mode .form-control::placeholder {
            color: #a0aec0;
        }

        .form-control:focus {
            box-shadow: none;
            border-color: var(--primary);
        }

        .footer {
            background-color: var(--dark);
            color: var(--text-light);
            padding: 25px 0;
        }

        .social-icon {
            width: 40px;
            height: 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            margin: 0 5px;
            color: white;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            text-decoration: none;
        }

        .social-icon:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--primary);
            border-radius: 50%;
            transform: scale(0);
            transition: all 0.3s ease;
            z-index: -1;
        }

        .social-icon:hover:before {
            transform: scale(1);
        }

        .social-icon:hover {
            transform: translateY(-5px);
            color: white;
        }

        /* Fixed mode toggle position */
        .mode-toggle {
            position: fixed;
            top: 12px;
            right: 40px;
            z-index: 1100;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }
        @media (max-width:768px) {
            .mode-toggle{
                top: 17px;
                right: 90px;
                width: 40px;
                height: 40px;
            }
            
        }

        .dark-mode .mode-toggle {
            background-color: var(--primary-dark);
        }

        .mode-toggle:hover {
            transform: rotate(45deg);
        }

        /* Added back to top button */
        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1100;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: var(--transition);
            opacity: 0;
            visibility: hidden;
        }

        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }

        .dark-mode .back-to-top {
            background-color: var(--primary-dark);
        }

        .back-to-top:hover {
            transform: translateY(-5px);
        }

        .shape {
            position: absolute;
            z-index: -1;
            opacity: 0.1;
        }

        .dark-mode .shape {
            opacity: 0.05;
        }

        .shape-1 {
            top: 10%;
            left: 5%;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background-color: var(--primary);
            animation: float 8s ease-in-out infinite;
        }

        .shape-2 {
            bottom: 10%;
            right: 5%;
            width: 200px;
            height: 200px;
            border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
            background-color: var(--accent);
            animation: float 10s ease-in-out infinite reverse;
        }

        @keyframes float {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(10px, -10px) rotate(5deg); }
            50% { transform: translate(0, 15px) rotate(0deg); }
            75% { transform: translate(-10px, -5px) rotate(-5deg); }
        }

        .avatar {
            width: 300px;
            height: 300px;
            border-radius: 50%;
            overflow: hidden;
            border: 5px solid var(--primary);
            box-shadow: var(--shadow);
            animation: morph 8s ease-in-out infinite;
        }

        .dark-mode .avatar {
            border-color: var(--primary-light);
        }

        @keyframes morph {
            0%, 100% { border-radius: 50%; }
            25% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
            50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
            75% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
        }

        /* Grid layout for projects and skills */
        .grid-container {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            grid-auto-rows: minmax(100px, auto);
            gap: 20px;
        }

        .grid-item {
            border-radius: 15px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
            background-color: var(--bg-card-light);
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .dark-mode .grid-item {
            background-color: var(--bg-card-dark);
        }

        .grid-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
        }

        .grid-item-1 {
            grid-column: span 6;
            grid-row: span 2;
        }

        .grid-item-2 {
            grid-column: span 6;
            grid-row: span 1;
        }

        .grid-item-3 {
            grid-column: span 3;
            grid-row: span 1;
        }

        .grid-item-4 {
            grid-column: span 3;
            grid-row: span 1;
        }

        .grid-item-5 {
            grid-column: span 4;
            grid-row: span 2;
        }

        .grid-item-6 {
            grid-column: span 4;
            grid-row: span 1;
        }

        .grid-item-7 {
            grid-column: span 4;
            grid-row: span 1;
        }
        .grid-item-12 {
            grid-column: span 12;
            grid-row: span 1;
        }

        @media (max-width: 992px) {
            .grid-item-1, .grid-item-2, .grid-item-5 {
                grid-column: span 12;
            }
            .grid-item-3, .grid-item-4 {
                grid-column: span 6;
            }
            .grid-item-6, .grid-item-7 {
                grid-column: span 6;
            }
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 2.5rem;
            }
            .hero-subtitle {
                font-size: 1.2rem;
            }
            .section {
                padding: 60px 0;
            }
            .section-title {
                font-size: 2rem;
            }
            .avatar {
                width: 200px;
                height: 200px;
                margin-top: 40px; /* Added more gap for smaller screens */
            }
            .grid-item-3, .grid-item-4, .grid-item-6, .grid-item-7 {
                grid-column: span 12;
            }
        }

        /* Animated background */
        .animated-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }

        .animated-bg span {
            position: absolute;
            display: block;
            width: 20px;
            height: 20px;
            background: rgba(99, 102, 241, 0.1);
            animation: animate 25s linear infinite;
            bottom: -150px;
            border-radius: 50%;
        }

        .dark-mode .animated-bg span {
            background: rgba(165, 180, 252, 0.1);
        }

        .animated-bg span:nth-child(1) {
            left: 25%;
            width: 80px;
            height: 80px;
            animation-delay: 0s;
        }

        .animated-bg span:nth-child(2) {
            left: 10%;
            width: 20px;
            height: 20px;
            animation-delay: 2s;
            animation-duration: 12s;
        }

        .animated-bg span:nth-child(3) {
            left: 70%;
            width: 20px;
            height: 20px;
            animation-delay: 4s;
        }

        .animated-bg span:nth-child(4) {
            left: 40%;
            width: 60px;
            height: 60px;
            animation-delay: 0s;
            animation-duration: 18s;
        }

        .animated-bg span:nth-child(5) {
            left: 65%;
            width: 20px;
            height: 20px;
            animation-delay: 0s;
        }

        .animated-bg span:nth-child(6) {
            left: 75%;
            width: 110px;
            height: 110px;
            animation-delay: 3s;
        }

        .animated-bg span:nth-child(7) {
            left: 35%;
            width: 150px;
            height: 150px;
            animation-delay: 7s;
        }

        .animated-bg span:nth-child(8) {
            left: 50%;
            width: 25px;
            height: 25px;
            animation-delay: 15s;
            animation-duration: 45s;
        }

        .animated-bg span:nth-child(9) {
            left: 20%;
            width: 15px;
            height: 15px;
            animation-delay: 2s;
            animation-duration: 35s;
        }

        .animated-bg span:nth-child(10) {
            left: 85%;
            width: 150px;
            height: 150px;
            animation-delay: 0s;
            animation-duration: 11s;
        }

        @keyframes animate {
            0% {
                transform: translateY(0) rotate(0deg);
                opacity: 1;
                border-radius: 0;
            }
            100% {
                transform: translateY(-1000px) rotate(720deg);
                opacity: 0;
                border-radius: 50%;
            }
        }

        /* Animated text reveal */
        .reveal-text {
            position: relative;
            display: inline-block;
            color: transparent;
        }

        .reveal-text::before {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            color: var(--primary);
            overflow: hidden;
            border-right: 3px solid var(--primary);
            animation: typing 3s steps(30) forwards;
        }

        .dark-mode .reveal-text::before {
            color: var(--primary-light);
            border-right-color: var(--primary-light);
        }

        @keyframes typing {
            0% { width: 0; }
            100% { width: 100%; }
        }

        /* Menu enhancement */
        .menu-item {
            position: relative;
            overflow: hidden;
        }

        .menu-item::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--primary);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

        .dark-mode .menu-item::before {
            background-color: var(--primary-light);
        }

        .menu-item:hover::before {
            transform: translateX(0);
        }

        /* Scroll indicator */
        .scroll-indicator {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            animation: bounce 2s infinite;
        }

        .scroll-indicator span {
            display: block;
            width: 30px;
            height: 50px;
            border: 2px solid var(--primary);
            border-radius: 50px;
            position: relative;
        }

        .dark-mode .scroll-indicator span {
            border-color: var(--primary-light);
        }

        .scroll-indicator span::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 50%;
            width: 6px;
            height: 6px;
            margin-left: -3px;
            background-color: var(--primary);
            border-radius: 50%;
            animation: scroll 2s infinite;
        }

        .dark-mode .scroll-indicator span::before {
            background-color: var(--primary-light);
        }

        @keyframes scroll {
            0% { transform: translateY(0); opacity: 1; }
            100% { transform: translateY(15px); opacity: 0; }
        }

        /* Circle progress for language skills */
        .circle-progress {
            position: relative;
            width: 80px;
            height: 80px;
        }

        .circle-progress svg {
            transform: rotate(-90deg);
        }

        .circle-progress .position-absolute {
            font-weight: 600;
            color: var(--primary);
        }

        .dark-mode .circle-progress .position-absolute {
            color: var(--primary-light);
        }

        .dark-mode .circle-progress svg circle:nth-child(2) {
            stroke: var(--primary-light);
        }

        /* Improved text contrast */
        .text-primary {
            color: var(--primary) !important;
        }

        .dark-mode .text-primary {
            color: var(--primary-light) !important;
        }

        /* Card title colors */
        .grid-item h3, .grid-item h4 {
            color: var(--text-dark);
        }

        .dark-mode .grid-item h3, .dark-mode .grid-item h4 {
            color: var(--text-light);
        }

        .tech-icon {
            font-size: 50px;
            max-width: 50px;
            max-height: 50px;
            margin: 0 15px;
        }

        .html-icon { color: #E44D26; }

        .css-icon { color: #264DE4; }

        .js-icon { color: #F7DF1E; }

        .bootstrap-icon { color: #7952B3; }
