/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar a:hover {
    background-color: #f0f0f0;
}

.navbar a.active {
    background-color: #007bff;
    color: white;
}

/* Profile Section */
.profile-intro {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.profile-intro ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin: 1rem 0;
}

.profile-intro a {
    color: #007bff;
    text-decoration: none;
}

.profile-intro a:hover {
    text-decoration: underline;
}

/* News and Achievements */
.achievements {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.achievements h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.achievements ul {
    list-style: none;
    padding: 0;
}

.achievements li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.achievements li::before {
    content: "•";
    color: #007bff;
    position: absolute;
    left: 0;
}

/* Honors Section */
.honors {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.honors h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.honors ul {
    list-style: none;
    padding: 0;
}

.honors li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.honors li::before {
    content: "🏆";
    position: absolute;
    left: 0;
}

.honors strong {
    color: #007bff;
}

/* Resume Section */
.resume-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resume-item {
    margin-bottom: 2rem;
}

.resume-item h3 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.resume-item h4 {
    color: #34495e;
    margin: 1rem 0 0.5rem;
}

.resume-item ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.resume-item em {
    color: #666;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #0056b3;
}

/* Loading State */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Profile Photo */
.profile-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .navbar ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Blog Posts */
.blog-post {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.blog-post h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.blog-post .post-date {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-post .post-content {
    line-height: 1.8;
}

.blog-post .post-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.blog-post .post-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.blog-post .tags {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.blog-post .tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.blog-post .tag:hover {
    background-color: #dee2e6;
}

/* Tags */
.tags {
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Loading and Error States */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background-color: #f8d7da;
    border-radius: 8px;
    margin: 1rem 0;
}

.retry-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #0056b3;
}

.no-posts {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Post Preview */
.post-preview {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.post-preview h2 {
    margin: 0 0 1rem;
}

.post-preview h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-preview h2 a:hover {
    color: #007bff;
}

.post-preview-content {
    color: #666;
    margin-bottom: 1rem;
}

/* Post Detail */
.post-detail {
    background-color: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.post-detail h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #666;
    font-style: italic;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 2rem;
}

/* Enhanced Code Block Styling */
.post-content .code-block {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.post-content .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.post-content .code-language {
    font-weight: bold;
    text-transform: uppercase;
}

.post-content .copy-button {
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.post-content .copy-button:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.post-content .copy-button.copied {
    color: #48bb78;
}

.post-content .codehilite {
    margin: 0;
    border-radius: 0 0 8px 8px;
}

.post-content .codehilite pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background-color: #1a202c;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    background-color: #f1f5f9;
    color: #2d3748;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

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

.post-link {
    margin: 2rem 0;
}

.post-link a {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-navigation {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.back-to-posts {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-posts:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-status {
    color: #28a745;
    font-style: italic;
}
