/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM STYLES - Sebastian Leon Portfolio
   ═══════════════════════════════════════════════════════════════════════════ */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #06b6d4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #0891b2);
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.dark .glass {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animation Delays */
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }

/* Active Navigation Link */
.nav-link.active {
    color: #3b82f6;
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}
.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Tooltip */
.tooltip {
    position: relative;
}
.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}
.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Form Validation States */
.input-error {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}
.input-success {
    border-color: #22c55e !important;
}
.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Image Placeholder/Loading */
.img-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
.dark .img-loading {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Back to Top Button */
#back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* WhatsApp Button - Mobile Optimization */
@media (max-width: 768px) {
    #whatsapp-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
}

/* Profile Photo Frame */
.profile-frame {
    position: relative;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}
.profile-frame img {
    border-radius: 50%;
    border: 4px solid white;
}
.dark .profile-frame img {
    border-color: #0f172a;
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    font-family: Georgia, serif;
    color: #3b82f6;
    opacity: 0.2;
    line-height: 1;
}

/* Metric Badge */
.metric-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
