/* Portfolio Hub Custom Styles */

/* Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #ffffff;
    --bs-card-bg: #2d2d2d;
    --bs-border-color: #404040;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    transition: var(--transition-smooth);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(13, 110, 253, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

#theme-toggle {
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.stats-row {
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-5deg); }
}

.floating-icons {
    position: relative;
    margin-top: 2rem;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: -20px;
    left: 20px;
    animation-delay: -0.5s;
    color: #61dafb;
}

.floating-icon:nth-child(2) {
    top: 40px;
    right: 30px;
    animation-delay: -2s;
    color: #339933;
}

.floating-icon:nth-child(3) {
    bottom: 20px;
    left: 50px;
    animation-delay: -3.5s;
    color: #ff9900;
}

.floating-icon:nth-child(4) {
    bottom: -10px;
    right: 20px;
    animation-delay: -1s;
    color: #0db7ed;
}

/* App Cards */
.app-card {
    transition: var(--transition-smooth);
}

.shadow-hover {
    transition: var(--transition-smooth);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.shadow-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.app-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.375rem 0.375rem 0 0;
    position: relative;
    overflow: hidden;
}

.app-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.shadow-hover:hover .app-preview::before {
    left: 100%;
}

/* Tech Badges */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tech-badges .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Enhanced App Cards */
.badge-status {
    font-size: 0.65rem;
    padding: 0.35em 0.6em;
}

.live-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* App Status Indicators */
.app-card[data-status="live"] .card {
    border-left: 4px solid #28a745;
}

.app-card[data-status="development"] .card {
    border-left: 4px solid #ffc107;
}

.app-card[data-status="planning"] .card {
    border-left: 4px solid #17a2b8;
}

.app-card[data-status="concept"] .card {
    border-left: 4px solid #6c757d;
}

/* Progress Bars */
.progress {
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 1.5s ease-in-out;
}

/* Enhanced Hover Effects */
.app-card:hover .live-indicator {
    animation-duration: 1s;
}

.app-card:hover .badge-status {
    transform: scale(1.05);
}

/* App Grid Enhancements */
.app-placeholder {
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.app-placeholder:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Border Dashed for Placeholders */
.border-dashed {
    border: 2px dashed #dee2e6 !important;
    background-color: #f8f9fa;
}

.border-dashed:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(13, 110, 253, 0.05);
}

/* Filter Buttons */
#filter-buttons .btn {
    border-radius: 25px;
    margin: 0 0.2rem;
    transition: var(--transition-smooth);
}

#filter-buttons .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Section Spacing */
section {
    padding: 4rem 0;
}

/* Tech Stack Icons */
.tech-stack i {
    transition: var(--transition-smooth);
}

.tech-stack i:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Modal Styling */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 1rem 1rem 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}

.social-links a {
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--info-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .floating-icons {
        display: none;
    }
    
    .app-preview {
        height: 120px;
    }
    
    .tech-badges {
        justify-content: center;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Dark Theme Styles */
[data-theme="dark"] {
    background-color: var(--dark-color);
    color: white;
}

[data-theme="dark"] .card {
    background-color: var(--bs-card-bg);
    border-color: var(--bs-border-color);
    color: white;
}

[data-theme="dark"] .border-dashed {
    background-color: #2d2d2d;
    border-color: #404040 !important;
}

[data-theme="dark"] .app-preview {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
}

[data-theme="dark"] .bg-light {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    footer,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
    }
    
    .card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}