:root
{
    color-scheme: dark;
    --bg: #090a0e;
    --ink: #f4f1e8;
    --muted: #a4a8b4;
    --line: #2c3140;
    --accent: #ffd84a;
    --panel: #12141b;
}

*
{
    box-sizing: border-box;
}

html, body
{
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(1200px 500px at 20% -10%, #1c2030 0%, transparent 55%),
        var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, "Segoe UI", sans-serif;
}

body
{
    padding: 28px 22px 48px 46px;
}

.top
{
    max-width: 1180px;
    margin: 0 auto 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
}

h1
{
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.03em;
    font-weight: 650;
}

h1 span
{
    color: var(--accent);
}

.lede
{
    margin: 0;
    max-width: 46rem;
    color: var(--muted);
    line-height: 1.45;
}

.layout
{
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 28px;
    align-items: start;
}

.bench
{
    position: relative;
    display: flow-root;
    min-width: 0;
}

.stage
{
    display: flex;
    justify-content: flex-start;
}

#panel
{
    width: min(720px, calc(100vw - 48px));
    height: auto;
    border-radius: 22px;
    background: #07080c;
    box-shadow:
        0 0 0 1px #000,
        0 24px 60px rgba(0, 0, 0, 0.45);
}

.side
{
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 18px 14px;
}

button
{
    font: inherit;
    color: var(--ink);
    background: #0c0e14;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.repo-line
{
    margin: 0 0 8px;
    font-size: 14px;
}

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

.project-grid
{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.project-tile
{
    position: absolute;
    pointer-events: auto;
}

.project-icon
{
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border-width: 2px;
    border-radius: 12px;
    cursor: pointer;
    background: #07080c;
}

.project-icon img
{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-icon[aria-pressed="true"]
{
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.project-pop
{
    display: none;
    position: absolute;
    z-index: 6;
    width: min(240px, calc(100vw - 48px));
    padding: 10px 12px 12px;
    background: #0c0e14;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.project-tile[data-edge="bottom"] .project-pop
{
    bottom: calc(100% + 8px);
    left: 0;
}

.project-tile[data-edge="bottom"][data-align="end"] .project-pop
{
    left: auto;
    right: 0;
}

.project-tile[data-edge="left"] .project-pop
{
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.project-tile[data-edge="right"] .project-pop
{
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.project-pop::after
{
    content: "";
    position: absolute;
}

.project-tile[data-edge="bottom"] .project-pop::after
{
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
}

.project-tile[data-edge="left"] .project-pop::after
{
    top: 0;
    bottom: 0;
    right: 100%;
    width: 16px;
}

.project-tile[data-edge="right"] .project-pop::after
{
    top: 0;
    bottom: 0;
    left: 100%;
    width: 16px;
}

.project-tile.is-hot .project-pop,
.project-tile:has(:focus-visible) .project-pop
{
    display: block;
}

.project-tile.is-dismissed .project-pop
{
    display: none;
}

.project-pop strong
{
    display: block;
    color: var(--ink);
    font-size: 14px;
    margin-bottom: 4px;
}

.project-pop p
{
    margin: 0 0 6px;
}

.project-shows
{
    color: var(--ink);
}

#description
{
    color: var(--muted);
    line-height: 1.45;
    min-height: 4.4em;
}

.clock
{
    font-variant-numeric: tabular-nums;
    font-size: 40px;
    letter-spacing: 0.04em;
    margin: 8px 0 4px;
    color: var(--accent);
}

#status
{
    color: var(--muted);
    font-size: 14px;
    min-height: 2.6em;
}

button
{
    padding: 8px 14px;
    cursor: pointer;
}

button:hover
{
    border-color: var(--accent);
}

.screen-row
{
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.screen-row input
{
    width: 100%;
    accent-color: var(--accent);
}

#screen-boost-value
{
    min-width: 2ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

details
{
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

summary
{
    cursor: pointer;
    color: var(--ink);
}

a
{
    color: var(--accent);
}

.back
{
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 4;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    opacity: 0.72;
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    border-radius: 8px;
}

.back:hover
{
    opacity: 1;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 860px)
{
    .top, .layout
    {
        display: block;
    }

    .side
    {
        margin-top: 18px;
    }

    .stage
    {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .project-grid.is-narrow
    {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 14px;
        pointer-events: auto;
    }

    .project-grid.is-narrow .project-tile
    {
        position: relative;
        width: 80px;
        height: 80px;
        flex: 0 0 80px;
    }
}
