/* ===================================================
   SCROLL ANIMATIONS - Cards Fly In
   =================================================== */

/* Initial state - cards hidden */
.skill-card-modern {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visible state - triggered by IntersectionObserver */
.skill-card-modern.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger delay for sequential animation */
.skill-card-modern:nth-child(1) {
    transition-delay: 0.05s;
}

.skill-card-modern:nth-child(2) {
    transition-delay: 0.1s;
}

.skill-card-modern:nth-child(3) {
    transition-delay: 0.15s;
}

.skill-card-modern:nth-child(4) {
    transition-delay: 0.2s;
}

.skill-card-modern:nth-child(5) {
    transition-delay: 0.25s;
}

.skill-card-modern:nth-child(6) {
    transition-delay: 0.3s;
}

.skill-card-modern:nth-child(7) {
    transition-delay: 0.35s;
}

.skill-card-modern:nth-child(8) {
    transition-delay: 0.4s;
}

.skill-card-modern:nth-child(9) {
    transition-delay: 0.45s;
}

.skill-card-modern:nth-child(10) {
    transition-delay: 0.5s;
}

.skill-card-modern:nth-child(11) {
    transition-delay: 0.55s;
}

.skill-card-modern:nth-child(12) {
    transition-delay: 0.6s;
}

.skill-card-modern:nth-child(13) {
    transition-delay: 0.65s;
}

.skill-card-modern:nth-child(14) {
    transition-delay: 0.7s;
}

.skill-card-modern:nth-child(15) {
    transition-delay: 0.75s;
}

.skill-card-modern:nth-child(16) {
    transition-delay: 0.8s;
}

.skill-card-modern:nth-child(17) {
    transition-delay: 0.85s;
}

/* ===================================================
   SKILL DETAILS MODAL - Premium Glassmorphic
   =================================================== */

.skill-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.skill-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.skill-modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(26, 31, 58, 0.98));
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 229, 255, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }

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

.skill-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.skill-modal-close:hover {
    background: rgba(255, 59, 48, 0.9);
    border-color: #ff3b30;
    transform: rotate(90deg);
}

.skill-modal-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
}

.skill-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.skill-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.skill-modal-level {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 229, 255, 0.2);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.4);
}

.skill-modal-body {
    padding: 2rem;
}

.modal-info-section {
    margin-bottom: 2rem;
}

.modal-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-info-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-list li {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-list li:last-child {
    border-bottom: none;
}

.modal-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

.modal-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-tag {
    background: rgba(123, 47, 247, 0.2);
    border: 1px solid rgba(123, 47, 247, 0.4);
    color: var(--accent-purple);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.related-tag:hover {
    background: rgba(123, 47, 247, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 47, 247, 0.3);
}

/* Scrollbar styling for modal */
.skill-modal-content::-webkit-scrollbar {
    width: 8px;
}

.skill-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.skill-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 10px;
}

.skill-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .skill-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .skill-modal-header {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .skill-modal-title {
        font-size: 1.6rem;
    }

    .skill-modal-icon {
        font-size: 3rem;
    }

    .skill-modal-body {
        padding: 1.5rem;
    }

    .skill-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.75rem;
        top: 15px;
        right: 15px;
    }
}