/* =========================================
   PROJECT ARCHIVE — Page Styles
   ========================================= */

/* Custom Scrollbar (Mirror main site) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6366f1; }

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    z-index: 100;
    transition: width 0.1s ease;
}

/* Custom Cursor */
@media (min-width: 768px) {
    * { cursor: none !important; }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* ─── Page Header ─── */
.archive-hero {
    position: relative;
    overflow: hidden;
}

.archive-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #050505, transparent);
    pointer-events: none;
}

/* ─── Filter Bar ─── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 9999px;
    z-index: -1;
}

.filter-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.filter-btn.active {
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.filter-btn.active::before {
    opacity: 1;
}

/* ─── Project Grid ─── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Project Card ─── */
.project-card-archive {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.project-card-archive:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(99, 102, 241, 0.1);
}

.project-card-archive .card-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.project-card-archive .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s ease;
}

.project-card-archive:hover .card-image {
    transform: scale(1.08);
}

.project-card-archive .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.project-card-archive:hover .card-overlay {
    opacity: 1;
}

.project-card-archive .card-overlay .view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    color: #050505;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
}

.project-card-archive:hover .card-overlay .view-btn {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    transition-delay: 0.1s;
}

.project-card-archive .card-overlay .view-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.project-card-archive .card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.project-card-archive .card-category {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a855f7;
    margin-bottom: 0.5rem;
}

.project-card-archive .card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.project-card-archive:hover .card-title {
    color: #a5b4fc;
}

.project-card-archive .card-excerpt {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-card-archive .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.project-card-archive .card-tags span {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.3s ease;
}

.project-card-archive:hover .card-tags span {
    background: rgba(255, 255, 255, 0.08);
}

/* ─── Tall card variants (masonry feel) ─── */
.project-card-archive.tall .card-image-wrap {
    aspect-ratio: 3 / 4;
}

/* ─── Stagger reveal animation ─── */
.project-card-archive {
    opacity: 0;
    transform: translateY(40px);
}

.project-card-archive.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger delay */
.project-card-archive:nth-child(1) { transition-delay: 0s; }
.project-card-archive:nth-child(2) { transition-delay: 0.08s; }
.project-card-archive:nth-child(3) { transition-delay: 0.16s; }
.project-card-archive:nth-child(4) { transition-delay: 0.24s; }
.project-card-archive:nth-child(5) { transition-delay: 0.32s; }
.project-card-archive:nth-child(6) { transition-delay: 0.4s; }
.project-card-archive:nth-child(7) { transition-delay: 0.48s; }
.project-card-archive:nth-child(8) { transition-delay: 0.56s; }

/* ─── Footer ─── */
.archive-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.archive-footer a {
    transition: color 0.3s ease;
}

.archive-footer a:hover {
    color: #a5b4fc;
}

/* ─── Ambient Orbs ─── */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(120px);
}
