@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

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

html {
    min-height: 100%;
    height: 100%;
}

html.home-page {
    height: auto;
    min-height: 100%;
}

html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    background-image: none;
    background-size: 110%;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

html.home-page::before {
    display: none;
}

body.home-page::before {
    content: '';
    position: absolute;
    top: -18vh;
    left: 0;
    width: 100%;
    height: calc(100% + 18vh);
    min-height: calc(100vh + 18vh);
    background-image: url('images/IMG_2288.PNG');
    background-size: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    z-index: 3;
    pointer-events: none;
}

/* White background for slideshow */
.home-slideshow-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-color: white;
    z-index: 1;
}

/* White bar below image */
.home-bottom-section {
    position: absolute;
    top: 110vh;
    left: 0;
    width: 100%;
    height: 10vh;
    background-color: white;
    z-index: 4;
    pointer-events: none;
    filter: invert(0) !important;
}

html.inverted-mode .home-bottom-section {
    filter: none !important;
}

/* Reset white bar position on mobile */
@media (max-width: 768px) {
    .home-bottom-section {
        top: 100vh;
    }
    
    html.inverted-mode .home-bottom-section {
        filter: none !important;
    }
}

/* Home page slideshow - replaces black rectangle */
.home-slideshow {
    position: absolute;
    top: calc(61% - 18vh);
    right: 26%;
    transform: translateY(-50%) scale(1.10);
    width: 30.25%;
    aspect-ratio: 16 / 9;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.home-slideshow img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 1;
}

html.home-page {
    overflow: auto;
    height: auto;
    min-height: 100%;
    scroll-snap-type: none;
    scroll-behavior: auto;
    overscroll-behavior-y: auto;
}

body {
    font-family: 'Courier Prime', monospace;
    background-color: transparent;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body.home-page {
    overflow: auto;
    height: auto;
    min-height: 120vh;
    position: relative;
    background-color: white;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}


.container {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 40px;
    overflow-x: hidden;
}

html.home-page .container {
    min-height: 100vh;
    overflow: visible;
    background-color: transparent;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 4;
}

/* Navigation - Top Left */
.navigation {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 100;
    transition: opacity 0.3s ease;
}

.artist-name {
    transition: opacity 0.3s ease;
}

.nav-links a {
    transition: opacity 0.3s ease;
}

.instagram-icon {
    transition: opacity 0.3s ease;
}

.logo {
    transition: opacity 0.3s ease;
}

.artist-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24pt;
    font-family: 'Courier Prime', monospace;
    color: #1a1a1a;
    text-shadow: 
        0.5px 0.5px 0px rgba(0,0,0,0.1),
        -0.5px -0.5px 0px rgba(255,255,255,0.1);
    filter: contrast(1.1);
}

.artist-name-image {
    height: 16.5px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    margin-bottom: 12px;
}

.nav-links li {
    margin-bottom: 12px;
}

.nav-links a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: opacity 0.3s;
    display: inline-block;
    font-family: 'Courier Prime', monospace;
    text-shadow: 
        0.5px 0.5px 0px rgba(0,0,0,0.1),
        -0.5px -0.5px 0px rgba(255,255,255,0.1);
    filter: contrast(1.1);
}

.nav-links a:hover {
    opacity: 0.6;
}

.nav-links a:hover .nav-link-image {
    opacity: 0.6;
}

.nav-link-image {
    height: 18px;
    width: auto;
    display: block;
    transition: opacity 0.3s;
    transform: translateY(-3px);
}

.nav-links a[href="work.html"] .nav-link-image {
    transform: translateY(-3px) rotate(-2deg);
}

.nav-links a[href="about.html"] .nav-link-image {
    transform: translateY(-3px) rotate(-1deg);
}

.nav-links a.contact-link .nav-link-image {
    transform: translateY(-3px) rotate(1deg);
}

.instagram-icon {
    display: inline-block;
    color: #1a1a1a;
    margin-top: 0;
    transition: opacity 0.3s;
}

