/* ===== COMPONENTS CSS - UI Components ===== */

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #2563eb;
    font-weight: 600;
    border: 2px solid #2563eb;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-secondary:hover {
    background-color: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.dark .btn-secondary {
    color: #60a5fa;
    border-color: #60a5fa;
}

.dark .btn-secondary:hover {
    background-color: #60a5fa;
    color: #ffffff;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #6b7280;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-ghost:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.dark .btn-ghost {
    color: #9ca3af;
}

.dark .btn-ghost:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

/* ===== NAVIGATION ===== */
.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.dark .nav-link {
    color: #d1d5db;
}

.dark .nav-link:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

.mobile-nav-link {
    display: block;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.dark .mobile-nav-link:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

/* ===== CARDS ===== */
.project-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .project-card {
    background-color: #374151;
}

.blog-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .blog-card {
    background-color: #374151;
}

/* ===== SKILL TAGS ===== */
.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    margin: 0.125rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: #bfdbfe;
    transform: scale(1.05);
}

.dark .skill-tag {
    background-color: #1e3a8a;
    color: #93c5fd;
}

.dark .skill-tag:hover {
    background-color: #1e40af;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    margin: 0.125rem;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background-color: #e5e7eb;
    transform: scale(1.05);
}

.dark .tech-tag {
    background-color: #4b5563;
    color: #d1d5db;
}

.dark .tech-tag:hover {
    background-color: #6b7280;
}

/* ===== SOCIAL LINKS ===== */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: #6b7280;
    background-color: transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.dark .social-link {
    color: #9ca3af;
}

.dark .social-link:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

/* ===== FORMS ===== */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #374151;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark .form-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .form-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #374151;
    resize: vertical;
    min-height: 6rem;
}

