@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
    color-scheme: dark;
    --bg: #101312;
    --panel: #171b19;
    --panel-hover: #1c211f;
    --card-surface: rgba(23, 27, 25, .88);
    --topbar: rgba(16, 19, 18, .82);
    --text: #e7ebe8;
    --muted: #929b96;
    --accent: #a9c7b5;
    --line: rgba(231, 235, 232, .12);
    --texture-a: rgba(95, 130, 110, .13);
    --texture-b: rgba(77, 91, 84, .11);
    --grid-line: rgba(255, 255, 255, .018)
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f1f1ed;
    --panel: #ffffff;
    --panel-hover: #f8f8f3;
    --card-surface: rgba(255, 255, 255, .9);
    --topbar: rgba(241, 241, 237, .86);
    --text: #1a1e1c;
    --muted: #69716d;
    --accent: #577463;
    --line: rgba(26, 30, 28, .14);
    --texture-a: rgba(99, 132, 111, .12);
    --texture-b: rgba(143, 125, 98, .08);
    --grid-line: rgba(26, 30, 28, .028)
}

* {
    box-sizing: border-box
}

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

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 80% 12%, var(--texture-a), transparent 32%), radial-gradient(circle at 12% 72%, var(--texture-b), transparent 28%), linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
    background-attachment: fixed
}

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

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

.topbar {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(5vw, calc((100vw - 1120px)/2));
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--topbar);
    backdrop-filter: blur(16px)
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 10px
}

.wordmark span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    font-size: 9px;
    font-weight: 700
}

.wordmark strong {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em
}

nav {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--muted)
}

nav a:hover {
    color: var(--text)
}

.lab-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 11px;
    color: var(--text)
}

.status-strip,
.display-controls {
    display: flex;
    align-items: center;
    gap: 5px
}

.status-item {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    white-space: nowrap
}

.status-item strong {
    font-size: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums
}

.status-item small {
    color: var(--muted);
    font-size: 8px
}

.live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 10%, transparent)
}

.temperature.is-live .live-dot {
    background: #9fc8ac;
    box-shadow: 0 0 0 3px rgba(159, 200, 172, .12)
}

.display-controls {
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 999px
}

.display-controls button {
    min-width: 26px;
    height: 24px;
    padding: 0 6px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: 500 9px "Roboto", sans-serif
}

.display-controls button:hover {
    background: color-mix(in srgb, var(--text) 9%, transparent);
    color: var(--text)
}

.hero {
    min-height: 330px;
    width: min(1120px, 90vw);
    margin: 0 auto;
    padding: 54px 0 44px;
    position: relative;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center
}

.eyebrow,
.kicker {
    text-transform: uppercase;
    letter-spacing: .17em;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted)
}

.eyebrow {
    margin-bottom: 30px
}

.pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 9px;
    box-shadow: 0 0 0 4px rgba(169, 199, 181, .09)
}

h1 {
    font-size: clamp(42px, 5vw, 68px);
    line-height: .94;
    font-weight: 300;
    letter-spacing: -.05em;
    margin: 0
}

h1 em,
h2 em {
    font-weight: 300;
    font-style: normal;
    color: var(--accent)
}

.lead {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 460px;
    margin: 8px 0 0
}

.primary {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 9px 10px 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    color: var(--text)
}

.primary:hover {
    background: var(--text);
    color: var(--bg)
}

.primary span {
    font-size: 14px
}

.projects {
    width: min(1120px, 90vw);
    margin: 0 auto;
    padding: 54px 0 70px
}

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

.section-head h2,
.about h2 {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1;
    font-weight: 300;
    letter-spacing: -.035em;
    margin: 9px 0 0
}

.section-head>p {
    font-size: 9px;
    color: var(--muted)
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    border-top: 1px solid var(--line);
    padding-top: 14px
}

.filters {
    display: flex;
    min-width: 0;
    gap: 6px;
    flex-wrap: wrap
}

.filters button {
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--muted);
    cursor: pointer;
    font: 500 10px "Roboto", sans-serif
}

.filters button:hover,
.filters button.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg)
}

.filters button:nth-child(2) {
    --filter-accent: #d6a2aa
}

.filters button:nth-child(3) {
    --filter-accent: #d7b978
}

.filters button:nth-child(4) {
    --filter-accent: #b8a5d6
}

.filters button:nth-child(5) {
    --filter-accent: #8fc9c8
}

.filters button:not(:first-child):hover,
.filters button:not(:first-child).active {
    background: color-mix(in srgb, var(--filter-accent) 18%, var(--panel));
    border-color: color-mix(in srgb, var(--filter-accent) 48%, transparent);
    color: color-mix(in srgb, var(--filter-accent) 88%, white)
}

.search {
    width: 200px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted)
}

.search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    padding: 6px 0;
    color: var(--text);
    font: 400 11px "Roboto", sans-serif
}

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

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

.card {
    --card-accent: var(--accent);
    --card-wash: rgba(169, 199, 181, .045);
    min-width: 0;
    min-height: 380px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--card-wash), transparent 58%), var(--card-surface);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: background .28s ease, border-color .28s ease, transform .28s ease, box-shadow .28s ease
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    z-index: 2;
    background: var(--card-accent);
    opacity: .46;
    transition: opacity .28s ease
}

