/* ===========================
   FRONTEND IMPROVEMENTS
   Mobile-First, Human Touch, Performance
   =========================== */

/* CSS Variables untuk konsistensi */
:root {
    --section-padding-desktop: 80px 20px;
    --section-padding-mobile: 60px 20px;
    --touch-target-size: 44px;
    --font-size-mobile-min: 15px;
    --transition-smooth: 0.47s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-natural: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===========================
   MOBILE UX IMPROVEMENTS
   =========================== */

/* Touch-friendly button sizes */


/* Mobile font sizes - readable */
@media (max-width: 768px) {
    .testimonial-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .author-info p {
        font-size: 0.85rem;
    }
    
    .skill-label {
        font-size: 1rem;
    }
}

/* Slider Dots Indicator */
.slider-dots {
    display: none; /* Hidden by default on desktop */
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

/* Show dots only on mobile */
@media (max-width: 768px) {
    .slider-dots {
        display: flex;
    }
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

.slider-dots .dot:hover {
    background: var(--primary-color);
    opacity: 0.7;
}

/* ===========================
   HUMAN TOUCH - Organic Design
   =========================== */

/* Testimonial card hover - clean */
.testimonial-card:hover {
    transform: none;
}

/* Accent border for personality - skills only */
.skills-section .box-container::before {
    content: none;
}

/* Organic easing for all transitions */
.testimonials-track {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ===========================
   MICRO-INTERACTIONS
   =========================== */

/* Button press feedback - NO BOUNCE */
.slider-btn:active {
    transform: none;
    transition: none;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Ripple effect - removed for slider buttons to prevent bounce */
.slider-btn {
    position: relative;
    overflow: hidden;
}

.slider-btn::after {
    content: none;
}

/* ===========================
   LOADING STATES
   =========================== */

/* Image loading skeleton */
.image-wrapper {
    position: relative;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

.image-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        var(--bg-card) 0%, 
        var(--border-color) 50%, 
        var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image.loaded + .image-skeleton {
    display: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Auto-slide progress bar */
.auto-slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    width: 0;
    border-radius: 0 0 0 3px;
    z-index: 1;
}

.auto-slide-progress.animating {
    animation: slideProgress 7s linear;
}

@keyframes slideProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* ===========================
   EMPTY STATES
   =========================== */

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===========================
   CONSISTENT SPACING
   =========================== */

.skills-section,
.testimonials-section,
.projects-section {
    padding: var(--section-padding-desktop);
}

@media (max-width: 768px) {
    .skills-section,
    .testimonials-section,
    .projects-section {
        padding: var(--section-padding-mobile);
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

/* Focus visible for keyboard navigation */
.slider-btn:focus-visible,
.submit-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* GPU acceleration for smooth animations */
.slider-container,
.testimonials-slider-container {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Contain layout shifts */
.testimonial-card,
.project-card,
.skill-category-slide {
    contain: layout style paint;
}
