@font-face {
    font-family: "Neco";
    src: url("../images/assets/fonts/Neco-Regular.woff2") format("woff2");
    font-weight: 400;
}

@font-face {
    font-family: "Neco";
    src: url("../images/assets/fonts/Neco-Medium.woff2") format("woff2");
    font-weight: 500;
}

@font-face {
    font-family: "Neco";
    src: url("../images/assets/fonts/Neco-Bold.woff2") format("woff2");
    font-weight: 700;
}

/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body {
    font-family: "Neco", Arial, Helvetica, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(141, 84, 89, 0.42) 0%,
            rgba(55, 28, 31, 0.2) 35%,
            transparent 70%
        ),
        #070606;

    color: #ffffff;
}

body.viewer-open {
    overflow: hidden;
}

button {
    font: inherit;
}


/* =========================================
   MENU BUTTON
========================================= */

.menu-button {
    position: fixed;
    top: 28px;
    left: 28px;
    z-index: 50;

    width: 54px;
    height: 48px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border: none;
    border-radius: 10px;

    background: #c98291;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.35);
}

.menu-button span {
    width: 30px;
    height: 4px;

    border-radius: 999px;

    background: #28171b;
}

.menu-button:hover {
   background: #d3919f;

  transform: translateY(-2px);   
}


/* =========================================
   LOGO
========================================= */

.site-logo {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 50;
}

.site-logo img {
    width: 150px;
    height: auto;
    display: block;
}


/* =========================================
   MAIN GALLERY
========================================= */

.gallery {
    width: min(1500px, 92vw);

    margin: 0 auto;

    padding: 200px 0 100px;

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(145px, 1fr));

    gap: 65px 168px;
}


/* =========================================
   PROJECT CARD
========================================= */

.project-card {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================
   PREVIEW IMAGE STACK
========================================= */

.image-stack {
    position: relative;

    width: 270px;
    height: 390px;

    cursor: pointer;
    outline: none;

    transition: transform 200ms ease;
}

.image-stack:hover {
    transform: translateY(-3px);
}

.image-stack img, .image-stack video {
    position: absolute;
    inset: 0;

    width: 270px;
    height: 390px;

    will-change: transform;
    backface-visibility: hidden;

    display: block;

    object-fit: cover;

    border: 2px solid  #ffffff;
    border-radius: 25px;

    background: #181516;

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.52),
        0 0 10px rgba(255, 255, 255, 0.08);

    pointer-events: none;
    user-select: none;

    transition:
        transform 620ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 420ms ease;
}


/* =========================================
   PREVIEW ORDER: 123
========================================= */

/* Image 1: front */
.image-stack img:nth-child(1),
.image-stack video:nth-child(1) {
    z-index: 3;
    transform: translate(0, 0) rotate(0deg);
    filter: brightness(1);
}

/* Image 2: middle */
.image-stack img:nth-child(2),
.image-stack video:nth-child(2) {
    z-index: 2;
    transform: translate(-10px, -7px) rotate(-1deg);
    filter: brightness(0.84);
}

/* Image 3: back */
.image-stack img:nth-child(3),
.image-stack video:nth-child(3) {
    z-index: 1;
    transform: translate(-20px, -14px) rotate(-2deg);
    filter: brightness(0.7);
}

/* =========================================
   PREVIEW ORDER: 231
========================================= */

/* Image 2: front */
.image-stack.order-231 img:nth-child(2),
.image-stack.order-231 video:nth-child(2) {
    z-index: 3;
    transform: translate(0, 0) rotate(0deg);
    filter: brightness(1);
}

/* Image 3: middle */
.image-stack.order-231 img:nth-child(3),
.image-stack.order-231 video:nth-child(3) {
    z-index: 2;
    transform: translate(-10px, -7px) rotate(-1deg);
    filter: brightness(0.84);
}

/* Image 1: back */
.image-stack.order-231 img:nth-child(1),
.image-stack.order-231 video:nth-child(1) {
    z-index: 1;
    transform: translate(-20px, -14px) rotate(-2deg);
    filter: brightness(0.7);
}

/* =========================================
   PREVIEW ORDER: 312
========================================= */

/* Image 3: front */
.image-stack.order-312 img:nth-child(3),
.image-stack.order-312 video:nth-child(3) {
    z-index: 3;
    transform: translate(0, 0) rotate(0deg);
    filter: brightness(1);
}

/* Image 1: middle */
.image-stack.order-312 img:nth-child(1),
.image-stack.order-312 video:nth-child(1) {
    z-index: 2;
    transform: translate(-10px, -7px) rotate(-1deg);
    filter: brightness(0.84);
}

