body {
    background-color: #0c0c0c !important;
}

.sticky-info {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
}
.back-nav-container {
    position: static;
    top: 120px;
    z-index: 1000;
}

.projects-title {
    color: var( --text-primary) !important;
    margin: 40px 0 16px;
}

.description {
    max-width: 40ch; 
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-character; 
    word-spacing: normal;  
    letter-spacing: -0.35px; 
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}


@media (max-width: 992px) {
    .back-nav-container {
        position: static;
        top: 0;
        left: 0;
        padding: 10px;
        margin-bottom: 10px;
    }
}

.btn-back-projects {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(18,18,18,0.8);
    color: var(--text-primary);
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.btn-back-projects:hover {
    color: var( --accent-yellow); ;
    border-color: var( --accent-yellow) ;
    background: var(--bg-secondary);
    transform: translateX(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    column-gap: 32px;
    row-gap: 20px;
}

@media (max-width: 991px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
}

.project-box {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid #333;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165,0.84,0.44,1);
}

.project-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165,0.84,0.44,1);
}

.project-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff40;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.project-box:hover::after {
    opacity: 1;
}
.project-caption {
    font-size: 15px;
    line-height: 1.6;
}


.image-modal {
    position: fixed;
    inset: 0;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    touch-action: pan-y;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    letter-spacing: 1px;
    margin-top: 10px;
}
.modal-counter{
    font-size: 12px
}
.modal-caption {
    font-size: 15px;
}
.modal-img-wrapper {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 85%;
    max-height: 85%;
    border-radius: 10px;
    cursor: zoom-in;
}
.image-modal:fullscreen {
    cursor: auto !important;
}
.image-modal:-webkit-full-screen {
    cursor: auto !important;
}
.image-modal:-moz-full-screen {
    cursor: auto !important;
}
:fullscreen {
    cursor: auto !important;
}

#fullscreenBtn{
    position: absolute;
    right: 80px;
    width: 44px;
    height: 44px;
}

.modal-close {
    position: absolute;
    top: -4px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}

.modal-close::before {
    content: "";
    position: absolute;
    inset: 0;
}

.modal-close:hover {
    color: #ffffff;
    transform: scale(1.2);
    background: rgb(255, 0, 0);
    opacity: 1;
    transform: scale(1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover::before {
    opacity: 1;
    transform: scale(1);
    background: rgba(255,0,0,0.08);
}


.modal-nav {
    position: absolute;
    top: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
}

.modal-nav.prev { left: 30px; }
.modal-nav.next { right: 30px; }

.modal-nav:hover {
    color: var(--accent-yellow) ;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 25px rgba(255,215,0,0.25);
}

.modal-toolbar {
    position: absolute;
    display: flex;
    gap: 14px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.modal-content:hover .modal-toolbar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.modal-tool {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-tool:hover {
    background: var(--accent-yellow);
    color: #000;
    transform: scale(1.15);
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border: 1.2px solid var(--accent-yellow) ;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-yellow);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 2147483647;
}
.project-thumb{
    cursor: pointer;
}
.fake-cursor,
.cursor-halo {
    z-index: 100000 !important;
    pointer-events: none;
}

@media (min-width: 992px) {
    .modal-toolbar {
        top: 25px;
        right: 240px;
    }
}
@media (max-width: 576px) {
    .modal-toolbar {
        top: 10px;
        right: 25px;
    }
    .modal-toolbar {
        gap: 8px;         
        padding: 4px 8px; 
    }

    .modal-tool {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

}

@media (hover: none) and (pointer: coarse) {

    .fake-cursor,
    .cursor-halo {
        display: none !important;
    }

    body.fake-active,
    body.fake-active * {
        cursor: auto !important;
    }
    .custom-cursor,
    .cursor-halo,
    .fake-cursor {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
}
@media (max-width: 768px) {
    .custom-cursor,
    .cursor-halo,
    .fake-cursor {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
    .modal-counter {
        position: absolute;
        top: -10px;   
        left: 25px;    
        right: auto;   
        text-align: left;
    }
}
@media (hover: none) and (pointer: coarse) {

    .modal-toolbar {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        background: rgba(0,0,0,0.3);
        padding: 6px;
        border-radius: 30px;

}
}
.hero-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.hero-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.projects-masonry {
    column-count: 3;
    column-gap: 20px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

.masonry-item img {
    width: 100%;
    border-radius: 12px;
    display: block;
}


.split-layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.split-row {
    display: flex;
    align-items: center;
    gap: 40px;
}

.split-row.reverse {
    flex-direction: row-reverse;
}

.split-image,
.split-text {
    flex: 1;
}

.split-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.split-text h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.split-text p {
    color: #ccc;
    line-height: 1.6;
}

.magazine-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-auto-rows: 250px;
    gap: 20px;
}

.magazine-big {
    grid-row: span 2;
}

.magazine-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.magazine-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

@media (max-width: 768px) {
    
    .split-layout {
        display: grid;
        grid-template-columns: 1fr; 
        gap: 16px; 
        padding: 16px;
    }

    .split-row {
        display: block; 
        width: 100%;
        margin-bottom: 0 !important; 
    }

    .split-image {
        width: 100%;
        aspect-ratio: 4 / 3; 
        overflow: hidden;
        border-radius: 12px; 
    }

    .split-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
        display: block;
    }
}

@media (max-width: 991px) {
    .projects-masonry {
        column-count: 2;
    }

    .magazine-layout {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .magazine-big {
        grid-row: span 2;
    }
}

@media (max-width: 576px) {
    .projects-masonry {
        column-count: 1;
    }
    .magazine-layout {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .magazine-big {
        grid-row: span 2;
    }
}
@media (max-width: 991px) {
    .sticky-info {
        position: relative; 
        max-height: none; 
        overflow-y: visible; 
        padding-right: 0;
        top: 0;
    }
    .description {
        text-align: left;
        text-justify: none; 
        letter-spacing: normal; 
        word-spacing: normal; 
        line-height: 1.5; 
        -webkit-hyphens: none;
        hyphens: none;
        word-break: normal;
        width: 100%;
        max-width: 100%;
        margin-bottom: 25px;
    }
}