:root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #666666;
    --line: #000000;
    --hair: rgba(0, 0, 0, .12);
    --radius: 28px;
    --mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
    --max: 1100px;
}

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

html, body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--mono);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.grid-background {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(0,0,0,.05) 25%, rgba(0,0,0,.05) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.05) 75%, rgba(0,0,0,.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0,0,0,.05) 25%, rgba(0,0,0,.05) 26%, transparent 27%, transparent 74%, rgba(0,0,0,.05) 75%, rgba(0,0,0,.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

/* top nav */
.topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
}

.topnav .brand {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 1.05rem;
    text-decoration: none;
}

.topnav .brand .dot { color: var(--muted); }

.topnav .links {
    display: flex;
    gap: 26px;
    font-size: .82rem;
    letter-spacing: .4px;
}

.topnav .links a {
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}

.topnav .links a:hover,
.topnav .links a.current {
    border-bottom-color: var(--fg);
}

/* blog page header */
.page-header {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 56px 40px 24px;
}

.page-header h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.05;
    font-size: clamp(2rem, 6vw, 3.2rem);
}

.page-header p {
    margin-top: 14px;
    color: #222;
    max-width: 70ch;
}

/* terminal card */
.blog-shell {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 40px 70px;
}

.blog-terminal {
    border: 2px solid var(--line);
    border-radius: calc(var(--radius) + 2px);
    background: var(--fg);
    color: #eaeaea;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0,0,0,.13);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #777;
}

.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }

.term-path {
    margin-left: 10px;
    font-size: .72rem;
    color: #b8b8b8;
    letter-spacing: .7px;
}

.term-body {
    padding: 26px 24px 30px;
    font-size: .95rem;
    min-height: 170px;
}

.term-body .prompt { color: #6cff9b; }
.term-body .out { color: #eaeaea; }

.type-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: #eaeaea;
    margin-left: 2px;
    vertical-align: -2px;
    animation: blink 1s step-end infinite;
}

.blog-note {
    margin-top: 16px;
    font-size: .84rem;
    color: var(--muted);
    letter-spacing: .4px;
}

footer {
    position: relative;
    z-index: 2;
    border-top: 2px solid var(--line);
    padding: 32px 40px;
    text-align: center;
    font-size: .8rem;
    letter-spacing: 1.6px;
    color: var(--muted);
}

footer a {
    text-decoration: none;
    color: var(--fg);
    font-weight: 700;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@media (max-width: 820px) {
    .topnav,
    .page-header,
    .blog-shell,
    footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .topnav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .topnav .links {
        width: 100%;
        gap: 14px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }
}
