:root {
    --color-bg: #F7FAFD;
    --color-navbar: #F7FAFD;
    --color-card: #FFFFFF;
    --color-border: #c9cbd5;
    --color-primary: #e85a38;
    --color-primary-hover: #c54c2f;
    --color-secondary: #2b2a2a;
    --color-title: #232B38;
    --color-text: #1d1d23;
    --color-text-secondary: #2b2a2a;
    --color-icon-secondary: #D1D5DB;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
}

button:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.btn-no-animation {
    transition: none !important;
    transform: none !important;
}

a:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.skill-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

div.rounded-xl:hover {
    transform: scale(1.03);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.img-hover:hover {
    transform: scale(1.13);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.nav-link:hover {
    color: var(--color-primary) !important;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s cubic-bezier(.4, 0, .2, 1), background 0.3s;
    border-radius: 9999px;
}

.nav-link:hover::after {
    width: 100%;
    background: var(--color-primary);
}

.nav-link {
    position: relative;
    color: var(--color-title);
    transition: color 0.3s ease;
}

#navbar {
    background-color: var(--color-navbar);
    background-opacity: 0.8; /* Initial transparency */
    transition: background-opacity 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background-opacity: 1; /* Full opacity when scrolled */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Optional shadow for effect */
}

/* Scroll reveal initial state */
.scroll-reveal {
    opacity: 0;
    transform: translateY(2rem);
}

.scroll-reveal.opacity-100 {
    opacity: 1;
}

.scroll-reveal.translate-y-0 {
    transform: translateY(0);
}

.scroll-reveal {
    transition: opacity 0.7s cubic-bezier(.4, 0, .2, 1), transform 0.7s cubic-bezier(.4, 0, .2, 1);
}

/* Responsive Design */
@media (max-width: 767px) {
    #menu-toggle {
        display: block;
    }

    #nav-menu {
        /*display: none;*/
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-navbar);
        flex-direction: column;
        padding: 1rem;
        z-index: 50;
    }

    #nav-menu li {
        margin: 0.5rem 0;
    }

    #nav-menu .nav-link {
        display: block;
        padding: 0.5rem;
        color: var(--color-title) !important;
    }

    #nav-menu .nav-link:hover {
        color: var(--color-primary) !important;
        background-color: rgba(0, 0, 0, 0.1); /* Optional: Add background for better visibility */
        transition: color 0.3s ease, background-color 0.3s ease;
    }

    button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (min-width: 768px) {
    #menu-toggle {
        display: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s cubic-bezier(.4, 0, .2, 1);
}

#project-modal .custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: #eaeaea #ffffff;
}

#project-modal .custom-scroll::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

/*@media (max-width: 767px) {*/
/*    #project-modal {*/
/*        padding-top: 0 !important;*/
/*    }*/
/*    #project-modal > #close-modal-btn {*/
/*        top: 0.5rem !important;*/
/*        right: 0.5rem !important;*/
/*    }*/
/*    #project-modal .custom-scroll {*/
/*        padding-top: 2.5rem !important; !* Add space for the button if needed *!*/
/*    }*/
/*}*/

@media (max-width: 767px) {
    #project-modal {
        padding-top: 0 !important;
        min-height: 300px; /* Ensures enough height for absolute positioning */
    }

    #close-modal-btn {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        /*left: auto !important;*/
        margin: 0 !important;
    }

    #project-modal .custom-scroll {
        padding-top: 2.5rem !important;
    }

    .project-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
}

#project-modal .custom-scroll::-webkit-scrollbar-thumb {
    background: #eaeaea;
    border-radius: 8px;
}

#project-modal .custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #e85a38;
}

@keyframes phone-move {
    0% {
        transform: translateY(0) rotate(-6deg);
    }
    20% {
        transform: translateY(-8px) rotate(-3deg);
    }
    40% {
        transform: translateY(-14px) rotate(3deg);
    }
    60% {
        transform: translateY(-8px) rotate(6deg);
    }
    80% {
        transform: translateY(0) rotate(3deg);
    }
    100% {
        transform: translateY(0) rotate(-6deg);
    }
}

.animate-phone-move {
    animation: phone-move 3.6s cubic-bezier(.4, 0, .2, 1) infinite;
    will-change: transform;
}