:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --background-dark: #0f172a;
    --background-light: #f8fafc;
    --text-dark: #e2e8f0;
    --text-light: #1e293b;
    --card-bg-dark: #1e293b;
    --card-bg-light: #ffffff;
    --nav-bg-dark: rgba(15, 23, 42, 0.95);
    --nav-bg-light: rgba(248, 250, 252, 0.95);
    --border-radius: 12px;
    --box-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 cubic-bezier(0.25, 0.8, 0.25, 1);
}

:root.light-mode {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #2563eb;
    --secondary-dark: #1d4ed8;
    --background-dark: #f8fafc;
    --background-light: #0f172a;
    --text-dark: #1e293b;
    --text-light: #e2e8f0;
    --card-bg-dark: #ffffff;
    --card-bg-light: #1e293b;
    --nav-bg-dark: rgba(248, 250, 252, 0.95);
    --nav-bg-light: rgba(15, 23, 42, 0.95);
}

body {
    background: var(--background-dark);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    transition: background 0.5s, color 0.5s;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

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

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

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

/* Navbar */
.navbar {
    background: var(--nav-bg-dark);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: var(--primary-color);
    font-weight: 700;
}

:root.light-mode .navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-dark);
    margin: 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
}

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

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

.nav-link.active{
    color: var(--primary-color) !important;
}

/* Active link text color in light mode */
:root.light-mode .nav-link.active {
    color: #000 !important;
}

:root.light-mode .navbar-dark .nav-link {
    color: #1e293b; /* dark text for light mode */
}

:root.light-mode .navbar-dark .nav-link.active {
    color: var(--primary-color) !important;
}

/* Navbar Toggle */
.navbar-toggler {
    border: 1px solid var(--text-dark);
}

:root.light-mode .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='black' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.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(226, 232, 240, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Profile Picture */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.profile-picture-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.profile-picture {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    animation: floating 4s ease-in-out infinite;
    transition: var(--transition);
}

.profile-picture-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 2px dashed var(--primary-color);
    animation: spin 15s linear infinite;
    opacity: 0.7;
    z-index: -1;
}

:root.light-mode .profile-picture {
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(37, 99, 235, 0.03)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: cover;
    z-index: -1;
    opacity: 0.5;
}

:root.light-mode section::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(16, 185, 129, 0.03)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
}

/* Cards */
.card {
    background: var(--card-bg-dark);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    height: 100%;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* View project detail hover border in light mode */
:root.light-mode .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

:root.light-mode .btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Skills Section */
.skill-item {
    text-align: center;
    padding: 1.5rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.skill-item:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-5px);
}

/* Skill icon hover color in light mode */
:root.light-mode .skill-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    transition: var(--transition);
}

/* Skill icon hover color in light mode */
:root.light-mode .skill-item:hover .skill-icon {
    color: #10b981;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 0;
}

/* Tailwind CSS Icon */
.skill-icon.tailwind {
    fill: var(--primary-color);
    width: 48px;
    height: 48px;
}

/* C++ Logo */
.skill-icon.img-icon {
    filter: brightness(0) saturate(100%) invert(28%) sepia(65%) saturate(4199%) hue-rotate(205deg) brightness(104%) contrast(103%);
    transition: var(--transition);
    width: 48px;
    height: 48px;
}

:root.light-mode .skill-icon.img-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(90%) saturate(690%) hue-rotate(119deg) brightness(94%) contrast(87%);
}

/* Contact Section */
.contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1 rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.contact-info a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

/* Light mode adjustments */
:root.light-mode .contact-info a {
    color: var(--text-dark);
}

:root.light-mode .contact-info a:hover {
    color: var(--primary-color);
}

/* Add this to your existing CSS */

/* Dark mode hand icon color */
.wave i.fa-hand {
    color: var(--primary-color);
}

