*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #09090b;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #d4d4d8;
    --heading: #fafafa;
    --muted: #a1a1aa;
    --faint: #71717a;
    --accent: #f7a41d;
    --accent-soft: rgba(247, 164, 29, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --nav-bg: rgba(9, 9, 11, 0.72);
    --code-bg: #0f0f12;

    --lang-zig: #f7a41d;
    --lang-ts: #3178c6;
    --lang-shell: #89e051;

    --radius: 16px;
    --max: 64rem;
    --gutter: 1rem;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #fafafa;
        --surface: #ffffff;
        --surface-hover: #ffffff;
        --border: #e4e4e7;
        --border-strong: #d4d4d8;
        --text: #3f3f46;
        --heading: #09090b;
        --muted: #52525b;
        --faint: #71717a;
        --accent: #b45309;
        --accent-soft: rgba(180, 83, 9, 0.08);
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
        --nav-bg: rgba(250, 250, 250, 0.8);
        --code-bg: #18181b;
    }
}

@media (min-width: 640px) {
    :root {
        --gutter: 1.5rem;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

a {
    color: inherit;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.dev > section,
.footer {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--max);
    height: 3.5rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.04em;
    color: var(--heading);
    text-decoration: none;
}

.nav-brand-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
    color: var(--heading);
    background: var(--surface-hover);
}

.nav-link .icon {
    width: 0.85em;
    height: 0.85em;
    opacity: 0.7;
}

.nav-link-icon .icon {
    width: 1.1rem;
    height: 1.1rem;
    opacity: 1;
}

.eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--faint);
}

.section-title {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.section-title-sm {
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--heading);
    color: var(--bg);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--heading);
}

.btn-ghost:hover {
    border-color: var(--border-strong);
}

.btn .icon {
    width: 1rem;
    height: 1rem;
}

.hero {
    padding-block: 4rem 3rem;
}

@media (min-width: 640px) {
    .hero {
        padding-block: 6rem 4rem;
    }
}

.hero-title {
    max-width: 44rem;
    margin: 0 0 1.25rem;
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--heading);
    text-wrap: balance;
}

.hero-sub {
    max-width: 36rem;
    margin: 0 0 2rem;
    font-size: 1.075rem;
    line-height: 1.65;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metrics {
    display: flex;
    gap: 2.5rem;
    margin: 3rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.metric {
    display: flex;
    flex-direction: column-reverse;
}

.metric dt {
    font-size: 0.75rem;
    color: var(--faint);
}

.metric dd {
    margin: 0.15rem 0 0;
}

.metric-num {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    color: var(--heading);
    font-variant-numeric: tabular-nums;
}

.spotlight {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

@media (min-width: 860px) {
    .spotlight {
        grid-template-columns: 1fr 1.05fr;
        align-items: center;
        gap: 2.5rem;
    }
}

.spotlight-copy {
    position: relative;
}

.spotlight-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--heading);
}

.spotlight-title a {
    text-decoration: none;
}

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

.spotlight-desc {
    margin: 0 0 1.25rem;
    color: var(--muted);
}

.spotlight-points {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    font-size: 0.925rem;
}

.spotlight-points li {
    padding-left: 1rem;
    position: relative;
}

.spotlight-points li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--faint);
}

.spotlight-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.chip-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--heading);
    text-decoration: none;
}

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

.code {
    margin: 0;
    min-width: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--code-bg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.code-bar {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-file {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: #a1a1aa;
}

.code pre {
    margin: 0;
    padding: 1.1rem 1.25rem 1.3rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: #e4e4e7;
}

.oss {
    margin-bottom: 4rem;
}

.oss-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
}

.see-all:hover {
    color: var(--accent);
}

.filters {
    display: flex;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0 0 0.25rem;
    border: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filter label:hover {
    color: var(--heading);
    border-color: var(--border-strong);
}

.filter input:checked + label {
    background: var(--heading);
    border-color: var(--heading);
    color: var(--bg);
}

.filter input:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.filter-count {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
}

.oss:has(#lang-zig:checked) .card:not([data-lang="Zig"]),
.oss:has(#lang-ts:checked) .card:not([data-lang="TypeScript"]),
.oss:has(#lang-shell:checked) .card:not([data-lang="Shell"]) {
    display: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.card:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.card-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--heading);
}

.card-title a {
    text-decoration: none;
}

.stretched::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.card-desc {
    flex: 1;
    margin: 0 0 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}

.card-foot {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.lang {
    --lang: var(--faint);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
}

.lang::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--lang);
}

[data-lang="Zig"] {
    --lang: var(--lang-zig);
}

[data-lang="TypeScript"] {
    --lang: var(--lang-ts);
}

[data-lang="Shell"] {
    --lang: var(--lang-shell);
}

.stats {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.stat .icon {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--faint);
}

.spotlight .stats {
    font-size: 0.9rem;
}

.card-home {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: auto;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.15s ease, background 0.15s ease;
}

.card-home:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.built {
    margin-bottom: 4rem;
}

.built-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.built-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.built-list a:hover {
    border-color: var(--border-strong);
}

.built-name {
    font-weight: 600;
    color: var(--heading);
}

.built-note {
    margin-left: auto;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--faint);
}

.built-list .icon {
    color: var(--faint);
}

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

.dev > .cta {
    max-width: calc(var(--max) - 2 * var(--gutter));
    margin-bottom: 1rem;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
}

@media (max-width: 639px) {
    .dev > .cta {
        margin-inline: var(--gutter);
        width: auto;
        padding: 1.5rem;
    }
}

.cta-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--heading);
}

.cta-sub {
    max-width: 30rem;
    margin: 0;
    font-size: 0.925rem;
    color: var(--muted);
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-block: 2rem 2.5rem;
    font-size: 0.825rem;
    color: var(--faint);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

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

.hl .hl-comment {
    color: #8b949e;
    font-style: italic;
}

.hl .hl-keyword,
.hl .hl-conditional,
.hl .hl-repeat,
.hl .hl-exception,
.hl .hl-include,
.hl .hl-storageclass,
.hl .hl-type-qualifier {
    color: #ff7b72;
}

.hl .hl-string,
.hl .hl-character {
    color: #a5d6ff;
}

.hl .hl-number,
.hl .hl-float,
.hl .hl-boolean,
.hl .hl-constant,
.hl .hl-string-escape,
.hl .hl-escape {
    color: #79c0ff;
}

.hl .hl-function,
.hl .hl-method {
    color: #d2a8ff;
}

.hl .hl-type,
.hl .hl-constructor,
.hl .hl-variable-builtin,
.hl .hl-function-builtin,
.hl .hl-constant-builtin,
.hl .hl-attribute {
    color: #ffa657;
}

.hl .hl-tag {
    color: #7ee787;
}

.hl .hl-property,
.hl .hl-variable-member,
.hl .hl-field,
.hl .hl-tag-attribute {
    color: #79c0ff;
}

.hl .hl-operator,
.hl .hl-punctuation {
    color: #c9d1d9;
}
