:root {
    color-scheme: light dark;
    --bg: #fff;
    --fg: #111;
    --muted: #6b7280;
    --border: color-mix(in oklab, currentColor 15%, transparent);
    --brand: #0ea5e9;
    --max: 1100px;
}

:root.dark {
    --bg: #0b0d10;
    --fg: #eef2f7;
    --muted: #99a3b1;
    --border: color-mix(in oklab, currentColor 20%, transparent);
    --brand: #38bdf8;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial
}

a {
    color: inherit;
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 1rem
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: color-mix(in oklab, var(--bg) 75%, transparent);
    border-bottom: 1px solid var(--border)
}

.brand {
    font-weight: 900;
    letter-spacing: .2px
}

.nav .pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none
}

.nav .pill:hover {
    text-decoration: none
}

.nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 6px
}

.main {
    min-height: 65vh;
    padding: 1.25rem 0 2.5rem
}

footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0
}

footer small {
    color: var(--muted)
}

.hero {
    padding: 3rem 0 2rem;
    text-align: center
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 .5rem
}

.hero p {
    color: var(--muted);
    margin: 0 auto;
    max-width: 75ch
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem
}

.card {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in oklab, var(--bg) 88%, transparent)
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block
}

.card .pad {
    padding: 1rem
}

.card h3 {
    margin: .25rem 0 .5rem;
    font-size: 1.1rem
}

.meta {
    font-size: .85rem;
    color: var(--muted);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap
}

.badge {
    display: inline-block;
    font-size: .8rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: .25rem .6rem;
    border-radius: 999px
}

article.prose {
    max-width: 75ch;
    margin: 0 auto;
    line-height: 1.7
}

article.prose img {
    width: 100%;
    height: auto;
    border-radius: 12px
}

article.prose h1,
article.prose h2,
article.prose h3 {
    line-height: 1.2;
    margin-top: 1.6em
}

article.prose pre {
    overflow: auto;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border)
}

.search {
    display: flex;
    gap: .5rem;
    margin: .5rem 0 1rem
}

.search input {
    flex: 1;
    padding: .65rem .8rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg)
}

.search input::placeholder {
    color: var(--muted)
}

.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--brand); z-index: 1000;
  transition: width .15s ease-out;
}
