/* ============================================================
   File: projects.css
   vertex IS – Projects Module Styles (Enhanced)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Cabinet+Grotesk:wght@400;500;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */

:root {
    --purple-dark: #1f0033;
    --purple: #310052;
    --purple-mid: #3b0066;
    --gold: #ffd966;
    --gold-dark: #e8b000;
    --gold-pale: rgba(232, 176, 0, 0.12);
    --white: #ffffff;
    --off-white: #faf9fc;
    --gray-100: #f8f7fa;
    --gray-200: #f0eef4;
    --gray-300: #e5e2ec;
    --gray-600: #6b6a7a;
    --dark-text: #1a1a2e;
    --muted: #5a5a70;
    --shadow-sm: 0 8px 20px rgba(0,0,0,0.03), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 12px 28px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    --transition: all 0.25s ease;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
}

/* ── Project Card Animations ───────────────────────────────── */

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reveal-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes reveal-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(232, 176, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(232, 176, 0, 0.2);
    }
}

/* ── Reveal Classes ────────────────────────────────────────── */

.reveal-up {
    animation: reveal-up 0.6s ease-out forwards;
    opacity: 0;
}

.reveal-left {
    animation: reveal-left 0.6s ease-out forwards;
    opacity: 0;
}

.reveal-right {
    animation: reveal-right 0.6s ease-out forwards;
    opacity: 0;
}

.revealed {
    opacity: 1 !important;
    animation-play-state: running;
}

/* ── Project Cards Enhanced ────────────────────────────────── */

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--transition);
    z-index: 10;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image {
    transition: transform 0.5s ease;
    position: relative;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-category {
    animation: reveal-left 0.5s ease-out;
}

.project-title {
    animation: reveal-up 0.5s ease-out 0.1s both;
}

.project-description {
    animation: reveal-up 0.5s ease-out 0.2s both;
}

.project-btn {
    animation: reveal-up 0.5s ease-out 0.4s both;
}

/* ── Filter Pills Animation ────────────────────────────────── */

.filter-pill {
    position: relative;
    overflow: hidden;
}

.filter-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-100%);
    transition: transform var(--transition);
    z-index: -1;
}

.filter-pill:hover::before {
    transform: translateY(0);
}

/* ── Loading States ────────────────────────────────────────– */

.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ── Hero Section Enhancements ─────────────────────────────── */

.projects-hero {
    position: relative;
}

.projects-hero h1 {
    animation: reveal-up 0.8s ease-out;
    position: relative;
}

.projects-hero p {
    animation: reveal-up 0.8s ease-out 0.2s both;
    position: relative;
}

.hero-accent {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Floating Elements ─────────────────────────────────────– */

.floating-element {
    animation: float 3s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 0.5s;
}

.floating-element:nth-child(3) {
    animation-delay: 1s;
}

/* ── Admin Section ────────────────────────────────────────── */

.admin-section {
    animation: reveal-left 0.6s ease-out;
    position: relative;
}

.admin-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(232, 176, 0, 0.05), transparent);
    pointer-events: none;
    border-radius: var(--radius-md);
}

/* ── Responsive Animations ────────────────────────────────– */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Mobile Optimizations ─────────────────────────────────– */

@media (max-width: 768px) {
    .project-card:hover {
        transform: translateY(-4px);
    }

    .project-image {
        height: 180px;
    }

    .projects-hero h1 {
        font-size: 1.8rem;
    }

    .filter-pill {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ── Accessibility ────────────────────────────────────────– */

.project-card:focus-within {
    outline: 2px solid var(--gold-dark);
    outline-offset: 2px;
}

.filter-pill:focus {
    outline: 2px solid var(--gold-dark);
    outline-offset: 2px;
}

/* ── Print Styles ────────────────────────────────────────– */

@media print {
    .filter-bar,
    .admin-section {
        display: none;
    }

    .project-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .project-btn {
        display: none;
    }
}

/* ── Dark Mode Support ─────────────────────────────────────– */

@media (prefers-color-scheme: dark) {
    .project-card {
        background: #1a1a2e;
        border-color: rgba(232, 176, 0, 0.2);
    }

    .project-title {
        color: var(--white);
    }

    .filter-pill {
        background: #2a2a3e;
        color: var(--white);
    }

    .empty-state h3 {
        color: var(--white);
    }
}

/* ── Stagger Animation Helper ─────────────────────────────– */

.project-card:nth-child(1) {
    --delay: 0s;
}

.project-card:nth-child(2) {
    --delay: 0.1s;
}

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

.project-card:nth-child(n+4) {
    --delay: 0.3s;
}

/* ── Smooth Scrolling ──────────────────────────────────────– */

html {
    scroll-behavior: smooth;
}

/* ── Transition Utilities ──────────────────────────────────– */

.transition-fast {
    transition: var(--transition);
}

.transition-slow {
    transition: all 0.5s ease;
}

/* ── Utility Classes ───────────────────────────────────────– */

.glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ── Gradient Overlays ────────────────────────────────────– */

.gradient-overlay {
    background: linear-gradient(135deg, rgba(31, 0, 51, 0.6) 0%, rgba(49, 0, 82, 0.6) 100%);
}

.gradient-overlay-light {
    background: linear-gradient(135deg, rgba(232, 176, 0, 0.1) 0%, rgba(232, 176, 0, 0.05) 100%);
}

/* ── Badge Styles ──────────────────────────────────────────– */

.badge-gold {
    background: var(--gold-dark);
    color: var(--white);
}

.badge-purple {
    background: var(--purple-mid);
    color: var(--white);
}

.badge-light {
    background: var(--gold-pale);
    color: var(--gold-dark);
}

/* ── Link Styles ───────────────────────────────────────────– */

a.underline-animated {
    position: relative;
    text-decoration: none;
}

a.underline-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-dark);
    transition: width var(--transition);
}

a.underline-animated:hover::after {
    width: 100%;
}

/* ── Breadcrumb ────────────────────────────────────────────– */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    color: var(--muted);
}

.breadcrumb-item.active {
    color: var(--dark-text);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--gold-dark);
}

/* ── Custom Scrollbar ──────────────────────────────────────– */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ── Focus Visible ────────────────────────────────────────– */

*:focus-visible {
    outline: 2px solid var(--gold-dark);
    outline-offset: 2px;
}

/* ── Button States ────────────────────────────────────────– */

.btn-active {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--white);
    transform: translateY(-2px);
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Container Queries (for future enhancement) ────────────– */

@supports (container-type: inline-size) {
    .project-card {
        container-type: inline-size;
    }

    @container (max-width: 400px) {
        .project-title {
            font-size: 1.2rem;
        }
    }
}
