/* Base styles for entire website */
body {
    font-family: 'Palatino', serif;
    background: #fff;
    color: #000;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: normal;
}

h3 {
    font-size: 1rem;
    margin: 15px 0 10px 0;
    font-weight: normal;
}

p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

ul {
    margin-bottom: 15px;
    font-size: 0.9rem;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Links */
a {
    color: #666;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #666;
}

sup {
    font-size: 0.65em;
    vertical-align: super;
    line-height: 0;
    font-weight: normal;
}

/* Header and Navigation */
header {
    background: #fff;
    border-bottom: 1px solid #000;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2rem;
    font-weight: normal;
    margin: 0 0 10px 0;
}

header p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

header p a {
    color: #000;
}

nav {
    margin-top: 15px;
}

nav a {
    color: #000;
    text-decoration: none;
    margin: 0 20px;
    font-size: 0.9rem;
}

nav a:hover {
    text-decoration: underline;
    color: #666;
}

/* Main content */
main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 10px;
}

/* Post content styles */
.post-content {
    max-width: 550px;
    margin: 0 auto;
    padding: 20px 10px;
}

.post-content h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 20px;
    text-align: center;
}

.post-content h2 {
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: normal;
}

.post-content h3 {
    font-size: 1rem;
    margin: 15px 0 10px 0;
    font-weight: normal;
}

.post-content p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.post-content ul {
    margin-bottom: 15px;
    font-size: 0.9rem;
    padding-left: 20px;
}

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

/* Post meta styles */
.post-meta {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin: 0 0 10px 0;
    text-align: center;
}

/* Code styles */
pre {
    background: #fff;
    border: 1px solid #000;
    padding: 10px;
    margin: 15px 0;
    overflow-x: auto;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 2px 4px;
    font-size: 0.85em;
}

/* Syntax highlighting */
.keyword { color: #000; font-weight: bold; }
.type { color: #666; font-style: italic; }
.function { color: #333; text-decoration: underline; }
.comment { color: #888; font-style: italic; }
.number { color: #444; }
.operator { color: #000; }
.variable { color: #222; }

/* Navigation breadcrumb */
.breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #666;
}

/* Footer */
footer {
    background: #fff;
    border-top: 1px solid #000;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.8rem;
}

/* Contact info */
.contact-info {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 0.8rem;
}

.contact-info a {
    color: #000;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
    color: #666;
}

/* Note boxes */
.note {
    max-width: 500px;
    margin: 20px auto 0 auto;
    padding: 15px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 0.8rem;
    line-height: 1.3;
}

.note p {
    margin: 0;
    color: #333;
}

/* References styling */
.references {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #000;
    font-size: 0.8rem;
    text-align: center;
}

.references a {
    color: #000;
    text-decoration: none;
}

.references a:hover {
    text-decoration: underline;
    color: #666;
}

/* Sections for content organization */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 20px;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
}

.section p {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Writing styles for structs pages */
.writing-item {
    border: 1px solid #000;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
}

.writing-header {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.writing-thoughts {
    flex: 1;
}

.writing-thoughts p {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.writing-thoughts p:last-child {
    margin-bottom: 0;
}

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

/* Responsive design */
@media (max-width: 768px) {
    body { 
        padding: 10px 5px; 
        max-width: 100%;
    }
    main { 
        padding: 10px 5px; 
    }
    .post-content { 
        padding: 10px 5px; 
    }
    header h1 { 
        font-size: 1.5rem; 
    }
    nav a { 
        margin: 0 10px; 
    }
}

@media (max-width: 480px) {
    h1 { 
        font-size: 1.2rem; 
    }
}