* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: 221 83% 53%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --background: 0 0% 100%;
    --foreground: 222 47% 11%;
    --card: 0 0% 100%;
    --card-foreground: 222 47% 11%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    --border: 214 32% 91%;
    --radius: 0.75rem;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: hsl(var(--foreground));
    background-color: hsl(var(--background));
    min-height: 100vh;
}

.header {
    position: sticky;
    top: 1rem;
    z-index: 50;
    margin: 1rem auto;
    max-width: 50rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.header.scrolled {
    border-color: hsl(var(--border));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    border-radius: calc(var(--radius) - 0.25rem);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
}

.nav-link.active {
    color: hsl(var(--foreground));
    background: hsl(var(--muted));
}

.main {
    max-width: 50rem;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.profile-section {
    padding: 4rem 0 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 9rem;
    height: 9rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 0.25rem;
    object-fit: cover;
    background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--background)) 100%);
}

.avatar-placeholder {
    width: 9rem;
    height: 9rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: hsl(var(--primary));
    background: linear-gradient(135deg, hsl(var(--muted)) 0%, hsl(var(--background)) 100%);
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: linear-gradient(90deg, hsl(var(--muted) / 0.8), hsl(var(--muted) / 0.6), hsl(var(--muted) / 0.8));
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: hsl(var(--primary) / 0.3);
    background: linear-gradient(90deg, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.05), hsl(var(--primary) / 0.1));
}

.tag-icon {
    width: 1rem;
    height: 1rem;
}

.profile-bio {
    color: hsl(var(--muted-foreground));
    text-align: center;
    line-height: 1.8;
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.more-link:hover {
    color: hsl(var(--foreground));
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--muted) / 0.8);
}

.arrow-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.more-link:hover .arrow-icon {
    transform: translateX(0.25rem);
}

.content-section {
    padding: 2rem 0;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card {
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.card:hover {
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--muted) / 0.3);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-date {
    font-size: 0.75rem;
    font-family: monospace;
    color: hsl(var(--muted-foreground) / 0.8);
    margin-top: 0.25rem;
}

.card-details {
    margin-top: 1rem;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-details li {
    margin-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 2rem;
    color: hsl(var(--primary));
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
}

.interests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.interest-card {
    padding: 1.25rem 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-left: 3px solid hsl(var(--primary));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.interest-card:hover {
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--muted) / 0.3);
    transform: translateX(0.25rem);
}

.interest-card h3 {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.interest-card p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.post-card {
    display: block;
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-card:hover {
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--muted) / 0.3);
}

.post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.post-excerpt {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
}

.post-date {
    color: hsl(var(--muted-foreground) / 0.8);
    font-family: monospace;
}

.post-tag {
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.footer {
    margin-top: 4rem;
    padding: 2rem 1rem;
    border-top: 1px solid hsl(var(--border));
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-link {
    color: hsl(var(--muted-foreground));
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: hsl(var(--foreground));
}

.social-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-quote {
    font-size: 0.875rem;
    font-style: italic;
    color: hsl(var(--muted-foreground));
    max-width: 600px;
    margin: 0 auto;
}

.page-header {
    padding: 6rem 1rem 3rem;
    text-align: center;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--muted)) 100%);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
/*    font-family: 'Times New Roman', 'Georgia', serif; */
}

.page-header p {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
    max-width: 500px;
    margin: 0 auto;
    font-family: 'Times New Roman', 'Georgia', serif;
    font-style: italic;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-card {
    padding: 1.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.content-card:hover {
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--muted) / 0.3);
}

.content-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.content-card .date {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}

.content-card p {
    font-size: 0.9375rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.content-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag-item {
    font-size: 0.75rem;
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.math-block {
    background: hsl(var(--muted));
    padding: 1.5rem;
    border-radius: calc(var(--radius) - 0.25rem);
    margin: 1.5rem 0;
    text-align: center;
    overflow-x: auto;
    border-left: 3px solid hsl(var(--primary) / 0.5);
}

.math-block .katex {
    font-size: 1.2rem;
}

@media (max-width: 640px) {
    .header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .profile-section {
        padding: 3rem 0 2rem;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .page-header {
        padding: 4rem 1rem 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
        font-family: 'Times New Roman', 'Georgia', serif;
    }
}

.article-page {
    padding-top: 2rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-date {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-family: monospace;
}

.article-category {
    font-size: 0.75rem;
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: hsl(var(--foreground));
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-serif);
    color: hsl(var(--foreground));
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 3px solid hsl(var(--primary));
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

.article-content code {
    background: hsl(var(--muted));
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: monospace;
}

.article-content pre {
    background: hsl(var(--muted));
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-back:hover {
    color: hsl(var(--foreground));
}

.click-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particle-fly 1s ease-out forwards;
}

.click-particle.color-1 { background: #ff6b6b; }
.click-particle.color-2 { background: #4ecdc4; }
.click-particle.color-3 { background: #45b7d1; }
.click-particle.color-4 { background: #96ceb4; }
.click-particle.color-5 { background: #ffeaa7; }
.click-particle.color-6 { background: #dfe6e9; }
.click-particle.color-7 { background: #fd79a8; }
.click-particle.color-8 { background: #a29bfe; }
.click-particle.color-9 { background: #74b9ff; }
.click-particle.color-10 { background: #55efc4; }

@keyframes particle-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}