.instagram-icon:hover {
    opacity: 0.6;
}

.instagram-icon-image {
    width: 18px;
    height: 18px;
    display: block;
}

/* Logo - Top Right */
.logo {
    position: fixed;
    top: 40px;
    right: 40px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

.logo-bar {
    width: 8px;
    height: 40px;
}

.logo-bar.red {
    background-color: #ff4444;
}

.logo-bar.green {
    background-color: #44ff44;
}

.logo-bar.blue {
    background-color: #4444ff;
}

/* Artwork Container - Center */
.artwork-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding-top: 120px;
    padding-bottom: 100px;
}

/* About Container - Center (blank for future text) */
.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding-top: 180px;
    padding-bottom: 100px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.about-text {
    width: 100%;
    padding: 0 80px;
    position: relative;
    overflow: visible;
}

.about-decoration {
    position: absolute;
    bottom: 140px;
    left: 95%;
    transform: translateX(-50%) rotate(9deg);
    width: 150px;
    height: auto;
    z-index: 1;
    pointer-events: none;
}

.about-top-right {
    position: absolute;
    top: 90px;
    right: -50px;
    width: auto;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

.about-text p {
    font-family: 'Courier Prime', monospace;
    font-size: 14pt;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: left;
}

.about-text p::first-letter {
    float: left;
    font-size: 3em;
    line-height: 0.8;
    padding-right: 4px;
    padding-top: 2px;
}

.artwork {
    width: 100%;
    max-width: 900px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

/* Hand-drawn effect for SVG paths */
.artwork path,
.artwork rect,
.artwork circle {
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* Add subtle hand-drawn wobble effect */
@keyframes wobble {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(0.3px, -0.2px); }
    50% { transform: translate(-0.2px, 0.3px); }
    75% { transform: translate(0.2px, 0.2px); }
}

.artwork {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
    animation: wobble 8s ease-in-out infinite;
}

/* Work Boxes Container - Center */
.work-boxes-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    min-height: 80vh;
    padding-top: 120px;
    padding-bottom: 100px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 auto;
}

.work-box {
    width: 360px;
    height: 480px;
    border: none;
    background-color: transparent;
    box-shadow: none;
}

.work-box-left {
    background-image: url('images/work-box-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.work-box-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    color: #000000;
    font-family: 'Courier Prime', monospace;
    text-align: center;
    font-size: 16pt;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    line-height: 1.4;
    border: none;
    width: auto;
    white-space: nowrap;
    margin: 0 auto;
    display: block;
}

.work-box-right .work-box-label {
    padding: 10px 18px;
}

.work-box-left::after {
    display: none;
}

.work-box-left:hover .work-box-label {
    opacity: 1;
}

/* Caption - Bottom */
.caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

.caption-title {
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-align: center;
}

.caption-title-main {
    font-size: 18px;
    display: block;
}

.caption-title-subtitle {
    display: block;
    white-space: nowrap;
}

.caption-date {
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    text-align: center;
}

.caption-copyright {
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    text-align: left;
    position: absolute;
    bottom: 1px;
    left: 40px;
    z-index: 1000;
}

/* Scroll-to-top arrow inversion for desktop */
.scroll-to-top-arrow {
    filter: invert(0) !important;
}

html.inverted-mode .scroll-to-top-arrow {
    filter: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .navigation {
        top: 20px;
        left: 20px;
        z-index: 201;
    }
    
    .logo {
        top: 20px;
        right: 20px;
        z-index: 201;
    }
    
    .artist-name {
        font-size: 18px;
    }
    
    .nav-links a {
        font-size: 14px !important;
    }
    
    .artwork-container {
        padding-top: 180px;
    }
    
    .about-container {
        padding-top: 220px;
    }
    
    .about-text {
        padding: 0 20px;
    }
    
    .about-text p {
        font-size: 9pt;
        line-height: 1.5;
        text-align: left;
    }
    
    .about-text p::first-letter {
        float: left;
        font-size: 3em;
        line-height: 0.8;
        padding-right: 3px;
        padding-top: 2px;
    }
    
    .caption-copyright {
        font-size: 10px;
    }
    
    html.home-page .container {
        padding: 0;
    }
    
    body.home-page::before {
        background-size: 223%;
        background-position: 54% center;
        transform: translateY(2vh);
    }
    
    /* Background image for non-home pages on mobile - match home overlay scale and position */
    html:not(.home-page)::before {
        background-size: 223%;
        background-position: 54% center;
    }
    
    .home-slideshow {
        top: calc(51.5% - 5vh);
        right: 21%;
        transform: translateY(-50%) scale(2.231658);
    }
    
    .caption {
        bottom: calc(250px - 5vh);
    }
    
    .caption-title {
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .caption-title-main {
        font-size: 14px;
    }
    
    .caption-title-subtitle {
        font-size: 12px;
    }
    
    .caption-date {
        margin-top: 2px;
    }
    
    .caption-copyright {
        position: absolute;
        bottom: calc(1px + 5vh);
        left: 20px;
    }
    
    body.home-page {
        min-height: 110vh;
        height: 110vh;
        max-height: 110vh;
        overflow: hidden;
    }
    
    .home-bottom-section {
        display: block;
    }
    
    html.inverted-mode .home-bottom-section {
        filter: none !important;
    }
    
    .work-boxes-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .work-box-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        width: 100%;
    }
    
    .work-box-title-mobile {
        font-family: 'Courier Prime', monospace;
        font-size: 18px;
        font-weight: 400;
        color: #1a1a1a;
        text-align: center;
        display: block !important;
        margin-top: 0;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* White bar behind navigation and logo on mobile */
    .mobile-top-bar {
        display: none;
    }
    
    .scroll-to-top {
        position: fixed;
        top: 20px;
        left: -10px;
        width: 60px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .scroll-to-top.visible {
        opacity: 1;
        pointer-events: auto;
    }
    
    .scroll-to-top-arrow {
        font-size: 32px;
        color: #1a1a1a;
        font-weight: bold;
        display: block;
        filter: invert(0) !important;
    }
    
    html.inverted-mode .scroll-to-top-arrow {
        filter: none !important;
        color: #1a1a1a !important;
    }
    
    .work-boxes-container {
        padding-top: calc(180px - 10vh);
        gap: 10px;
    }
    
    .work-box {
        width: 380px !important;
        height: 507px !important;
        max-width: 380px !important;
    }
    
    .work-box-left {
        background-size: 380px 507px !important;
    }
    
    .work-box-middle {
        background-size: 380px 507px !important;
    }
    
    .work-box-right {
        background-size: 380px 507px !important;
    }
    
    .work-boxes-container {
        justify-content: center;
        align-items: center;
    }
    
    .gallery-image-wrapper {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    .gallery-page-images > .gallery-image-wrapper:first-child {
        padding-top: 80px !important;
    }
    
    .gallery-image-wrapper:not(:first-child) {
        padding-top: 0 !important;
    }
    
    .gallery-page-images {
        padding-bottom: 0 !important;
        gap: 0 !important;
    }
    
    .gallery-page-images {
        gap: 0 !important;
        padding-bottom: 0 !important;
        padding-top: 15vh !important;
    }
    
    .gallery-image-wrapper:first-child {
        padding-top: 80px !important;
    }
    
    .gallery-image-container {
        margin-bottom: 0 !important;
    }
    
    .gallery-page-image {
        height: auto;
        max-width: 100%;
        max-height: 400px;
        width: auto;
    }
    
    .gallery-image-container {
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    
    .gallery-page-image {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 0 !important;
        padding-top: 0 !important;
        display: block !important;
        vertical-align: top !important;
        object-fit: contain !important;
        object-position: top !important;
        align-self: flex-start !important;
        line-height: 0 !important;
        height: auto !important;
        max-height: 400px !important;
    }
    
    .gallery-image-container {
        line-height: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    .gallery-caption {
        margin-top: 5px !important;
        margin-bottom: 75px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 1.2 !important;
    }
    
    .gallery-image-wrapper:last-child .gallery-caption {
        margin-bottom: 75px !important;
    }
    
    .gallery-image-container {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        min-height: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .gallery-page-image {
        flex-shrink: 0 !important;
    }
    
    .gallery-image-wrapper {
        align-items: flex-start !important;
        padding-bottom: 0 !important;
    }
    
    .gallery-image-wrapper:not(:last-child) {
        padding-bottom: 0 !important;
    }
    
    .gallery-caption > div:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .gallery-caption > div:first-child {
        font-size: 14px;
    }
    
    .gallery-caption > div:last-child {
        font-size: 12px;
    }
    
    .expanded-image {
        max-width: 100%;
        max-height: 100vh;
    }
    
    .caption {
        bottom: 80px;
        padding: 0 20px;
    }
    
    .caption-title,
    .caption-date {
        font-size: 12px;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        height: auto !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        padding: 20px 15px !important;
    }
}

/* Contact Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    background-image: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 40px;
    border-radius: 0;
    max-width: none;
    width: 600px;
    height: 600px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
}

/* Invert close button X when page is inverted */
html.inverted-mode .close-modal {
    filter: invert(1);
}

.close-modal:hover {
    opacity: 0.6;
}

.modal-content h2 {
    font-family: 'Courier Prime', monospace;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-modal-title {
    height: 72px;
    width: auto;
    display: block;
    margin: 0 auto 10px auto;
}

/* Invert contact modal image when page is inverted */
html.inverted-mode .contact-modal-title {
    filter: invert(1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #2a2a2a;
    background-color: transparent;
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    font-family: 'Courier Prime', monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.send-button-image {
    height: auto;
    width: auto;
    max-height: 24px;
    display: block;
}

.submit-btn:hover {
    background-color: #333;
}

.submit-btn:active {
    opacity: 0.8;
}

/* Work Box Link */
.work-box-left {
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s ease;
    text-decoration: none;
    display: block;
}

.work-box-left:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.work-box-middle {
    background-image: url('images/sapovnela-box-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    position: relative;
    transition: opacity 0.3s, transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.work-box-middle::after {
    display: none;
}

.work-box-middle:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.work-box-middle:hover .work-box-label {
    opacity: 1;
}

.work-box-right {
    background-image: url('images/previous-work-box-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    position: relative;
    transition: opacity 0.3s, transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.work-box-right::after {
    display: none;
}

.work-box-right:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.work-box-right:hover .work-box-label {
    opacity: 1;
}

.gallery-modal-content {
    background-color: #ffffff;
    padding: 0;
    border-radius: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.close-gallery {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
    z-index: 1001;
    background-color: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-gallery:hover {
    opacity: 0.6;
}

.gallery-container {
    overflow-y: auto;
    padding: 60px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-height: 90vh;
}

.gallery-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Custom scrollbar for gallery */
.gallery-container::-webkit-scrollbar {
    width: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gallery-container::-webkit-scrollbar-thumb {
    background: #888;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Gallery Page (Full Page) */
html:not(.home-page) {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.gallery-page-container {
    width: 100%;
    position: relative;
}

.gallery-page-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 0 100px 0;
}

    .gallery-image-container .gallery-navigation {
        margin-top: 40px !important;
        margin-bottom: 80px !important;
        width: 100%;
        max-width: 800px;
    }

.gallery-image-wrapper {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 180px;
    padding-bottom: 100px;
    box-sizing: border-box;
}

.gallery-image-wrapper:first-child {
    padding-top: 120px;
}

.gallery-image-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    width: fit-content;
}

.gallery-page-image {
    width: auto;
    max-width: 100%;
    height: 600px;
    display: block;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) {
    .gallery-page-image {
        height: auto !important;
        max-height: 400px;
    }
}

.gallery-page-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.work-box-title-mobile {
    display: none;
}

.gallery-title {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.gallery-title img {
    height: auto;
    width: 100px;
    display: block;
    margin: 0 auto;
}

.gallery-caption {
    margin-top: 20px;
    text-align: left;
    font-family: 'Courier Prime', monospace;
    color: #1a1a1a;
    line-height: 1.6;
    width: 100%;
    align-self: stretch;
}


.gallery-caption > div:first-child {
    font-size: 14px;
    margin-bottom: 4px;
}

.gallery-caption > div:last-child {
    font-size: 12px;
    color: #666;
}

/* Expanded Image View */
.expanded-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.close-expanded {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
    z-index: 1001;
}

.close-expanded:hover {
    opacity: 0.6;
}

.expanded-image {
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Inverted Mode - Logo rotation and color inversion */
.logo-image {
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

html.inverted-mode {
    filter: invert(1) !important;
}

/* Exclude mobile top bar from global inversion */
@media (max-width: 768px) {
}

/* Ensure background is inverted - the filter on html should affect ::before, 
   but some browsers need explicit handling */
html.inverted-mode::before {
    will-change: filter;
}

/* Exclude PIXEL logo from inversion */
html.inverted-mode .logo-image {
    filter: invert(1);
}

/* Exclude gallery images from inversion */
html.inverted-mode .gallery-page-image,
html.inverted-mode .gallery-image,
html.inverted-mode .gallery-image-container img,
html.inverted-mode .expanded-image {
    filter: invert(1);
}

/* Exclude work box labels from global inversion and manually invert them */
html.inverted-mode .work-box-label {
    filter: invert(1);
    background-color: black;
    color: white;
}

/* Exclude modal content from inversion and set background to black when inverted */
html.inverted-mode .modal-content {
    filter: invert(1);
    background-color: #000000 !important;
}

/* Ensure text in modal is white when inverted (since we excluded modal from inversion) */
html.inverted-mode .modal-content,
html.inverted-mode .modal-content .form-group label,
html.inverted-mode .modal-content .form-group input,
html.inverted-mode .modal-content .form-group textarea,
html.inverted-mode .modal-content .submit-btn {
    color: #ffffff;
}

html.inverted-mode .modal-content .submit-btn {
    background-color: #ffffff;
    color: #000000;
}

/* Invert white background when page is inverted - make it black */
html.inverted-mode .home-slideshow-background {
    background-color: transparent;
}

@media (max-width: 768px) {
    .about-top-right {
        width: auto;
        height: 87.75px;
        top: 120px;
        right: 20px;
    }
    
}

/* Ensure body background inverts to black when page is inverted */
html.inverted-mode body.home-page {
    background-color: black;
}

html.inverted-mode body.home-page .container {
    background-color: transparent;
}

html.inverted-mode html.home-page::before {
    background-color: transparent;
}


/* Gallery Navigation */
.gallery-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 0;
}

.gallery-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-family: 'Courier Prime', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
}

.gallery-nav-link:hover {
    opacity: 0.6;
}

.gallery-nav-back {
    flex-direction: row;
}

.gallery-nav-forward {
    flex-direction: row;
    margin-left: auto;
}

.gallery-nav-label {
    display: inline-block;
}

.gallery-nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .gallery-navigation {
        margin: 40px auto calc(1px + 5vh + 30px) !important;
        padding: 0 15px;
    }
    
    .gallery-image-container .gallery-navigation {
        margin-top: 80px !important;
        margin-bottom: calc(1px + 5vh + 30px) !important;
    }
    
    
    .gallery-nav-link {
        font-size: 12px;
        gap: 6px;
    }
    
    .gallery-nav-link svg {
        width: 16px;
        height: 16px;
    }
}