.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dark .form-textarea {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.dark .form-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

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

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

.role-animation {
    animation: roleSlide 8s infinite;
}

.role-text {
    display: block;
    height: 2.5rem;
    line-height: 2.5rem;
    overflow: hidden;
    color: #2563eb;
    font-weight: 600;
}

.dark .role-text {
    color: #60a5fa;
}

@keyframes roleSlide {
    0%, 20% {
        transform: translateY(0);
    }
    25%, 45% {
        transform: translateY(-2.5rem);
    }
    50%, 70% {
        transform: translateY(-5rem);
    }
    75%, 95% {
        transform: translateY(-7.5rem);
    }
    100% {
        transform: translateY(-10rem);
    }
}

/* ===== GRADIENTS ===== */
.text-gradient {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-blue-400 {
    --tw-gradient-from: #60a5fa;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

.from-blue-50 {
    --tw-gradient-from: #eff6ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.via-white {
    --tw-gradient-stops: var(--tw-gradient-from), #ffffff, var(--tw-gradient-to);
}

.to-indigo-50 {
    --tw-gradient-to: #eef2ff;
}

.dark .dark\:from-gray-900 {
    --tw-gradient-from: #111827;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0));
}

.dark .dark\:via-gray-800 {
    --tw-gradient-stops: var(--tw-gradient-from), #1f2937, var(--tw-gradient-to);
}

.dark .dark\:to-gray-900 {
    --tw-gradient-to: #111827;
}

/* ===== BORDERS ===== */
.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.dark .dark\:border-gray-700 {
    border-color: #374151;
}

/* ===== ROUNDED CORNERS ===== */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ===== SHADOWS ===== */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== SPACE UTILITIES ===== */
.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-x-6 > * + * {
    margin-left: 1.5rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

/* ===== FLEX UTILITIES ===== */
.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

/* ===== WIDTH AND HEIGHT UTILITIES ===== */
.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.w-20 {
    width: 5rem;
}

.w-30 {
    width: 7.5rem;
}

.w-32 {
    width: 8rem;
}

.w-76 {
    width: 19rem;
}

.w-80 {
    width: 20rem;
}

.w-96 {
    width: 24rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

.h-20 {
    height: 5rem;
}

.h-30 {
    height: 7.5rem;
}

.h-32 {
    height: 8rem;
}

.h-48 {
    height: 12rem;
}

.h-76 {
    height: 19rem;
}

.h-80 {
    height: 20rem;
}

.h-96 {
    height: 24rem;
}

/* ===== POSITIONING ===== */
.top-0 {
    top: 0;
}

.top-20 {
    top: 5rem;
}

.bottom-20 {
    bottom: 5rem;
}

.left-20 {
    left: 5rem;
}

.right-20 {
    right: 5rem;
}

.-bottom-2 {
    bottom: -0.5rem;
}

.-right-2 {
    right: -0.5rem;
}

.-top-2 {
    top: -0.5rem;
}

.-left-2 {
    left: -0.5rem;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* ===== BLUR ===== */
.blur-3xl {
    filter: blur(64px);
}

/* ===== BACKGROUND COLORS ===== */
.bg-white {
    background-color: #ffffff;
}

.bg-green-500 {
    background-color: #10b981;
}

.bg-blue-400 {
    background-color: #60a5fa;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-gray-700 {
    background-color: #374151;
}

.bg-gray-800 {
    background-color: #1f2937;
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-black {
    background-color: #000000;
}

/* ===== TEXT COLORS ===== */
.text-white {
    color: #ffffff;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.text-blue-400 {
    color: #60a5fa;
}

.text-blue-600 {
    color: #2563eb;
}

.text-red-500 {
    color: #ef4444;
}

/* ===== BORDER COLORS ===== */
.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-gray-600 {
    border-color: #4b5563;
}

.border-gray-700 {
    border-color: #374151;
}

/* ===== RESIZE ===== */
.resize-none {
    resize: none;
}

/* ===== CURSOR ===== */
.cursor-pointer {
    cursor: pointer;
}

/* ===== FILL ===== */
.fill-currentColor {
    fill: currentColor;
}

/* ===== STROKE ===== */
.stroke-currentColor {
    stroke: currentColor;
}

/* ===== VIEWBOX ===== */
[viewBox] {
    viewBox: attr(viewBox);
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (min-width: 640px) {
    .sm\:px-3 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:h-10 {
        height: 2.5rem;
    }
    
    .md\:text-2xl {
        font-size: 1.5rem;
    }
    
    .md\:text-4xl {
        font-size: 2.25rem;
    }
    
    .md\:text-5xl {
        font-size: 3rem;
    }
    
    .md\:text-7xl {
        font-size: 4.5rem;
    }
} 

/* ===== BLOG COMPONENTS ===== */

/* Blog Card */
.blog-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.2);
}

.blog-card img {
    transition: transform 0.3s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Modal */
#blogModal, #blogViewModal {
    backdrop-filter: blur(4px);
}

#blogModal .bg-white,
#blogViewModal .bg-white {
    animation: slideInUp 0.3s ease-out;
}

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

/* Blog Form */
#blogForm input:focus,
#blogForm textarea:focus,
#blogForm select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Blog Admin Controls */
#blogAdminControls {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

/* Blog Search and Filter */
#blogSearch:focus,
#blogCategoryFilter:focus,
#blogSortBy:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Blog Tags */
.blog-tag {
    transition: all 0.2s ease;
}

.blog-tag:hover {
    transform: scale(1.05);
}

/* Blog View Content */
#blogViewContent {
    line-height: 1.8;
}

#blogViewContent h1,
#blogViewContent h2,
#blogViewContent h3,
#blogViewContent h4,
#blogViewContent h5,
#blogViewContent h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

#blogViewContent p {
    margin-bottom: 1rem;
}

#blogViewContent ul,
#blogViewContent ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#blogViewContent li {
    margin-bottom: 0.5rem;
}

#blogViewContent blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6b7280;
}

#blogViewContent code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

#blogViewContent pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Dark mode adjustments */
.dark #blogViewContent code {
    background-color: #374151;
    color: #f9fafb;
}

.dark #blogViewContent blockquote {
    color: #9ca3af;
}

/* Blog Stats */
.blog-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog Category Badge */
.blog-category {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Blog Actions */
.blog-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-actions button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-actions .btn-edit {
    background-color: #3b82f6;
    color: white;
}

.blog-actions .btn-edit:hover {
    background-color: #2563eb;
}

.blog-actions .btn-delete {
    background-color: #ef4444;
    color: white;
}

.blog-actions .btn-delete:hover {
    background-color: #dc2626;
}

/* Blog Loading States */
.blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.blog-loading .spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.blog-empty svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

/* Blog Responsive Design */
@media (max-width: 768px) {
    .blog-card {
        margin-bottom: 1rem;
    }
    
    #blogModal .max-w-4xl {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .blog-actions {
        flex-direction: column;
    }
    
    .blog-stats {
        flex-wrap: wrap;
    }
} 