﻿/*
===============================================
COMPONENTS CSS - Essential UI Components
Professional Portfolio by Chinmoy Kumar Biswas
Version: 2.0.0 - Clean Build
===============================================
*/

/* ===== BUTTON COMPONENTS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary-color);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--bg-glass);
    color: var(--primary-color);
}

/* ===== CARD COMPONENTS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-glass {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.card-header {
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.card-body {
    margin-bottom: var(--space-4);
}

.card-footer {
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

/* ===== NAVIGATION COMPONENTS ===== */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    position: relative;
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
    border-radius: var(--radius-lg);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-glass);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
}

.mobile-nav.active {
    transform: translateX(0);
}

/* ===== FORM COMPONENTS ===== */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-elevated);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== PROJECT CARD COMPONENTS ===== */
.project-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--neutral-200);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card-image img {
    transform: scale(1.1);
}

.project-card-content {
    padding: var(--space-6);
}

.project-card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

/* ===== SKILL COMPONENTS ===== */
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-4);
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-6);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.skill-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    background: var(--gradient-primary);
    color: white;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: transform var(--transition-base);
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(24px);
}

/* ===== MODAL COMPONENTS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .card {
        padding: var(--space-4);
    }
    
    .project-card-content {
        padding: var(--space-4);
    }
    
    .skill-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: var(--space-3);
    }
    
    .skill-item {
        padding: var(--space-4);
    }
    
    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-sm);
    }
}
