@font-face {
    font-family: "Inter Local";
    src: url("../fonts/inter-latin-400-600.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg-solid: #ffffff;
    --ink: #171717;
    --muted: #5d5d5d;
    --faint: #8b8b8b;
    --status-ink: #444444;
    --sans: "Inter Local", Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", ui-monospace, monospace;
    --max-width: 1440px;
    --gutter: clamp(1.25rem, 4vw, 4rem);
    --header-height: clamp(88px, 13vh, 112px);
    --controls-height: 38px;
    --project-count: 15;
    --desktop-vertical-reserve: 140px;
    --row-height: clamp(36px, calc((100svh - var(--desktop-vertical-reserve) - var(--controls-height) - 8px) / var(--project-count)), 42px);
}

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

html {
    min-width: 320px;
    background-color: var(--bg-solid);
}

body {
    min-width: 320px;
    margin: 0;
    background-color: var(--bg-solid);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.site {
    height: 100svh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

body.site main {
    min-height: 0;
    display: flex;
}

img {
    display: block;
    max-width: 100%;
}

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

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

::selection {
    background: #171717;
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid #171717;
    outline-offset: 4px;
}

.page-width {
    width: min(100%, var(--max-width));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    padding: .65rem .85rem;
    background: #171717;
    color: #ffffff;
    font-family: var(--mono);
    font-size: .72rem;
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: none;
}

.site-header {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.nav-wrap {
    min-height: var(--header-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
}

.brand {
    margin: 0;
    color: #171717;
    font-size: clamp(3.8rem, 7.5vw, 5.8rem);
    font-weight: 400;
    letter-spacing: -.1em;
    line-height: .78;
}

.brand a {
    display: inline-block;
}

.brand a::before {
    display: none;
}

.nav-wrap::after {
    content: "";
    flex: 0 0 1.1rem;
    width: 1.1rem;
    height: 1.1rem;
    background: url("../img/lxucan-mark.svg") center / contain no-repeat;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 4vw, 3.5rem);
    color: #626262;
    font-size: .75rem;
}

.nav-links a {
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: #171717;
}

.projects {
    min-height: 0;
    display: grid;
    place-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.projects-shell {
    width: 100%;
    max-width: 760px;
}

.project-sort {
    min-height: var(--controls-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    color: var(--faint);
    font-size: .7rem;
    line-height: 1;
}

.project-sort-label {
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-sort-control {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.project-sort select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 132px;
    min-height: 30px;
    margin: 0;
    padding: .4rem 1.85rem .4rem .65rem;
    border: 1px solid #dedede;
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.project-sort select:hover {
    border-color: #bdbdbd;
}

.project-sort select:focus-visible {
    border-color: var(--ink);
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.project-sort select:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.project-sort-chevron {
    position: absolute;
    right: .65rem;
    top: 50%;
    color: var(--ink);
    font-size: .82rem;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-58%);
}

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

.project-list {
    min-height: 0;
    width: 100%;
    max-width: 760px;
    height: calc(var(--row-height) * var(--project-count));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(var(--project-count), var(--row-height));
}

.project-row {
    display: grid;
    grid-template-columns: clamp(36px, 3.3vw, 42px) minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    grid-template-areas: "logo copy status";
    gap: .18rem clamp(.75rem, 1.5vw, 1.25rem);
    align-items: center;
    min-width: 0;
    min-height: 0;
    padding: .2rem 0;
}

.project-row:hover .project-copy strong,
.project-row:focus-visible .project-copy strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.project-logo {
    grid-area: logo;
    width: clamp(36px, 3.1vw, 40px);
    height: clamp(36px, 3.1vw, 40px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-copy {
    grid-area: copy;
    min-width: 0;
    align-self: center;
    display: flex;
    align-items: baseline;
    gap: .55rem;
}

.project-copy strong {
    min-width: 0;
    overflow: hidden;
    color: #171717;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-v2 {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: .22rem .4rem .2rem;
    border: 1px solid #ddc8bd;
    border-radius: 999px;
    color: #99533f;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: none;
    transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.project-v2--is-live {
    border-color: #b9d8c4;
    color: #2f7750;
}

.project-row:hover .project-v2,
.project-row:focus-visible .project-v2 {
    border-color: #99533f;
    background-color: #fff8f4;
    color: #7c2d1f;
    transform: translateY(-1px);
}

.project-row:hover .project-v2--is-live,
.project-row:focus-visible .project-v2--is-live {
    border-color: #3e8b5d;
    background-color: #f4fbf6;
    color: #245e38;
}

.project-status .project-v2 {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    margin-right: .28rem;
    transform: none;
}

.project-row:hover .project-status .project-v2,
.project-row:focus-visible .project-status .project-v2 {
    border-color: transparent;
    background-color: transparent;
    color: inherit;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .project-v2 {
        transition: none;
    }
}

.project-status {
    grid-area: status;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    color: var(--status-ink);
    font-family: var(--sans);
    font-size: clamp(.76rem, 1vw, .84rem);
    letter-spacing: .01em;
    font-weight: 600;
    line-height: 1.1;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.project-status::before {
    content: "•";
    display: inline-block;
    margin-right: .38rem;
    color: currentColor;
    font-size: 1.15em;
    transform: translateY(-.02em);
}

.project-status--is-live {
    color: #7c2d1f;
}

.project-status--is-live::before {
    color: #c15a3d;
}

.project-status--incoming {
    color: #505050;
}

.project-status--in-review {
    color: #6c4d37;
}

.project-status--in-review::before {
    color: #a4663f;
}

.project-row .project-copy strong {
    color: #171717;
}

.project-row .project-status {
    color: #444444;
}

.project-row .project-status--is-live {
    color: #7c2d1f;
}

.project-row .project-status--is-live::before {
    color: #c15a3d;
}

.project-row .project-status--incoming {
    color: #505050;
}

.project-row .project-status--in-review {
    color: #6c4d37;
}

.project-row .project-status--in-review::before {
    color: #a4663f;
}

.project-arrow {
    display: none;
}

@media (min-width: 681px) {
    .nav-wrap {
        padding-top: clamp(.35rem, 1vh, .6rem);
    }

    .project-row {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }
}

@media (min-width: 681px) and (max-height: 680px) {
    :root {
        --header-height: 86px;
        --controls-height: 34px;
        --row-height: clamp(34px, calc((100svh - var(--desktop-vertical-reserve) - var(--controls-height) - 6px) / var(--project-count)), 40px);
    }
}

@media (min-width: 681px) and (max-height: 780px) {
    .project-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .project-logo {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }
}

@media (max-width: 680px) {
    :root {
        --header-height: 118px;
        --row-height: clamp(38px, 6.35vh, 44px);
    }

    html {
        height: auto;
        overflow-y: auto;
    }

    body.site {
        height: auto;
        min-height: 100svh;
        overflow: visible;
        -webkit-overflow-scrolling: touch;
    }

    body.site main {
        min-height: auto;
        display: block;
    }

    .projects {
        display: block;
        min-height: 0;
        padding-block: .25rem max(1.5rem, env(safe-area-inset-bottom));
    }

    .project-sort {
        justify-content: flex-start;
        gap: .55rem;
    }

    .project-list {
        height: auto;
    }

    .nav-wrap {
        min-height: var(--header-height);
        gap: .55rem;
        border: 0;
        box-shadow: none;
    }

    .brand {
        font-size: clamp(3.8rem, 19vw, 5.2rem);
    }

    .nav-links {
        gap: 1rem;
        font-size: .76rem;
    }

    .project-row {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        grid-template-rows: 1fr;
        grid-template-areas: "logo copy status";
        gap: 0 .7rem;
        padding: .15rem 0;
    }

    .project-logo {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .project-copy strong {
        padding-top: 0;
        font-size: .98rem;
    }

    .project-copy {
        gap: .42rem;
    }

    .project-v2 {
        min-height: 1.16rem;
        padding: .2rem .34rem .18rem;
        font-size: .54rem;
    }

    .project-status {
        margin-top: 0;
        text-align: right;
        font-size: .7rem;
        letter-spacing: 0;
    }

}

@media (max-width: 420px) {
    .nav-links {
        gap: .75rem;
    }
}

@media (max-width: 360px) {
    :root {
        --gutter: .75rem;
        --row-height: clamp(35px, 6.15vh, 38px);
    }

    .brand {
        font-size: 1.08rem;
    }

    .nav-links {
        font-size: .7rem;
    }

    .project-row {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        gap: 0 .5rem;
        padding: .1rem 0;
    }

    .project-logo {
        width: 34px;
        height: 34px;
        border-radius: 7px;
    }

    .project-copy strong {
        padding-top: 0;
        font-size: .9rem;
        letter-spacing: -.04em;
    }

    .project-copy {
        gap: .34rem;
    }

    .project-v2 {
        min-height: 1.08rem;
        padding: .18rem .3rem .16rem;
        font-size: .5rem;
    }

    .project-status {
        margin-top: 0;
        font-size: .66rem;
        letter-spacing: 0;
        line-height: 1.05;
    }

}
