/* ================================================
   css/portfolio.css - THE ABDUCTION RECORDS
   (Kinetic Streams / Vivid Data-Flow)
   STATUS: RECALIBRATED (Space & Size Fix)
================================================= */

/* --- THE ENVIRONMENT --- */
.portfolio-section {
    position: relative;
    padding: 2rem 0 8rem 0; 
    background: transparent;
    overflow: hidden;
    z-index: 2;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

.portfolio-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

/* --- HEADER (FIXED SPACING) --- */
.portfolio-header {
    text-align: center; 
    position: relative;
    z-index: 20;
    padding-top: 4rem;
    
    /* THE FIX: Added significant breathing room below the text */
    margin-bottom: 6rem; 
}

/* --- THE KINETIC CONTAINER --- */
.kinetic-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    
    transform: rotate(-3deg) scale(1.1); 
    width: 120%;
    margin-left: -10%;
    
    /* THE FIX: Removed the negative margin that was pulling it up */
    margin-top: 0; 
    
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* --- THE TRACKS --- */
.stream-track {
    display: flex;
    gap: 2rem;
    width: max-content; 
    cursor: grab;
    padding: 20px 0;
}

.track-1 { animation: scrollLeft 60s linear infinite; }
.track-2 { animation: scrollRight 70s linear infinite; }

.stream-track:hover { animation-play-state: paused; }

/* --- THE CARD --- */
.evidence-file {
    position: relative;
    width: 400px; 
    height: 250px;
    background: #050505;
    flex-shrink: 0; 
    clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
    border: 1px solid rgba(255,255,255,0.15);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.evidence-file img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: none;
}

.file-data {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 100%);
    padding: 2rem;
    display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; 
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.file-id {
    font-family: monospace; 
    color: var(--primary); 
    font-size: 0.7rem;
    letter-spacing: 0.2em; 
    margin-bottom: 5px;
    opacity: 0.8;
}

.file-name {
    font-family: var(--font-heading); 
    color: #fff; 
    font-size: 1.6rem;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Pill Style Tag (No bar) */
.file-service {
    font-family: monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    width: fit-content;
}

.evidence-file:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(236, 246, 116, 0.15);
}

.evidence-file:hover img { 
    transform: scale(1.1);
}

.evidence-file:hover .file-data { 
    opacity: 1; 
    transform: translateY(0); 
}

@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ================================================
   THE ENHANCED ANALYSIS CHAMBER (LIGHTBOX)
   STATUS: STEALTH / MINIMALIST
================================================= */

.analysis-chamber {
    position: fixed;
    inset: 0;
    z-index: 99999;
    
    /* Deep atmosphere, high blur to focus on content */
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: rgba(5, 5, 8, 0.85);
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease-out;
}

.chamber-backdrop {
    position: absolute;
    inset: 0;
    /* Subtle grid, barely visible */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

/* === SPECIMEN CONTAINER === */
.specimen-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.95);
    transition: all 0.4s ease-out;
    text-align: center;
    width: 90vw;
    max-width: 450px; /* Slightly wider for better view */
    padding: 0 1rem;
}

/* === CONTAINMENT FIELD (Clean Glass, No Heavy Borders) === */
.containment-field {
    position: relative;
    width: 100%;
    
    /* Flexible stage height */
    height: 45vh; 
    min-height: 300px;
    max-height: 500px;
    
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem; 
    
    margin: 0 auto 2rem auto;
    
    /* Pure Glass Look */
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    
    /* Subtle rounded corners instead of harsh cuts */
    border-radius: 4px;
}

/* Optional: Very subtle inner scan line (can remove if too much) */
.containment-field::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    animation: scanDown 4s linear infinite;
    pointer-events: none;
}

/* === THE IMAGE (Perfect Fit) === */
.specimen-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
    position: relative;
    z-index: 10;
    
    /* Slight glow to make it separate from bg */
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.6)); 
}

