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

html,
body {
    width: 100%;
    height: 100%;
    background: #080808;
    color: rgba(232, 228, 220, 0.86);
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    overflow: hidden;
    cursor: none;
}

#cur {
    --cur-size: 8px;
    --cur-size-big: 48px;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: var(--cur-size);
    height: var(--cur-size);
    background: rgba(232, 228, 220, 0.86);
    border-radius: 50%;
    top: calc(var(--cur-size) * -0.5);
    left: calc(var(--cur-size) * -0.5);
    transition: width 0.4s ease, height 0.4s ease;
    mix-blend-mode: difference;
}

#cur.big {
    width: var(--cur-size-big);
    height: var(--cur-size-big);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 2.5rem;
}

.logo {
    font-family: 'cormorant garamond', serif;
    left: 2rem;
}

.link {
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    color: rgba(232, 228, 220, 0.86);
    text-decoration: none;
    opacity: 0.9;
    text-transform: uppercase;
    transition: color 0.3s;

    position: fixed;
    top: 1.3rem;
    z-index: 100;
    padding: 0.25rem;
}

.link:hover {
    color: rgba(232, 228, 220, 1);
}

.contact {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    right: 2rem;
}



/*nav a {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 0.38);
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: rgba(232, 228, 220, 0.78);
}*/

#stage {
    position: fixed;
    inset: 0;
    z-index: 1;
}

.cell {
    position: absolute;
    border-radius: 50%;
    overflow: hidden;
    cursor: none;
    will-change: transform;
    transition: transform 0.7s cubic-bezier(.16, 1, .3, 1), box-shadow 0.7s ease, border-color 0.6s;
    border: 1px inset rgba(232, 228, 220, 0.07);
}

.cell:hover {
    box-shadow: 0 0 80px 4px rgba(232, 228, 220, 0.06);
    border-color: rgba(232, 228, 220, 0.22);
}

.cell-still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: brightness(0.78) saturate(0.85);
    transition: filter 0.7s ease;
    z-index: 1;
    /*user-drag: none;
	-webkit-user-drag: none;
	-moz-user-select: none;*/
}

.cell:hover .cell-still {
    filter: brightness(0.08) saturate(0.2);
}

/* 3D sphere shading — sits above still, below loop */
.cell-sphere {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    background:
        /* radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.08) 30%, transparent 60%),
        radial-gradient(circle at 70% 74%, rgba(0, 0, 0, 0.7) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, transparent 48%, rgba(0, 0, 0, 0.72) 100%); */
        radial-gradient(circle at 35% 32%, rgba(255,255,255,0.13) 0%, transparent 55%),
        radial-gradient(circle at 68% 72%, rgba(0,0,0,0.55) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,0.55) 100%);
    box-shadow: inset -8px -8px 24px rgba(0, 0, 0, 0.5), inset 4px 4px 16px rgba(255, 255, 255, 0.08);
    transition: opacity 0.7s ease;
}

.cell:hover .cell-sphere {
    opacity: 0.3;
}

.cell-loop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    border: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 2;
}

.cell:hover .cell-loop {
    opacity: 1;
}

.cell-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease 0.15s;
    padding: 15%;
    pointer-events: none;
}

.cell:hover .cell-info {
    opacity: 1;
}

.cell-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.8vw, 2.4rem);
    letter-spacing: 0.02em;
    line-height: 1;
    color: rgba(232, 228, 220, 0.86);
    margin-bottom: 0.4em;
}

.cell-sub {
    font-size: clamp(0.5rem, 0.85vw, 0.72rem);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 1);
    line-height: 1.5;
}

/* Lightbox */
#lb {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8, 8, 8, 0.97);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#lb.open {
    opacity: 1;
    pointer-events: all;
}

/*#lb.open #lb-overlay {
    position: absolute;
    inset: 0;
    z-index: 99;
    pointer-events: auto;
}

#lb.open #lb-overlay.active {
    pointer-events: none;
}*/

#lb-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#lb-close,
#lb-prev,
#lb-next {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
     color: rgba(232, 228, 220, 0.86);
    transition: color 0.3s;
}

