/* Global Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth transitions for theme */
.dark {
    color-scheme: dark;
}

.light {
    color-scheme: light;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Skill Cards Hover Effect */
.skill-card {
    transition: all 0.3s ease;
}

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

/* Code Blocks */
code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

.dark code {
    background: #1e293b;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* Blog Post Styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.blog-post h1,
.blog-post h2,
.blog-post h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: bold;
}

.blog-post h1 {
    font-size: 2.25rem;
}

.blog-post h2 {
    font-size: 1.875rem;
}

.blog-post h3 {
    font-size: 1.5rem;
}

.blog-post p {
    margin-bottom: 1rem;
}

.blog-post ul,
.blog-post ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

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

.blog-post blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.dark .blog-post blockquote {
    color: #a1a5b1;
}

/* Markdown Link Styles */
.blog-post a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.blog-post a:hover {
    color: var(--primary-dark);
}

.dark .blog-post a {
    color: #60a5fa;
}

.dark .blog-post a:hover {
    color: #93c5fd;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Tag Styles */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.dark .tag {
    background: #0c4a6e;
    color: #7dd3fc;
}

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

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

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Print Styles */
@media print {
    .nav,
    footer,
    #theme-toggle,
    #menu-toggle {
        display: none;
    }
}

/* Dark Mode Specific */
.dark {
    --tw-bg-opacity: 1;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th,
td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.dark th,
.dark td {
    border-color: #475569;
}

th {
    background: #f8fafc;
    font-weight: 600;
}

.dark th {
    background: #1e293b;
}
