/* ===== Project Page Styles ===== */

/* Project Hero */
.project-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 60px;
    position: relative;
    overflow: hidden;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) blur(4px);
    opacity: 0.7;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.5) 0%, rgba(10, 10, 15, 0.85) 100%);
    z-index: 1;
}

.project-hero .container {
    position: relative;
    z-index: 2;
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    animation: fadeInUp 1s ease 0.5s both;
}

.scroll-hint span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(6px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 0.6;
        transform: translateX(-50%) translateY(0);
    }
}

.project-label {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.project-hero-title {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.project-tech-stack {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.project-tech-stack span {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Project Sections */
.project-section {
    padding: 100px 0;
}

.project-section.alt-bg {
    background: var(--bg-secondary);
}

.section-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    margin: -20px auto 50px;
    line-height: 1.7;
}

/* Story Section */
.story-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    align-items: start;
}

.story-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-text strong {
    color: var(--accent);
}

.story-highlight {
    font-size: 1.3rem !important;
    color: var(--text-primary) !important;
}

.story-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-stat {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.story-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.story-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Architecture Section */
.architecture-diagram {
    margin-bottom: 50px;
}

.diagram-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-muted);
}

.diagram-placeholder p {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.diagram-placeholder.small {
    padding: 60px 40px;
}

.placeholder-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.architecture-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.arch-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.arch-card h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.arch-card ul {
    list-style: disc;
    padding-left: 20px;
}

.arch-card li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Feature Blocks */
.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-block.reverse {
    direction: rtl;
}

.feature-block.reverse > * {
    direction: ltr;
}

.feature-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.feature-visual {
    display: flex;
    justify-content: center;
}

.code-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.code-preview pre {
    padding: 24px;
    overflow-x: auto;
}

.code-preview code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.security-badges {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.badge {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 16px 32px;
    text-align: center;
    color: var(--accent);
    font-weight: 500;
    font-size: 1rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-item {
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-item.large {
    grid-column: span 2;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.video-section {
    text-align: center;
}

.video-section h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.video-container video {
    width: 100%;
    display: block;
}

/* Footer Back Link */
.back-link {
    display: inline-block;
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: var(--transition-fast);
}

.back-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 968px) {
    .story-content {
        grid-template-columns: 1fr;
    }

    .story-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .architecture-details {
        grid-template-columns: 1fr;
    }

    .feature-block,
    .feature-block.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.large {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .project-hero {
        min-height: 50vh;
        padding: 120px 24px 60px;
    }

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

    .gallery-item.large {
        grid-column: span 1;
    }

    .story-stats {
        flex-direction: column;
    }
}
