/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent:       #7a1414;
    --accent-dim:   #581010;
    --fg:           #252729;
    --fg-mid:       rgba(37,39,41,0.60);
    --fg-dim:       rgba(37,39,41,0.40);
    --bg:           #f6f6f5;
    --bg-tag:       #ebebea;
    --bg-pre:       #ebebea;
    --border:       rgba(37,39,41,0.10);
    --link:         #546070;
    --ok:           #2d9e4f;
    --font:         'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', Menlo, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    --max-w:        min(80%, 1080px);
    --pad-x:        24px;
    --nav-h:        41px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }

body {
    background: var(--bg);
    overflow-x: clip;
    color: var(--fg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Top Nav ───────────────────────────────────────────────────────────────── */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(246,246,245,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
}

.top-nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 8px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    overflow: hidden;
    min-height: var(--nav-h);
}

.top-nav-links {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.top-nav a {
    color: var(--fg-mid);
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.top-nav a:hover { color: var(--accent); }
.top-nav a.nav-active { color: var(--accent); }

.nav-sep {
    color: var(--fg-dim);
    margin: 0 0.6rem;
    user-select: none;
    flex-shrink: 0;
}

.nav-right { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0 0 0.4rem;
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1;
    color: var(--fg-mid);
    transition: color 0.2s;
    vertical-align: middle;
    user-select: none;
    flex-shrink: 0;
}

.theme-toggle:hover { color: var(--accent); }
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.site-main { flex: 1 0 auto; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px var(--pad-x) 40px;
    width: 100%;
}

section { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ─── Typography ──────────────────────────────────────────────────────────────── */
a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 1px;
}

h1 { font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.2; }

.section-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 1.4rem;
}

.section-sub {
    font-size: 0.85rem;
    color: var(--fg-mid);
    margin: -0.8rem 0 1.4rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.6rem 0;
}

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
    padding: 56px 0 20px;
}

.hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--fg-dim);
    letter-spacing: 0.06em;
    margin-bottom: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
}

.hero-name {
    font-size: 2.6rem;
    margin-bottom: 0.4rem;
}

.hero-role {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-term {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--fg-mid);
    background: var(--bg-tag);
    border: 1px solid var(--border);
    padding: 0.55rem 0.8rem;
    margin-bottom: 1.2rem;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.hero-term::-webkit-scrollbar { display: none; }

.term-prompt { color: var(--accent); }
.term-cmd { color: var(--fg); }
.term-cursor { display: inline-block; width: 0.55em; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    font-size: 0.95rem;
    color: var(--fg-mid);
    line-height: 1.75;
    max-width: 60ch;
    margin-bottom: 1.3rem;
}

.hero-links {
    margin-top: 1.2rem;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.hero-links a {
    color: var(--fg-mid);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
}

.hero-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.hero-links .sep {
    color: var(--fg-dim);
    margin: 0 0.45rem;
    user-select: none;
}

.hero-aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.header-avatar {
    width: 140px;
    height: 140px;
    border-radius: 4px;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.3s, transform 0.3s;
}

.header-avatar:hover {
    filter: grayscale(0%);
    transform: translateY(-2px);
}

.hero-aside .tag {
    font-size: 0.7rem;
    padding: 2px 7px;
    color: var(--fg-mid);
    background: transparent;
}

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hire-badge,
.connect-badge {
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    text-transform: uppercase;
    background: transparent;
    white-space: nowrap;
}

.hire-badge {
    color: var(--ok);
    border: 1px solid var(--ok);
}

.connect-badge {
    color: var(--fg-mid);
    border: 1px solid var(--border);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.connect-badge:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ─── Stats / Highlights ─────────────────────────────────────────────────────── */
.highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    margin-top: 2.2rem;
}

.highlight-item {
    padding: 1.2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-right: 1px solid var(--border);
}

.highlight-item:last-child { border-right: none; }

.highlight-num {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--fg);
    line-height: 1;
    font-family: var(--font-mono);
}

.highlight-label {
    font-size: 0.7rem;
    color: var(--fg-dim);
    letter-spacing: 0.04em;
    line-height: 1.35;
}

/* ─── About ──────────────────────────────────────────────────────────────────── */
.about-text {
    font-size: 0.95rem;
    color: var(--fg-mid);
    line-height: 1.75;
    max-width: 72ch;
}

.about-text p { margin-bottom: 1rem; }

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    font-size: 0.8rem;
    color: var(--fg-dim);
    margin-top: 1.4rem;
    letter-spacing: 0.02em;
}

.meta-row b { color: var(--fg); font-weight: 600; }

/* ─── Stack Tags ──────────────────────────────────────────────────────────────── */
.stack-group {
    display: grid;
    grid-template-columns: 130px 1fr;
    align-items: start;
    gap: 0.6rem 1rem;
    margin-bottom: 0.85rem;
}

