/* =====================
   PROJECTS PAGE STYLES
===================== */

/* CSS Custom Properties for better maintainability */
:root {
    --project-card-border-radius: 20px;
    --project-icon-size: 80px;
    --filter-btn-padding: 12px 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* =====================
   HERO SECTION
===================== */
.page-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    background: linear-gradient(135deg, rgba(15, 76, 117, 0.2) 0%, rgba(26, 26, 46, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.page-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: var(--font-size-md);
    color: var(--gray-text);
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.9;
}

.page-description {
    font-size: var(--font-size-sm);
    color: var(--gray-text);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-inline: auto;
}

/* =====================
   FILTER SECTION
===================== */
.project-filter {
    padding: 3rem 0;
    background: rgba(22, 33, 62, 0.3);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--gradient-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--gray-text);
    padding: var(--filter-btn-padding);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 0;
}

.filter-btn:is(:hover, :focus, .active) {
    transform: translateY(-2px);
    border-color: var(--neon-green);
    box-shadow: var(--glow-neon);
    color: var(--primary-dark);
}

.filter-btn:is(:hover, :focus, .active)::before {
    transform: translateX(0);
}

.filter-btn i,
.filter-btn span {
    position: relative;
    z-index: 1;
}

/* Search Container */
.search-container {
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.project-search {
    background: var(--gradient-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--light-text);
    padding: 12px 20px 12px 50px;
    border-radius: 25px;
    width: 100%;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.project-search:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: var(--glow-neon);
}

.project-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-text);
    pointer-events: none;
    z-index: 1;
}

/* =====================
   PROJECTS SECTION
===================== */
.projects-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 76, 117, 0.1) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* =====================
   PROJECT CARDS
===================== */
.project-card {
    background: var(--gradient-card);
    border-radius: var(--project-card-border-radius);
    border: 1px solid rgba(0, 255, 136, 0.1);
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: var(--shadow-card);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--neon-green);
    box-shadow: var(--shadow-hover), var(--glow-neon);
}

.project-card:hover::before {
    opacity: 1;
}

/* Card States */
.project-card.hidden {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    pointer-events: none;
}

.project-card.show {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =====================
   PROJECT IMAGE/ICON
===================== */
.project-image {
    height: 150px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--secondary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(0, 255, 136, 0.1), transparent, rgba(0, 212, 255, 0.1));
    animation: rotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-icon {
    width: var(--project-icon-size);
    height: var(--project-icon-size);
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    transition: var(--transition-smooth);
}

.project-icon i {
    font-size: 2rem;
    color: var(--primary-dark);
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

/* =====================
   PROJECT OVERLAY
===================== */
.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition-smooth);
    transform: translateY(20px);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

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

.project-link:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

/* =====================
   PROJECT CONTENT
===================== */
.project-content {
    padding: 2rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-header h3 {
    color: var(--light-text);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    margin: 0;
}

.project-date {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    white-space: nowrap;
    font-style: normal;
}

.project-description {
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* =====================
   TECHNOLOGY TAGS
===================== */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.tech-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--neon-green);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 0;
}

.tech-tag:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.tech-tag:hover::before {
    transform: translateX(0);
}

/* =====================
   PROJECT FEATURES
===================== */
.project-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.feature i {
    color: var(--neon-green);
    font-size: 0.8rem;
    width: 16px;
    flex-shrink: 0;
}

/* =====================
   EMPTY STATE
===================== */
.projects-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-text);
    grid-column: 1 / -1;
}

.projects-empty.hidden {
    display: none;
}

.projects-empty i {
    font-size: 4rem;
    color: var(--neon-green);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.projects-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.projects-empty p {
    font-size: 1rem;
    line-height: 1.6;
}

/* =====================
   CTA SECTION
===================== */
.projects-cta {
    padding: var(--section-padding) 0;
    background: rgba(22, 33, 62, 0.3);
    text-align: center;
    position: relative;
}

.projects-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: var(--font-size-lg);
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-content blockquote {
    margin: 1.5rem 0;
    font-style: italic;
    border-left: 3px solid var(--neon-green);
    padding-left: 1rem;
}

.cta-content blockquote p {
    color: var(--neon-green);
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.cta-content blockquote cite {
    color: var(--gray-text);
    font-size: 0.9rem;
}

.cta-content > p {
    color: var(--gray-text);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* =====================
   ANIMATIONS
===================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =====================
   RESPONSIVE DESIGN
===================== */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 50vh;
        padding-top: 80px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0 1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-date {
        align-self: flex-end;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .search-container {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        gap: 1rem;
    }
    
    .project-card {
        margin: 0 0.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .project-tech {
        gap: 0.3rem;
    }
    
    .tech-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .project-image {
        height: 120px;
    }
    
    .project-icon {
        width: 60px;
        height: 60px;
    }
    
    .project-icon i {
        font-size: 1.5rem;
    }
    
    .search-container {
        max-width: 280px;
    }
    
    .project-search {
        padding: 10px 18px 10px 45px;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 15px;
    }
}

/* =====================
   FOCUS STATES
===================== */
.filter-btn:focus-visible,
.project-card:focus-visible,
.project-link:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

/* =====================
   PRINT STYLES
===================== */
@media print {
    .project-filter,
    .projects-cta,
    .project-overlay {
        display: none;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        transform: none !important;
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}