/* Font Declarations */
@font-face {
    font-family: 'HONTINE';
    src: url('../fonts/hontine/hontine.eot');
    src: url('../fonts/hontine/hontine.eot?#iefix') format('embedded-opentype'),
         url('../fonts/hontine/hontine.woff2') format('woff2'),
         url('../fonts/hontine/hontine.woff') format('woff'),
         url('../fonts/hontine/hontine.ttf') format('truetype'),
         url('../fonts/hontine/hontine.svg#youworkforthem') format('svg');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-regular.eot');
    src: url('../fonts/403mono/403-mono-regular.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-regular.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-regular.woff') format('woff'),
         url('../fonts/403mono/403-mono-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-medium.eot');
    src: url('../fonts/403mono/403-mono-medium.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-medium.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-medium.woff') format('woff'),
         url('../fonts/403mono/403-mono-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-semibold.eot');
    src: url('../fonts/403mono/403-mono-semibold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-semibold.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-semibold.woff') format('woff'),
         url('../fonts/403mono/403-mono-semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-bold.eot');
    src: url('../fonts/403mono/403-mono-bold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-bold.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-bold.woff') format('woff'),
         url('../fonts/403mono/403-mono-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-exbold.eot');
    src: url('../fonts/403mono/403-mono-exbold.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-exbold.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-exbold.woff') format('woff'),
         url('../fonts/403mono/403-mono-exbold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: '403 Mono';
    src: url('../fonts/403mono/403-mono-black.eot');
    src: url('../fonts/403mono/403-mono-black.eot?#iefix') format('embedded-opentype'),
         url('../fonts/403mono/403-mono-black.woff2') format('woff2'),
         url('../fonts/403mono/403-mono-black.woff') format('woff'),
         url('../fonts/403mono/403-mono-black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

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

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

@keyframes fadeInBox {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
}

body {
    background-color: #ECDED5;
}

/* Hide boxes before animations start */
.square-box {
    opacity: 0;
}

/* Fade in animations when loaded */
body.loaded .square-box {
    animation: fadeInBox 1s ease-out forwards;
}

body.loaded .box-1 {
    animation-delay: 0.2s;
}

body.loaded .box-2 {
    animation-delay: 0.4s;
}

body.loaded .box-3 {
    animation-delay: 0.6s;
}

#wrapper {
    width: 90vw;
    height: 100vh;
    margin: 0 auto;

}

.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-bottom: 1px dotted #000000;
    margin-top: 60px;
}

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    font-size: 14px;
    padding: 8px 16px;
}

.btn {
    font-family: '403 Mono';
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #000000;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 100px;
    font-weight: 300;
    font-size: 16px;
    text-transform: uppercase;
    color: #000000;
}

.btn:hover {
    background-color: #790000;
    color: #ECDED5;
    stroke-width: 1px solid #790000;
}

.nav-btn.active {
    background-color: #790000;
    color: #ECDED5;
}

.nav-btn.active:hover {
    background-color: #790000;
    color: #ECDED5;
}

#shuffle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 200px;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

#toggle-grab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 200px;
    position: absolute;
    top: 45%;
    right: -15px;
    transform: translateY(-50%);
    z-index: 50;
}

#shuffle-btn img,
#toggle-grab-btn img {
    width: 20px;
    height: 20px;
    display: block;
    transition: filter 0.3s ease;
}

/* Smooth transition only when hovering on */
#toggle-grab-btn:hover .grab-icon,
#toggle-grab-btn:hover .grab-off-icon,
#toggle-grab-btn.active:hover .grab-icon,
#toggle-grab-btn.active:hover .grab-off-icon {
    transition: opacity 0.3s ease;
}

/* Position both grab icons in the same place */
#toggle-grab-btn .grab-icon,
#toggle-grab-btn .grab-off-icon {
    position: absolute;
}

/* When grab is OFF (default), show grab-off icon */
#toggle-grab-btn .grab-icon {
    opacity: 0;
}

#toggle-grab-btn .grab-off-icon {
    opacity: 1;
}

/* When grab is OFF and hovering, show grab icon (preview of turning on) */
#toggle-grab-btn:hover .grab-icon {
    opacity: 1;
}

