* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #222;
    background: #fff;
    font-size: 18px;
}

header {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    border-bottom: 2px solid #222;
}

nav {
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

footer {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem;
    color: #999;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
}

/* Posts list */
.posts {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.post-preview h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.post-preview h2 a {
    color: #222;
    text-decoration: none;
}

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

.post-preview time {
    color: #999;
    font-size: 0.85rem;
}

.post-preview .excerpt {
    margin-top: 0.5rem;
    color: #555;
}

.no-posts {
    color: #999;
}

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

.post-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.post-header time {
    color: #999;
    font-size: 0.85rem;
}

.post-meta {
    color: #999;
    font-size: 0.85rem;
}

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

.post-content h2 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

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

.post-content pre {
    background: #f7f7f7;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.post-content code {
    background: #f7f7f7;
    padding: 0.15rem 0.4rem;
    font-size: 0.9em;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content blockquote {
    border-left: 2px solid #ddd;
    padding-left: 1rem;
    color: #666;
    margin: 1.5rem 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
}

.post-content iframe {
    max-width: 100%;
    margin: 1.5rem 0;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #222;
}

/* Admin */
.admin h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin h2 {
    font-size: 1.1rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.posts-table th,
.posts-table td {
    padding: 0.75rem 0;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.posts-table th {
    font-weight: 600;
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.posts-table a {
    color: #222;
    text-decoration: none;
}

.posts-table a:hover {
    text-decoration: underline;
}

/* Editor */
.editor h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #222;
}

.form-group textarea {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #222;
    color: #fff;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #000;
}

.btn-secondary {
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    border-color: #222;
    background: #fff;
}

.btn-link {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.btn-link:hover {
    color: #c00;
}