/* === KILL THE CORNERS === */
.field-corner { display: none; }

/* === METADATA PANEL (Clean & Floating) === */
.specimen-metadata {
    /* Transparent floating text, no box */
    text-align: left;
    margin-bottom: 2rem;
    border-left: 2px solid var(--primary); /* Just a simple accent line */
    padding-left: 1rem;
    margin-left: 10px;
}

.specimen-id { 
    font-family: monospace; 
    color: var(--primary); 
    font-size: 0.75rem; 
    letter-spacing: 0.2em; 
    display: block; 
    margin-bottom: 0.2rem; 
    opacity: 0.8;
}

.specimen-name { 
    font-family: var(--font-heading); 
    color: #fff; 
    font-size: 1.8rem; 
    text-transform: uppercase; 
    margin: 0; 
    line-height: 1.1; 
    letter-spacing: 0.05em;
}

.specimen-type { 
    font-family: monospace; 
    color: rgba(255, 255, 255, 0.5); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    margin-top: 0.2rem;
    display: block; 
}

/* === CLOSE BUTTON (THE REVAMP) === */
/* Minimalist "Ghost" Button */
.chamber-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Very subtle border */
    color: rgba(255, 255, 255, 0.6); /* Muted text */
    
    padding: 0.8rem 3rem;
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px; /* Smooth pill shape */
    
    /* Center it */
    display: block;
    margin: 0 auto;
}

.chamber-close:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(236, 246, 116, 0.2);
    background: rgba(236, 246, 116, 0.05);
    letter-spacing: 0.4em; /* Expands on hover */
}

/* === ACTIVE STATE === */
.analysis-chamber.active { opacity: 1; visibility: visible; pointer-events: auto; }
.analysis-chamber.active .specimen-container { transform: translate(-50%, -50%) scale(1); }
.analysis-chamber.active .containment-field::before { opacity: 0.5; }

@keyframes scanDown {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@media (max-width: 768px) {
    .specimen-container { width: 95vw; }
    .containment-field { height: 35vh; padding: 1rem; }
    .chamber-close { width: 100%; border-radius: 4px; }
}

/* css/portfolio.css - MOBILE KINETIC STREAM (RESIZED & TUNED) */

@media (max-width: 768px) {
    
    .portfolio-section {
        padding: 4rem 0;
        overflow: hidden; /* Critical: Cuts off the tilted edges */
    }

    .portfolio-header {
        margin-bottom: 3rem;
        padding-top: 1rem;
    }
    
    .portfolio-header h2 {
        font-size: 2.2rem !important;
    }

    /* 1. THE WRAPPER (Keep the tilt, but widen the stage) */
    .kinetic-wrapper {
        /* Make it wider than the phone screen so edges don't clip awkwardly */
        width: 180%; 
        margin-left: -40%; /* Center the extra width */
        
        transform: rotate(-3deg); /* KEEP THE TILT! */
        gap: 1.5rem; /* Slightly tighter gap */
    }

    /* 2. THE TRACKS (Keep moving, just resize gap) */
    .stream-track {
        gap: 1.5rem;
        padding: 10px 0;
        /* Ensure animation continues */
        animation-play-state: running; 
    }
    
    /* 3. THE CARDS (The Shrink Ray) */
    .evidence-file {
        /* Mobile Friendly Size */
        width: 260px; 
        height: 170px;
        
        /* Keep the cool shape */
        clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
        
        flex-shrink: 0;
    }

    /* 4. CONTENT SCALING (Make text fit small cards) */
    .file-name { 
        font-size: 1.1rem; /* Smaller text */
    }
    
    .file-id { 
        font-size: 0.6rem; 
    }
    
    .file-service {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
    
    /* 5. INTERACTION TWEAK */
    /* On mobile, sometimes tap = hover. We ensure the gradient doesn't block the view too aggressively */
    .file-data {
        padding: 1rem;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
    }
}

