.fw-section {
    background: #000;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.1);
    height: auto;
    padding: 5rem 0;
}

.fw-track { 
    display: flex; 
    flex-direction: column; 
    gap: 4rem; 
    padding: 0 1.5rem; 
    width: 100%; 
}

.fw-item { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    opacity: 0.3; 
    transition: opacity 0.5s ease; 
}

.fw-big-text { 
    font-size: 4rem; 
    font-weight: 700; 
    line-height: 0.9; 
    color: transparent; 
    -webkit-text-stroke: 1px rgba(255,255,255,0.4); 
    transition: all 0.5s ease; 
}

.fw-item.active { opacity: 1; }
.fw-item.active .fw-big-text { -webkit-text-stroke: 0px; color: #fff; }

.fw-details { 
    margin-top: 1.5rem; 
    border-left: 2px solid #a855f7; 
    padding-left: 1.5rem; 
    opacity: 0; 
    transform: translateY(10px); 
    transition: all 0.5s ease; 
}
.fw-item.active .fw-details { opacity: 1; transform: translateY(0); }

.fw-desc { font-size: 1.1rem; color: #ccc; line-height: 1.5; }
.fw-num { font-family: 'JetBrains Mono', monospace; color: #a855f7; margin-bottom: 0.5rem; display: block; }

@media (min-width: 1024px) {
    .fw-section { 
        height: 100vh; 
        display: flex; 
        align-items: center; 
        padding: 0; 
    }
    
    .fw-track { 
        flex-direction: row; 
        gap: 15vw; 
        padding-left: 5vw; 
        width: max-content; 
    }
    
    .fw-item { 
        width: 80vw; 
        opacity: 0.2; 
    }
    
    .fw-big-text { 
        font-size: clamp(6rem, 15vw, 15rem); 
        -webkit-text-stroke: 2px rgba(255,255,255,0.3); 
        white-space: nowrap; 
    }
    
    .fw-details { 
        margin-top: 4rem; 
        padding-left: 2rem; 
    }
    
    .fw-desc { font-size: 1.5rem; }
}

.works-section {
    background: #000;
    overflow: visible;
    height: auto;
    padding: 5rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.works-header-abs { 
    padding: 0; 
    margin-bottom: 2rem; 
    width: 60%;
}

.works-big-title {
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.outline-text {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.4);
}

.title-line-wrapper {
    overflow: hidden; 
    display: block;
}

.works-gradient-mask {
    display: none;
    position: absolute;
    top: 0; left: 0;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
}

@media (max-width: 1023px) {
    .works-section {
        height: 100vh; 
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        padding: 0;
    }
    .works-header-abs {
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        z-index: 20;
        text-align: center;
    }
    .works-track {
        position: absolute;
        top: 50%; left: 0; width: 100%;
        flex-direction: column;
        gap: 2rem;
        padding: 0 1.5rem;
        opacity: 0;
    }
    .works-gradient-mask {
        display: block;
        width: 100%; height: 40vh; 
        background: linear-gradient(to bottom, #000 20%, transparent 100%);
    }
}

@media (min-width: 1024px) {
    .works-section { 
        height: 100vh; 
        padding: 0; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        overflow: hidden; 
    }
    .works-gradient-mask {
        display: block;
        width: 60vw; height: 100%;
        background: linear-gradient(to right, #000 30%, transparent 100%);
    }
    .works-header-abs { 
        position: absolute; 
        top: 50%; left: 50%; 
        transform: translate(-50%, -50%); 
        z-index: 20; 
        pointer-events: none;
    }
    .works-big-title { font-size: clamp(6rem, 12vw, 12rem); }
}

.works-track { 
    display: flex; 
    width: 100%; 
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .works-track { 
        flex-direction: row; 
        align-items: center; 
        gap: 4vw; 
        width: max-content; 
        height: 60vh; 
        position: absolute;
        top: 50%; 
        transform: translateY(-50%);
        z-index: 10;
    }
}

.work-card {
    position: relative; 
    width: 100%; 
    height: 200px; 
    flex-shrink: 0; 
    left: 10px;
    border-radius: 24px; 
    overflow: hidden;
    background: #0a0a0a; 
    border: 1px solid rgba(255,255,255,0.1); 
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .work-card { width: 50vw; height: 100%; border-radius: 32px; }
    .work-card:hover { border-color: rgba(255,255,255,0.4); transform: scale(1.02); }
}

.wc-img { 
    width: 100%; height: 100%; 
    object-fit: cover; 
    filter: grayscale(100%); 
    transition: filter 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s ease; 
}

.work-card:hover .wc-img { filter: grayscale(0%); transform: scale(1.05); }

.wc-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 2.5rem; 
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); 
    display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0.8; transition: opacity 0.3s; z-index: 5; pointer-events: none; 
}
.work-card:hover .wc-overlay { opacity: 1; }

.wc-title { font-size: 2rem; color: #fff; font-weight: 500; }
.wc-cat { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: #a855f7; margin-bottom: 0.5rem; text-transform: uppercase; }

.view-more-card { 
    width: 100%; height: 300px; flex-shrink: 0; border-radius: 24px; 
    border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; 
    align-items: center; justify-content: center; background: #050505; transition: all 0.4s ease; cursor: pointer; 
}
@media (min-width: 1024px) { .view-more-card { width: 25vw; height: 100%; border-radius: 32px; } }
.view-more-card:hover { background: #111; border-color: #a855f7; }
.vm-label { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #666; margin-bottom: 2rem; text-transform: uppercase; }
.vm-text { font-size: 2.5rem; color: #fff; font-weight: 600; line-height: 1; text-align: center; }
.vm-icon { margin-top: 2rem; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: #fff; transition: all 0.4s ease; }
.view-more-card:hover .vm-icon { background: #a855f7; border-color: #a855f7; transform: rotate(-45deg); }

.project-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    background: rgba(8, 8, 8, 0.65);
    backdrop-filter: blur(60px) saturate(140%);
    -webkit-backdrop-filter: blur(60px) saturate(140%);
    display: none;
    opacity: 0;
    color: #fff;
    font-family: 'Inter', sans-serif;
    transform-origin: center center;
}

.modal-grain {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.modal-ambient-glow {
    position: absolute;
    top: -20%; left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 90vh;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 60%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 10s infinite alternate ease-in-out;
}

@keyframes ambientPulse {
    0% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    100% { transform: translateX(-50%) scale(1.1); opacity: 0.9; }
}

.modal-nav {
    position: absolute;
    top: 2rem; 
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 900px;
    padding: 0.6rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
    border-radius: 100px;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translateX(-50%) scale(1.01);
}

.modal-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    border: none;
    color: #eee;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.modal-nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-icon-circle {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-icon-circle.filled {
    background: #fff; color: #000;
}

.modal-nav-btn:hover .btn-icon-circle {
    transform: scale(1.15);
    background: #fff; color: #000;
}

.modal-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.project-year-badge {
    font-size: 0.6rem;
    color: #a855f7;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
    opacity: 0.8;
}

.project-display-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.modal-scroll-container {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; 
}
.modal-scroll-container::-webkit-scrollbar { display: none; }

.modal-content-spacer {
    height: 160px;
}

.modal-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.modal-media-wrapper {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
    margin-bottom: 4rem;
}

.media-slider {
    width: 100%; height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-item {
    flex: 0 0 100%;
    width: 100%; height: 100%;
    position: relative;
}

.media-item video, .media-item img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.slider-controls-floating {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: opacity 0.3s;
}

.modal-media-wrapper:hover .slider-controls-floating {
    background: rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.2);
}

.slider-arrow {
    background: none; border: none; color: #fff;
    cursor: pointer; opacity: 0.7; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
}
.slider-arrow:hover { opacity: 1; background: rgba(255,255,255,0.1); }

.slider-dots { display: flex; gap: 8px; }
.slider-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slider-dot.active { background: #fff; transform: scale(1.4); }

.modal-info-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.info-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    color: #a855f7;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-text {
    font-size: 1.6rem;
    line-height: 1.4;
    color: #eee;
    font-weight: 300;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
}

.panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.panel-row:last-child { border-bottom: none; }

.panel-label { color: #888; font-size: 0.9rem; }
.panel-val { color: #fff; font-weight: 500; font-size: 0.9rem; text-align: right; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}
.tech-tag:hover { background: rgba(255,255,255,0.1); }

.modal-footer-section {
    padding: 0 1.5rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-separator {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.6;
}
.sep-text { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; font-size: 0.8rem; }
.sep-line { flex: 1; height: 1px; background: #fff; }

.related-projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.work-card.active-related {
    left: 0; width: 100%; height: 350px;
}

@media (max-width: 1023px) {
    .modal-nav {
        top: 1rem;
        width: 94%;
        padding: 0.5rem;
    }
    
    .btn-text { display: none; }
    
    .modal-content-spacer { height: 120px; }
    
    .modal-media-wrapper {
        aspect-ratio: 1 / 1; 
        border-radius: 24px;
        margin-bottom: 2rem;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-text { font-size: 1.2rem; }
    
    .related-projects { grid-template-columns: 1fr; }
}