html, body {
   height: 100%;
   overflow: hidden;
   background-color: #0a0a0a;
}

.project-carousel {
    margin-top: 67px;
    height: calc(100vh - 67px);
    width: 100vw;
    position: relative;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}


.project-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 10% 10% 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;

    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 0, -1000px);
    transition: all 1s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}

.project-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0) rotateX(0deg);
    z-index: 10;
    filter: brightness(1);
}

.project-slide.prev {
    opacity: 0;
    visibility: visible;
    transform: translate3d(0, -100%, -800px) rotateX(30deg);
    z-index: 5;
    filter: brightness(0.2);
}

.project-slide.next {
    opacity: 0;
    visibility: visible;
    transform: translate3d(0, 100%, -800px) rotateX(-30deg);
    z-index: 5;
    filter: brightness(0.2);
}

.project-info {
    flex: 1;
    max-width: 500px;
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
    opacity: 0;
    transform: translateY(30px);
}

.project-slide.active .project-info {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    font-size: 40px;
    margin-bottom: 10px;
    color: #f1f1f1;
}
.accent-sub { color: #8892b0; margin-bottom: 30px; display: block; }
.project-description { font-size: 16px; line-height: 1.6; color: #c1c1c1; }
.tech-stack {
    list-style: none; padding: 0; margin-top: 30px; display: flex; gap: 15px;
    color: #0096ff; font-size: 14px;
}

.pdf-container {
    flex: 1.5;
    height: 80%;
    max-width: 700px;
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.pdf-container:hover {
    border-color: #0096ff;
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
}
.pdf-container iframe { border: none; display: block; }

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.mobile-pdf-btn {
    display: inline-block;
    margin-top: 20px;
    text-align: center;
    width: auto; 
    padding: 10px 25px;
}

.scroll-arrow {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    fill: #0096ff;
    cursor: pointer;
    opacity: 0.6;
    z-index: 20;
    transition: all 0.3s ease;
    animation: arrowBounce 2s infinite;
}

.scroll-arrow:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(0, 150, 255, 0.8));
    transform: translateX(-50%) scale(1.1);
}

.rotate-device-message {
    display: none;
    
    position: absolute;
    top: 67px;
    bottom: 30px;
    left: 0;
    right: 0;
    
    color: #f1f1f1;
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes arrowBounceMobile {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@media (max-width: 1024px){
    
    .project-carousel {
        margin-top: 67px;
        height: calc(100vh - 67px) !important; 
        perspective: 1200px !important;
        overflow: hidden !important;
    }
    
    .project-slide {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        
        position: absolute !important;
        height: 100% !important;
        
        flex-direction: column;
        justify-content: flex-start;
        padding: 30px 20px 120px;
        gap: 30px;
    }

    .project-info {
        flex: 0 0 auto;
        max-width: 100%;
        text-align: center;
        opacity: 1 !important;
        transform: none !important;
    }

    .project-title { font-size: 28px; margin-bottom: 5px; line-height: 1.2; }
    .accent-sub { margin-bottom: 15px; font-size: 14px; }
    .tech-stack { justify-content: center; margin-top: 15px; }

    .pdf-container {
        width: 100%;
        max-width: 700px;
        flex: 0 0 auto;
        
        height: 75vh !important; 
        min-height: 500px;

        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .mobile-pdf-btn {
         width: 100%;
         padding: 15px 0;
    }
    
    .footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 1000;
    }
    
    .scroll-arrow {
        display: block !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        
        margin: 40px auto 0;
        
        animation: arrowBounceMobile 2s infinite !important; 
    }
}

@media (max-height: 1024px) and (orientation: landscape) {
    .project-carousel {
        margin-top: 1vh;
        height: 99vh;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .rotate-device-message {
        display: flex;
    }

    .project-carousel {
        display: none !important;
    }
    
    html, body {
        overflow: hidden !important;
        height: 100% !important;
    }
}