#toggle-grab-btn:hover .grab-off-icon {
    opacity: 0;
}

/* When grab is ON (active), show grab icon, hide grab-off */
#toggle-grab-btn.active .grab-icon {
    opacity: 1;
}

#toggle-grab-btn.active .grab-off-icon {
    opacity: 0;
}

/* When grab is ON and hovering, show grab-off icon (preview of turning off) */
#toggle-grab-btn.active:hover .grab-icon {
    opacity: 0;
}

#toggle-grab-btn.active:hover .grab-off-icon {
    opacity: 1;
}

#shuffle-btn:hover img,
#toggle-grab-btn:hover img {
    filter: brightness(0) saturate(100%) invert(91%) sepia(9%) saturate(434%) hue-rotate(332deg) brightness(97%) contrast(90%);
}

.rotate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 200px;
    position: absolute;
    z-index: 50;
}

#rotate-left-btn {
    left: -15px;
    top: 45%;
    transform: translateY(-50%);
}

#rotate-left-btn img {
    transform: rotate(-90deg);
}

#reset-btn {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.rotate-btn img {
    width: 20px;
    height: 20px;
    display: block;
    transition: filter 0.3s ease;
}

.rotate-btn:hover img {
    filter: brightness(0) saturate(100%) invert(91%) sepia(9%) saturate(434%) hue-rotate(332deg) brightness(97%) contrast(90%);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 40px;
    height: 75vh;
    position: relative;
    margin-top: 3vh;
    padding: 80px;
}

.column {
    position: relative;
    z-index: 0;
}

.column-2::before, .column-3::before, .column-4::before, .column-5::before,
.column-6::before, .column-7::before, .column-8::before, .column-9::before,
.column-10::before, .column-11::before, .column-12::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(121, 0, 0, 0.1);
    z-index: 0;
}

.square-box {
    position: absolute;
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                scale 0.3s ease;
}

.square-box.dragging {
    transition: none;
}

.box-1 {
    z-index: 20;
    display: block;
}

.box-2 {
    z-index: 30;
    display: block;
}

.box-3 {
    z-index: 10;
    display: block;
}

.box-3 img {
    width: 100%;
    border: 3px solid #790000;
    transform: rotate(3deg);
}

.box-3 img:hover {
    opacity: 1;
}

.box-1.grab-enabled:hover,
.box-2.grab-enabled:hover,
.box-3.grab-enabled:hover {
    scale: 1.02;
}

h1 {
    font-family: 'HONTINE';
    font-style: normal;
    font-weight: 700;
    font-size: 96px;
    line-height: 106px;
    text-transform: uppercase;
    color: #790000;
    transition: all 0.3s ease;
}

h1 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

h1 a:hover {
    color: #790000;
}

h2 {
    font-family: '403 Mono';
    font-style: normal;
    font-weight: 300;
    font-size: 36px;
    line-height: 51px;
    text-align: left;
    text-transform: uppercase;
    color: #000000;
}

.box-1 h2 {
    text-align: justify;
}



h3 {
    font-family: '403 Mono';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 23px;
    text-transform: uppercase;
    color: #790000;
}

p {
    font-family: '403 Mono';
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 17px;
    text-align: justify;
    color: #790000;
    padding-bottom: 30px;
}

a {
    text-decoration: none;
}

/* Corner Labels (Desktop) */
.corners {
    display: block;
    z-index: 100;
    width: 190px;
    height: 20px;
    position: absolute;
}

#creativedirection {
    top: 0;
    left: 0;
}

#codetech {
    top: 90px;
    right: -90px;
    transform: rotate(90deg);
}

#interactiondesign {
    bottom: 0px;
    right: 0px;
}

#graphicdesign {
    bottom: 90px;
    left: -90px;
    transform: rotate(-90deg);
}

/* Scrolling Labels (Mobile Only) */
.scroll-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px dotted #000000;
    padding: 15px 0;
    background-color: #ECDED5;
    display: none;
}

.scroll-top {
    margin-top: 20px;
    border-top: none;
}

.scroll-bottom {
    margin-bottom: 20px;
    border-top: 1px dotted #000000;
}

