body {
    overflow: hidden;
}

/* Load in animations for the main page elements, triggered by the 'page-loaded' class added on window load. */
/* Hide the main elements initially and prepare the transition */
/* Initial State: Hidden and shifted */
/* Previous panel styles */

.left-panel, .right-panel {
    opacity: 0;
}
.left-panel {
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Desktop tuning: soften the right panel/video entry (background character) on load. */
@media (min-width: 1101px) {
    .right-panel {
        transform: translate3d(18px, 0, 0) scale(1.008);
        transition: opacity 1s cubic-bezier(0.25, 0.1, 0.25, 1),
                    transform 1s cubic-bezier(0.25, 0.1, 0.25, 1);
        backface-visibility: hidden;
        will-change: transform, opacity;
    }

    .right-panel .right-panel-video {
        opacity: 0.015;
        transform: translate3d(0, 0, 0) scale(1.012);
        transition: opacity 1.05s cubic-bezier(0.25, 0.1, 0.25, 1),
                    transform 1.05s cubic-bezier(0.25, 0.1, 0.25, 1),
                    filter 0.5s ease;
        will-change: transform, opacity;
    }
}

/* Initial state for Project Items */
.project-item {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Specific style for the <hr> separators */
#project-list hr {
    opacity: 0;
    transform: scaleX(0); /* Collapsed horizontally */
    transform-origin: center;
    transition: all 0.8s ease-out;
}

/* Triggered States */
body.page-loaded .left-panel,
body.page-loaded .right-panel {
    opacity: 1;
}

body.page-loaded .left-panel {
    transform: translateX(0);
}

body.page-loaded .right-panel {
    transform: translate3d(0, 0, 0) scale(1);
}

@media (min-width: 1101px) {
    body.page-loaded .right-panel .right-panel-video {
        opacity: 0.07;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.project-item.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Reveal the lines */
#project-list hr.visible {
    opacity: 1;
    transform: scaleX(1);
}

/* ── Commission Status — bare typographic line, no box ── */
.commission-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.7rem;
    width: fit-content;
    cursor: default;
    user-select: none;
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity 0.5s ease 0.4s,
        transform 0.5s cubic-bezier(0.2, 1, 0.3, 1) 0.4s;
    padding-top: 0.15rem;
}

.commission-status.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ── Dot ── */
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

/* Open: Apple green with a slow, understated pulse */
.commission-status.is-open .status-dot {
    background: #34c759;
}

.commission-status.is-open .status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #34c759;
    animation: statusRing 2.8s ease-out infinite;
    pointer-events: none;
}

@keyframes statusRing {
    0% {
        transform: scale(1);
        opacity: 0.45;
    }

    70% {
        transform: scale(2.0);
        opacity: 0;
    }

    100% {
        transform: scale(2.0);
        opacity: 0;
    }
}

/* Closed: matches the muted text colour, no animation */
.commission-status.is-closed .status-dot {
    background: var(--text-muted);
    opacity: 0.4;
}

/* ── Label — same scale & colour as .client-info ── */
.status-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
}

/* ── Tablet (≤ 1100px) ── */
@media (max-width: 1100px) {
    .commission-status {
        margin-top: 0.6rem;
    }

    .status-text {
        font-size: 0.82rem;
    }
}

/* ── Phone (≤ 600px) ── */
@media (max-width: 600px) {
    .commission-status {
        margin-top: 0.45rem;
        gap: 0.45rem;
    }

    .status-dot {
        width: 6px;
        height: 6px;
    }

    .status-text {
        font-size: 0.78rem;
    }
}