.projects {
    --lift: rgba(24, 24, 27, 0.18);
    --scene-bg: color-mix(in srgb, var(--fg) 5%, var(--panel));
    --scene-card: var(--panel);
    --scene-line: var(--line);
    --scene-soft: color-mix(in srgb, var(--fg) 13%, var(--panel));
    --scene-ink: var(--fg);
    --card-bg: var(--rail);
    --card-edge: color-mix(in srgb, var(--fg) 20%, var(--panel));
    padding: calc(var(--bar) + 16px) 0 0;
}

:root[data-theme="dark"] .projects {
    --lift: rgba(0, 0, 0, 0.55);
}

.projects-field {
    position: relative;
    overflow: clip;
}

.projects-plane {
    --pw: 1040px;
    --ph: 1410px;
    --hx: 120px;
    --hy: 16px;
    --hw: 800px;
    --shift: max(0px, (100% - var(--pw)) / 2);
    position: relative;
    width: max(var(--pw), 100%);
    height: var(--ph);
    user-select: none;
    -webkit-user-select: none;
}

.projects-head {
    position: absolute;
    left: calc(var(--hx) + var(--shift));
    top: var(--hy);
    width: var(--hw);
    text-align: center;
}

.projects-head .screen-title {
    text-wrap: balance;
}

.projects-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.projects-cell {
    position: absolute;
    left: calc(var(--x) + var(--shift));
    top: var(--y);
    translate: calc(var(--pull, 0) * -100%) 0;
}

.projects-cell:nth-child(1) {
    --x: 520px;
    --y: 160px;
    --pull: 0.5;
    --size: 0.9;
}

.projects-cell:nth-child(2) {
    --x: 364px;
    --y: 684px;
    --pull: 1;
    --size: 0.9;
}

.projects-cell:nth-child(3) {
    --x: 676px;
    --y: 684px;
    --size: 0.9;
}

.projects-cell:nth-child(4) {
    --x: 364px;
    --y: 1068px;
    --pull: 1;
    --size: 0.9;
}

.projects-cell:nth-child(5) {
    --x: 520px;
    --y: 544px;
    --pull: 0.5;
    --size: 0.9;
}

.projects-cell:nth-child(6) {
    --x: 520px;
    --y: 928px;
    --pull: 0.5;
    --size: 0.9;
}

.projects-cell:nth-child(7) {
    --x: 364px;
    --y: 300px;
    --pull: 1;
    --size: 0.9;
}

.projects-cell:nth-child(8) {
    --x: 676px;
    --y: 300px;
    --size: 0.9;
}

.projects-card {
    display: block;
    width: calc(var(--size, 1) * min(68vw, 270px));
    padding: 10px 10px 16px;
    border: 1px solid var(--card-edge);
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: 0 26px 48px -30px var(--lift);
    outline-offset: 4px;
    transition: translate .3s, box-shadow .3s;
    -webkit-user-drag: none;
}

.projects-card:hover,
.projects-card:focus-visible {
    translate: 0 -6px;
    box-shadow: 0 34px 56px -30px var(--lift);
}

.projects-card:focus-visible {
    outline: 2px solid var(--accent);
}

@media (any-hover: hover) {
    .projects-field.is-dragging .projects-card {
        pointer-events: none;
    }
}

.projects-frame {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.projects-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    margin: 0;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.projects-bar i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--accent);
}

.projects-bar span:last-child {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.projects-scene {
    display: block;
    width: 100%;
    height: auto;
}

.projects-name {
    margin: 14px 6px 0;
    font-family: var(--font-name);
    font-weight: 900;
    font-size: 19px;
    line-height: 24px;
    letter-spacing: -0.02em;
}

.projects-line {
    margin: 4px 6px 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--body);
}

.scene-bg {
    fill: var(--scene-bg);
}

.scene-card {
    fill: var(--scene-card);
}

.scene-edge {
    stroke: var(--scene-line);
    stroke-width: 1;
}

.scene-edge-red {
    stroke: var(--accent);
    stroke-width: 1.5;
}

.scene-soft {
    fill: var(--scene-soft);
}

.scene-ink {
    fill: var(--scene-ink);
}

.scene-red {
    fill: var(--accent);
}

.scene-white {
    fill: #FFFFFF;
}

.scene-none {
    fill: none;
}

.scene-rule {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 1;
}

.scene-panel-line {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 1.4;
}

