/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --link-color: #000;
    --link-hover: #666;
    --background: #f4f4f3;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Crimson Text', 'Hoefler Text', Garamond, 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    font-size: 18px;
}

a {
    color: var(--link-color);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header */
header {
    margin-bottom: 80px;
}

header h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
    text-align: center;
}

.header-main {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 30px;
}

.profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.header-content {
    flex: 1;
}

header h1 a {
    color: var(--link-color);
    text-decoration: none;
}

header h1 a:hover {
    color: var(--link-hover);
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.social-links a {
    color: var(--text-light);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        align-items: center;
    }

    .header-content {
        text-align: center;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* Sections */
section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

/* Writing section */
.writing-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.writing-links a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
    font-size: 1.125rem;
}

.writing-links a:hover {
    text-decoration-color: var(--link-color);
}

/* Projects section */
.project {
    margin-bottom: 40px;
}

.project:last-child {
    margin-bottom: 0;
}

.project h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project h3 a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
}

.project h3 a:hover {
    text-decoration-color: var(--link-color);
}

.project p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CV section */
.cv-section {
    margin-top: 40px;
}

.cv-link {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
    font-size: 1.125rem;
}

.cv-link:hover {
    text-decoration-color: var(--link-color);
}

/* Blog posts */
.blog-post-preview {
    margin-bottom: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-preview:last-child {
    border-bottom: none;
}

.blog-post-preview h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-post-preview h3 a {
    color: var(--link-color);
    text-decoration: none;
}

.blog-post-preview h3 a:hover {
    text-decoration: underline;
}

.blog-post-preview time {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.blog-post-preview p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Blog post content */
.blog-post {
    margin-bottom: 60px;
}

.blog-post h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.blog-post time {
    display: block;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 40px;
}

.blog-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-post-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 50px;
    margin-bottom: 20px;
}

.blog-post-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
}

.blog-post-content p {
    margin-bottom: 20px;
}

.blog-post-content a {
    color: var(--link-color);
    text-decoration: underline;
}

.blog-post-content a:hover {
    color: var(--link-hover);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 20px;
    margin-left: 30px;
}

.blog-post-content li {
    margin-bottom: 10px;
}

.blog-post-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9em;
}

.blog-post-content pre {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.blog-post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Footer */
footer {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 40px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--link-color);
}
