.works-page-body {
    background: #0d0d0d;
    color: #ffffff;
    font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.works-sticky-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 13, 0.577);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
}

.works-nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.works-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'General Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.25s ease;
}

.works-back-btn:hover {
    color: #ff6421;
}

.works-page-header {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 40px 20px;
    box-sizing: border-box;
}

.works-hero-container {
    margin-bottom: 10px;
}

.works-hero-heading {
    font-family: 'General Sans', sans-serif;
    font-size: clamp(38px, 5.5vw, 72px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -1.5px;
    color: #ffffff;
    margin: 0 0 16px;
}

.works-hero-sub {
    font-family: 'General Sans', sans-serif;
    font-size: clamp(15px, 1.3vw, 18px);
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    font-weight: 400;
    max-width: 600px;
}

.works-page-main {
    width: 100%;
}

.works-content-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px 10px;
    box-sizing: border-box;
}

.works-controls-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.works-filter-pills {
    position: relative;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.works-filter-pills::-webkit-scrollbar {
    display: none;
}

.works-filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0 16px;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'General Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.works-filter-pill:hover {
    color: rgba(255, 255, 255, 0.85);
}

.works-filter-pill.active {
    color: #ffffff;
}

.works-filter-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6421;
    box-shadow: 0 0 12px rgba(255, 100, 33, 0.250), 0 -1px 4px rgba(255, 100, 33, 0.4);
    border-radius: 2px;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), width 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, width;
}

.works-filter-pill .pill-count {
    font-size: 14px;
    font-weight: 500;
    vertical-align: super;
    line-height: 1;
    transform: translateY(-4px);
    display: inline-block;
    opacity: 0.6;
    margin-left: 2px;
}

.works-filter-pill.active .pill-count {
    opacity: 0.9;
}

.works-view-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.works-view-toggles.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.works-view-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 16px;
}

.works-view-btn.active {
    background: #ff6421;
    color: #ffffff;
    border-color: #ff6421;
}

.works-view-icon {
    width: 18px;
    height: 18px;
    display: block;
    filter: invert(1);
    transition: filter 0.25s ease;
}

.works-view-btn:hover .works-view-icon {
    filter: invert(41%) sepia(98%) saturate(3015%) hue-rotate(360deg) brightness(101%) contrast(106%);
}

.works-view-btn.active .works-view-icon {
    filter: invert(1);
}

.works-panes-wrapper {
    position: relative;
    margin-top: 10px;
    min-height: 300px;
}

.works-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

.grid-cursor-badge {
    position: fixed;
    top: 0;
    left: 0;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #ff6421;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center center;
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
    z-index: 1000;
    font-family: 'General Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    will-change: transform, left, top;
}

.grid-cursor-badge.visible {
    transform: translate(-50%, -50%) scale(1);
}

.grid-cursor-badge-text {
    display: inline-block;
    will-change: transform;
    pointer-events: none;
}

.works-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px 20px;
    padding-top: 30px;
    contain: layout style;
}

.works-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.works-pane.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.projects-view-list {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.projects-view-list.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.projects-view-list.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.projects-table-head {
    display: grid;
    grid-template-columns: 2.8fr 1.8fr 1.6fr 0.6fr;
    padding: 24px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-family: 'General Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.642);
    text-transform: uppercase;
}

.projects-table-head .col-year {
    text-align: right;
}

.projects-table-body {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-table-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background-color 0.4s ease, opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.projects-table-body:hover .project-table-row:not(:hover) .row-title,
.projects-table-body.has-hover .project-table-row:not(:hover) .row-title {
    color: rgba(255, 255, 255, 0.35);
}

.projects-table-body:hover .project-table-row:not(:hover) .row-meta,
.projects-table-body.has-hover .project-table-row:not(:hover) .row-meta {
    color: rgba(255, 255, 255, 0.35);
}

.project-table-link {
    display: grid;
    grid-template-columns: 2.8fr 1.8fr 1.6fr 0.6fr;
    align-items: center;
    padding: 32px 0;
    text-decoration: none;
    color: #ffffff;
}

.project-table-link .row-title {
    font-family: 'General Sans', sans-serif;
    font-size: clamp(35px, 2.2vw, 34px);
    font-weight: 500;
    letter-spacing: -0.8px;
    color: #ffffff;
    white-space: nowrap;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-table-row:hover .row-title {
    transform: translateX(-14px);
    color: #ffffff;
}

.project-table-link .row-meta {
    font-family: 'General Sans', sans-serif;
    font-size: 18.5px;
    color: rgb(255, 255, 255);
    font-weight: 400;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-table-row:hover .row-meta {
    transform: translateX(14px);
}

.project-table-link .col-year {
    text-align: right;
}

.projects-view-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    padding-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.projects-view-grid.active {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

.projects-view-grid.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.project-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-grid-link {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.project-grid-thumb-wrapper {
    width: 100%;
    overflow: hidden;
    display: block;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    cursor: pointer;
}

.project-grid-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    box-shadow: none;
}

.project-grid-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0 0;
    width: 100%;
    flex: 1;
}

.project-grid-top-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    gap: 12px;
}

.project-grid-name {
    font-family: 'General Sans', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.4px;
    transition: color 0.25s ease;
}

.project-grid-link:hover .project-grid-name {
    color: #ff6421;
}

.project-grid-year {
    font-size: 14px;
    color: rgb(255, 255, 255);
    font-weight: 500;
    flex-shrink: 0;
}

.project-grid-tag {
    font-size: 13.5px;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.project-grid-desc {
    font-family: 'General Sans', sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68);
    margin: 4px 0 0 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-grid-stack {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 6px;
    width: 100%;
    min-height: 66px;
}

.project-grid-stack-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.project-grid-card:hover .project-grid-stack-pill {
    background: rgba(255, 255, 255, 0.09);
    border-color: #ffffff4d;
}

.stack-pill-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.works-video-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111111;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.works-video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: none;
}

.works-video-card:hover video {
    transform: none;
}

.works-images-grid {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-top: 30px;
    width: 100%;
}

.works-masonry-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.works-image-card {
    width: 100%;
    background: transparent;
    display: block;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.35s ease;
}

.works-image-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.works-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 3%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.15) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 14px 14px;
    box-sizing: border-box;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
}

.works-image-card:hover .works-image-overlay {
    opacity: 1;
}

.works-image-title {
    font-family: 'General Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.2px;
    transform: translateY(6px);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.works-image-card:hover .works-image-title {
    transform: translateY(0);
}

.works-image-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.image-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: zoom-out;
}

.image-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.image-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
    z-index: 10001;
}