.card:hover {
    background: linear-gradient(135deg, var(--card-wash), transparent 72%), var(--panel-hover);
    border-color: color-mix(in srgb, var(--card-accent) 42%, transparent);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--card-accent) 8%, transparent);
    transform: translateY(-2px)
}

.card:hover::before {
    opacity: .82
}

.card.ochre {
    --card-accent: #d7b978;
    --card-wash: rgba(215, 185, 120, .075)
}

.card.rose {
    --card-accent: #d6a2aa;
    --card-wash: rgba(214, 162, 170, .07)
}

.card.violet {
    --card-accent: #b8a5d6;
    --card-wash: rgba(184, 165, 214, .07)
}

.card.blue {
    --card-accent: #91b8d2;
    --card-wash: rgba(145, 184, 210, .07)
}

.card.green {
    --card-accent: #9fc8ac;
    --card-wash: rgba(159, 200, 172, .07)
}

.card.cyan {
    --card-accent: #8fc9c8;
    --card-wash: rgba(143, 201, 200, .07)
}

:root[data-theme="light"] .card.ochre {
    --card-accent: #896d34;
    --card-wash: rgba(183, 147, 77, .1)
}

:root[data-theme="light"] .card.rose {
    --card-accent: #95636c;
    --card-wash: rgba(177, 117, 128, .09)
}

:root[data-theme="light"] .card.violet {
    --card-accent: #755f94;
    --card-wash: rgba(132, 106, 166, .09)
}

:root[data-theme="light"] .card.cyan {
    --card-accent: #397c7b;
    --card-wash: rgba(70, 142, 140, .09)
}

.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 5px;
    background: #0d100f
}

.card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 12, 11, .05), rgba(10, 12, 11, .22)), linear-gradient(135deg, var(--card-wash), transparent 65%)
}

.card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(.68) contrast(.94) brightness(.68);
    transform: scale(1.01);
    transition: filter .35s ease, transform .45s ease
}

.card:hover .card-image img {
    filter: saturate(.82) contrast(.98) brightness(.8);
    transform: scale(1.025)
}

.card-number {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 1;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(12, 15, 14, .7);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, .72);
    font: 8px/1 ui-monospace, monospace
}

.arrow {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 1;
    width: 23px;
    height: 23px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(12, 15, 14, .7);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    transition: background .25s ease, border-color .25s ease, color .25s ease
}

.card:hover .arrow {
    background: var(--card-accent);
    border-color: var(--card-accent);
    color: var(--bg)
}

.tag {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--card-accent);
    margin: 0 0 9px
}

.card-copy {
    padding: 16px 5px 7px
}

.card h3 {
    font-size: 18px;
    line-height: 1.16;
    font-weight: 400;
    letter-spacing: -.015em;
    margin: 0 0 10px
}

.desc {
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    max-width: 42ch
}

.empty {
    padding: 50px 0;
    text-align: center;
    color: var(--muted)
}

.about {
    padding: 76px 8vw;
    background: rgba(169, 199, 181, .08);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px
}

.about>div {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: end;
    gap: 7vw
}

.about>div p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 3px
}

footer {
    min-height: 170px;
    padding: 48px max(5vw, calc((100vw - 1120px)/2));
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: start;
    gap: 24px;
    font-size: 10px;
    line-height: 1.7;
    color: var(--muted)
}

.wordmark.inverse span {
    background: var(--accent);
    color: var(--bg)
}

.wordmark.inverse strong {
    color: var(--text)
}

.footnote {
    color: #68706c
}

@media(max-width:900px) {
    .nav-projects {
        display: none
    }

    .hero {
        padding-top: 58px
    }

    .lead {
        margin-top: 30px
    }

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

    .about,
    .about>div {
        grid-template-columns: 1fr
    }

    .about>div {
        gap: 24px
    }
}

@media(max-width:620px) {
    body {
        overflow-x: clip
    }

    .nav-projects,
    .lab-link {
        display: none
    }

    .topbar {
        width: 100vw;
        padding: 0 18px
    }

    nav {
        gap: 6px
    }

    .status-strip {
        gap: 3px
    }

    .status-item {
        min-height: 27px;
        padding: 4px 6px
    }

    .status-item small {
        display: none
    }

    .display-controls button {
        min-width: 23px;
        padding: 0 4px
    }

    .wordmark {
        gap: 7px
    }

    .wordmark strong {
        font-size: 11px
    }

    .hero,
    .projects {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
        padding-left: 18px;
        padding-right: 18px
    }

    .hero {
        min-height: 470px;
        padding-top: 60px
    }

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

    .controls {
        width: 100%;
        min-width: 0;
        flex-direction: column
    }

    .filters {
        width: 100%;
        max-width: 100%
    }

    .search {
        width: 100%
    }

    .section-head>p {
        display: none
    }

    .card {
        min-height: 0
    }

    .about {
        padding: 60px 20px
    }

    footer {
        grid-template-columns: 1fr;
        padding: 42px 20px
    }
}

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

    body::before {
        background-attachment: scroll
    }

    .card {
        transition: none
    }

    .card-image img {
        transition: none
    }
}