/* Image 2: back */
.image-stack.order-312 img:nth-child(2),
.image-stack.order-312 video:nth-child(2) {
    z-index: 1;
    transform: translate(-20px, -14px) rotate(-2deg);
    filter: brightness(0.7);
}

/* =========================================
   PROJECT NAME
========================================= */

.project-name {
    width: 270px;
    min-height: 50px;

    margin-top: 22px;
    padding: 9px 14px;

    border: none;
    border-radius: 999px;

    background: #c98291;
    color: #221d1e;

    font-size: 22px;
    font-weight: 600;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.3);
}

.project-name:hover {
  background: #d3919f;

  transform: translateY(-2px);
}


/* =========================================
   PROJECT VIEWER
========================================= */

.project-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;

    overflow-y: auto;

    padding: 28px 26px 55px;

    background: rgba(5, 4, 4, 0.72);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 240ms ease,
        visibility 240ms ease;
}

.project-viewer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.viewer-content {
    width: min(1200px, 94vw);
    min-height: calc(100vh - 56px);

    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =========================================
   PROJECT VIEWER CLOSE
========================================= */

.viewer-close {
    position: fixed;
    top: 18px;
    right: 28px;
    z-index: 1100;

    width: 58px;
    height: 58px;

    border: none;

    background: transparent;
    color: #ffffff;

    font-size: 58px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================
   VIEWER TITLE
========================================= */

.viewer-title {
    width: min(720px, 74vw);
    min-height: 62px;

    margin-bottom: 22px;
    padding: 12px 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 45px;

    background: #c98291;
    color: #241e20;

    font-size: clamp(60px, 2vw, 70px);
    text-align: center;
}


/* =========================================
   MAIN IMAGE AREA
========================================= */

.viewer-stage {
    position: relative;

    width: fit-content;

    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewport {
    width: auto;
    height: auto;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #c98291;
    border-radius: 10px;

    background: #171214;

    cursor: zoom-in;
}

.viewer-main-image {
    display: block;

    width: auto;
    height: auto;

    max-width: auto;
    max-height: 720px;

    object-fit: contain;

    pointer-events: none;
    user-select: none;
}

/* =========================================
   VIEWER ARROWS
========================================= */

.viewer-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;

    width: 66px;
    height: 210px;

    border: none;

    background: transparent;
    color: #ffffff;

    font-size: 130px;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);
}

.viewer-left {
    left: -78px;
}

.viewer-right {
    right: -78px;
}


/* =========================================
   ZOOM TEXT
========================================= */

.zoom-hint {
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.64);

    font-size: 12px;
}


/* =========================================
   THUMBNAILS
========================================= */

.viewer-thumbnails {
    width: min(1120px, 91vw);

    margin-top: 18px;
    padding: 7px 6px 13px;

    display: flex;
    gap: 9px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;

    scrollbar-color:
        #d39aa5
        rgba(255, 255, 255, 0.1);
}

.viewer-thumbnail {
    flex: 0 0 auto;

    width: 145px;
    height: 88px;

    padding: 0;

    overflow: hidden;

    border: 3px solid transparent;
    border-radius: 8px;

    background: #171414;

    opacity: 0.64;

    cursor: pointer;
}

.viewer-thumbnail.active {
    opacity: 1;
    border-color: #c98291;
}

.viewer-thumbnail img,
.viewer-thumbnail video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =========================================
   DESCRIPTION
========================================= */

.description-section {
    width: min(900px, 91vw);

    margin-top: 24px;
    padding: 20px;

    border: 1px solid rgba(226, 160, 173, 0.38);
    border-radius: 28px;

    background: rgba(18, 13, 15, 0.98);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.65);

}

.description-heading {
    margin-bottom: 10px;

    font-size: 25px;
}

.description-box {
    max-height: 220px;

    padding-right: 14px;

    overflow-y: hidden;

    color: rgba(255, 255, 255, 0.84);

    font-size: 20px;
    font-weight: 400;
    line-height: 1.7;

    white-space: pre-line;

    scrollbar-color:
        #d39aa5
        rgba(255, 255, 255, 0.1);
}

.description-section.expanded .description-box {
    max-height: none;
    overflow: visible;
}

.description-toggle:hover {
    background: #d3919f;

     transform: translateY(-2px);

}

.description-toggle {
    margin-top: 16px;
    padding: 9px 18px;

    border: none;
    border-radius: 999px;

    background: #c98291;
    color: #271f21;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.description-toggle[hidden] {
    display: none;
}

