﻿/* Import Inter font and set global font family */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Global Animations */
@keyframes spinner-spin {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
}

body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    background-color: #ffffff;
    color: #374151;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
    color: #1f2937;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin: 0 0 1rem 0;
    line-height: 1.7;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    border-radius: 0.375rem;
    font-style: italic;
    color: #475569;
}

/* Container */
.container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: white;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    text-decoration: none;
}

/* Form Validation */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10b981;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Error Boundary */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC4wODE1I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ef4444;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 0.375rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Page Header */
.page-header {
    text-align: center;
    margin: 3rem 0 4rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 400;
}

/* Content Sections */
.intro-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.content-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.content-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #3b82f6;
}

.skill-category h4 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.skill-category ul {
    margin: 0;
    padding-left: 1.25rem;
}

.skill-category li {
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.connect-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Loading and Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.empty-state h2 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.empty-state p {
    margin-bottom: 2rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* Blog Grid and Cards */
.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.blog-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    background: #ffffff;
    transition: all 0.15s ease-in-out;
}

.blog-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.blog-card-hero {
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.blog-card h2 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #1f2937;
}

.blog-card h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.blog-card-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.blog-card p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Post Styles */
.post {
    max-width: 44rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.post-header {
    margin: 2rem 0 2rem;
    text-align: center;
}

.post-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
    line-height: 1.2;
}

.post-hero {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.post-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.post-content {
    line-height: 1.7;
    color: #374151;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.post-content h1 { font-size: 2rem; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.5rem; }
.post-content h4 { font-size: 1.25rem; }

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 1.5rem auto;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Enhanced code block styling */
.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow: auto;
    border: 1px solid #374151;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    position: relative;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.post-content code:not(pre code) {
    background: #f1f5f9;
    color: #374151;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.875em;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

/* Visual Studio syntax highlighting */
.post-content pre .hljs-keyword { color: #569cd6; }
.post-content pre .hljs-string { color: #ce9178; }
.post-content pre .hljs-number { color: #b5cea8; }
.post-content pre .hljs-comment { color: #6a9955; font-style: italic; }
.post-content pre .hljs-function { color: #dcdcaa; }
.post-content pre .hljs-class { color: #4ec9b0; }
.post-content pre .hljs-variable { color: #9cdcfe; }
.post-content pre .hljs-type { color: #4ec9b0; }
.post-content pre .hljs-built_in { color: #4ec9b0; }
.post-content pre .hljs-operator { color: #d4d4d4; }
.post-content pre .hljs-punctuation { color: #d4d4d4; }
.post-content pre .hljs-property { color: #9cdcfe; }
.post-content pre .hljs-attribute { color: #92c5f8; }
.post-content pre .hljs-tag { color: #569cd6; }
.post-content pre .hljs-name { color: #4fc1ff; }
.post-content pre .hljs-selector-id { color: #d7ba7d; }
.post-content pre .hljs-selector-class { color: #d7ba7d; }
.post-content pre .hljs-literal { color: #569cd6; }
.post-content pre .hljs-meta { color: #9b9b9b; }
.post-content pre .hljs-title { color: #dcdcaa; }

/* Language label for code blocks */
.post-content pre[data-language]::before {
    content: attr(data-language);
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Subscribe CTA */
.subscribe-cta {
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    background: #f8fafc;
    text-align: center;
}

.subscribe-cta h3 {
    margin: 0 0 0.75rem 0;
    color: #1f2937;
}

.subscribe-cta p {
    margin-bottom: 1rem;
    color: #6b7280;
}

/* Table of Contents Styles */
.toc-container {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #3b82f6;
}

.table-of-contents h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

.table-of-contents ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.table-of-contents > ul {
    padding-left: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
    position: relative;
}

.table-of-contents li::before {
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: -1rem;
}

.table-of-contents > ul > li::before {
    left: 0;
}

.table-of-contents a {
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.15s ease-in-out;
}

.table-of-contents a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.table-of-contents ul ul {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

/* Responsive TOC */
@media (max-width: 768px) {
    .toc-container {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }
    
    .table-of-contents a {
        font-size: 0.875rem;
    }
}

/* Global Animations for Components */
@keyframes spinner-spin {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}