/* Modern CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Properties */
:root {
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-2: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-3: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-4: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
    --gradient-5: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-6: linear-gradient(135deg, #84cc16 0%, #10b981 100%);
    --gradient-7: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);

    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-light: #94a3b8;
}

/* Base Styles */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Main Container */
.skills-container {
    max-width: 1200px;
    margin: 5rem auto 2rem;
    padding: 2rem;
}

/* Main Title */
.main-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* Skill Categories */
.skill-category {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Category Headers */
.category-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.8);
}

.category-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Individual Skills */
.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Skill Bars with Dynamic Colors */
.skill-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

/* Different gradients for different skill categories */
.skill-category:nth-child(1) .skill-progress {
    background: var(--gradient-1);
}

.skill-category:nth-child(2) .skill-progress {
    background: var(--gradient-2);
}

.skill-category:nth-child(3) .skill-progress {
    background: var(--gradient-3);
}

.skill-category:nth-child(4) .skill-progress {
    background: var(--gradient-4);
}

.skill-category:nth-child(5) .skill-progress {
    background: var(--gradient-5);
}

.skill-category:nth-child(6) .skill-progress {
    background: var(--gradient-6);
}

.skill-category:nth-child(7) .skill-progress {
    background: var(--gradient-7);
}

/* Skill Progress Animation */
.skill-progress {
    height: 100%;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Set progress width based on data-level attribute */
[data-level="90"] .skill-progress {
    width: 90%;
}

[data-level="85"] .skill-progress {
    width: 85%;
}

[data-level="80"] .skill-progress {
    width: 80%;
}

[data-level="75"] .skill-progress {
    width: 75%;
}

[data-level="70"] .skill-progress {
    width: 70%;
}

/* Animation for skill categories */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.skill-category {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.skill-category:nth-child(1) {
    animation-delay: 0.1s;
}

.skill-category:nth-child(2) {
    animation-delay: 0.2s;
}

.skill-category:nth-child(3) {
    animation-delay: 0.3s;
}

.skill-category:nth-child(4) {
    animation-delay: 0.4s;
}

.skill-category:nth-child(5) {
    animation-delay: 0.5s;
}

.skill-category:nth-child(6) {
    animation-delay: 0.6s;
}

.skill-category:nth-child(7) {
    animation-delay: 0.7s;
}

/* Hover Effects */
.skill-item:hover .skill-progress {
    filter: brightness(1.1);
}

/* Media Queries */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .skills-container {
        margin-top: 4rem;
        padding: 1rem;
    }

    .main-title {
        font-size: 2.25rem;
    }

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

    .skill-category {
        padding: 1.25rem;
    }

    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}