/* Main Stylesheet */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --text-color: #334155;
    --bg-color: #ffffff;
    --border-color: #e2e8f0;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: #333;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    margin: 0 0.1rem;
    color: var(--text-color) !important;
}

.navbar-nav .nav-link:hover {
    background-color: var(--light-color);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    font-weight: 600;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 60vh;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    border-radius: 0.5rem;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Code Blocks */
.code-block-wrapper {
    margin: 1rem 0;
}

.code-block-wrapper pre {
    margin: 0;
    border-radius: 0 0 0.375rem 0.375rem;
    background-color: #2d3748 !important;
}

.code-block-wrapper code {
    color: #e2e8f0;
}

.copy-btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Tutorial Content */
.tutorial-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.tutorial-content h1,
.tutorial-content h2,
.tutorial-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.tutorial-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.tutorial-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.tutorial-content h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.tutorial-content p {
    margin-bottom: 1.5rem;
}

.tutorial-content ul,
.tutorial-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.tutorial-content li {
    margin-bottom: 0.5rem;
}

.tutorial-content blockquote {
    background-color: var(--light-color);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* Project Cards */
.project-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

/* Portfolio Gallery */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.portfolio-item img {
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Software Cards */
.software-rating {
    color: #ffc107;
}

.rating-stars {
    display: inline-block;
}

.rating-stars .fas {
    color: #ffc107;
}

.rating-stars .far {
    color: #dee2e6;
}

/* Badges */
.badge {
    font-weight: 500;
}

.badge-tech {
    background-color: #e9ecef;
    color: #495057;
    font-weight: 400;
}

/* Social Links */
.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* Table of Contents */
#table-of-contents a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

#table-of-contents a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .tutorial-content {
        font-size: 1rem;
    }
    
    .code-block-wrapper {
        margin: 0.5rem -15px;
    }
    
    .code-block-wrapper pre {
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .social-links,
    .pagination {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}