/* Light mode hand icon color */
:root.light-mode .wave i.fa-hand {
    color: var(--primary-color);
    /* or any other color you prefer */
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.social-links a {
    text-decoration: none;
}

.social-link {
    outline: none;
    text-decoration: none;
}

.social-link:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Floating Buttons */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.back-to-top,
.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.back-to-top:hover,
.theme-toggle:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.back-to-top {
    bottom: 85px;
}

/* Footer */
footer {
    background: var(--card-bg-dark);
    color: var(--text-dark);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.5s, color 0.5s;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Typing Animation Container */
.typing-container {
    min-height: 4.5rem;
    display: flex;
    justify-content: center;
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .typing-container {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Text element with cursor */
#typing-text {
    display: inline;
    position: relative;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
}

/* Cursor styling - now using a span element */
.blinking-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Wave Animation */
.wave {
    display: inline-block;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(-10deg);
    }

    20% {
        transform: rotate(12deg);
    }

    30% {
        transform: rotate(-10deg);
    }

    40% {
        transform: rotate(9deg);
    }

    50% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    #about {
        padding-top: 7rem;
    }

    section {
        padding: 4rem 0;
    }

    .profile-picture-container {
        width: 250px;
        height: 250px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 3rem 0;
    }

    .profile-picture-container {
        width: 200px;
        height: 200px;
    }

    .card {
        margin-bottom: 1.5rem;
    }
}

/* Cosmic Download Button */
.cosmic-download-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 15rem;
    height: 3.5rem;
    overflow: hidden;
    background-size: 300% 300%;
    cursor: pointer;
    backdrop-filter: blur(1rem);
    border-radius: 5rem;
    transition: all 0.5s ease;
    animation: cosmic-gradient 8s ease infinite;
    border: double 4px transparent;
    background-image: linear-gradient(var(--background-dark), var(--background-dark)),
        linear-gradient(137.48deg,
            var(--primary-color) 10%,
            var(--secondary-color) 45%,
            #8f51ea 67%,
            #0044ff 87%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    text-decoration: none;
    margin: 1rem auto;
}

.cosmic-download-btn strong {
    z-index: 2;
    font-size: 1rem;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 4px white;
    transition: all 0.3s ease;
}

.cosmic-container {
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: 0.5s;
    backdrop-filter: blur(1rem);
    border-radius: 5rem;
}

.cosmic-stars {
    position: relative;
    background: transparent;
    width: 200rem;
    height: 200rem;
}

.cosmic-stars::after {
    content: "";
    position: absolute;
    top: -10rem;
    left: -100rem;
    width: 100%;
    height: 100%;
    animation: cosmicStarRotate 120s linear infinite;
    background-image: radial-gradient(#ffffff 1px, transparent 1%);
    background-size: 50px 50px;
}

.cosmic-stars::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 170%;
    height: 500%;
    animation: cosmicStar 80s linear infinite;
    background-image: radial-gradient(#ffffff 1px, transparent 1%);
    background-size: 50px 50px;
    opacity: 0.5;
}

.cosmic-glow {
    position: absolute;
    display: flex;
    width: 14rem;
}

.cosmic-circle {
    width: 100%;
    height: 35px;
    filter: blur(2rem);
    animation: cosmicPulse 5s infinite;
    z-index: -1;
}

.cosmic-circle:nth-of-type(1) {
    background: rgba(37, 99, 235, 0.6);
}

.cosmic-circle:nth-of-type(2) {
    background: rgba(16, 185, 129, 0.6);
}

.cosmic-icon {
    color: #47a6ff;
    position: absolute;
    right: 1.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
    z-index: 3;
}

:root.light-mode .cosmic-icon {
    color: aquamarine;
}

/* Hover Effects */
.cosmic-download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

:root.light-mode .cosmic-download-btn:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.cosmic-download-btn:hover .cosmic-container {
    z-index: 1;
    background-color: var(--background-dark);
}

:root.light-mode .cosmic-download-btn:hover .cosmic-container {
    z-index: 1;
    background-color: var(--background-light);
}

.cosmic-download-btn:hover strong {
    letter-spacing: 3px;
    transform: translateX(-15px);
}

.cosmic-download-btn:hover .cosmic-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Active State */
.cosmic-download-btn:active {
    border: double 4px var(--primary-color);
    background-origin: border-box;
    background-clip: content-box, border-box;
    animation: none;
}

.cosmic-download-btn:active .cosmic-circle {
    background: var(--primary-color);
}

/* Animations */
@keyframes cosmicStar {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-135rem);
    }
}

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

    to {
        transform: rotate(0);
    }
}

@keyframes cosmic-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes cosmicPulse {
    0% {
        transform: scale(0.75);
        opacity: 0.7;
    }

    70% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(0.75);
        opacity: 0.7;
    }
}

/* Light Mode Adjustments */
:root.light-mode .cosmic-download-btn {
    background-image: linear-gradient(var(--background-light), var(--secondary-color)),
        linear-gradient(137.48deg,
            var(--primary-color) 10%,
            var(--secondary-color) 45%,
            #8f51ea 67%,
            #0044ff 87%);
}

:root.light-mode .cosmic-download-btn strong {
    color: #ffffff;
}

/* Modal Styles */
.modal-content {
    background: var(--card-bg-dark);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

:root.light-mode .modal-content {
    background: white;
    color: var(--text-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
}

:root.light-mode .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
}

:root.light-mode .modal-title {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

:root.light-mode .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-label {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

:root.light-mode .form-label {
    color: var(--text-dark);
}

.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

:root.light-mode .form-control {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-color);
    color: var(--text-dark);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

:root.light-mode .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
    background: white;
}

.form-check-label {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-check-input{
    border-color: var(--primary-color);
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}


:root.light-mode .form-check-input {
    border-color: var(--primary-color);
}

:root.light-mode .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}



/* Validation States */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);  
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--primary-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23007bff'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M4.8 6l1.2 1.2L9.2 4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.25rem rgba(32, 25, 135, 0.25);
    border-color: var(--primary-color);
}

:root.light-mode .was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--primary-color);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23198754'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M4.8 6l1.2 1.2L9.2 4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

