/* Custom Styles for Portfolio - Soft & Human Design */

:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --dark-bg: #0f172a;
    --light-bg: #ffffff;
    --card-bg: #f9fafb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Card Styles */
.card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Dark Mode */
.dark .card {
    background: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: #e5e7eb;
    color: var(--text-dark);
}

.dark .badge-secondary {
    background-color: #374151;
    color: #f3f4f6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

p {
    line-height: 1.6;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--card-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Utility Classes */
.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Modal Enhancements */
#projectModal {
    animation: fadeIn 0.3s ease-out;
}

#projectModal:not(.hidden) {
    display: flex;
}

#modalContent {
    max-height: 85vh;
    will-change: transform, opacity;
}

#modalContent.scale-100 {
    transform: scale(1);
    opacity: 1;
}

#modalContent.scale-95 {
    transform: scale(0.95);
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Gallery Image Hover */
#modalBody img {
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

#modalBody img:hover {
    transform: scale(1.05);
}

/* Scroll to Top Button */
#scrollToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#scrollToTop.show {
    display: flex;
    opacity: 1;
}

#scrollToTop:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

#scrollToTop:active {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .card {
        padding: 16px;
    }

    #scrollToTop {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}
