/* ========================================
   Portfolio Muhammad Alif AL Faqih
   Custom CSS - Stone Gray Theme
   ======================================== */

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Performance optimization */
* {
    will-change: auto;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* === Stone Gray Mountain Theme Background === */
.gradient-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
}

/* === Glassmorphism Effect - Stone Gray Theme === */
.glass {
    background: rgba(248, 250, 252, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 116, 139, 0.2);
    box-shadow: 0 8px 32px 0 rgba(71, 85, 105, 0.15);
}

.glass-strong {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    /* Reduced from 30px for better performance */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 116, 139, 0.25);
}

/* === Enhanced Card Hover - Simplified === */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    will-change: transform;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(71, 85, 105, 0.2);
}

/* === Skill Bar Animation - Simplified === */
.skill-bar {
    transition: width 1s ease-out;
    position: relative;
}

/* === Fade In Animation === */
.animate-fade-in {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Floating Animation === */
.floating {
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(2deg);
    }

    50% {
        transform: translateY(-10px) rotate(-2deg);
    }

    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

/* === Pulse Animation === */
.pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* === Gradient Text - Stone Gray === */
.gradient-text {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Button Glow Effect === */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

.btn-glow:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(103, 126, 234, 0.6);
}

/* === Scroll Progress Bar - Stone Gray === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #475569, #64748b, #94a3b8);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* === Mobile Menu === */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* === Stagger Animation Delay === */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* === Custom Scrollbar - Stone Gray === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #64748b, #94a3b8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569, #64748b);
}

/* === Footer Styles - Stone Gray Theme === */
footer {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
}

/* === Back to Top Button === */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #475569, #64748b);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(71, 85, 105, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.6);
}


/* === Skeleton Loading for Image === */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.image-loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image-loaded {
    opacity: 1;
}

/* === Footer Content === */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.95;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.developer-credit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.developer-credit p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.developer-credit strong {
    font-weight: 700;
}