#lb-close:hover,
#lb-prev:hover,
#lb-next:hover {
    color: rgba(232, 228, 220, 1);
}

#lb-close {
    top: 1.6rem;
    right: 2.2rem;
}

#lb-prev {
    top: 50%;
    left: 2.2rem;
    transform: translateY(-50%);
}

#lb-next {
    top: 50%;
    right: 2.2rem;
    transform: translateY(-50%);
}

#lb-controls {
    transition: opacity 250ms ease-out;
}

#lb-meta {
    position: absolute;
    bottom: 1.8rem;
    left: 2.2rem;
    z-index: 10;
    transition: opacity 250ms ease-out;
}

#lb-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2.4rem;
    letter-spacing: 0.03em;
    color: rgba(232, 228, 220, 1);
    transition: opacity 250ms ease-out;
}

#lb-sub {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 0.86);
}

#lb-count {
    position: absolute;
    bottom: 1.8rem;
    right: 2.2rem;
    z-index: 10;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: rgba(232, 228, 220, 0.86);
    transition: opacity 250ms ease-out;
}

.hide {
    opacity: 0;
}

/* Contact */
#contact-wrap {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: #0c0b09;
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

#contact-wrap.open {
    opacity: 1;
    pointer-events: all;
}

#contact-close {
    position: absolute;
    z-index: 999;
    top: 1.8rem;
    right: 2.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 0.86);
    cursor: pointer;
    transition: color 0.3s;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
}

#contact-close:hover {
    color: rgba(232, 228, 220, 1);
}

/* Left panel — name */
.contact-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3.5rem 3rem 3.5rem 3.5rem;
    border-right: 1px solid rgba(232, 228, 220, 0.07);
    position: relative;
}
/*
.contact-left::before {
    content: '';
    position: absolute;
    top: 3.5rem;
    left: 3.5rem;
    width: 2rem;
    height: 1px;
    background: rgba(232, 228, 220, 0.25);
}
*/
.contact-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 7vw, 7.5rem);
    line-height: 0.92;
    color: rgba(232, 228, 220, 0.86);
    letter-spacing: -0.01em;
}

.contact-name em {
    font-style: italic;
    color: rgba(232, 228, 220, 0.45);
}

.contact-role {
    margin-top: 2rem;
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 0.86);
    line-height: 1.8;
}

/* Right panel — links */
.contact-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3.5rem 3.5rem 3.5rem 3rem;
}

.contact-link-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 1.4rem 0;
    border-top: 1px solid rgba(232, 228, 220, 0.08);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.contact-link-item:last-child {
    border-bottom: 1px solid rgba(232, 228, 220, 0.08);
}

.contact-link-label {
    font-family: 'Jost', sans-serif;
    font-weight: 200;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 228, 220, 0.3);
}

.contact-link-val {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: rgba(232, 228, 220, 0.86);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.3s;
}

.contact-link-item:hover .contact-link-val {
    color: rgba(232, 228, 220, 1);
}

.contact-link-arrow {
    font-size: 0.7rem;
    color: rgba(232, 228, 220, 0.2);
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.contact-link-item:hover .contact-link-arrow {
    color: rgba(232, 228, 220, 0.6);
    transform: translate(3px, -3px);
}

@media (max-width: 440px) {
    #contact-wrap {
        grid-template-columns: auto;
    }

    .contact-left {
        justify-content: flex-start;
    }
}

/* Xiaomi ultra-wide thumbnail fix */
.cell[data-project="Xiaomi"] .cell-still {
    object-fit: cover;
    object-position: center;
    transform: scale(1.6);
}

.cell[data-project="Xiaomi"] .cell-loop {
    width: 280%;
    height: 280%;
}

/* Extra loop bleed for specific projects */
.cell[data-project="Instax"] .cell-loop,
.cell[data-project="Slido"] .cell-loop,
.cell[data-project="Autodesk"] .cell-loop,
.cell[data-project="Elderbrook"] .cell-loop {
    width: 220%;
    height: 220%;
}

.lbo #cur {
    display: none;
}

.lbo {
    cursor: auto;
}
