:root { --bg-main: #f0f9ff; --bg-card: #ffffff; --primary: #0ea5e9; --primary-dark: #0284c7; --primary-light: #e0f2fe; --text-dark: #0f172a; --text-muted: #64748b; --shadow-soft: 0 10px 40px -10px rgba(14, 165, 233, 0.15); --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; text-decoration: none; list-style: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }
body { background-color: var(--bg-main); color: var(--text-dark); line-height: 1.7; overflow-x: hidden; }

header { position: fixed; top: 0; left: 0; width: 100%; padding: 1.2rem 8%; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,0.05); z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); } .logo span { color: var(--primary); }
.btn-back { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 5px; transition: var(--transition); } .btn-back:hover { color: var(--primary); }

.gallery-section { padding: 8rem 8% 4rem; min-height: 100vh; max-width: 1200px; margin: 0 auto; }
.gallery-header { text-align: center; margin-bottom: 3rem; } .gallery-header h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; } .gallery-header span { color: var(--primary); } .gallery-header p { color: var(--text-muted); font-size: 1.05rem; }

.project-counter { display: inline-flex; align-items: center; justify-content: center; gap: 4px; background: var(--primary-light); color: var(--primary-dark); padding: 0.6rem 1.5rem; border-radius: 50px; font-size: 0.95rem; font-weight: 500; margin-top: 1.5rem; border: 1px dashed var(--primary); box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1); cursor: pointer; transition: var(--transition); }
.project-counter strong { font-size: 1.1rem; color: var(--primary); transition: var(--transition); margin-right: 4px; }
.project-counter:hover { transform: translateY(-3px); background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3); }
.project-counter:hover strong { color: white; }

.filter-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.filter-btn { padding: 0.6rem 1.5rem; background: var(--bg-card); border: 2px solid var(--primary-light); border-radius: 50px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: var(--transition); font-size: 0.9rem; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(14, 165, 233, 0.2); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; }
.project-card { background: var(--bg-card); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-soft); transition: var(--transition); display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2); }

.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.project-img { width: 100%; height: 250px; position: relative; background: var(--primary-light); border-bottom: 1px solid #e0f2fe; display: flex; justify-content: center; align-items: center; overflow: hidden; padding: 1.2rem; }
.img-slider { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-behavior: smooth; align-items: center; scrollbar-width: none; gap: 10px; scroll-snap-type: x mandatory; }
.img-slider::-webkit-scrollbar { display: none; }
.justify-center { justify-content: center; } .justify-start { justify-content: flex-start; }
.desktop-img-slide { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1)); flex-shrink: 0; transition: var(--transition); scroll-snap-align: center; pointer-events: none; }
.mobile-img-slide { width: calc(33.33% - 7px); height: 95%; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1)); flex-shrink: 0; transition: var(--transition); scroll-snap-align: center; pointer-events: none; }
.desktop-img-slide:hover, .mobile-img-slide:hover { transform: translateY(-3px) scale(1.02); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.9); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.15); z-index: 10; color: var(--primary-dark); font-size: 1.2rem; transition: var(--transition); }
.slider-btn:hover { background: var(--primary); color: white; transform: translateY(-50%) scale(1.1); }
.slider-btn.prev { left: 8px; } .slider-btn.next { right: 8px; }

.project-info { padding: 1.8rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-info h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.project-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; } .tags span { background: var(--primary-light); color: var(--primary-dark); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.btn-visit { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem; background: var(--primary); color: white; border-radius: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; font-size: 1rem; width: 100%; }
.btn-visit:hover { background: var(--primary-dark); transform: translateY(-3px); }
footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(8px); z-index: 2000; justify-content: center; align-items: center; padding: 1rem; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { background: var(--bg-card); width: 100%; max-width: 800px; max-height: 90vh; border-radius: 20px; overflow-y: auto; position: relative; padding: 2rem; transform: translateY(50px); transition: transform 0.3s ease; scrollbar-width: thin; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-content::-webkit-scrollbar { width: 6px; } .modal-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.btn-close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: var(--text-muted); cursor: pointer; background: none; border: none; transition: var(--transition); z-index: 10; } .btn-close-modal:hover { color: #ef4444; transform: rotate(90deg); }
.modal-img-container { width: 100%; height: 350px; background: var(--primary-light); border-radius: 12px; margin-bottom: 1.5rem; position: relative; display: flex; align-items: center; padding: 1rem; overflow: hidden; }
.modal-title { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.modal-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; -webkit-user-select: text; -ms-user-select: text; user-select: text; } 
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2rem; }
.contact-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: white; transition: var(--transition); }
.contact-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn-wa { background: #25D366; } .btn-email { background: #ea4335; } .btn-github { background: #333; } .btn-linkedin { background: #0077b5; }
.btn-modal-visit { display: flex; justify-content: center; width: 100%; padding: 1rem; background: var(--primary); color: white; border-radius: 12px; font-weight: 600; font-size: 1.1rem; gap: 8px; transition: var(--transition); }
.btn-modal-visit:hover { background: var(--primary-dark); transform: translateY(-3px); }

@media (max-width: 768px) {
    header { padding: 1rem 5%; } .gallery-section { padding: 7rem 5% 3rem; } .gallery-header h2 { font-size: 1.8rem; }
    .project-counter { font-size: 0.85rem; padding: 0.5rem 1rem; margin-top: 1rem; }
    .filter-buttons { gap: 0.5rem; } .filter-btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
    
    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    
    .project-img { height: 130px; padding: 0.5rem 1.2rem; } 
    .slider-btn { width: 22px; height: 22px; font-size: 0.9rem; } .slider-btn.prev { left: 2px; } .slider-btn.next { right: 2px; } 
    
    .project-info { padding: 1rem; }
    .project-info h3 { font-size: 1rem; margin-bottom: 0.3rem; }
    .project-info p { font-size: 0.75rem; margin-bottom: 0.8rem; line-height: 1.4; }
    .tags { gap: 0.3rem; margin-bottom: 1rem; }
    .tags span { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
    .btn-visit { font-size: 0.75rem; padding: 0.6rem; gap: 0.3rem; }
    
    .modal-content { padding: 1.5rem; } .modal-img-container { height: 250px; } .modal-title { font-size: 1.4rem; }
}