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

/* === Persistent top navigation === */

.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid #ddd;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

.topnav-brand {
    font-size: 1rem;
    font-weight: normal;
    text-decoration: none;
    color: black;
    letter-spacing: 0.05em;
}

.topnav-brand:hover {
    text-decoration: underline;
}

.topnav-links {
    display: flex;
    gap: 1.5rem;
}

.topnav-links a {
    color: #666;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.topnav-links a:hover {
    color: black;
}

.topnav-links a.current {
    color: black;
    border-bottom: 1px solid black;
}

@media (max-width: 768px) {
    .topnav {
        padding: 0.6rem 1rem;
    }

    .topnav-links {
        gap: 1rem;
        font-size: 0.8rem;
    }
}

body {
    font-family: 'American Typewriter', 'Courier New', monospace;
    background: white;
    color: black;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 41px;
}

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

h1 {
    font-size: 3rem;
    font-weight: normal;
    margin-bottom: 1rem;
    border-bottom: 1px solid black;
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 2rem 0 1rem 0;
}

h3 {
    font-size: 1.2rem;
    font-weight: normal;
    margin: 1.5rem 0 0.5rem 0;
}

a {
    color: black;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

pre {
    background: #f5f5f5;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid black;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
}

pre code {
    background: none;
    padding: 0;
}

blockquote {
    border-left: 3px solid black;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 3.5rem;
    left: 1rem;
    z-index: 1001;
    background: white;
    border: 1px solid black;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}
