/* Enhanced Project Page Styles */
.project-page {
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0f0f11;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.08) 10%, transparent 10%);
    background-size: 60px 60px;
    animation: moveProjectBackground 120s linear infinite;
    z-index: -1;
}

@keyframes moveProjectBackground {
    0% { background-position: 0 0%; }
    100% { background-position: 0 100%; }
}

.project-page .container {
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Enhanced Header Section */
.project-header {
    background: linear-gradient(135deg, #1a1a1d, #242428);
    border: 1px solid #3a3a3e;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8c8c8e, transparent);
    animation: headerGlow 3s infinite;
}

/* Background image for project header - generic version */
.project-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    mask: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0) 100%);
    z-index: 0;
}

/* Specific background images for different pages */
.project-header.linked::after {
    background-image: url('img/LinkedSS3.png');
}

.project-header.ground-zero::after {
    background-image: url('img/GZscreenshot2.png');
}

.project-header.hollow-reverie::after {
    background-image: url('img/HRscreenshot1.png');
}

.project-header.ultrakill::after {
    background-image: url('img/ukscreenshot4.png');
}

.project-header.operation-starfall::after {
    background-image: url('img/OSscreenshot1.png');
}

.project-header.multiplayer-fps::after {
    background-image: url('img/MPFPSenv1.jpg');
}

.project-header.evil-punk::after {
    background-image: url('img/EPCover.png');
}

.project-header.rift-guardian::after {
    background-image: url('img/RGscreenshot1.png');
}

.project-header.tower-defense::after {
    background-image: url('img/TDscreenshot1.png');
}

.project-header.retro-shooter::after {
    background-image: url('img/URSss1.png');
}

.project-header.two-d-two-d::after {
    background-image: url('img/2Dscreenshot1.png');
}

.project-header .project-title,
.project-header .project-subtitle {
    position: relative;
    z-index: 1;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.project-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    word-wrap: break-word;
    background: linear-gradient(135deg, #fff, #8c8c8e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-subtitle {
    font-size: 24px;
    color: #8c8c8e;
    margin-bottom: 0;
    word-wrap: break-word;
    font-weight: 400;
}

/* Enhanced Gallery and Video Section */
.gallery-video-container {
    background: #1a1a1d;
    border: 1px solid #3a3a3e;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.gallery-and-video {
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-bottom: 0;
}

.swiper-container {
    width: 100%;
    border: 2px solid #3a3a3e;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 9;
    background: #0f0f11;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
    transition: transform 0.3s ease;
}

.swiper-slide:hover img {
    transform: scale(1.02);
}

.project-video {
    width: 100%;
    border: 2px solid #3a3a3e;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    background: #0f0f11;
}

.project-video iframe {
    width: 100%;
    height: 100%;
    border-radius: 13px;
}

.swiper-button-next,
.swiper-button-prev {
    color: #8c8c8e;
    width: 40px;
    height: 40px;
    transition: color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: #fff;
}

/* Enhanced Description Containers */
.description-section {
    background: linear-gradient(135deg, #1a1a1d, #242428);
    border: 1px solid #3a3a3e;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.description-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8c8c8e, transparent);
    border-radius: 0 0 0 20px;
}

.description-section h2 {
    font-size: 32px;
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.description-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: #8c8c8e;
    border-radius: 1px;
}

.description-section p {
    color: #b8b8ba;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: justify;
}

/* Enhanced Hyperlink Styles */
.description-section a {
    color: #8c8c8e;
    text-decoration: none;
    position: relative;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(140, 140, 142, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.description-section a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #8c8c8e;
    transition: width 0.3s ease;
}

.description-section a:hover {
    color: #fff;
    background: rgba(140, 140, 142, 0.2);
    transform: translateY(-1px);
}

.description-section a:hover::before {
    width: 100%;
}

/* External link indicator */
.description-section a[target="_blank"]::after {
    content: '↗';
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.description-section a[target="_blank"]:hover::after {
    opacity: 1;
}

.description-section img,
.description-section video {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3a3e;
}

/* Enhanced Media Containers */
.media-container {
    background: #0f0f11;
    border: 1px solid #3a3a3e;
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.media-container img,
.media-container video {
    border-radius: 12px;
    border: none;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
    height: auto;
}

/* Enhanced Project Links */
.project-links {
    background: #1a1a1d;
    border: 1px solid #3a3a3e;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.project-links .cta-button {
    font-size: 16px;
    white-space: nowrap;
    padding: 14px 28px;
    border-radius: 25px;
    background: linear-gradient(135deg, #0f0f11, #1a1a1d);
    border: 1px solid #8c8c8e;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-links .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-links .cta-button:hover::before {
    left: 100%;
}

.project-links .cta-button:hover {
    background: #8c8c8e;
    color: #0f0f11;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(140, 140, 142, 0.3);
}

/* Item Grid Enhancement */
.item-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}

.item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1d, #242428);
    border: 1px solid #3a3a3e;
    border-radius: 20px;
    overflow: hidden;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 300px;
    margin: 10px;
    position: relative;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8c8c8e, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover::before {
    opacity: 1;
}

.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.item-card img {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #3a3a3e;
}

.item-card h4 {
    margin: 15px 0;
    font-size: 24px;
    color: #fff;
    text-align: center;
    font-weight: 600;
}

.item-card p {
    color: #b8b8ba;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-title {
        font-size: 40px;
    }

    .project-subtitle {
        font-size: 22px;
    }

    .description-section h2 {
        font-size: 28px;
    }

    .project-header {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .project-page {
        padding-top: 60px;
    }

    .project-title {
        font-size: 32px;
    }

    .project-subtitle {
        font-size: 20px;
    }

    .description-section h2 {
        font-size: 26px;
    }

    .project-links {
        flex-direction: column;
        align-items: stretch;
    }

    .project-links .cta-button {
        width: 100%;
        text-align: center;
    }

    .gallery-and-video {
        flex-direction: column;
    }

    .project-header,
    .gallery-video-container,
    .description-section,
    .project-links {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .project-page {
        padding-top: 40px;
    }

    .project-title {
        font-size: 28px;
    }

    .project-subtitle {
        font-size: 18px;
    }

    .description-section h2 {
        font-size: 24px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }

    .project-header,
    .gallery-video-container,
    .description-section,
    .project-links {
        padding: 20px;
    }
}

/* Footer styles remain the same */
footer {
    background-color: #0f0f11;
    padding: 20px 0;
    position: relative;
    width: 100%;
    border-top: 1px solid #8c8c8e;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.location {
    font-size: 14px;
    color: #8c8c8e;
}

.social-links a {
    color: #8c8c8e;
    margin-left: 15px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #fff;
}