/* Projects Page - Clean Mobile-First Design */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.projects-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 140px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.projects-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(59, 130, 246, 0.03) 49%, rgba(59, 130, 246, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(139, 92, 246, 0.03) 49%, rgba(139, 92, 246, 0.03) 51%, transparent 52%);
    background-size: 60px 60px;
    z-index: 1;
    opacity: 0.7;
}

.projects-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.decoration {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(1px);
}

.decoration-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.decoration-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 15%;
    animation: float 4s ease-in-out infinite reverse;
}

.decoration-3 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 5%;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-badge i {
    font-size: 1rem;
}

.projects-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 3;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    font-weight: 400;
    position: relative;
    z-index: 3;
}

/* Projects Section */
.projects-section {
    padding: 4rem 0;
    background: var(--light-surface);
}

/* Featured Project */
.featured-project {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 1.5rem;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 4px 20px rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
}

.featured-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 1.5rem 1.5rem 0 0;
}

.featured-project::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse-glow 3s ease-in-out infinite;
}

.project-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 99, 235, 0.5);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.project-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.project-image, .card-image {
    text-align: center;
}

.project-image {
    background: none;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 0rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.featured-project:hover .featured-image {
    transform: translateY(-8px);
}

.card-image {
    height: 200px;
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-image--contain {
    object-fit: contain;
    padding: 1.25rem;
}

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

/* Mobile Icons - Hidden on desktop, shown on mobile */
.mobile-icon {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.featured-mobile-icon {
    border-radius: 1rem;
}

/* Desktop - Show images, hide icons */
@media (min-width: 769px) {
    .mobile-icon {
        display: none !important;
    }
    
    .project-image, .featured-image {
        display: block;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Mobile Responsive - Show images */
@media (max-width: 768px) {
    .mobile-icon {
        display: none !important;
    }
    
    .card-image {
        position: relative;
        height: auto; /* Let image determine height */
    }
    
    .project-image, .featured-image {
        height: auto; /* Let image determine height */
        width: 100%;
        object-fit: cover;
    }
}

.image-box {
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    padding: 3rem;
    color: white;
    font-size: 3rem;
    display: inline-block;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4), 0 8px 25px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.image-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

.image-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.5), 0 12px 30px rgba(37, 99, 235, 0.3);
}

.image-box.small {
    padding: 2.5rem;
    font-size: 2.5rem;
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.project-details h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-type {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.stat i {
    color: var(--accent-color);
}

.project-tags, .card-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    border-color: var(--accent-color);
}

.tag:hover::before {
    left: 100%;
}

/* Specific tech tag colors */
.tag:nth-child(1) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #2563eb;
}

.tag:nth-child(2) {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border-color: #0891b2;
}

.tag:nth-child(3) {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-color: #7c3aed;
}

.tag:nth-child(4) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #059669;
}

.tag:nth-child(5) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Other Projects */
.other-projects {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.05), transparent);
    transition: left 0.6s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12), 
        0 8px 25px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.project-card:hover::before {
    left: 100%;
}

.card-content {
    padding: 1.5rem;
}

.card-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.card-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.card-content .btn {
    width: 100%;
    justify-content: center;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--gradient-primary), #4f46e5);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.01) 50%, transparent 60%);
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

.cta-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 10;
}

.cta-content p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 10;
    opacity: 1;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.cta-section .btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.cta-section .btn-primary:hover {
    background: #1d4ed8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cta-section .btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-section .btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Active nav link */
.nav-link.active {
    color: var(--accent-color);
}

.nav-link.active::after {
    width: 100%;
}

/* Enhanced Typography */
.card-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.project-card:hover .card-content h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(4px);
}

.card-content p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.project-card:hover .card-content p {
    color: #4b5563;
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .projects-hero {
        padding: 10rem 0 6rem;
    }
    
    .projects-section {
        padding: 6rem 0;
    }
    
    .featured-project {
        padding: 3rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr 2fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-buttons {
        flex-wrap: nowrap;
    }
    
    .cta-buttons {
        flex-wrap: nowrap;
    }
    
    .cta-section {
        padding: 4rem 3rem;
    }
    
    .cta-content h3 {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .project-description {
        font-size: 1.125rem;
    }
    
    .card-content p {
        font-size: 1rem;
    }
}

/* Mobile responsive styles for new hero design */
@media (max-width: 768px) {
    .projects-hero {
        padding: 120px 15px 60px;
    }
    
    .projects-hero-title {
        font-size: 2.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .projects-hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.6;
        padding: 0 10px;
    }
    
    .hero-badge {
        padding: 10px 20px;
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .decoration-1,
    .decoration-2,
    .decoration-3 {
        opacity: 0.5;
    }
    
    .decoration-1 {
        width: 80px;
        height: 80px;
    }
    
    .decoration-2 {
        width: 60px;
        height: 60px;
    }
    
    .decoration-3 {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        padding: 100px 10px 50px;
    }
    
    .projects-hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .projects-hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .hero-badge {
        padding: 8px 16px;
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-badge i {
        font-size: 0.9rem;
    }
    
    .decoration-1,
    .decoration-2,
    .decoration-3 {
        display: none; /* Hide decorations on very small screens */
    }
}
