/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
}

/* Header */
.site-header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left side: Logo + Nav */
.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.site-logo svg {
    width: 24px;
    height: 24px;
}

/* Navigation Links */
.site-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-nav .nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.site-nav .nav-link:hover {
    background: #f0f0f0;
    color: #0066cc;
}

/* Right side: Social Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    color: #666;
}

.social-icon:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Profile Card */
.profile-card {
    display: flex;
    gap: 2rem;
    align-items: start;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-title {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.profile-contact {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.profile-contact span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-bio {
    color: #444;
    line-height: 1.6;
}

/* Section Headers */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tag Badges */
.tag-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #f0f0f0;
    color: #444;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-badge--primary {
    background: #0066cc;
    color: white;
}

.tag-badge--primary:hover {
    background: #0052a3;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Experience Items */
.experience-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.25rem;
}

.experience-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.experience-date {
    color: #666;
    font-size: 0.875rem;
    white-space: nowrap;
}

.experience-company {
    color: #666;
    margin-bottom: 0.5rem;
}

.experience-description {
    color: #444;
    line-height: 1.6;
}

/* Recent Posts Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.see-all-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.see-all-link:hover {
    text-decoration: underline;
}

/* Blog Post Cards */
.blog-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s;
}

.blog-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #999;
}

.blog-card-meta svg {
    width: 16px;
    height: 16px;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

/* Page Heading */
.page-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Meta Separator */
.meta-separator {
    margin: 0 0.5rem;
    color: rgba(0, 0, 0, 0.3);
}

.back-button:hover {
    color: #1a1a1a;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* Single Post Styles */
.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #999;
}

.post-meta svg {
    width: 16px;
    height: 16px;
}

/* Post Content */
.post-content {
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5rem;
}

.post-content h4,
.post-content h5,
.post-content h6 {
    scroll-margin-top: 5rem;
}

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

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

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

/* Code Blocks */
.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.post-content code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
}

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

.post-content :not(pre) > code {
    background: #f5f5f5;
    color: #e83e8c;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.post-content table thead {
    background: #f9f9f9;
}

.post-content table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    color: #1a1a1a;
}

.post-content table td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    line-height: 1.6;
}

.post-content table tbody tr:last-child td {
    border-bottom: none;
}

.post-content table tbody tr:hover {
    background: #fafafa;
}

/* Bold text in table cells */
.post-content table td strong,
.post-content table th strong {
    color: #1a1a1a;
    font-weight: 600;
}

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

    main {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .experience-header {
        flex-direction: column;
    }

    .post-title {
        font-size: 1.5rem;
    }

    /* Responsive tables */
    .post-content table {
        font-size: 0.875rem;
    }

    .post-content table th,
    .post-content table td {
        padding: 0.75rem;
    }
}
