/* ===================================
   PROJECTS PAGE - MODERN DESIGN
   =================================== */

/* Import distinctive fonts */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    /* Projects page specific colors */
    --accent-teal: #06d6a0;
    --accent-coral: #ef476f;
    --accent-yellow: #ffd166;
    --accent-purple: #6c63ff;
    --dark-navy: #0f1419;
    --soft-white: #fafafa;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ===================================
   PROJECTS HERO SECTION
   =================================== */

.projects-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%);
    overflow: hidden;
    padding: 120px 20px 80px;
}

/* Animated Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-teal);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    top: 50%;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-coral);
    bottom: -100px;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(40px, 10px) scale(1.05); }
}

/* Hero Content */
.hero-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.hero-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-teal);
    margin-bottom: 20px;
    padding: 8px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-top: 10px;
}

.hero-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 50px;
    max-width: 700px;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-teal);
    line-height: 1;
}

.stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   FILTER SECTION
   =================================== */

.filter-section {
    background: #ffffff;
    padding: 40px 20px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 100px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.filter-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 30px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-teal);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    color: #ffffff;
    border-color: var(--accent-teal);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-teal);
    color: #ffffff;
    border-color: var(--accent-teal);
    transform: scale(1.05);
}

/* ===================================
   PROJECTS GRID
   =================================== */

.projects-section {
    background: #fafafa;
    padding: 100px 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 50px;
    animation: fadeIn 0.8s ease-out;
}

/* Project Card */
.project-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: cardFadeIn 0.6s ease-out forwards;
    cursor: pointer;
    position: relative;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Project Image Wrapper */
.project-image-wrapper {
    position: relative;
    overflow: hidden;
}

.project-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.9), rgba(108, 99, 255, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.view-project {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Project Number Badge */
.project-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: transform 0.3s ease;
}

.project-card:hover .project-number {
    transform: rotate(360deg);
}

/* Project Content */
.project-content {
    padding: 35px;
}

/* Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-gis {
    background: rgba(6, 214, 160, 0.1);
    color: #06d6a0;
    border: 1px solid rgba(6, 214, 160, 0.3);
}

.tag-cartography {
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.tag-survey {
    background: rgba(239, 71, 111, 0.1);
    color: #ef476f;
    border: 1px solid rgba(239, 71, 111, 0.3);
}

.tag-remote {
    background: rgba(255, 209, 102, 0.1);
    color: #e6a800;
    border: 1px solid rgba(255, 209, 102, 0.3);
}

.tag-web {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Project Title */
.project-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a2332;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--accent-teal);
}

/* Project Description */
.project-description {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #6b7280;
    margin-bottom: 25px;
}

/* Project Meta */
.project-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #6b7280;
}

.meta-item .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    color: var(--accent-teal);
}

/* Project Link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 15px;
}

.project-link .arrow {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.project-link:hover .arrow {
    transform: translateX(5px);
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-purple));
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -100px;
    animation: float 15s infinite ease-in-out;
}

.cta-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -200px;
    left: -100px;
    animation: float 20s infinite ease-in-out;
    animation-delay: 5s;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.cta-content p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 18px 45px;
    background: #ffffff;
    color: var(--accent-teal);
    border: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    stroke-width: 3;
    transition: transform 0.3s ease;
}

.btn-cta:hover .btn-arrow {
    transform: translateX(5px);
}

/* ===================================
   FILTER ANIMATIONS
   =================================== */

.project-card.filtered-out {
    animation: fadeOut 0.4s ease-out forwards;
}

.project-card.filtered-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .projects-hero {
        min-height: 70vh;
        padding: 100px 20px 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 30px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .filter-section {
        position: relative;
        top: 0;
    }

    .filter-controls {
        gap: 8px;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 10px 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .project-image {
        height: 250px;
    }

    .project-content {
        padding: 25px;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-label {
        font-size: 0.75rem;
        padding: 6px 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .project-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        top: 15px;
        right: 15px;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .btn-cta {
        padding: 16px 35px;
        font-size: 0.9rem;
    }
}