.scroll-content {
    display: inline-block;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.scroll-top .scroll-content {
    animation-name: scrollLeft;
    animation-duration: 30s;
}

.scroll-bottom .scroll-content {
    animation-name: scrollRight;
    animation-duration: 30s;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.scroll-label {
    font-family: '403 Mono';
    font-size: 16px;
    font-weight: 300;
    text-transform: uppercase;
    color: #790000;
    padding: 0 20px;
    display: inline-block;
}

footer {
    display: flex;
    width: 100%;
    padding-top: 80px;
}

footer p {
    margin: auto;
    text-transform: uppercase;
}

#heart {
    color: red;
}

/* Projects Page */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 3vh;
}

.projects-header h2 {
    font-size: 28px;
}

#category-filter {
    font-size: 14px;
    padding: 8px 30px 8px 16px;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("/images/icons/dropdown-arrow.svg");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 8px;
    transition: background-image 0.3s ease;
}

#category-filter:hover {
    background-image: url("/images/icons/dropdown-arrow-hover.svg");
}

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

#projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 80px;
    position: relative;
}

.project-card {
    cursor: pointer;
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card.loaded {
    animation: fadeInUp 1s ease-out forwards;
}

.project-card.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.project-card.filtering-out {
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.filtering-in {
    opacity: 1;
    transform: scale(1);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    /* border: 3px solid #790000; */
    border-radius: 20px;
    margin-bottom: 15px;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

/* .project-card:hover .project-image img {
    transform: scale(1.05);
} */

.project-info h3 {
    font-family: '403 Mono';
    font-style: normal;
    font-weight: 300;
    font-size: 16px;
    line-height: 23px;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 5px;
}

.project-role, .project-client {
    font-family: '403 Mono';
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 17px;
    color: #790000;
    padding-bottom: 5px;
    text-align: left;
}

main {
    padding: 0 5vw;
}

/* Individual Project Page */
#project-detail {
    margin-top: 3vh;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-back {
    margin-bottom: 30px;
}

.hero-media {
    width: 100%;
    /* border: 3px solid #790000; */
    margin-bottom: 30px;
    border-radius: 20px;
}

.hero-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 30px;
    border: 3px solid #790000;
}

.hero-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-header {
    margin-bottom: 30px;
}

.project-header h2 {
    margin-bottom: 15px;
}

.project-meta {
    font-family: '403 Mono';
    font-size: 14px;
    line-height: 20px;
    color: #790000;
    padding-bottom: 5px;
}

.project-meta strong {
    color: #000000;
}

.project-description {
    margin-bottom: 30px;
}

.project-description p {
    font-family: '403 Mono';
    font-size: 14px;
    line-height: 22px;
    color: #000000;
    text-align: left;
}

.project-description iframe {
    display: block;
    margin: 20px 0;
    border-radius: 20px;
    overflow: hidden;
}

.case-study {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(121, 0, 0, 0.05);
    border-left: 3px solid #790000;
}

.support-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.support-thumbnail {
    cursor: pointer;
    /* border: 3px solid #790000; */
    overflow: hidden;
    /* aspect-ratio: 16 / 9; */
    transition: transform 0.3s ease;
    /* background-color: aqua; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-thumbnail:hover {
    transform: scale(1.05);
}

.support-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    aspect-ratio: 1/1;
}

.external-links {
    margin-bottom: 30px;
}

.external-links h3 {
    margin-bottom: 10px;
}

.external-links ul {
    list-style: none;
    padding: 0;
}

.external-links li {
    margin-bottom: 8px;
}

.external-links a {
    font-family: '403 Mono';
    font-size: 14px;
    color: #790000;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.external-links a:hover {
    color: #000000;
}

.project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-tag {
    font-family: '403 Mono';
    font-size: 12px;
    padding: 5px 15px;
    border: 1px solid #790000;
    color: #790000;
    text-transform: uppercase;
    border-radius: 100px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-tag:hover {
    background-color: #790000;
    color: #ECDED5;
}

.project-navigation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    pointer-events: none;
    z-index: 100;
}

.project-navigation .btn {
    position: absolute;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 40px;
    width: 40px;
    border-radius: 200px;
    padding: 0;
    pointer-events: auto;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-navigation .btn .arrow {
    display: inline-block;
    pointer-events: none;
    transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-navigation .btn .text {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-navigation .btn:hover {
    width: auto;
    padding: 0 20px;
    border-radius: 100px;
}

.project-navigation .btn:hover .text {
    max-width: 200px;
    opacity: 1;
}

.project-navigation .prev-project:hover .arrow {
    margin-right: 8px;
}

.project-navigation .next-project:hover .arrow {
    margin-left: 8px;
}

.project-navigation .prev-project {
    left: 0;
}

.project-navigation .next-project {
    right: 0;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

#lightbox.hidden {
    display: none;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

#lightbox-video {
    width: 80vw;
    height: 45vw;
    max-height: 90vh;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #ECDED5;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: #ECDED5;
    border: none;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    z-index: 1001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #000000;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: #ECDED5;
    border-left: 1px solid #790000;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 80px 40px 40px 40px;
    gap: 0;
}

.mobile-nav-link {
    font-family: '403 Mono';
    font-size: 18px;
    font-weight: 300;
    text-transform: uppercase;
    color: #790000;
    text-decoration: none;
    padding: 20px 0;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.mobile-nav-link:hover {
    color: #790000;
    padding-left: 10px;
}

.mobile-contact {
    border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Header */
    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        display: none;
    }

    .header-section {
        margin-top: 30px;
        padding-bottom: 10px;
        align-items: center;
    }

    .header-section h1 {
        font-size: 72px;
        line-height: 52px;
        color:#790000;
    }

    .mobile-menu-toggle {
        align-self: center;
        position: relative;
        top: -5px
    }

    /* Grid Container */
    .grid-container {
        height: auto;
        min-height: 80vh;
        padding: 40px 20px;
        margin-top: 2vh;
        display: flex;
        flex-direction: column;
        gap: 30px;
        position: relative;
    }

    /* Hide grid columns on mobile */
    .column {
        display: none;
    }

    /* Boxes - stack vertically */
    .square-box {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        transition: none !important;
        margin-bottom: 20px;
        opacity: 1 !important;
        animation: none !important;
    }

    .box-1 {
        order: 2;
    }

    .box-2 {
        order: 3;
    }

    .box-3 {
        order: 1;
    }

    .box-1 h2 {
        font-size: 24px;
        line-height: 34px;
        text-align: left;
    }

    .box-2 p {
        font-size: 14px;
        line-height: 20px;
    }

    .box-3 img {
        width: 100%;
        height: auto;
    }

    /* Control Buttons - hide on mobile */
    #shuffle-btn,
    #toggle-grab-btn,
    #rotate-left-btn,
    #reset-btn {
        display: none;
    }

    /* Hide corner labels on mobile */
    .corners {
        display: none;
    }

    /* Show scrolling labels on mobile */
    .scroll-container {
        display: block;
        padding: 10px 0;
        margin: 15px 0;
    }

    .scroll-label {
        font-size: 14px;
        padding: 0 15px;
    }

    .scroll-top {
        position: relative;
        top: -15px
    }

    .scroll-top .scroll-content,
    .scroll-bottom .scroll-content {
        animation-duration: 20s;
    }

    /* Footer */
    footer {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    footer p {
        font-size: 10px;
    }

    /* Disable hover effects on mobile */
    .box-1.grab-enabled:hover,
    .box-2.grab-enabled:hover,
    .box-3.grab-enabled:hover {
        scale: 1;
    }

    /* Projects grid - single column on mobile */
    #projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Projects header - stack vertically on mobile */
    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    #category-filter {
        width: 100%;
    }

    /* Project navigation - adjust for mobile */
    .project-navigation {
        width: 100vw;
    }

    .project-navigation .btn {
        height: 35px;
        width: 35px;
    }

    .project-navigation .btn:hover {
        padding: 0 15px;
    }

    .project-navigation .prev-project {
        left: 10px;
    }

    .project-navigation .next-project {
        right: 10px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-section h1 {
        font-size: 72px;
        line-height: 80px;
    }

    .grid-container {
        padding: 60px;
    }

    h2 {
        font-size: 28px;
        line-height: 40px;
    }

    /* Projects grid - two columns on tablet */
    #projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