.scene-line-ink {
    fill: none;
    stroke: var(--scene-ink);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-line-white {
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-side {
    fill: var(--scene-card);
    opacity: 0.28;
}

.scene-tick {
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-spark {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-track {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 3;
    stroke-linecap: round;
}

.scene-track-ink {
    fill: none;
    stroke: var(--scene-ink);
    stroke-width: 3;
    stroke-linecap: round;
}

.scene-track-red {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
}

.scene-area {
    fill: var(--accent);
    opacity: 0.14;
}

.scene-flow {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 5 5;
}

.scene-line-red {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-digit {
    fill: var(--scene-ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    text-anchor: middle;
}

.scene-digit-white {
    fill: #FFFFFF;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    text-anchor: middle;
}

.scene-seg-soft {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 5;
}

.scene-seg-red {
    fill: none;
    stroke: var(--accent);
    stroke-width: 5;
}

.scene-seg-ink {
    fill: none;
    stroke: var(--scene-ink);
    stroke-width: 5;
}

.scene-seg-a {
    stroke-dasharray: 28 47.4;
}

.scene-seg-b {
    stroke-dasharray: 16 59.4;
    stroke-dashoffset: -31;
}

.scene-path {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-ring-red {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
}

.scene-letter-i {
    fill: var(--scene-ink);
    font-family: var(--font-name);
    font-weight: 900;
    font-size: 10px;
    text-anchor: middle;
}

.scene-letter-c {
    fill: var(--scene-card);
    font-family: var(--font-name);
    font-weight: 900;
    font-size: 10px;
    text-anchor: middle;
}

.scene-letter-w {
    fill: #FFFFFF;
    font-family: var(--font-name);
    font-weight: 900;
    font-size: 10px;
    text-anchor: middle;
}

.scene-line-soft {
    fill: none;
    stroke: var(--scene-soft);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-ring-card {
    stroke: var(--scene-card);
    stroke-width: 2;
}

.scene-dash-ink {
    fill: none;
    stroke: var(--scene-ink);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 3 3;
}

.scene-band {
    fill: var(--scene-ink);
    opacity: 0.06;
}

.scene-num {
    fill: var(--scene-ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
}

.scene-num-sm {
    font-size: 9px;
}

.scene-num-lg {
    font-size: 20px;
}

.scene-num-xl {
    font-size: 28px;
}

.scene-num-soft {
    fill: var(--muted);
}

@media (min-width: 700px) {
    .projects-cell:nth-child(2),
    .projects-cell:nth-child(4),
    .projects-cell:nth-child(7) {
        --x: 330px;
    }

    .projects-cell:nth-child(3),
    .projects-cell:nth-child(8) {
        --x: 710px;
    }
}

@media (min-width: 1200px) and (pointer: fine) {
    .projects {
        height: min(var(--view), 1240px);
        min-height: 640px;
        padding: 0;
    }

    .projects-field {
        position: absolute;
        inset: 0;
    }

    .projects-plane {
        --pw: 2600px;
        --ph: 1440px;
        --hx: 1000px;
        --hy: 640px;
        --hw: 600px;
        height: calc(max(var(--ph), 100%) + var(--dock-space));
    }

    .projects-head {
        translate: 0 -50%;
    }

    .projects-cell {
        translate: 0 calc(var(--lift, 0) * -100%);
    }

    .projects-cell:nth-child(1) {
        --x: 673px;
        --y: 310px;
        --size: 0.84;
    }

    .projects-cell:nth-child(2) {
        --x: 318px;
        --y: 466px;
        --size: 0.84;
    }

    .projects-cell:nth-child(3) {
        --x: 1983px;
        --y: 506px;
        --size: 0.84;
    }

    .projects-cell:nth-child(4) {
        --x: 1150px;
        --y: 760px;
        --size: 0.84;
    }

    .projects-cell:nth-child(5) {
        --x: 673px;
        --y: 723px;
        --size: 0.84;
    }

    .projects-cell:nth-child(6) {
        --x: 1628px;
        --y: 350px;
        --size: 0.84;
    }

    .projects-cell:nth-child(7) {
        --x: 1628px;
        --y: 763px;
        --size: 0.84;
    }

    .projects-cell:nth-child(8) {
        --x: 1150px;
        --y: 520px;
        --lift: 1;
        --size: 0.84;
    }

    .projects-card {
        width: calc(var(--size, 1) * 330px);
    }

    .projects-name {
        font-size: 22px;
        line-height: 28px;
    }

    .projects-line {
        font-size: 15px;
        line-height: 22px;
    }
}

@media (pointer: coarse) {
    .projects-plane {
        will-change: transform;
    }
}

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