/* =========================================
   THE ARCHIVE - WORK HUB PAGE
   Clinical Aesthetic / High-End Portfolio
   ========================================= */

/* Archive Hero Section */
.archive-hero {
    background: #FFFFFF;
    padding: 180px 0 120px;
    margin-top: 72px;
    border-bottom: 1px solid #E5E5E5;
}

.archive-hero-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4%;
}

.archive-headline {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active .archive-headline {
    opacity: 1;
    transform: translateY(0);
}

.archive-subtext {
    font-family: var(--font-main);
    font-size: 1.125rem;
    color: #666666;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 1s ease-out 0.4s;
}

.reveal-active .archive-subtext {
    opacity: 1;
    transform: translateY(0);
}

.project-counter {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #999999;
    padding: 8px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 0px;
    background: #FAFAFA;
}

.counter-value {
    font-weight: 500;
}

/* Smart Filter Section */
.filter-section {
    background: #FFFFFF;
    padding: 40px 0;
    border-bottom: 1px solid #E5E5E5;
    position: sticky;
    top: 72px;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.filter-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4%;
}

.filter-nav {
    display: flex;
    gap: 48px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-nav::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    border: none;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    color: #999999;
    cursor: pointer;
    padding: 12px 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.3s ease;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: #1A1A1A;
    transition: width 0.3s ease;
}

.filter-btn:hover {
    color: #1A1A1A;
}

.filter-btn.active {
    color: #1A1A1A;
    font-weight: 600;
}

.filter-btn.active::after {
    width: 100%;
}

/* Project Matrix Section */
.project-matrix {
    background: #FFFFFF;
    padding: 100px 0 200px;
}

.matrix-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 80px 40px;
    grid-auto-flow: dense;
}

/* Asymmetric Grid Layout */
.matrix-card {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.matrix-card.wide {
    grid-column: span 2;
}

/* Visual Container */
.matrix-visual {
    position: relative;
    overflow: hidden;
    background: #F8F8F8;
    border: 1px solid #E5E5E5;
    border-radius: 0px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.matrix-visual.tall {
    aspect-ratio: 4 / 5;
}

.matrix-visual.wide {
    aspect-ratio: 16 / 9;
}

.matrix-visual:hover {
    border-color: #CCCCCC;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Browser Frame */
.browser-frame {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.browser-bar {
    background: #F0F0F0;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid #E0E0E0;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D0D0D0;
}

.browser-dots span:nth-child(1) {
    background: #FF5F57;
}

.browser-dots span:nth-child(2) {
    background: #FEBC2E;
}

.browser-dots span:nth-child(3) {
    background: #28C840;
}

.browser-frame img {
    width: 100%;
    height: calc(100% - 32px);
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.matrix-visual:hover .browser-frame img {
    transform: scale(1.05);
}

/* Hover Overlay with Tech Stack */
.matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.matrix-visual:hover .matrix-overlay {
    opacity: 1;
}

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

.tech-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 14px;
    border-radius: 2px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Project Info */
.matrix-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matrix-industry {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.matrix-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: #1A1A1A;
    line-height: 1.3;
    transition: transform 0.3s ease;
}

.matrix-card:hover .matrix-title {
    transform: translateX(4px);
}

/* Technical Footnote - The Wow Factor */
.matrix-impact {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #666666;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FAFAFA;
    border-left: 2px solid #1A1A1A;
    display: inline-block;
    align-self: flex-start;
}

.matrix-link {
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.matrix-card:hover .matrix-link {
    opacity: 1;
    transform: translateX(0);
}

.matrix-link:hover {
    gap: 12px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .matrix-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 60px 30px;
    }

    .matrix-card.wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .archive-hero {
        padding: 140px 0 80px;
    }

    .archive-headline {
        font-size: 3rem;
    }

    .archive-subtext {
        font-size: 1rem;
    }

    .filter-section {
        padding: 24px 0;
    }

    .filter-nav {
        gap: 32px;
    }

    .filter-btn {
        font-size: 13px;
    }

    .matrix-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .matrix-card.wide {
        grid-column: span 1;
    }

    .matrix-visual.tall,
    .matrix-visual.wide {
        aspect-ratio: 4 / 3;
    }

    .matrix-title {
        font-size: 1.25rem;
    }
}

/* Smooth Page Transitions */
@media (prefers-reduced-motion: no-preference) {
    .matrix-card {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .matrix-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .matrix-card:nth-child(2) {
        animation-delay: 0.15s;
    }

    .matrix-card:nth-child(3) {
        animation-delay: 0.2s;
    }

    .matrix-card:nth-child(4) {
        animation-delay: 0.25s;
    }

    .matrix-card:nth-child(5) {
        animation-delay: 0.3s;
    }

    .matrix-card:nth-child(6) {
        animation-delay: 0.35s;
    }

    .matrix-card:nth-child(7) {
        animation-delay: 0.4s;
    }

    .matrix-card:nth-child(8) {
        animation-delay: 0.45s;
    }

    .matrix-card:nth-child(9) {
        animation-delay: 0.5s;
    }

    .matrix-card:nth-child(10) {
        animation-delay: 0.55s;
    }

    .matrix-card:nth-child(11) {
        animation-delay: 0.6s;
    }

    .matrix-card:nth-child(12) {
        animation-delay: 0.65s;
    }

    .matrix-card:nth-child(13) {
        animation-delay: 0.7s;
    }

    .matrix-card:nth-child(14) {
        animation-delay: 0.75s;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles for Case Studies */
@media print {

    .archive-hero,
    .filter-section,
    .matrix-overlay,
    .matrix-link {
        display: none;
    }

    .matrix-card {
        page-break-inside: avoid;
    }
}