.left-column {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 150 / 500;
    height: 100%;
}

.info {
    display: flex;
    flex-direction: column;
    grid-row: 2;
    align-self: start;
    gap: 2rem;
}

#info-text {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#info-text p {
    margin: 0 0 2rem 0;
    max-width: 100%;
    font-size: 14px;
}

#info-text p:last-child {
    margin-bottom: 0;
}

/* fade out effect when transitioning between collections */
#info-text.fade-out {
    opacity: 0;
}

#info-index {
    display: flex;
    grid-row: 3;
    align-self: end;
    min-height: 1.2rem;
    font-size: 14px;
    opacity: 1;
    transition: opacity 0.8s ease;
    transform: translateY(5px); /* slight downward shift for visual balance with center square */
}

#info-index.fade-out {
    opacity: 0;
}

/* loading ring */
.loading-ring {
    width: 100%;
    display: flex;
    grid-row: 1;
    flex-direction: row;
    align-self: flex-start;
}

/* SVG loading ring styling */
.ring-bg {
    fill: none;
    stroke: #ddd;
    stroke-width: 1px;
}

.ring-progress {
    fill: none;
    stroke: #000;
    stroke-width: 1px;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset linear;
    transform: rotate(90deg); /* start point at top */
    transform-origin: 50% 50%;
}

/* center column */
.center-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1 / 1;
    height: 100%;

}

.square {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #000;
}

.hero-border {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -60%); /* shift up by 10% for visual balance */
    width: 75%;
    border: 1px solid #000;
    background-color: white;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: fill;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

/* fade with special filter effect when transitioning */
.hero-image.fade-out {
    opacity: 0;
    filter: grayscale(80%) contrast(150%) brightness(120%);
}

/* optional: tech overlay grid pattern (initially hidden) */
.tech-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 8px 8px; /* 8px grid */
    opacity: 0;
    transition: opacity 1s ease;
    mix-blend-mode: lighten;
    z-index: 2;
}

/* square Navigation */
.square-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

#square-link {
    padding-top: 0.5rem;
    color: #000;
    transition: color 0.5s ease, opacity 0.5s ease;
}

#square-link.fade-out {
    opacity: 0;
    color: #fff;
}

#square-prev,
#square-next {
    cursor: pointer;
    padding-top: 0.5rem;
}

#square-prev {
    padding-right: 2rem;
}

#square-next {
    padding-left: 2rem;
}

/* banner */
.banner-wrapper {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    overflow: hidden;
    border: 1px solid #000;
    aspect-ratio: 150 / 500;
}

.banner-strip {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.banner-strip img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    rotate: 180deg;
}

/*-------------- tablet styles --------------*/
@media screen and (max-width: 1024px) {
    .center-column {
        width: 70vw;
        height: 70vw;
        max-width: 500px;
        max-height: 500px;
        margin-top: 7rem;
        order: 1;
    }

    #square-link,
    #square-prev,
    #square-next {
        margin-top: 1rem;
    }

    .left-column {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "info ring"
            "info index";
        position: relative;
        align-items: flex-start;
        align-content: start;
        width: 85vw;
        max-width: 500px;
        align-self: center;
        order: 2;
        margin-top: 6rem;
        column-gap: 1rem;
        row-gap: 0;
        height: auto;
        min-height: 300px;
        max-height: none;
        aspect-ratio: unset;
    }

    .info {
        grid-area: info;
        align-self: start;
        justify-content: start;
        max-width: 100%;
        min-width: 0;
        order: 0;
    }

    #info-text {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 2rem;
        margin-top: 0;
        min-height: 0;
    }

    #info-text p {
        margin: 0;
        text-align: left;
        font-size: 14px;
        max-width: 200px;
    }

    #info-index {
        grid-area: index;
        display: flex;
        align-self: end;
        justify-content: end;
        align-items: flex-end;
        min-height: 1.2rem;
        font-size: 14px;
        opacity: 1;
        transition: opacity 0.6s ease;
        justify-self: end;
    }

    .loading-ring {
        grid-area: ring;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-self: start;
        justify-self: end;
        width: auto;
    }

    /* banner hidden on tablet (rotated on mobile would be confusing) */
    .banner-wrapper {
        display: none;
    }
}

/*-------------- mobile styles --------------*/
@media screen and (max-width: 767px) {

    .main {
        padding-bottom: 0; 
    }
    .center-column {
        width: 85vw;
        height: 85vw;
        max-width: 500px;
        max-height: 500px;
        margin-top: 4rem;
        order: 1;
    }

    .left-column {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "info ring"
            "info index";
        align-items: flex-start;
        align-content: start;
        width: 85vw;
        max-width: 500px;
        margin-top: 5rem;
        align-self: center;
        order: 2;
        gap: 1rem;
        row-gap: 0;
        height: auto;
        min-height: 300px;
        max-height: none;
        aspect-ratio: unset;
    }

    .info {
        gap: 2rem;
        align-self: start;
        max-width: 100%;
        min-width: 0;
        order: 0;
    }

    #info-text {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 0;
        gap: 2rem;
    }

    #info-text p {
        margin: 0;
        text-align: left;
    }

    #info-index {
        align-self: end;
        align-items: flex-end;
        transform: translateY(0);
    }
}
