:root {
    --bg: #0d0d0d;
    --text: #e8e8e8;
    --text-muted: #888;
    --accent: #5ccfcf;
    --accent-dim: #3a9a9a;
    --border: #2a2a2a;
    --card-bg: #141414;
}

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

html {
    font-size: 18px;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-home {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-home:hover {
    color: var(--accent);
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Main content */
main {
    flex: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    width: 100%;
}

/* Homepage */
.homepage-headline {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.homepage-context {
    color: var(--text-muted);
    margin-bottom: 3.5rem;
}

.homepage-context p {
    margin-bottom: 1.2rem;
}

.homepage-context p:last-child {
    margin-bottom: 0;
}

.section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Featured posts */
.featured {
    margin-bottom: 3rem;
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-item {
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.featured-item:hover {
    border-color: var(--accent-dim);
    background: #1a1a1a;
}

.featured-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
    font-size: 1.05rem;
}

.featured-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.all-writing {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.6rem 0;
    transition: color 0.2s ease;
}

.all-writing:hover {
    color: var(--text);
}

.all-writing .arrow {
    transition: transform 0.2s ease;
}

.all-writing:hover .arrow {
    transform: translateX(4px);
}

/* Writing index page */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pinned-list {
    margin-bottom: 3rem;
}

.post-list-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

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

.post-list-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.post-list-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-list-title a:hover {
    color: var(--accent);
}

.post-list-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Single post */
.post {
    max-width: 100%;
}

.post-header {
    margin-bottom: 2.5rem;
}

.post-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.post-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

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

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.post-content strong {
    color: var(--text);
    font-weight: 600;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.back-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Footer */
footer {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    border-top: 1px solid var(--border);
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-text::before {
    content: "Assumes failure. Still works. | Matt Livingston";
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    main {
        padding: 2rem 1.25rem;
    }

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

    .nav {
        padding: 1.25rem 1.25rem 0;
    }
}
