:root {
    --bg: #07110d;
    --surface: rgba(8, 19, 15, .92);
    --surface-soft: rgba(13, 28, 22, .82);
    --text: #f5fbf7;
    --muted: #a7bbb0;
    --line: rgba(218, 239, 226, .19);
    --focus: #86efac;
    --mint: #5ee6a8;
    --cyan: #58d7ea;
    --yellow: #f4c95d;
    --coral: #ff8f70;
    --violet: #b8a0ff;
    --blue: #74a9ff;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.scene,
.backdrop {
    height: 62vh;
    inset: 0 0 auto;
    position: absolute;
    width: 100%;
}

.scene {
    object-fit: cover;
    object-position: center 44%;
}

.backdrop {
    background: rgba(2, 10, 7, .69);
}

.site-header {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1240px;
    min-height: 82px;
    padding: 16px 28px;
    position: relative;
    z-index: 2;
}

.brand {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: var(--mint);
    border-radius: 6px;
    color: #052014;
    display: inline-flex;
    font-size: 15px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand strong,
.brand small {
    display: block;
    letter-spacing: 0;
}

.brand strong {
    font-size: 15px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.domain-nav {
    align-items: center;
    display: flex;
    gap: 4px;
}

.domain-nav a {
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 12px 14px 10px;
    text-decoration: none;
}

.domain-nav a:hover,
.domain-nav a[aria-current="page"] {
    border-color: var(--mint);
    color: var(--text);
}

.menu-toggle {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    display: none;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 14px;
}

main {
    position: relative;
    z-index: 1;
}

.intro {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 1240px;
    min-height: 410px;
    padding: 50px 28px 86px;
}

.eyebrow {
    color: var(--mint);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

h1,
h2,
p {
    letter-spacing: 0;
}

h1 {
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    margin: 0;
    max-width: 820px;
}

.intro-copy {
    color: #d0ddd5;
    font-size: 17px;
    line-height: 1.65;
    margin: 22px 0 28px;
    max-width: 640px;
}

.primary-action {
    background: var(--mint);
    border: 1px solid var(--mint);
    border-radius: 6px;
    color: #052014;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    justify-content: center;
    min-height: 46px;
    padding: 14px 18px;
    text-decoration: none;
}

.primary-action:hover {
    background: #95f5c6;
}

.intro-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.secondary-action {
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 6px;
    color: var(--text);
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 13px 18px;
    text-decoration: none;
}

.secondary-action:hover {
    background: rgba(255, 255, 255, .08);
    border-color: var(--mint);
}

.projects {
    background: var(--surface);
    border-top: 1px solid var(--line);
    margin: -42px auto 0;
    max-width: 1240px;
    padding: 34px 28px 38px;
    position: relative;
}

.section-heading {
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading .eyebrow {
    margin-bottom: 8px;
}

.section-heading h2 {
    font-size: 27px;
    margin: 0;
}

.section-heading > p {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.status-dot {
    background: var(--mint);
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    margin-right: 7px;
    width: 8px;
}

.project-controls {
    align-items: end;
    background: rgba(4, 14, 10, .62);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 14px 20px;
    grid-template-columns: minmax(230px, .9fr) minmax(420px, 1.4fr) auto;
    margin-bottom: 18px;
    padding: 16px;
}

.project-search span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.project-search input {
    background: rgba(255, 255, 255, .055);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font: inherit;
    height: 42px;
    outline: 0;
    padding: 0 12px;
    width: 100%;
}

.project-search input:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(94, 230, 168, .12);
}

.project-search input::placeholder {
    color: #70897c;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    min-height: 38px;
    padding: 8px 13px;
}

.filter-button:hover,
.filter-button.is-active {
    background: rgba(94, 230, 168, .13);
    border-color: var(--mint);
    color: var(--text);
}

.project-result {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 10px;
    white-space: nowrap;
}

.project-result strong {
    color: var(--mint);
}

.project-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-link {
    --accent: var(--mint);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 258px;
    padding: 20px;
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.project-link:hover {
    background: rgba(22, 43, 34, .96);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-meta {
    color: var(--accent);
    display: flex;
    font-size: 11px;
    font-weight: 900;
    justify-content: space-between;
    letter-spacing: .08em;
    min-height: 18px;
    text-transform: uppercase;
}

.project-meta b {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.project-link > strong {
    font-size: 22px;
    line-height: 1.2;
    margin-top: 14px;
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.version-badge,
.status-badge {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .02em;
    padding: 5px 8px;
}

.version-badge {
    background: rgba(255, 255, 255, .07);
    color: #d9e7df;
}

.status-badge {
    color: var(--muted);
}

.status-recommended {
    background: rgba(94, 230, 168, .14);
    border-color: rgba(94, 230, 168, .45);
    color: #98f4c8;
}

.status-stable,
.status-public {
    background: rgba(88, 215, 234, .11);
    border-color: rgba(88, 215, 234, .36);
    color: #8ae8f4;
}

.status-preview {
    background: rgba(244, 201, 93, .12);
    border-color: rgba(244, 201, 93, .4);
    color: #f6d77e;
}

.status-protected {
    background: rgba(116, 169, 255, .12);
    border-color: rgba(116, 169, 255, .35);
    color: #a8c8ff;
}

.status-legacy {
    background: rgba(184, 160, 255, .1);
    border-color: rgba(184, 160, 255, .34);
    color: #cdbdff;
}

.project-description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    margin-top: 10px;
}

.project-open {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    margin-top: auto;
    padding-top: 20px;
}

.project-open span {
    color: var(--accent);
    margin-left: 5px;
}

.accent-cyan { --accent: var(--cyan); }
.accent-yellow { --accent: var(--yellow); }
.accent-coral { --accent: var(--coral); }
.accent-violet { --accent: var(--violet); }
.accent-blue { --accent: var(--blue); }

.project-empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    margin-top: 12px;
    padding: 34px;
    text-align: center;
}

footer {
    color: var(--muted);
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1240px;
    padding: 24px 28px 34px;
}

@media (max-width: 860px) {
    .project-controls {
        grid-template-columns: 1fr;
    }

    .project-result {
        margin: 0;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .scene,
    .backdrop {
        height: 540px;
    }

    .site-header {
        min-height: 72px;
        padding: 12px 18px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .domain-nav {
        background: #0b1813;
        border: 1px solid var(--line);
        display: none;
        flex-direction: column;
        padding: 8px;
        position: absolute;
        right: 18px;
        top: 64px;
        width: min(270px, calc(100vw - 36px));
    }

    .domain-nav.is-open {
        display: flex;
    }

    .domain-nav a {
        width: 100%;
    }

    .intro {
        min-height: 430px;
        padding: 46px 18px 78px;
    }

    h1 {
        font-size: 39px;
        overflow-wrap: anywhere;
    }

    .intro-copy {
        font-size: 15px;
    }

    .projects {
        margin-top: -38px;
        padding: 28px 18px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-link {
        min-height: 228px;
    }

    .project-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .project-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-button {
        flex: none;
    }

    footer {
        flex-direction: column;
        gap: 7px;
        padding: 22px 18px 28px;
    }
}

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

    .project-link {
        transition: none;
    }
}
