.nocursor {
    cursor: none;
}

@media (max-width: 768px) {
    .nocursor {
        cursor: auto;
    }
}

.smooth-transition {
    transition: all 0.3s ease-in-out;
}

.skill-item {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.skill-item:hover {
    /* the color of the text on mouse over */
    border-left-color: #9271ff;
    color: #ff9900;
}

.skill-item.active {
    font-weight: bold;
    border-left-color: #9271ff;
    color: #ff9900;
}


.skill-item::before {
    /* the color of the highlight on mouse over */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #9c7eff36;
    transition: width 0.3s ease-in-out;
    z-index: -1;
}

.skill-item:hover::before,
.skill-item.active::before {
    width: 100%;
}

.skill-description {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    position: relative; /* Keep position fixed */
}

.skill-description.active {
    max-height: 2000px;
    opacity: 1;
    overflow-y: auto;
}

/* Mobile-specific styles for click behavior AND TOP ALIGNMENT */
@media (max-width: 768px) {

    /* Remove styles that modify height/padding/margin on *inactive* descriptions. */
    .skill-description {
        /*  Start hidden, no transform. */
        opacity: 0;
        height: 0;
        overflow: hidden;
        padding-top: 0 !important;
        /* Ensure no initial padding */
        padding-bottom: 0 !important;
        transform: none;
        /* Don't start with a transform */
        transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out;
    }

    .skill-description.active {
        opacity: 1;
        height: auto;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Make sure descriptions don't take up *all* space */
    .skills-container {
        max-height: none; /* Remove the max-height */
        overflow-y: visible; /* Ensure content can flow beyond container */
    }

    /*  TOP ALIGN descriptions on mobile */
    .md\:pl-12 {
        /* Target the right-hand pane */
        padding-top: 0 !important;
        /* Remove padding that might push content down */
        padding-left: 0 !important;
        /* Remove left padding on mobile for full width */
    }

    .md\:items-center {
        /*  Align items to the start on mobile*/
        align-items: flex-start !important;
    }

    /* No need to reset height of list items on mobile */

    /* Contact form mobile styles */
    .md\:w-1\/2 {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }

    .md\:pr-12 {
        padding-right: 0 !important;
    }
}

/* Preloader Style - More Pizzazz! */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
}

.loader::before,
.loader::after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #818cf8;
    animation: prixClipFix 2s linear infinite;
}

.loader::after {
    border-color: #FFF;
    animation: prixClipFix 2s linear infinite, rotate 0.5s linear infinite reverse;
    inset: 6px;
}

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

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

@keyframes prixClipFix {
    0% {
        clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0)
    }

    25% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0)
    }

    50% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%)
    }

    75% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%)
    }

    100% {
        clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0)
    }
}


/*   background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    /* background: repeating-linear-gradient( -45deg, #111827, #111827 2px, #1f2937 2px, #1f2937 4px ); */
    background: repeating-linear-gradient(-45deg, #20124d, #111827 2px, #20124d 2px, #1f2937 4px);

    pointer-events: none;
    z-index: -1;
}

/*  Slightly rotated layout */
.container {
    transform: rotate(-0deg);
    /* Subtle tilt */
}

.container>div {
    /* Rotate the child divs back */
    transform: rotate(0deg);
}

/* Rainbow text effect */
.rainbow-text {
    background: linear-gradient(45deg, #ff0000, #ff7300, #ffdd1d, #03df0a, #00e1ff, #7a00ff, #ff00c8, #ff0000);
    /* background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow 60s linear infinite reverse;
    background-size: 400% 100%;
}

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

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

/*
     /* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: rgba(129, 140, 248, 0.6);
    border-radius: 50%;
    pointer-events: none;
    /*transition: 0.3s;*/
}

.skill-heading, .role-title {
    font-size: 1.125rem;
    letter-spacing: 0.025em;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #374151;
    padding-bottom: 0.75rem;
    display: inline-block;
}

.subskill-heading {
    letter-spacing: 0.025em;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #374151;
    display: inline-block;
}

.description {
    color: #9CA3AF;
    line-height: 1.6;
    font-size: 1rem;
}