/* ===================================
   FEATURED WORK SECTION - NETFLIX + APPLE AESTHETIC
   =================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --red: #E50914;
    --red-dark: #B81D24;
    --ink: #0a0a0a;
    --ice: #F5F5F1;
    --glow: rgba(229, 9, 20, 0.6);
    
    /* Extended Palette */
    --bg-elevated: #141414;
    --text-primary: #ffffff;
    --text-secondary: #808080;
    --text-muted: #565656;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    /* Category Colors - Subtle & Premium */
    --cat-vfx: linear-gradient(135deg, #E50914 0%, #B81D24 100%);
    --cat-editing: linear-gradient(135deg, #FF6B6B 0%, #E50914 100%);
    --cat-3d: linear-gradient(135deg, #FF4444 0%, #C30000 100%);
    --cat-cgi: linear-gradient(135deg, #FF2D2D 0%, #AA0000 100%);
    
    /* Spacing - Apple-like precision */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    --spacing-2xl: 120px;
    
    /* Border Radius - Soft, modern */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    /* Transitions - Apple's timing */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-elegant: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Shadows - Depth like Apple */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--ink);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   SECTION LAYOUT
   =================================== */

.featured-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    min-height: 100vh;
    background: var(--ink);
    position: relative;
}

/* Subtle ambient gradient background */
.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    filter: blur(80px);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ===================================
   SECTION HEADER - APPLE MINIMALISM
   =================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.8s var(--transition-elegant);
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--red);
    margin-bottom: var(--spacing-sm);
    position: relative;
    opacity: 0.9;
}

.section-label::before,
.section-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 24px;
    height: 1px;
    background: var(--red);
    opacity: 0.6;
}

.section-label::before { left: -36px; }
.section-label::after { right: -36px; }

.section-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--ice) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.section-description {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===================================
   PROJECTS GRID - NETFLIX TILES
   =================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    animation: fadeInUp 1s var(--transition-elegant) 0.2s backwards;
}

/* ===================================
   PROJECT CARD - PREMIUM CONTAINER
   =================================== */

.project-card {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-elevated);
    transition: all var(--transition-elegant);
    box-shadow: var(--shadow-md);
}

/* Subtle border glow */
.project-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 40px var(--glow);
}

.project-card:hover::before {
    opacity: 1;
}

/* ===================================
   MEDIA CONTAINER
   =================================== */

.project-media {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.project-poster,
.project-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-poster {
    z-index: 1;
    transition: opacity var(--transition-smooth), transform var(--transition-elegant);
}

.project-video {
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-smooth);
    transform: scale(1.05);
}

.project-card:hover .project-poster {
    opacity: 0;
    transform: scale(1.1);
}

.project-card:hover .project-video {
    opacity: 1;
    transform: scale(1);
}

/* ===================================
   PLAY HINT - SUBTLE INDICATOR
   =================================== */

.play-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    color: var(--ice);
    transition: all var(--transition-smooth);
    pointer-events: none;
    opacity: 0.9;
}

.play-hint svg {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.8));
    width: 56px;
    height: 56px;
}

.project-card:hover .play-hint {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
}

/* ===================================
   OVERLAY - NETFLIX GRADIENT
   =================================== */

.project-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.98) 0%,
        rgba(10, 10, 10, 0.7) 30%,
        rgba(10, 10, 10, 0.3) 60%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--transition-elegant);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--spacing-lg);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(24px);
    opacity: 0;
    transition: all var(--transition-elegant);
}

.project-card:hover .overlay-content {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.15s;
}

/* ===================================
   CATEGORY TAG - RED ACCENT
   =================================== */

.project-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: var(--spacing-sm);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.project-category::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--red);
    opacity: 0.9;
    z-index: -1;
}

.project-category::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    z-index: -1;
}

.project-category[data-category="vfx"] {
    background: var(--cat-vfx);
}

.project-category[data-category="editing"] {
    background: var(--cat-editing);
}

.project-category[data-category="3d"] {
    background: var(--cat-3d);
}

.project-category[data-category="cgi"] {
    background: var(--cat-cgi);
}

/* ===================================
   PROJECT TITLE - BOLD & CLEAR
   =================================== */

.project-title {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-xs);
    color: var(--ice);
    line-height: 1.2;
}

/* ===================================
   PROJECT DESCRIPTION
   =================================== */

.project-description {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    opacity: 0.9;
}

/* ===================================
   CTA BUTTON - APPLE GLASS MORPHISM
   =================================== */

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--ice);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    transform: translateY(12px);
    opacity: 0;
}

.project-card:hover .project-cta {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.25s;
}

.project-cta:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--red);
    transform: translateX(4px);
    box-shadow: 0 0 24px var(--glow);
}

.cta-arrow {
    transition: transform var(--transition-fast);
}

.project-cta:hover .cta-arrow {
    transform: translateX(4px);
}

/* ===================================
   VIDEO MODAL - FULLSCREEN PLAYER
   =================================== */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 1280px;
    transform: scale(0.92);
    transition: transform var(--transition-elegant);
}

.video-modal.active .modal-content {
    transform: scale(1);
}

.modal-content video {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl), 0 0 60px var(--glow);
}

/* ===================================
   MODAL CLOSE - FLOATING BUTTON
   =================================== */

.modal-close {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--ice);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    z-index: 10000;
}

.modal-close:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--red);
    transform: rotate(90deg);
    box-shadow: 0 0 24px var(--glow);
}

/* ===================================
   RESPONSIVE - ULTRAWIDE (3 COLUMNS)
   =================================== */

@media (min-width: 1600px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Center the 4th card in second row */
    .project-card:nth-child(4) {
        grid-column: 2;
    }
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */

@media (max-width: 1024px) {
    .featured-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .section-label::before,
    .section-label::after {
        display: none;
    }
    
    .projects-grid {
        gap: var(--spacing-sm);
    }
    
    .project-overlay {
        padding: var(--spacing-md);
    }
    
    .project-title {
        font-size: clamp(18px, 4vw, 24px);
    }
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */

@media (max-width: 768px) {
    .featured-section {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .project-card {
        aspect-ratio: 16 / 10;
    }
    
    /* Always show overlay on mobile */
    .project-overlay {
        opacity: 1;
        background: linear-gradient(
            to top,
            rgba(10, 10, 10, 0.95) 0%,
            rgba(10, 10, 10, 0.5) 50%,
            transparent 80%
        );
    }
    
    .overlay-content {
        transform: none;
        opacity: 1;
    }
    
    .project-cta {
        transform: none;
        opacity: 1;
    }
    
    .play-hint {
        opacity: 0.7;
    }
    
    .modal-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

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

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

/* ===================================
   ACCESSIBILITY - REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   LOADING STATES
   =================================== */

.project-video[poster] {
    background: var(--bg-elevated);
}

.project-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}