.stack-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-dim);
    padding-top: 4px;
    line-height: 1.3;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.78rem;
    padding: 3px 9px;
    background: var(--bg-tag);
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
    color: var(--fg);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    cursor: default;
}

.tag:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.stack-core .stack-label { color: var(--accent); }
.stack-core .tag {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 500;
}

/* ─── Timeline / Experience ───────────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.job {
    position: relative;
    margin-bottom: 1.8rem;
    padding-left: 1.4rem;
}

.job::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 6px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent);
    background: var(--bg);
    transform: rotate(45deg);
}

.job:last-child { margin-bottom: 0; }

.job-meta {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.job-company {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.job-date {
    font-size: 0.78rem;
    color: var(--fg-dim);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.job-role {
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.job-desc {
    font-size: 0.88rem;
    color: var(--fg-mid);
    line-height: 1.7;
    margin-bottom: 0.7rem;
}

.job-points {
    list-style: none;
    margin: 0;
    padding: 0;
}

.job-points li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--fg-mid);
    line-height: 1.6;
    margin-bottom: 0.32rem;
}

.job-points li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.job-points li:last-child { margin-bottom: 0; }

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.7rem;
}

/* ─── Projects ───────────────────────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-card {
    border: 1px solid var(--border);
    background: var(--bg-tag);
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.project-card .pl-tag { font-size: 0.7rem; }

.project-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.project-name {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.project-link {
    font-size: 0.72rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.project-link:hover { border-bottom-color: var(--accent); }

.project-desc {
    font-size: 0.85rem;
    color: var(--fg-mid);
    line-height: 1.65;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ─── Blog ───────────────────────────────────────────────────────────────────── */
.post-list { list-style: none; padding: 0; }
.post-list li {
    display: flex;
    flex-direction: column;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.2rem;
}
.post-list li:last-child { border-bottom: none; }
.post-list li.pinned { border-left: 3px solid var(--accent); padding-left: 0.9rem; }
.post-list .pl-pin {
    align-self: flex-start;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
.post-list .pl-title { color: var(--fg); font-size: 0.95rem; border-bottom: none; }
.post-list .pl-title:hover { color: var(--accent); }
.post-list .pl-meta { color: var(--fg-dim); font-size: 0.78rem; }
.post-list .pl-desc { color: var(--fg-mid); font-size: 0.83rem; margin-top: 0.1rem; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.pl-tag {
    font-size: 0.67rem;
    color: var(--fg-dim);
    padding: 0 4px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-tag);
    cursor: pointer;
    transition: all .1s;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.pl-tag:hover { color: var(--fg); border-color: var(--fg-mid); }

.latest-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--fg-dim);
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.04em;
}
.latest-more:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Blog post pages ─────────────────────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.78rem;
    color: var(--fg-dim);
    margin-bottom: 1.2rem;
    letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--fg-mid); border-bottom: none; }
.breadcrumb a:hover { color: var(--accent); }

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.2rem;
    font-size: 0.78rem;
    color: var(--fg-dim);
}

.md-body { overflow-wrap: break-word; word-break: break-word; max-width: 72ch; }
.md-body p { margin-bottom: 1rem; color: var(--fg-mid); font-size: 0.95rem; line-height: 1.75; }
.md-body h2 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin: 2rem 0 0.8rem;
}
.md-body h3 { font-size: 0.95rem; font-weight: 600; margin: 1.4rem 0 0.4rem; }
.md-body ul, .md-body ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.md-body li { margin-bottom: 0.3rem; color: var(--fg-mid); font-size: 0.95rem; }
.md-body strong { font-weight: 700; color: var(--fg); }
.md-body hr { border: none; border-top: 1px solid var(--border); margin: 1.8rem 0; }
.md-body code {
    background: var(--bg-tag);
    padding: 1px 5px;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.88em;
}
.md-body pre {
    background: var(--bg-tag);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 3px;
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
}
.md-body pre code { background: none; padding: 0; }
.md-body a { color: var(--accent); border-bottom: 1px solid transparent; }
.md-body a:hover { border-bottom-color: var(--accent); }

.post-prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 72ch;
}
.post-prevnext a {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--fg-mid);
    text-decoration: none;
    border-bottom: none;
    line-height: 1.5;
    transition: color .15s;
}
.post-prevnext a:hover { color: var(--accent); }
.post-prevnext .pn-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-dim);
    display: block;
    margin-bottom: 4px;
}
.post-prevnext .pn-next { text-align: right; padding-left: 1rem; border-left: 1px solid var(--border); }
.post-prevnext .pn-prev { padding-right: 1rem; }

/* ─── Contact ────────────────────────────────────────────────────────────────── */
.contact-card {
    border: 1px solid var(--border);
    background: var(--bg-tag);
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 480px;
}

