/*
 * Abanoub Portfolio — Patch v2.0
 * 1. Unified .section-header (removes triple definition conflict)
 * 2. Blue glass project cards
 * 3. Mobile animation support
 * 4. New animation utilities: scroll-progress, cursor-glow, FAQ, counters
 * 5. prefers-reduced-motion support
 */

/* ─── UNIFIED SECTION HEADER ─── */
.section-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-left: 8%;
    margin-top: 60px;
    margin-bottom: 40px;
    font-family: 'Fira Code', 'Courier New', monospace;
}
.section-header__tag {
    color: #00d4ff;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 400;
    opacity: 0.8;
}
.section-header__title {
    color: #ffffff;
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: -0.5px;
    margin: 0;
}
@media (max-width: 768px) {
    .section-header { margin-left: 20px; gap: 8px; }
}

/* ─── BLUE GLASS PROJECT CARDS ─── */
.project-card.stack-card {
    background: linear-gradient(
        135deg,
        rgba(0, 20, 45, 0.88) 0%,
        rgba(0, 35, 68, 0.78) 50%,
        rgba(0, 15, 38, 0.92) 100%
    ) !important;
    border: 1px solid rgba(0, 212, 255, 0.18) !important;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(0, 212, 255, 0.06),
        inset 0 1px 0 rgba(0, 212, 255, 0.14);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
}
/* Top shimmer */
.project-card.stack-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.45), transparent);
    pointer-events: none;
}
/* Inner glow on hover */
.project-card.stack-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(0,212,255,0.07) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.project-card.stack-card:hover::after { opacity: 1; }
.project-card.stack-card:hover {
    border-color: rgba(0, 212, 255, 0.38) !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.55),
        0 0 30px rgba(0, 212, 255, 0.1),
        inset 0 0 0 1px rgba(0, 212, 255, 0.12);
}
.project-card__title { color: #ffffff; }
.project-card__description { color: rgba(190, 220, 255, 0.72); }
.project-card__label { color: #00d4ff; }

/* ─── MOBILE PORTFOLIO: simple stack ─── */
@media (max-width: 768px) {
    .project-card.stack-card {
        position: relative !important;
        transform: none !important;
        margin-bottom: 24px !important;
        min-height: auto !important;
        filter: none !important;
        width: 92% !important;
        padding: 24px !important;
    }
    .project-container.stack-container {
        padding-bottom: 50px !important;
        gap: 0 !important;
    }
    .mockup-img { max-height: 260px !important; margin-top: 20px; }
}

/* ─── JS-REVEAL UTILITY ─── */
.js-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal.is-visible { opacity: 1; transform: none; }

/* ─── SKILL PILLS: mobile — pause float ─── */
@media (max-width: 768px) {
    .skill-pill {
        animation-play-state: paused !important;
        transition: opacity 0.5s ease, transform 0.5s ease,
                    border-color 0.3s ease, background 0.3s ease !important;
    }
}

/* ─── HERO: always visible on mobile ─── */
@media (max-width: 768px) {
    .profile-img,
    .hero-content > * {
        opacity: 1 !important;
        clip-path: none !important;
        transform: none !important;
    }
    .floating-card { transform: none !important; animation: none !important; }
}

/* ─── CURSOR GLOW: hide on touch ─── */
@media (hover: none) { #cursor-glow { display: none !important; } }

/* ─── SCROLL PROGRESS BAR ─── */
#scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, #00d4ff, #4facfe);
    z-index: 9999; pointer-events: none;
    transition: width 0.1s linear;
}

/* ─── HEADER OPACITY: GSAP will reveal these; CSS ensures they show if JS fails ─── */
.logo-link, .nav-menu, .social-icon { opacity: 0; }

/* ─── MAGNETIC BUTTON: base ─── */
.btn, .submit-btn, .cta-circle {
    will-change: transform;
    transform-origin: center center;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .logo-link, .nav-menu, .social-icon { opacity: 1 !important; transform: none !important; }
    .js-reveal { opacity: 1 !important; transform: none !important; }
    .skill-pill { animation: none !important; }
    .floating-card { animation: none !important; }
    .profile-img { opacity: 1 !important; clip-path: none !important; }
}

/* ─── FAQ ACCORDION ─── */
.faq-item {
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    padding: 16px 0;
}
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    color: #ffffff; font-weight: 500; cursor: pointer; gap: 16px;
    transition: color 0.3s ease;
}
.faq-question:hover { color: #00d4ff; }
.faq-question::after {
    content: '+'; color: #00d4ff;
    font-size: 1.4rem; font-weight: 300; line-height: 1;
    transition: transform 0.3s ease; flex-shrink: 0;
}
.faq-item.is-open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
    color: var(--text-gray); font-size: 0.95rem; line-height: 1.7;
    max-height: 0; overflow: hidden; padding: 0;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.is-open .faq-answer { padding-top: 12px; }

/* ─── WORK TOGETHER: mobile ─── */
@media (max-width: 767px) {
    .work-together { min-height: auto; padding: 80px 20px; overflow: hidden; }
    .main-heading { font-size: 2.4rem; text-align: center; }
    .cta-circle {
        position: relative; top: auto; left: auto;
        transform: none; margin: 30px auto 0;
    }
    .floating-assets .icon { display: none; }
}