/* ============================================
   SIMON PORTFOLIO AVATAR - SKILL SHOWCASE
   Fullscreen Bento Grid Overlay System
   v16.0.1
   ============================================ */

/* Overlay Container - Glass Design */
.spa-skill-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    
    /* Very transparent background as requested */
    background: rgba(20, 20, 20, 0.1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    overflow-y: auto;
    overflow-x: hidden;
}

.spa-skill-overlay.active {
    display: block;
    opacity: 1;
}

/* Header */
.spa-skill-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 40px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(20, 20, 20, 0.9) 0%,
        rgba(20, 20, 20, 0) 100%
    );
}

.spa-skill-title {
    font-family: var(--spa-name-font);
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
    text-align: center;
    
    /* Crisp 1px shadow for readability */
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.spa-skill-close {
    position: fixed;
    top: 40px;
    right: 60px;
    width: 50px;
    height: 50px;
    border: none;
    
    /* Dark glass button */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 101;
    
    /* Shadow for visibility */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.spa-skill-close:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

/* Content Area */
.spa-skill-content {
    padding: 0 60px 80px 60px;
}

/* Custom Scrollbar */
.spa-skill-overlay::-webkit-scrollbar {
    width: 8px;
}

.spa-skill-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.spa-skill-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.spa-skill-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Bento Grid Container */
.spa-skill-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Grid Block Base - Glass Style */
.spa-skill-block {
    /* Dark glass cards with strong contrast */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Staggered fade in */
    animation: blockFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.spa-skill-block:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
}

/* Block Sizes */
.spa-skill-block.size-small {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 200px;
}

.spa-skill-block.size-medium {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 200px;
}

.spa-skill-block.size-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 420px;
}

.spa-skill-block.size-wide {
    grid-column: span 4;
    grid-row: span 1;
    min-height: 200px;
}

.spa-skill-block.size-tall {
    grid-column: span 1;
    grid-row: span 2;
    min-height: 420px;
}

/* === BLOCK CONTENT TYPES === */

/* Video Block */
.spa-skill-block.type-video {
    padding: 0;
}

.spa-skill-block.type-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Image Block */
.spa-skill-block.type-image {
    padding: 0;
}

.spa-skill-block.type-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Text Block */
.spa-skill-block.type-text h3 {
    font-family: var(--spa-name-font);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    
    /* Crisp 1px shadow */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

.spa-skill-block.type-text p {
    font-family: var(--spa-text-font);
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    
    /* Crisp 1px shadow */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Stats Block */
.spa-skill-block.type-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.spa-skill-stats-number {
    font-family: var(--spa-name-font);
    font-size: 56px;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1;
    
    /* Crisp 1px shadow */
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.4);
}

.spa-skill-stats-label {
    font-family: var(--spa-text-font);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* Crisp 1px shadow */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

/* Quote Block */
.spa-skill-block.type-quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.spa-skill-quote-text {
    font-family: var(--spa-name-font);
    font-size: 20px;
    line-height: 1.5;
    color: #ffffff;
    margin: 0 0 20px 0;
    font-style: italic;
    
    /* Crisp 1px shadow */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
}

.spa-skill-quote-text::before {
    content: '"';
    font-size: 48px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 8px;
    line-height: 0;
}

.spa-skill-quote-author {
    font-family: var(--spa-text-font);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    
    /* Crisp 1px shadow */
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Gallery Block */
.spa-skill-block.type-gallery {
    padding: 0;
}

.spa-skill-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    height: 100%;
}

.spa-skill-gallery-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.spa-skill-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.spa-skill-gallery-item:hover img {
    transform: scale(1.05);
}

/* === ANIMATIONS === */
@keyframes blockFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Staggered delays */
.spa-skill-block:nth-child(1) { animation-delay: 0.1s; }
.spa-skill-block:nth-child(2) { animation-delay: 0.15s; }
.spa-skill-block:nth-child(3) { animation-delay: 0.2s; }
.spa-skill-block:nth-child(4) { animation-delay: 0.25s; }
.spa-skill-block:nth-child(5) { animation-delay: 0.3s; }
.spa-skill-block:nth-child(6) { animation-delay: 0.35s; }
.spa-skill-block:nth-child(7) { animation-delay: 0.4s; }
.spa-skill-block:nth-child(8) { animation-delay: 0.45s; }

/* Body Scroll Lock */
body.spa-skill-open {
    overflow: hidden;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .spa-skill-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .spa-skill-block.size-wide {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .spa-skill-header {
        padding: 30px 20px;
    }
    
    .spa-skill-close {
        top: 30px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .spa-skill-content {
        padding: 0 20px 60px 20px;
    }
    
    .spa-skill-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .spa-skill-block.size-medium,
    .spa-skill-block.size-large,
    .spa-skill-block.size-wide {
        grid-column: span 2;
    }
    
    .spa-skill-block {
        padding: 24px;
        min-height: 160px !important;
    }
}

@media (max-width: 480px) {
    .spa-skill-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .spa-skill-block.size-small,
    .spa-skill-block.size-medium,
    .spa-skill-block.size-large,
    .spa-skill-block.size-wide,
    .spa-skill-block.size-tall {
        grid-column: span 1;
        min-height: 180px !important;
    }
}