.image-modal-close:hover {
    background: rgba(255, 100, 33, 0.9);
    border-color: #ff6421;
    color: #ffffff;
    transform: scale(1.08) rotate(90deg);
}

.image-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 88vh;
    cursor: default;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.image-modal-overlay.active .image-modal-content {
    transform: scale(1);
}

.image-modal-img {
    max-width: 100%;
    max-height: calc(88vh - 40px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    user-select: none;
}

.image-modal-caption {
    margin-top: 14px;
    font-family: 'General Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    text-align: center;
}

.works-back-top-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0 45px;
}

.works-back-top-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 100px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'General Sans', sans-serif;
    font-size: 17.5px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.35s ease;
    z-index: 1;
}

.works-back-top-btn .radial-hover-overlay {
    position: absolute;
    inset: 0;
    background-color: #ff6421;
    border-radius: 100px;
    clip-path: circle(0% at var(--clip-x, 50%) var(--clip-y, 50%));
    -webkit-clip-path: circle(0% at var(--clip-x, 50%) var(--clip-y, 50%));
    transition: clip-path 1s cubic-bezier(0.25, 1, 0.5, 1), -webkit-clip-path 1s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    z-index: 0;
}

.works-back-top-btn.is-hovered .radial-hover-overlay {
    clip-path: circle(160% at var(--clip-x, 50%) var(--clip-y, 50%));
    -webkit-clip-path: circle(160% at var(--clip-x, 50%) var(--clip-y, 50%));
}

.works-back-top-btn:hover {
    border-color: #ff6421;
}

.works-back-top-btn .works-back-top-btn-inner {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .works-view-toggles {
        display: none !important;
    }

    .projects-view-list {
        display: none !important;
    }

    .projects-view-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 24px;
        opacity: 1 !important;
        transform: none !important;
    }

    .works-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 16px;
    }

    .works-images-grid {
        gap: 16px;
    }

    .works-masonry-col {
        gap: 16px;
    }

    .project-preview-window,
    .preview-badge,
    .grid-cursor-badge,
    .video-play-badge {
        display: none !important;
    }
}

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

    * {
        -webkit-tap-highlight-color: transparent;
    }

    .project-grid-card,
    .project-grid-link,
    .project-table-link,
    .works-video-card,
    .works-image-card {
        -webkit-tap-highlight-color: rgba(81, 200, 255, 0.393);
    }

    .project-preview-window,
    .preview-badge,
    .grid-cursor-badge,
    .video-play-badge {
        display: none !important;
    }

    .works-video-card:hover video,
    .works-video-card video {
        transform: none !important;
    }
}

@media (max-width: 768px) {

    .works-nav-container,
    .works-page-header,
    .works-content-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .works-back-btn {
        font-size: 16px;
    }

    .works-hero-heading {
        font-size: 38px;
    }

    .works-controls-bar {
        padding: 10px 0 0;
        gap: 0;
    }

    .projects-view-grid {
        gap: 24px 20px;
    }

    .project-grid-thumb-wrapper {
        padding: 0;
    }

    .project-grid-name {
        font-size: 19px;
    }

    .project-grid-desc {
        font-size: 13.5px;
        line-height: 1.45;
    }

    .project-grid-stack {
        gap: 6px;
    }

    .project-grid-stack-pill {
        padding: 4px 10px;
        font-size: 12px;
    }

    .works-images-grid {
        gap: 12px;
    }

    .works-masonry-col {
        gap: 12px;
    }
}

@media (max-width: 580px) {
    .projects-view-grid {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .project-grid-stack {
        min-height: auto;
        margin-bottom: 4px;
    }

    .works-videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .works-images-grid {
        gap: 10px;
    }

    .works-masonry-col {
        gap: 10px;
    }
}