.contact-card .cc-label {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.contact-card a {
    font-size: 0.88rem;
    color: var(--fg-mid);
    border-bottom: 1px solid transparent;
    padding: 2px 0;
}

.contact-card a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.contact-card .cc-meta {
    font-size: 0.78rem;
    color: var(--fg-dim);
}

/* ─── Footer ──────────────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.78rem;
    padding: 2rem 0 1.6rem;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    line-height: 2;
}

.footer-nav { margin-top: 0.6rem; }

.footer-nav a {
    color: var(--fg-dim);
    transition: color 0.2s;
    border-bottom: none;
}

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

.footer-nav .separator {
    margin: 0 0.5rem;
    opacity: 0.4;
}

/* ─── Reading progress / scroll-top ───────────────────────────────────────────── */
#read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

#scroll-top {
    position: fixed;
    bottom: 1.6rem;
    right: 1.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--fg-mid);
    font: 0.78rem/1 var(--font);
    padding: 6px 10px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, color 0.2s, border-color 0.2s;
    letter-spacing: 0.04em;
    z-index: 500;
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }
#scroll-top:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Scroll reveal ───────────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Skip link ───────────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.82rem;
    border-bottom: none;
    z-index: 9999;
    letter-spacing: 0.04em;
}
.skip-link:focus { top: 0; }

/* ─── Dark mode ───────────────────────────────────────────────────────────────── */
[data-theme="dark"] .top-nav { background: rgba(21,23,28,0.85); }

[data-theme="dark"] {
    --accent:     #e06363;
    --accent-dim: #b83030;
    --fg:         #d7dade;
    --fg-mid:     rgba(215,218,222,0.68);
    --fg-dim:     rgba(215,218,222,0.45);
    --bg:         #15171c;
    --bg-tag:     #1d2026;
    --bg-pre:     #1d2026;
    --border:     rgba(255,255,255,0.09);
    --link:       #7a9aae;
    --ok:         #46c06e;
}

[data-theme="dark"] .header-avatar { filter: grayscale(20%) brightness(0.9); }
[data-theme="dark"] .header-avatar:hover { filter: grayscale(0%) brightness(1); }
[data-theme="dark"] .project-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.4); }

/* ─── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --max-w: 100%; }

    .top-nav-inner { overflow: hidden; gap: 0; padding: 0; }
    .top-nav-links {
        flex: 1 1 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-width: 0;
        padding: 8px var(--pad-x);
    }
    .top-nav-links::-webkit-scrollbar { display: none; }
    .nav-right {
        flex-shrink: 0;
        padding: 8px var(--pad-x) 8px 0.8rem;
        border-left: 1px solid var(--border);
    }

    .hero { padding: 40px 0 10px; }
    .hero-name { font-size: 2rem; }

    .highlights { grid-template-columns: repeat(2, 1fr); }
    .highlight-item { border-right: none; border-bottom: 1px solid var(--border); }
    .highlight-item:nth-child(odd) { border-right: 1px solid var(--border); }
    .highlight-item:nth-last-child(-n+2) { border-bottom: none; }

    .stack-label { font-size: 0.68rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .top-nav { font-size: 0.73rem; }
}

@media (max-width: 480px) {
    :root { --pad-x: 18px; }

    .hero-inner { flex-direction: column-reverse; align-items: center; gap: 1.2rem; text-align: center; }
    .hero-text { width: 100%; }
    .hero-kicker { text-align: left; }
    .hero-term { text-align: left; }
    .hero-name { font-size: 1.6rem; letter-spacing: 0.06em; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-links { justify-content: center; }
    .badge-row { justify-content: center; }
    .header-avatar { width: 96px; height: 96px; }

    .stack-group { grid-template-columns: 1fr; gap: 0.3rem; }

    .timeline { padding-left: 14px; }
    .job { padding-left: 1rem; }
    .job::before { left: -19px; }

    .post-prevnext { grid-template-columns: 1fr; }
    .post-prevnext .pn-next { border-left: none; border-top: 1px solid var(--border); padding-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ─── Print ───────────────────────────────────────────────────────────────────── */
@media print {
    .top-nav, .skip-link, #read-progress, #scroll-top { display: none; }

    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    :root {
        --accent: #6b0000;
        --fg: #000;
        --fg-mid: #333;
        --fg-dim: #666;
        --border: #ccc;
        --bg: #fff;
        --bg-tag: #f0f0f0;
        --pad-x: 0px;
    }

    .container { padding: 0; }
    .reveal { opacity: 1; transform: none; }

    a { color: inherit; border-bottom: none; }
    a[href^="http"]::after,
    a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.7em; color: #666; }

    .tag, .pl-tag { background: transparent; border: 1px solid #ccc; color: #333; }

    footer { padding: 1rem 0 0; }

    @page { margin: 1.5cm 2cm; }
}