/* HERO */
.projects-hero {
    text-align: center;
    padding: 90px 0 100px;
    background: linear-gradient(135deg, #f8fafc, #e8ecf4);
}
.projects-hero h1 {
    font-size: 58px;
    font-weight: 900;
}
.projects-hero p {
    color: var(--text-muted);
    font-size: 20px;
    margin-top: 10px;
}

/* FILTER */
.project-filter-wrapper {
    padding: 40px 0;
    background: var(--surface);
}
.project-filter {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* FILTER BUTTONS */
.filter-btn {
    padding: 12px 30px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* PROJECT GRID */
.projects-section {
    padding: 80px 0;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

/* PROJECT CARDS */
.project-card {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: 0.3s ease;
    position: relative;
}
.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

.project-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.project-info {
    padding: 22px 20px;
}
.project-info h3 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 8px;
}

/* MODAL OVERLAY */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

/* MODAL CONTENT */
.modal-content {
    width: 90%;
    max-width: 650px;
    background: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 20px;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
    color: white;
    font-weight: 300;
}

/* HIDE CLASS */
.hide {
    display: none;
}

/* VIDEO SHOWCASE */
.video-showcase {
    padding: 100px 0;
    background: var(--surface);
    text-align: center;
}

.video-section-title {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
}

.video-section-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 40px;
}

/* INFINITE SLIDER */
.video-slider {
    display: flex;
    gap: 30px;
    overflow: hidden;
    padding: 20px 0;
    position: relative;
    width: 100%;
}

.video-card {
    min-width: 350px;
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;

    /* 3D PARALLAX & GLOW */
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Hover 3D + Glow */
.video-card:hover {
    transform: perspective(700px) rotateX(8deg) rotateY(-8deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25),
                0 0 20px rgba(244, 196, 48, 0.5);
}

/* Autoplay on hover */
.video-card:hover video {
    filter: brightness(1.1);
}

/* Active Drag */
.video-slider.grabbing {
    cursor: grabbing;
}

/* ================================
   GLOBAL CINEMATIC LIGHT STREAKS
================================= */
.cinematic-streak {
    position: absolute;
    top: 0;
    left: -200%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 40%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 60%
    );
    pointer-events: none;
    transform: skewX(-20deg);
    animation: streakMove 6s infinite linear;
}

@keyframes streakMove {
    0% { left: -200%; }
    100% { left: 200%; }
}

/* Apply streak to all cards */
.project-card,
.video-card {
    position: relative;
    overflow: hidden;
}
.project-card::before,
.video-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(2px);
}
.project-card::after,
.video-card::after {
    content: "";
    position: absolute;
    width: 180%;
    height: 100%;
    left: -200%;
    top: 0;
    background: linear-gradient(
        115deg,
        transparent,
        rgba(255,255,255,0.18),
        transparent
    );
    transform: skewX(-20deg);
    animation: streakMove 8s infinite linear;
}

/* ================================
   HOVER-TO-UNBLUR INTRO
================================= */
.project-card img,
.video-card video {
    filter: blur(6px) brightness(0.8);
    transition: 0.5s ease;
}
.project-card:hover img,
.video-card:hover video {
    filter: blur(0px) brightness(1);
}

/* ================================
   FULLSCREEN TIKTOK MODAL
================================= */
.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#fullscreenVideo {
    max-height: 95vh;
    max-width: 100%;
    border-radius: 20px;
}

.modal-close-video {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 999999;
}

/* swipe down hint */
.video-modal-overlay::after {
    content: "↓ Swipe down to close";
    color: rgba(255,255,255,0.5);
    position: absolute;
    bottom: 40px;
    font-size: 14px;
}
