/* ============================================
   PROJECT PAGE — LAYOUT
   ============================================ */
.project-page {
    position: relative;
    z-index: 5;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 64px);
}

/* ============================================
   BACK NAVIGATION
   ============================================ */
.project-nav {
    padding: 32px 0;
}

.project-nav__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64ffda;
    transition: opacity 0.3s;
}

.project-nav__back:hover {
    opacity: 0.7;
}

/* ============================================
   HERO SECTION
   ============================================ */
.project-hero {
    margin-bottom: 64px;
}

.project-hero__img {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(136, 146, 176, 0.2);
    aspect-ratio: 16 / 10;
    background: rgba(10, 25, 47, 0.8);
    box-shadow:
        0 0 20px var(--accent, rgba(100, 255, 218, 0.15)),
        0 0 50px var(--accent-dim, rgba(100, 255, 218, 0.05)),
        inset 0 0 30px rgba(255, 255, 255, 0.03);
    margin-bottom: 32px;
    position: relative;
}

.project-hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 40%,
        transparent 80%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

.project-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) saturate(1.1);
}

.project-hero__title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #ccd6f6;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.project-hero__tagline {
    font-size: 1.1rem;
    color: #8892b0;
    line-height: 1.6;
    max-width: 600px;
}

/* ============================================
   SECTION STRUCTURE
   ============================================ */
.project-section {
    margin-bottom: 80px;
}

.project-section__heading {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ccd6f6;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* ============================================
   OVERVIEW
   ============================================ */
.project-overview p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #8892b0;
    margin-bottom: 16px;
}

.project-overview .highlight {
    color: #ccd6f6;
    font-weight: 500;
}

/* ============================================
   KEY FEATURES GRID
   ============================================ */
.project-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.project-features__item {
    padding: 24px;
    border-radius: 8px;
    background: rgba(100, 255, 218, 0.03);
    border: 1px solid rgba(136, 146, 176, 0.1);
    transition: border-color 0.3s, background 0.3s;
}

.project-features__item:hover {
    border-color: rgba(100, 255, 218, 0.15);
    background: rgba(100, 255, 218, 0.05);
}

.project-features__item h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccd6f6;
    margin-bottom: 8px;
}

.project-features__item p {
    font-size: 0.85rem;
    color: #8892b0;
    line-height: 1.6;
}

/* ============================================
   SCREENSHOT GALLERY
   ============================================ */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-gallery__img {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(136, 146, 176, 0.2);
    aspect-ratio: 16 / 10;
    background: rgba(10, 25, 47, 0.8);
    box-shadow:
        0 0 15px var(--accent, rgba(100, 255, 218, 0.15)),
        0 0 30px var(--accent-dim, rgba(100, 255, 218, 0.05)),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
    transition: box-shadow 0.3s, border-color 0.3s;
    position: relative;
}

.project-gallery__img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        transparent 40%,
        transparent 80%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
}

.project-gallery__img:hover {
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow:
        0 0 20px var(--accent, rgba(100, 255, 218, 0.25)),
        0 0 50px var(--accent-dim, rgba(100, 255, 218, 0.1)),
        inset 0 0 20px rgba(255, 255, 255, 0.03);
}

.project-gallery__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    filter: brightness(1.1) saturate(1.1);
    transition: opacity 0.3s, transform 0.4s, filter 0.3s;
}

/* Contain mode — show full image with letterboxing (for portrait/mobile screenshots) */
.project-gallery__img--contain img {
    object-fit: contain;
}

/* Top-aligned — crop from top for very tall screenshots */
.project-gallery__img--top img {
    object-position: top;
}

.project-gallery__img:hover img {
    opacity: 1;
    transform: scale(1.03);
    filter: brightness(1.2) saturate(1.15);
}

.project-gallery__item figcaption {
    font-size: 0.75rem;
    color: #8892b0;
    margin-top: 8px;
    text-align: center;
}

/* ============================================
   TECH STACK PILLS
   ============================================ */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tech__pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(100, 255, 218, 0.08);
    color: #64ffda;
    letter-spacing: 0.02em;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

/* ============================================
   CTA SECTION
   ============================================ */
.project-section--cta {
    text-align: center;
    padding: 40px 0 80px;
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    border: 2px solid #64ffda;
    color: #64ffda;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.project-cta:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

.project-cta span {
    display: inline-block;
    transition: transform 0.3s;
}

.project-cta:hover span {
    transform: translate(3px, -3px);
}

.project-back-link {
    display: block;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #8892b0;
    transition: color 0.3s;
}

.project-back-link:hover {
    color: #64ffda;
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
    .project-hero__title {
        font-size: 2rem;
    }

    .project-hero {
        margin-bottom: 48px;
    }

    .project-features {
        grid-template-columns: 1fr;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-section {
        margin-bottom: 56px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .project-gallery__img img,
    .project-cta,
    .project-cta span {
        transition-duration: 0.15s !important;
    }
}
