@font-face {
    font-family: "Courier New";
    src: local("CourierNewPSMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-BoldMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-ItalicMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
    font-display: block;
}

@font-face {
    font-family: "Courier New";
    src: local("CourierNewPS-BoldItalicMT"), url("/fonts/CutiveMono-Regular.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
    font-display: block;
}


.miltonhall-title {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    max-width: 1100px;
    color: #383834;
    font-family: "Blue Screen", monospace;
    font-size: 24px;
    font-weight: normal;
    letter-spacing: 0;
    word-spacing: 0;
    line-height: 1;
    text-align: center;
    z-index: 5;
}

.miltonhall-title span {
    display: inline;
    margin: 0;
    padding: 0;
}

.miltonhall-back {
    position: absolute;
    left: 0;
    top: -4px;
    color: #383834;
    text-decoration: none;
    font-family: "Blue Screen", monospace;
    font-size: 28px;
    font-weight: normal;
    line-height: 1;
    white-space: nowrap;
    z-index: 6;
}

.miltonhall-back:hover {
    color: #33332d;
}

.miltonhall-gallery {
    position: absolute;
    top: 105px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: calc(100% - 125px);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #080908 transparent;
    z-index: 5;
}

.miltonhall-piece {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
    z-index: 6;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.miltonhall-piece img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: none;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.miltonhall-piece:hover img {
    transform: scale(1.025);
}

/* Lightbox — Astro reference styling */

.miltonhall-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(8, 9, 8, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.miltonhall-lightbox.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.miltonhall-lightbox-image-container {
    position: absolute;
    top: calc(5vh + 15px);
    right: 30px;
    bottom: 115px;
    left: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    cursor: zoom-in;
}

.miltonhall-lightbox-image {
    display: block;
    position: static;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    filter: none;
    flex: 0 0 auto;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center center;
    transition: none;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

.miltonhall-lightbox button {
    position: absolute;
    border: none;
    background: none;
    color: #a8a8a3;
    font-family: "Courier New", Courier, monospace;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

.miltonhall-lightbox button:hover {
    color: #bcbcb7;
}

.miltonhall-lightbox-close {
    top: 25px;
    right: 30px;
    font-size: 34px !important;
}

.miltonhall-lightbox-previous {
    left: calc(50% - 95px);
    bottom: 55px;
    top: auto;
    transform: none;
    padding: 18px 22px;
    margin: -18px -22px;
    color: #92928c;
    font-size: 32px;
}

.miltonhall-lightbox-next {
    left: calc(50% + 67px);
    right: auto;
    bottom: 55px;
    top: auto;
    transform: none;
    padding: 18px 22px;
    margin: -18px -22px;
    color: #92928c;
    font-size: 32px;
}

@media screen and (max-width: 600px) {
    .miltonhall-title {
        top: 58px;
        width: 88%;
        font-size: 20px;
        letter-spacing: 0;
        word-spacing: 0;
    }

    .miltonhall-back {
        top: -3px;
        font-size: 24px;
    }

    .miltonhall-gallery {
        top: 105px;
        width: 94%;
        height: calc(100% - 123px);
        padding: 5px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: max-content;
        gap: 7px;
        align-content: start;
    }

    .miltonhall-piece {
        position: relative;
        display: block;
        width: 100%;
        height: 0 !important;
        padding: 0 0 100% 0 !important;
        margin: 0;
        overflow: hidden;
    }

    .miltonhall-piece img {
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .miltonhall-lightbox-image-container {
        top: calc(5vh + 15px);
        right: 12px;
        bottom: 150px;
        left: 12px;
    }

    .miltonhall-lightbox-close {
        top: 18px;
        right: 20px;
        font-size: 30px !important;
    }

    .miltonhall-lightbox-previous {
        left: calc(50% - 60px);
        bottom: 75px;
        padding: 22px 24px;
        margin: -22px -24px;
        font-size: 32px;
    }

    .miltonhall-lightbox-next {
        left: calc(50% + 32px);
        right: auto;
        bottom: 75px;
        padding: 22px 24px;
        margin: -22px -24px;
        font-size: 32px;
    }
}

@media screen and (max-width: 380px) {
    .miltonhall-title {
        top: 54px;
        width: 90%;
        font-size: 18px;
        letter-spacing: 0;
        word-spacing: 0;
    }

    .miltonhall-back {
        top: -3px;
        font-size: 22px;
    }

    .miltonhall-gallery {
        top: 100px;
        height: calc(100% - 118px);
        width: 96%;
        padding: 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: max-content;
        gap: 6px;
        align-content: start;
    }

    .miltonhall-piece {
        width: 100%;
        height: 0 !important;
        padding: 0 0 100% 0 !important;
    }

    .miltonhall-piece img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .miltonhall-lightbox button {
        font-size: 24px;
    }

    .miltonhall-lightbox-close {
        font-size: 30px !important;
    }

    .miltonhall-lightbox-previous,
    .miltonhall-lightbox-next {
        font-size: 32px;
    }
}