/* ============================================================
   SECTION 5: THE HYPER-ARCHIVE (PROJECT REPOSITORY)
   Design System: Deep Perspective / Terminal Core / Holographic
   ============================================================ */

:root {
    --archive-bg: #03050c;
    --archive-accent: #00d4ff;
    --archive-border: rgba(0, 212, 255, 0.15);
    --archive-glass: rgba(10, 15, 30, 0.7);
    --archive-text: #e0e6ed;
}

.portfolio-section {
    position: relative;
    padding: 10rem 2rem;
    background: var(--archive-bg);
    min-height: 120vh;
    color: var(--archive-text);
    overflow: hidden;
    perspective: 2000px;
    /* Enable deep 3D space */
}

/* Atmospheric Vault Background */
.vault-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.vault-scan-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(0, 212, 255, 0.05),
            transparent);
    animation: scanLineMove 8s infinite linear;
}

@keyframes scanLineMove {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

/* Header & Navigation Styling */
.portfolio-header {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto 6rem;
}

.glitch-wrapper {
    margin-bottom: 3rem;
}

.section-tag {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 5px;
    color: var(--archive-accent);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.portfolio-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    color: #fff;
    position: relative;
}

/* Archive Nav (Filters & Status) */
.archive-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--archive-border);
    border-bottom: 1px solid var(--archive-border);
    padding: 1.5rem 0;
}

.nav-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
}

.btn-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--archive-accent);
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.filter-btn:hover .btn-text,
.filter-btn.active .btn-text {
    color: #fff;
}

.filter-btn.active .btn-line {
    width: 100%;
}

.nav-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: var(--archive-accent);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pulse {
    width: 6px;
    height: 6px;
    background: var(--archive-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--archive-accent);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

/* Hyper-Grid: The 3D Viewing Space */
.hyper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 5;
    position: relative;
    transform-style: preserve-3d;
}

/* Project Entry (Hyper-Card) */
.project-entry {
    position: relative;
    height: 450px;
    background: var(--archive-glass);
    border: 1px solid var(--archive-border);
    border-radius: 4px;
    /* Minimalist tech look */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
    opacity: 0;
    /* JS triggers revelation */
}

.project-entry.revealed {
    opacity: 1;
    transform: translateY(0);
}

.project-entry:hover {
    transform: translateZ(30px) translateY(-10px) rotateX(5deg);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

/* Entry Visual (Holographic Preview) */
.entry-visual {
    position: relative;
    height: 60%;
    background: #000;
    overflow: hidden;
}

.entry-blueprint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    opacity: 0.2;
    transition: all 0.8s ease;
    filter: blur(2px);
}

.project-entry:hover .entry-blueprint {
    opacity: 0.8;
    filter: blur(0) drop-shadow(0 0 15px var(--archive-accent));
    transform: scale(1.1);
}

.entry-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(0, 212, 255, 0.1) 1px, transparent 0);
    background-size: 15px 15px;
    z-index: 2;
}

/* Entry Content */
.entry-content {
    padding: 2rem;
    position: relative;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.entry-id {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    color: var(--archive-accent);
    margin-bottom: 0.5rem;
    display: block;
}

.entry-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.entry-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-tags {
    display: flex;
    gap: 0.8rem;
}

.tag-dot {
    width: 4px;
    height: 4px;
    background: var(--archive-accent);
    border-radius: 50%;
    position: relative;
}

.tag-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
}

.entry-action {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--archive-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Responsive Masterclass */
@media (max-width: 1100px) {
    .hyper-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .hyper-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-title {
        font-size: 3rem;
    }

    .archive-nav {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }

    .nav-filters {
        flex-wrap: wrap;
    }

    .portfolio-section {
        padding: 6rem 1.5rem;
    }
}

/* Detailed Scroll Reveal */
[data-reveal="archive"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-reveal="archive"].revealed {
    opacity: 1;
    transform: translateY(0);
}