:root.light-mode .was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    box-shadow: 0 0 0 0.25rem rgba(32, 135, 25, 0.25);
    border-color: var(--primary-color);
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.was-validated .form-check-input:valid ~ .form-check-label,
.form-check-input.is-valid ~ .form-check-label {
    color: var(--text-dark);
}

.was-validated .form-check-input:valid:checked,
.form-check-input.is-valid:checked {
    background-color: var(--primary-color); /* Background when checked & valid */
    border-color: var(--primary-color);
}
.was-validated .form-check-input:valid:checked::before,
.form-check-input.is-valid:checked::before {
    color: white; /* Checkmark color (white for visibility on blue) */
}

:root.light-mode .was-validated .form-check-input:valid:checked,
.form-check-input.is-valid:checked {
    background-color: var(--primary-color); /* Background when checked & valid */
    border-color: var(--primary-color);
}
:root.light-mode .was-validated .form-check-input:valid:checked::before,
.form-check-input.is-valid:checked::before {
    color: white; /* Checkmark color (white for visibility on blue) */
}

/* Buttons */
.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.8;
    transition: var(--transition);
}

:root.light-mode .btn-close {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.btn-outline-secondary {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

:root.light-mode .btn-outline-secondary {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
}

:root.light-mode .btn-outline-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Loading State */
.btn .spinner-border {
    vertical-align: text-top;
}

.btn .submit-text {
    display: inline-block;
}

.btn .spinner-border {
    display: none;
}

.btn.loading .submit-text {
    display: none;
}

.btn.loading .spinner-border {
    display: inline-block;
}


/* Responsive */
@media (max-width: 576px) {
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .form-control {
        padding: 0.6rem 0.75rem;
    }
}

/* Activities & Achievements Section */
#activities {
    padding: 6rem 0;
    position: relative;
}

#activities::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(37, 99, 235, 0.03)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
    background-size: cover;
    z-index: -1;
    opacity: 0.5;
}

:root.light-mode #activities::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(16, 185, 129, 0.03)" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>');
}

/* LinkedIn Post Container */
.linkedin-post {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

:root.light-mode .linkedin-post {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

:root:not(.light-mode) .linkedin-post {
    background: var(--card-bg-dark);
    border-color: rgba(255, 255, 255, 0.08);
}

.linkedin-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

:root:not(.light-mode) .linkedin-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Card Body */
.linkedin-post .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Profile Header */
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-pic-container {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin-right: 12px;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.active-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #4BCE97;
    border: 2px solid var(--card-bg-dark);
    border-radius: 50%;
}

:root.light-mode .active-indicator {
    border-color: #fff;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-date {
    margin-right: 6px;
}

/* Post Content */
.post-content {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.post-content p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* Tags */
.post-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tags .badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.8rem;
}

:root.light-mode .post-tags .badge {
    background-color: rgba(16, 185, 129, 0.1);
}

/* Post Image */
.post-image-container {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.post-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

:root:not(.light-mode) .post-image {
    border-color: rgba(255, 255, 255, 0.08);
}

.post-image:hover {
    transform: scale(1.02);
}

/* Post Actions */
.post-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 12px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

:root:not(.light-mode) .post-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.btn-action {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
}

.btn-action i {
    margin-right: 6px;
}

.btn-action:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

:root.light-mode .btn-action:hover {
    background: rgba(16, 185, 129, 0.05);
}

.btn-view {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.btn-view i {
    margin-right: 6px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .linkedin-post .card-body {
        padding: 1.25rem;
    }
    
    .profile-pic-container {
        width: 48px;
        height: 48px;
    }
    
    .post-image {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    #activities {
        padding: 4rem 0;
    }
    
    .post-content p {
        font-size: 0.9rem;
    }
    
    .post-image {
        max-height: 250px;
    }
}

@media (max-width: 576px) {
    #activities {
        padding: 3rem 0;
    }
    
    .linkedin-post .card-body {
        padding: 1rem;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .btn-action, .btn-view {
        flex: 1 0 calc(50% - 3px);
        justify-content: center;
        padding: 0.5rem;
    }
    
    .post-image {
        max-height: 200px;
    }
    
    .profile-name {
        font-size: 0.95rem;
    }
}
/* Post Meta - Date and Globe Icon */
.post-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.post-date {
    margin-right: 6px;
    color: var(--text-muted); /* Default light mode color */
}

:root:not(.light-mode) .post-date,
:root.dark-mode .post-date {
    color: rgba(255, 255, 255, 0.8) !important; /* Force white in dark mode */
}

.post-meta .fa-globe-americas {
    color: var(--text-muted); /* Default light mode color */
}

:root:not(.light-mode) .post-meta .fa-globe-americas,
:root.dark-mode .post-meta .fa-globe-americas {
    color: rgba(255, 255, 255, 0.8) !important; /* Force white in dark mode */
}