/* 
   PORTFOLIO REDESIGN - VIDEO EDITOR UI THEME
   Based on nehirdiyar.com aesthetic
*/

:root {
    /* Colors */
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --bg-panel-header: #1f1f1f;
    --bg-hover: #2a2a2a;

    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;

    --accent-cyan: #00f0ff;
    --accent-purple: #bd00ff;
    --accent-green: #00ff41;
    --accent-red: #ff003c;

    /* UI Borders & Lines */
    --border-light: #333;
    --border-active: var(--accent-cyan);

    /* Typography */
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 48px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.5;
    overflow-x: hidden;
    padding-top: 40px;
    /* Space for toolbar */
    padding-bottom: 60px;
    /* Space for timeline */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* --- TOOLBAR HEADER --- */
.app-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: var(--bg-panel-header);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: 1000;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-text {
    font-weight: 700;
    color: var(--accent-cyan);
    margin-right: var(--spacing-lg);
}

.menu-item {
    color: var(--text-secondary);
    cursor: pointer;
}

.menu-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    padding: 2px 4px;
    border-radius: 2px;
}

.btn-export {
    background: var(--accent-cyan);
    color: #000;
    padding: 4px 12px;
    font-weight: 700;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-export:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* --- MAIN LAYOUT --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    margin-bottom: var(--spacing-xl);
}

/* --- HERO: SOURCE MONITOR --- */
.source-monitor {
    background: #000;
    border: 1px solid var(--border-light);
    position: relative;
    padding: var(--spacing-lg);
    min-height: 400px;
    /* Reduced from 80vh to match monitor aspect */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-md);
    overflow: hidden;
}

/* Monitor GUI Overlay */
.monitor-overlay {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: var(--spacing-md);
    border: 1px solid #333;
    /* Safe title margin */
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.monitor-top,
.monitor-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--accent-green);
    text-shadow: 0 0 5px var(--accent-green);
}

.rec-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-red);
    font-weight: bold;
}

.rec-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Hero Content */
.hero-content {
    text-align: center;
    z-index: 10;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.highlight {
    color: var(--accent-cyan);
    position: relative;
}

.highlight::after {
    content: '_';
    animation: blink 1s infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: var(--spacing-md);
}

/* --- PORTFOLIO: THE BIN --- */
.bin-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 14px;
}

.bin-title {
    color: var(--accent-purple);
    font-weight: bold;
    text-transform: uppercase;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.portfolio-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.portfolio-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.card-video {
    background: #000;
    position: relative;
    padding-bottom: 56.25%;
    /* Default 16:9 Aspect Ratio */
    height: 0;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

/* Ensure iframes/videos fill the container */
.card-video iframe,
.card-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain; /* Ensures videos don't stretch */
    background: #000; /* Black bars for non-16:9 content */
}

/* DEPRECATED: Standardizing all to 16:9 as requested
.card-video.insta-reel {
    padding-bottom: 180%;
}
.card-video.insta-post {
    padding-bottom: 125%;
}
.card-video.square {
    padding-bottom: 100%;
}
*/

/* Local Videos Container - Now matches card-video 16:9 */
.card-media-auto {
    background: #000;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.card-media-auto video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Metadata style content info */
.card-content {
    padding: var(--spacing-sm);
    font-size: 12px;
}

.card-content h3 {
    color: var(--text-primary);
    font-weight: normal;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content h3::before {
    content: '📄 ';
    opacity: 0.5;
}

.card-content p {
    color: var(--text-muted);
}

/* --- FOOTER: TIMELINE --- */
.timeline-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--bg-panel-header);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: 1000;
}

.timecode {
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: bold;
    background: #000;
    padding: 4px 8px;
    border-radius: 2px;
}

.timeline-tracks {
    flex-grow: 1;
    margin: 0 var(--spacing-lg);
    height: 20px;
    background: repeating-linear-gradient(90deg,
            #333,
            #333 1px,
            transparent 1px,
            transparent 20px);
    position: relative;
    opacity: 0.3;
}

.playhead {
    position: absolute;
    left: 20%;
    top: -10px;
    bottom: -10px;
    width: 2px;
    background: var(--accent-cyan);
    z-index: 2;
}

.playhead::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid var(--accent-cyan);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-item {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .toolbar-right {
        gap: var(--spacing-sm);
    }
}

/* Animations Preservation - DISABLING FADE IN FOR RELIABILITY */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-on-scroll {
    opacity: 1;
    /* Changed from 0 to 1 to ensure visibility */
    transform: none;
    /* efficient reset */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);}
