/* Layout Structure */
.wrapper {
    max-width: var(--maxw);
    margin: 0 auto;
    opacity: 1;
}

/* Desktop Scroll Lock */
@media (min-width: 1025px) {

    html,
    body {
        overflow: hidden;
    }
}

/* Mobile Scroll & Structure */
@media (max-width: 1024px) {

    html,
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    .main-layout {
        height: auto;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .left-column {
        height: auto;
        flex: 0 0 auto;
        flex-direction: column;
    }



    .carousel-column {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* Header Grid */
.header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--chrome-gap);
    height: var(--header-h);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 var(--radius) var(--radius);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    padding-top: env(safe-area-inset-top);
    backdrop-filter: blur(13px);
    /* Fibonacci */
    -webkit-backdrop-filter: blur(13px);
}

.header-left,
.header-right {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: var(--chrome-gap);
    position: relative;
    z-index: 1100;
    justify-self: stretch;
    width: 100%;
}

.header-center {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    height: 100%;
}

.header-center::before {
    content: "";
    position: absolute;
    inset: 0 18px;
    border-radius: 80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    filter: blur(13px);
    /* Fibonacci (was 6) */
    z-index: -1;
}

/* Background Glow */
.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 61.8vw;
    /* Golden Width */
    height: 61.8vh;
    /* Golden Height */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.089), transparent 61.8%);
    filter: blur(13px);
    /* Fibonacci */
    z-index: -1;
}

/* Main Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 21px;
    /* Fibonacci (was 20) */
    padding: 21px;
    /* Fibonacci (was 20) */
    padding-top: var(--head-gap);
    height: calc(100vh - var(--header-h));
    max-width: var(--maxw);
    margin: 0 auto;
    overflow: hidden;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 21px;
    min-height: 0;
    height: 100%;
    min-width: 0;
}

.tweets-container {
    display: flex;
    flex-direction: row;
    gap: 21px;
    flex: 1;
    min-height: 0;
    /* Allow shrinking */
    min-width: 0;
}

.tweets-container::-webkit-scrollbar {
    display: none;
}

.shop-grid {
    flex: 0 0 auto;
    /* Ensure it doesn't shrink */
}

.sub-column {
    display: none;
    /* Deprecated */
}

.carousel-column {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    min-height: 0;
    width: fit-content;
    min-width: 0;
}

/* Responsive Grid Adjustments */
@media (max-width: 987px) {

    /* Fibonacci Breakpoint (was 1024) */
    .main-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: visible;
        width: 100%;
        max-width: 100%;
        padding: 10px;
        padding-top: var(--head-gap);
    }

    .header {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }

    .carousel-column {
        display: grid;
        grid-template-rows: repeat(3, auto);
        width: 100%;
    }

    .tweets-container {
        flex-direction: column;
        gap: 20px;
    }

    /* Mobile: Trinity card FIRST, Twitter SECOND */
    .tweets-container .twitter-spot {
        order: 1;
    }

    .tweets-container .project-card {
        order: 0;
    }
}

@media (max-width: 768px) {
    .header {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .header-center {
        display: none;
    }
}