body {
    font-family: 'Inclusive Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    font-size: larger;
    box-sizing: border-box;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

nav {
    height: 150px;
}

nav img {
    height: 120px;
    width: auto;
}

@media (max-width: 768px) {
    nav {
        height: 100px;
    }

    nav img {
        height: 80px;
    }
}

.hero {
    max-width: 100%;
    height: 500px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: #D3D3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: "Young Serif", serif;
    border: 2px solid;
}

.hero h1 {
    font-size: 10rem;
    margin: 0;
}

.hero h2 {
    font-size: 6rem;
    margin: 0;
}   

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Young Serif", serif;
}

.projects-gallery {
    background: transparent;
    max-width: 75%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .projects-gallery {
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .hero {
        height: 300px;
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 5rem;
    }
}

.project-card {
    display: flex;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.project-card:hover {
    animation: wiggle 0.5s ease-in-out infinite;
}

@keyframes wiggle {
    0% {
        rotate: 0deg;
        translate: 0 0
    }

    25% {
        rotate: -2deg;
        translate: -5px 0
    }

    80% {
        rotate: 2deg;
        translate: 5px 0
    }
}

.box-container {
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    width: 100%;
}

.box-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.box-card {
    width: 300px;
    height: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease;
    cursor: pointer;
}

.box-card:hover {
    animation: rotate3d 8s infinite linear;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: visible;
    border-radius: 12px;
    background: linear-gradient(145deg, #2a2a2a, #383838);
    border: 2px solid black;
    transition: all 0.3s ease;
    overflow: hidden;
}

.face::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    top: -100%;
    left: -100%;
    transition: all 0.5s ease;
    transform: translateZ(20px);
}

.face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.face:hover::before {
    top: 100%;
    left: 100%;
}

.face:hover::after {
    opacity: 1;
}

.front {
    transform: translateZ(150px);
}

.back {
    transform: translateZ(-150px) rotateY(180deg);
}

.right {
    transform: translateX(150px) rotateY(90deg);
}

.left {
    transform: translateX(-150px) rotateY(-90deg);
}

.top {
    transform: translateY(-150px) rotateX(90deg);
}

.bottom {
    transform: translateY(150px) rotateX(-90deg);
}

@keyframes rotate3d {
    0% {
        transform: rotateX(0) rotateY(0);
    }

    25% {
        transform: rotateX(90deg) rotateY(90deg);
    }

    50% {
        transform: rotateX(180deg) rotateY(180deg);
    }

    75% {
        transform: rotateX(270deg) rotateY(270deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@media (max-width: 768px) {
    .box-card {
        width: 210px;
        height: 210px;
    }

    .front {
        transform: translateZ(105px);
    }

    .back {
        transform: translateZ(-105px) rotateY(180deg);
    }

    .right {
        transform: translateX(105px) rotateY(90deg);
    }

    .left {
        transform: translateX(-105px) rotateY(-90deg);
    }

    .top {
        transform: translateY(-105px) rotateX(90deg);
    }

    .bottom {
        transform: translateY(105px) rotateX(-90deg);
    }
}


.trash-thrash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    padding: 5rem;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    width: 100%;
}

.trash-thrash-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.trash-thrash-grid .div2 {
    grid-column: span 2 / span 2;
}

.trash-thrash-grid .div3 {
    grid-row-start: 2;
}

.trash-thrash-grid .div4 {
    grid-row-start: 2;
}

.trash-thrash-grid .div5 {
    grid-row-start: 2;
}

.trash-thrash-grid .div6 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
}

.trash-thrash-grid .div7 {
    grid-column-start: 3;
    grid-row-start: 3;
}

.trash-thrash-grid .div8 {
    grid-column-start: 3;
    grid-row-start: 4;
}

@media (max-width: 1024px) {
    .trash-thrash-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        padding: 3rem;
    }

    .trash-thrash-grid .div2 {
        grid-column: span 1 / span 1;
    }

    .trash-thrash-grid .div3,
    .trash-thrash-grid .div4,
    .trash-thrash-grid .div5,
    .trash-thrash-grid .div6,
    .trash-thrash-grid .div7,
    .trash-thrash-grid .div8 {
        grid-row-start: auto;
        grid-column-start: auto;
    }
}

@media (max-width: 768px) {
    .trash-thrash-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 0;
        gap: 4px;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .trash-thrash-grid>div {
        grid-column: 1 !important;
        grid-row: auto !important;
        width: 100%;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
    }

    .trash-thrash-grid img {
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .trash-thrash-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 2rem;
        gap: 4px;
        width: auto;
        overflow: hidden;
    }

    .trash-thrash-grid>div {
        grid-column: 1 !important;
        grid-row: auto !important;
        width: auto;
    }

    .trash-thrash-grid img {
        width: 100%;
        height: auto;
    }
}

.fleshwalk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, auto);
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 5rem;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    width: 100%;
}

.fleshwalk-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    justify-self: center;
    align-self: center;
}

.fleshwalk-grid .div1 {
    grid-column: 3 / span 2;
    grid-row: 1;
}

.fleshwalk-grid .div2 {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.fleshwalk-grid .div2 img:hover {
    animation: rotation 10s infinite;
}

@keyframes rotation {
    100% {transform: rotate(360deg);}
  }

.fleshwalk-grid .div3 {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
}

.fleshwalk-grid .div4 {
    grid-column: 3 / span 2;
    grid-row: 2 / span 2;
}

.fleshwalk-grid .div5 {
    grid-row-start: 4;
    grid-column: 1;
}

.fleshwalk-grid .div6 {
    grid-row-start: 4;
    grid-column: 2;
}

.fleshwalk-grid .div7 {
    grid-row-start: 4;
    grid-column: 3;
}

.fleshwalk-grid .div8 {
    grid-row-start: 4;
    grid-column: 4;
}

.mystic-marsh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0px 5rem 5rem 5rem;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
    width: 100%;
}

.mystic-marsh-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    justify-self: center;
    align-self: center;
}
    
.mystic-marsh-grid .div1 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
}

.mystic-marsh-grid .div2 {
    grid-column: span 2 / span 2;
    grid-row: span 2 / span 2;
    grid-column-start: 3;
}

.mystic-marsh-grid .div3 {
    grid-row-start: 3;
}

.mystic-marsh-grid .div4 {
    grid-row-start: 3;
}

.mystic-marsh-grid .div5 {
    grid-row-start: 3;
}

.mystic-marsh-grid .div6 {
    grid-row-start: 3;
}

.mystic-marsh-grid .viewer-slot {
    position: relative;
    min-height: clamp(280px, 36vw, 560px);
    overflow: hidden;
    background: transparent;
}

.fbx-viewer {
    position: absolute;
    inset: 0;
}

.fbx-viewer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
    cursor: grab;
}

.fbx-viewer canvas:active {
    cursor: grabbing;
}

@media (max-width: 1024px) {
    .mystic-marsh-grid .viewer-slot {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .mystic-marsh-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 0 1rem 2rem;
    }

    .mystic-marsh-grid .div1,
    .mystic-marsh-grid .div2,
    .mystic-marsh-grid .div3,
    .mystic-marsh-grid .div4,
    .mystic-marsh-grid .div5,
    .mystic-marsh-grid .div6 {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .mystic-marsh-grid .viewer-slot {
        min-height: 300px;
    }
}
        