/* ============================================
   SKILLS SECTION - ENHANCED DESIGN
   Professional Category Colors (Option 2)
   ============================================ */

/* === COLOR VARIABLES === */
:root {
    /* Primary Brand Colors */
    --color-primary: #8B5CF6;
    --color-primary-light: #A78BFA;
    --color-primary-dark: #7C3AED;
    --color-accent: #F59E0B;
    --color-accent-light: #FBBF24;
    
    /* Backgrounds */
    --bg-primary: #0F0F1E;
    --bg-secondary: #1A1A2E;
    --bg-tertiary: #252538;
    --bg-card-glass: rgba(26, 26, 46, 0.6);
    
    /* Text */
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    
    /* Borders */
    --border-primary: rgba(139, 92, 246, 0.3);
    --border-hover: rgba(139, 92, 246, 0.6);
    --border-active: rgba(139, 92, 246, 0.8);
    
    /* Category Accent Colors */
    --accent-web: #3B82F6;
    --accent-web-glow: rgba(59, 130, 246, 0.15);
    
    --accent-mobile: #10B981;
    --accent-mobile-glow: rgba(16, 185, 129, 0.15);
    
    --accent-ai: #EC4899;
    --accent-ai-glow: rgba(236, 72, 153, 0.15);
    
    --accent-backend: #F59E0B;
    --accent-backend-glow: rgba(245, 158, 11, 0.15);
    
    --accent-cloud: #06B6D4;
    --accent-cloud-glow: rgba(6, 182, 212, 0.15);
    
    --accent-security: #EF4444;
    --accent-security-glow: rgba(239, 68, 68, 0.15);
}

/* === SECTION LAYOUT === */
.skills-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;        /* Keeps decorations contained */
    width: 100%;             /* Full width */
    max-width: 100vw;        /* Don't exceed viewport */
}

/* Background decoration - stays centered on zoom */
.skills-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;                    /* Center point */
    transform: translateX(-50%);  /* Actual centering */
    width: 1200px;                /* Fixed width */
    max-width: 90vw;              /* Don't exceed viewport */
    height: 1200px;
    background: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* === SECTION HEADER === */
.skills-section .section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.skills-section .section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-accent)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.skills-section .section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === SKILLS GRID - ZOOM-PROOF CENTERED === */
.skills-section .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    justify-content: center;    /* Centers grid tracks */
    justify-items: center;      /* Centers items in cells */
    gap: 2rem;
    margin: 0 auto;             /* Centers grid container */
    width: 100%;
    max-width: 1400px;          /* Constraint for very wide screens */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* === SKILL CARD === */
.skills-section .skill-card {
    position: relative;
    background: var(--bg-card-glass);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-primary);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 100%;              /* Fill grid cell */
    max-width: 100%;          /* Don't exceed cell */
    margin: 0;                /* No margins - grid handles spacing */
    justify-self: center;     /* Center within grid cell */
    align-self: start;        /* Align to top of cell */
}

/* Card hover effect */
.skills-section .skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    background: rgba(26, 26, 46, 0.8);
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.3),
        0 0 60px var(--category-glow);
}

/* === ACCENT LINE (Top Border) === */
.card-accent-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--category-accent);
    border-radius: 20px 20px 0 0;
}

/* === CARD HEADER === */
.skills-section .card-header {
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--category-accent);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 10px var(--category-glow));
}

.skills-section .skill-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.skills-section .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

/* === CARD BODY === */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === SKILL TAGS === */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.375rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* === CARD GLOW EFFECT === */
.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        var(--category-glow) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 20px;
}

.skills-section .skill-card:hover .card-glow {
    opacity: 1;
}

/* === CATEGORY-SPECIFIC COLORS === */

/* Web Development - Blue */
.card-web {
    --category-accent: var(--accent-web);
    --category-glow: var(--accent-web-glow);
}

/* Mobile - Green */
.card-mobile {
    --category-accent: var(--accent-mobile);
    --category-glow: var(--accent-mobile-glow);
}

/* AI - Pink */
.card-ai {
    --category-accent: var(--accent-ai);
    --category-glow: var(--accent-ai-glow);
}

/* Backend - Amber */
.card-backend {
    --category-accent: var(--accent-backend);
    --category-glow: var(--accent-backend-glow);
}

/* Cloud - Cyan */
.card-cloud {
    --category-accent: var(--accent-cloud);
    --category-glow: var(--accent-cloud-glow);
}

/* Security - Red */
.card-security {
    --category-accent: var(--accent-security);
    --category-glow: var(--accent-security-glow);
}

/* === RESPONSIVE DESIGN === */

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .skills-section .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 420px));
        gap: 2.5rem;
    }
}

/* Desktop (1200px - 1919px) */
@media (max-width: 1919px) {
    .skills-section .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        gap: 2rem;
    }
}

/* Tablet Landscape (1024px - 1199px) */
@media (max-width: 1199px) {
    .skills-section .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }

    .skills-section .skill-card {
        padding: 1.75rem;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) {
    .skills-section {
        padding: 4rem 0;
    }

    .skills-section .section-header {
        margin-bottom: 3rem;
    }

    .skills-section .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .skills-section .skill-card {
        padding: 1.5rem;
    }

    .skills-section .card-title {
        font-size: 1.25rem;
    }

    .card-icon {
        font-size: 2rem;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .skills-section {
        padding: 3rem 0;
    }
    
    .skills-section .section-header {
        margin-bottom: 2rem;
    }
    
    .skills-section .section-title {
        font-size: 2rem;
    }
    
    .skills-section .section-subtitle {
        font-size: 1rem;
    }
    
    .skills-section .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .skills-section .skill-card {
        padding: 1.5rem;
    }
    
    .skills-section .card-title {
        font-size: 1.125rem;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        gap: 1.25rem;
    }
    
    .skill-tags {
        gap: 0.375rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }
}

/* Small Mobile (< 375px) */
@media (max-width: 374px) {
    .skills-section .skill-card {
        padding: 1.25rem;
    }
    
    .skills-section .card-title {
        font-size: 1rem;
    }
}

/* === ANIMATIONS === */

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skills-section .skill-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Stagger animation for cards */
.skills-section .skill-card:nth-child(1) { animation-delay: 0.1s; }
.skills-section .skill-card:nth-child(2) { animation-delay: 0.2s; }
.skills-section .skill-card:nth-child(3) { animation-delay: 0.3s; }
.skills-section .skill-card:nth-child(4) { animation-delay: 0.4s; }
.skills-section .skill-card:nth-child(5) { animation-delay: 0.5s; }
.skills-section .skill-card:nth-child(6) { animation-delay: 0.6s; }

/* Pulse animation for icons */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.card-icon {
    animation: pulse 3s ease-in-out infinite;
}

/* === ACCESSIBILITY === */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .skills-section .skill-card,
    .card-icon,
    .skill-tag {
        animation: none;
        transition: none;
    }
    
    .skills-section .skill-card:hover {
        transform: none;
    }
}

/* Focus states */
.skills-section .skill-card:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}

.skill-tag:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
