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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    color: #1a365d;
}

/* Main content */
main {
    min-height: calc(100vh - 120px);
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1a365d;
}

.about, .posts, .contact {
    margin-bottom: 40px;
}

.about h2, .posts h2, .contact h1 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #1a365d;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-photo {
    width: 160px;
    height: 160px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.profile-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    position: absolute;
    top: -5px;
    left: -25px;
}

.about p {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

.about p a {
    color: #2c5282;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 82, 130, 0.3);
    transition: border-bottom-color 0.2s ease;
}

.about p a:hover {
    border-bottom-color: #2c5282;
}

.about p img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.1em;
    vertical-align: -0.1em;
}

/* Post list */
.post-list {
    list-style: none;
}

.post-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.post-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.post-item a:hover {
    color: #1a365d;
}

.post-date {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: 20px;
}

/* Individual post */
.post-header {
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #1a365d;
}

.post-header .post-date {
    color: #666;
    font-size: 1em;
    margin-left: 0;
}

.post-content {
    font-size: 1.1em;
    line-height: 1.7;
}

.post-content h2 {
    margin: 30px 0 15px 0;
    color: #1a365d;
}

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

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 20px;
}

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

.post-content a {
    color: #2c5282;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 82, 130, 0.3);
    transition: border-bottom-color 0.2s ease;
}

.post-content a:hover {
    border-bottom-color: #2c5282;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content code {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    white-space: pre;
}

.post-content blockquote {
    background-color: #f8f9fa;
    border-left: 4px solid #e9ecef;
    margin: 20px 0;
    padding: 15px 20px;
    font-style: italic;
    color: #666;
}

.post-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-nav a {
    color: #2c5282;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 82, 130, 0.3);
    transition: border-bottom-color 0.2s ease;
}

.post-nav a:hover {
    border-bottom-color: #2c5282;
}

/* Contact page */
.contact-info {
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info ul {
    list-style: none;
    margin-top: 10px;
}

.contact-info li {
    margin-bottom: 8px;
}

.contact-info a {
    color: #2c5282;
    text-decoration: none;
    border-bottom: 1px solid rgba(44, 82, 130, 0.3);
    transition: border-bottom-color 0.2s ease;
}

.contact-info a:hover {
    border-bottom-color: #2c5282;
}

/* Footer */
footer {
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
    color: #666;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .about-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-photo {
        align-self: flex-start;
    }
    
    .post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-date {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .hero h1 {
        font-size: 2em;
    }
}