.description-box a,
.description-box a:visited {
    color: #ecc9cf;
    font-weight: 700;
}

.description-box a:hover {
    color: #ffffff;
}

/* =========================================
   FULLSCREEN ZOOM
========================================= */

.fullscreen-zoom {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.88);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 200ms ease,
        visibility 200ms ease;
}

.fullscreen-zoom.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fullscreen-zoom-stage {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    cursor: grab;
    touch-action: none;
    user-select: none;
}

.fullscreen-zoom-stage.dragging {
    cursor: grabbing;
}

.fullscreen-zoom-stage img {
    max-width: 90vw;
    max-height: 90vh;

    display: block;

    object-fit: contain;

    pointer-events: none;
    user-select: none;

    transform-origin: center;
    will-change: transform;
}

.fullscreen-zoom-close {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 10000;

    width: 58px;
    height: 58px;

    border: none;

    background: transparent;
    color: rgb(255, 255, 255);

    font-size: 60px;
    line-height: 1;

    cursor: pointer;
}

/* =========================================
   hamburger menu
========================================= */

body.menu-open {
    overflow: hidden;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 220ms ease,
        visibility 220ms ease;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.55);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.side-menu {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 14px;

    width: min(320px, calc(100vw - 28px));

    padding: 35px 28px;

    display: flex;
    flex-direction: column;
    gap: 14px;

    border: 1px solid rgba(226, 160, 173, 0.35);
    border-radius: 24px;

    background: rgba(18, 13, 15, 0.94);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55);

    transform: translateX(-110%);

    transition:
        transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-overlay.open .side-menu {
    transform: translateX(0);
}

.menu-close {
    position: absolute;
    top: 14px;
    right: 18px;

    border: none;
    background: transparent;
    color: white;

    font-size: 42px;
    cursor: pointer;
}

.menu-logo {
    width: 250px;
    height: auto;

    margin: 10px auto 28px;
}

.side-menu a {
    padding: 14px 18px;

    border-radius: 14px;

    color: white;
    text-decoration: none;

    font-size: 20px;

    transition:
        background 180ms ease,
        color 180ms ease;
}

.side-menu a:hover,
.side-menu a.active {
    background: #c98291;
    color: #28171b;
}

/* =========================================
   SCROLLBARS
========================================= */

* {
    scrollbar-width: thin ;
    scrollbar-color: #c98291 #181012 ;
}

*::-webkit-scrollbar {
    width: 12px ;
    height: 12px ;
}

*::-webkit-scrollbar-track {
    background: #181012 ;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    border: 3px solid #181012 ;
    border-radius: 999px;

    background: linear-gradient(
        180deg,
        #e4a9b7,
        #a85f70
    ) ;
}

*::-webkit-scrollbar-thumb:hover {
    background: #ecc9cf ;
}

*::-webkit-scrollbar-corner {
    background: #181012 ;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {
    .viewer-stage {
        width: 86vw;
    }

    .viewer-left {
        left: -45px;
    }

    .viewer-right {
        right: -45px;
    }

    .viewer-arrow {
        font-size: 68px;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {
    .menu-button {
        top: 18px;
        left: 18px;

        width: 48px;
        height: 43px;
    }

    .site-logo {
        top: 18px;
        right: 18px;
    }

    .site-logo img {
        width: 48px;
    }

    .gallery {
        width: 90vw;

        padding-top: 110px;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 55px 28px;
    }

    .image-stack,
    .image-stack img, 
    .image-stack video {
        width: 115px;
        height: 170px;
    }

    .project-name {
        width: 115px;
    }

    .project-viewer {
        padding: 18px 12px 38px;
    }

    .viewer-close {
        top: 7px;
        right: 8px;

        font-size: 48px;
    }

    .viewer-title {
        width: 72vw;
        min-height: 48px;

        margin-bottom: 14px;

        font-size: 18px;
    }

    .viewer-stage {
        width: 92vw;
    }

    .image-viewport {
        height: 58vh;
        min-height: 340px;
    }

    .viewer-arrow {
        width: 42px;
        font-size: 56px;
    }

    .viewer-left {
        left: 0;
    }

    .viewer-right {
        right: 0;
    }

    .viewer-thumbnail {
        width: 105px;
        height: 68px;
    }

    .description-section {
        padding: 17px;
    }

    .fullscreen-zoom-stage img {
        max-width: 96vw;
        max-height: 88vh;
    }

    .fullscreen-zoom-close {
        top: 10px;
        right: 10px;

        font-size: 50px;
    }
};

