:root {
    --background: #f7f8fa;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #667085;
    --soft: #98a2b3;
    --border: #d9dee7;
    --accent: #2563eb;
    --accent-soft: #eef4ff;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.page-shell {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
}

.brand {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 750;
    text-decoration: none;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--surface);
}

.hero {
    padding: clamp(64px, 11vw, 104px) 0 clamp(40px, 7vw, 64px);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 18px;
    font-size: clamp(2.45rem, 6vw, 4.6rem);
    line-height: 1;
    font-weight: 780;
    letter-spacing: 0;
}

.intro {
    max-width: 620px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.65;
}

.directory {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.directory-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.15;
    font-weight: 760;
}

.search-box {
    display: grid;
    gap: 7px;
    min-width: min(100%, 300px);
    color: var(--soft);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.search-box input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 12px;
    color: var(--ink);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    text-transform: none;
    background: var(--surface);
}

.search-box input::placeholder {
    color: var(--soft);
}

.project-list {
    display: grid;
    gap: 10px;
}

.project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 620;
}

.project-row h3 {
    margin-bottom: 7px;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    line-height: 1.2;
    font-weight: 760;
}

.project-row p {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.58;
}

.project-actions {
    justify-self: end;
}

.visit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 7px;
    color: var(--accent);
    font-size: 0.93rem;
    font-weight: 750;
    text-decoration: none;
    background: var(--accent-soft);
}

.brand:focus-visible,
.visit-button:focus-visible,
.search-box input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 3px;
}

.empty-state {
    margin: 14px 0 0;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface);
}

@media (max-width: 700px) {
    .page-shell {
        width: min(100% - 28px, 920px);
        padding-top: 18px;
    }

    .site-header,
    .directory-header {
        align-items: stretch;
        flex-direction: column;
    }

    .header-badge {
        width: fit-content;
    }

    .hero {
        padding-top: 56px;
    }

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

    .project-actions {
        justify-self: stretch;
    }

    .visit-button {
        width: 100%;
    }
}

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