/* ===== SKILLS PAGE STYLES ===== */

.skills-section {
    min-height: 100vh;
    padding: 7rem 2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-container {
    max-width: 1400px;
    width: 100%;
    position: relative;
}

.page-title {
    text-align: center;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 4rem;
    margin-top: 1rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SKILLS GRID ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.skill-cluster {
    opacity: 0;
    animation: slideInCluster 0.6s ease forwards;
}

.skill-cluster:nth-child(1) { animation-delay: 0.2s; }
.skill-cluster:nth-child(2) { animation-delay: 0.4s; }
.skill-cluster:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInCluster {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cluster-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.skill-cluster[data-cluster="frontend"] .cluster-title {
    color: var(--accent-orange);
}

.skill-cluster[data-cluster="backend"] .cluster-title {
    color: var(--accent-purple);
}

.skill-cluster[data-cluster="infrastructure"] .cluster-title {
    color: var(--accent-pink);
}

/* ===== SKILL ITEMS ===== */
.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-block {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Glass morphism effect */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

body.dark-mode .skill-block {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.skill-block:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

body.dark-mode .skill-block:hover {
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Cluster-specific hover effects */
.skill-cluster[data-cluster="frontend"] .skill-block:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--accent-orange);
    box-shadow:
        0 12px 32px rgba(255, 107, 53, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.skill-cluster[data-cluster="backend"] .skill-block:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--accent-purple);
    box-shadow:
        0 12px 32px rgba(168, 85, 247, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.skill-cluster[data-cluster="infrastructure"] .skill-block:hover {
    background: rgba(236, 72, 153, 0.2);
    border-color: var(--accent-pink);
    box-shadow:
        0 12px 32px rgba(236, 72, 153, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
}

/* ===== CENTRAL BLOCK ===== */
.central-block {
    width: 280px;
    height: 280px;
    margin: 4rem auto 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;

    /* Enhanced glass effect */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 102, 204, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);

    opacity: 0;
    animation: fadeInScale 0.8s ease forwards 1s;
}

body.dark-mode .central-block {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 102, 204, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.central-block:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(5deg);
    box-shadow:
        0 16px 48px rgba(0, 102, 204, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.central-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.central-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.central-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.central-content p {
    font-size: 1rem;
    opacity: 0.8;
}

/* ===== PARTICLE CANVAS ===== */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6;
}

/* ===== 3D ROTATION EFFECT ===== */
.central-block.rotating {
    animation: rotate3d 20s linear infinite;
}

@keyframes rotate3d {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(90deg) rotateX(5deg); }
    50% { transform: rotateY(180deg) rotateX(0deg); }
    75% { transform: rotateY(270deg) rotateX(-5deg); }
    100% { transform: rotateY(360deg) rotateX(0deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .skills-section {
        padding: 6.5rem 1.5rem 3rem;
    }

    .page-title {
        margin-top: 0.5rem;
        margin-bottom: 3rem;
        font-size: 2.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skill-block {
        width: 70px;
        height: 70px;
    }

    .skill-icon {
        font-size: 1.5rem;
    }

    .skill-name {
        font-size: 0.65rem;
    }

    .central-block {
        width: 220px;
        height: 220px;
        margin-top: 3rem;
    }

    .central-icon {
        font-size: 3rem;
    }

    .central-content h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .skills-section {
        padding: 6rem 1rem 3rem;
    }

    .page-title {
        font-size: 2rem;
        margin-top: 0.5rem;
        margin-bottom: 2.5rem;
    }

    .skill-block {
        width: 60px;
        height: 60px;
    }

    .skill-icon {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .skill-name {
        font-size: 0.6rem;
    }

    .central-block {
        width: 180px;
        height: 180px;
    }

    .central-icon {
        font-size: 2.5rem;
    }

    .central-content h3 {
        font-size: 1.2rem;
    }

    .central-content p {
        font-size: 0.9rem;
    }
}
